File indexing completed on 2024-04-06 12:22:55
0001 #ifndef MONRUNTAG_H
0002 #define MONRUNTAG_H
0003
0004 #include <string>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/ITag.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonVersionDef.h"
0009
0010
0011
0012
0013 class MonRunTag : public ITag {
0014 public:
0015 friend class MonRunIOV;
0016 friend class EcalCondDBInterface;
0017
0018 MonRunTag();
0019 ~MonRunTag() override;
0020
0021
0022 std::string getGeneralTag() const;
0023 void setGeneralTag(std::string tag);
0024
0025 MonVersionDef getMonVersionDef() const;
0026 void setMonVersionDef(const MonVersionDef& ver);
0027
0028
0029 int fetchID() noexcept(false) override;
0030 void setByID(int id) noexcept(false) override;
0031
0032
0033 inline bool operator==(const MonRunTag& t) const {
0034 return (m_genTag == t.m_genTag && m_monVersionDef == t.m_monVersionDef);
0035 }
0036
0037 inline bool operator!=(const MonRunTag& t) const { return !(*this == t); }
0038
0039 private:
0040
0041 std::string m_genTag;
0042 MonVersionDef m_monVersionDef;
0043
0044
0045 int writeDB() noexcept(false);
0046
0047
0048 void fetchAllTags(std::vector<MonRunTag>* fillVec) noexcept(false);
0049
0050 void fetchParentIDs(int* verID) noexcept(false);
0051 };
0052
0053 #endif