CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MonRunTag.h
Go to the documentation of this file.
1 #ifndef MONRUNTAG_H
2 #define MONRUNTAG_H
3 
4 #include <string>
5 #include <stdexcept>
6 
9 
10 
14 class MonRunTag : public ITag {
15  public:
16  friend class MonRunIOV; // needs permission to write
17  friend class EcalCondDBInterface;
18 
19  MonRunTag();
20  ~MonRunTag();
21 
22  // Methods for user data
23  std::string getGeneralTag() const;
24  void setGeneralTag(std::string tag);
25 
28 
29  // Methods using ID
30  int fetchID() throw(std::runtime_error);
31  void setByID(int id) throw(std::runtime_error);
32 
33  // Operators
34  inline bool operator==(const MonRunTag &t) const
35  {
36  return (m_genTag == t.m_genTag &&
37  m_monVersionDef == t.m_monVersionDef);
38  }
39 
40  inline bool operator!=(const MonRunTag &t) const { return !(*this == t); }
41 
42  private:
43  // User data for this tag
44  std::string m_genTag;
46 
47  // Methods from ITag
48  int writeDB() throw(std::runtime_error);
49 
50  // Access methods
51  void fetchAllTags( std::vector<MonRunTag>* fillVec) throw(std::runtime_error);
52 
53  void fetchParentIDs(int* verID) throw(std::runtime_error);
54 
55 };
56 
57 #endif
int fetchID()
Definition: MonRunTag.cc:59
void fetchParentIDs(int *verID)
Definition: MonRunTag.cc:192
int writeDB()
Definition: MonRunTag.cc:128
Definition: ITag.h:11
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:33
~MonRunTag()
Definition: MonRunTag.cc:20
void setByID(int id)
Definition: MonRunTag.cc:100
void fetchAllTags(std::vector< MonRunTag > *fillVec)
Definition: MonRunTag.cc:169
MonVersionDef getMonVersionDef() const
Definition: MonRunTag.cc:43
void setMonVersionDef(MonVersionDef ver)
Definition: MonRunTag.cc:49
std::string getGeneralTag() const
Definition: MonRunTag.cc:26
MonRunTag()
Definition: MonRunTag.cc:9
bool operator!=(const MonRunTag &t) const
Definition: MonRunTag.h:40
string const
Definition: compareJSON.py:14
MonVersionDef m_monVersionDef
Definition: MonRunTag.h:45
std::string m_genTag
Definition: MonRunTag.h:44