CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunTag.h
Go to the documentation of this file.
1 #ifndef RUNTAG_H
2 #define RUNTAG_H
3 
4 #include <string>
5 #include <stdexcept>
6 
13 class RunTag : public ITag {
14  public:
15  friend class RunIOV; // needs permission to write
16  friend class EcalCondDBInterface;
17 
18  RunTag();
19  ~RunTag();
20 
21  // Methods for user data
22  std::string getGeneralTag() const;
23  void setGeneralTag(std::string tag);
24 
26  void setLocationDef(const LocationDef locDef);
27 
28  RunTypeDef getRunTypeDef() const;
29  void setRunTypeDef(const RunTypeDef runTypeDef);
30 
31  // Methods using ID
32  int fetchID() throw(std::runtime_error);
33  void setByID(int id) throw(std::runtime_error);
34 
35  // operators
36  inline bool operator==(const RunTag& t) const
37  {
38  return (m_genTag == t.m_genTag &&
39  m_locDef == t.m_locDef &&
40  m_runTypeDef == t.m_runTypeDef);
41  }
42 
43  inline bool operator!=(const RunTag& t) const { return !(*this == t); }
44 
45  private:
46  // User data for this tag
47  std::string m_genTag;
50 
51  // Methods from ITag
52  int writeDB() throw(std::runtime_error);
53  void fetchParentIDs(int* locId, int* runTypeID) throw(std::runtime_error);
54 
55  // Public access methods
56  void fetchAllTags( std::vector<RunTag>* fillVec) throw(std::runtime_error);
57 
58 };
59 
60 #endif
void setLocationDef(const LocationDef locDef)
Definition: RunTag.cc:53
LocationDef getLocationDef() const
Definition: RunTag.cc:46
RunTag()
Definition: RunTag.cc:9
Definition: RunTag.h:13
std::string getGeneralTag() const
Definition: RunTag.cc:27
RunTypeDef m_runTypeDef
Definition: RunTag.h:49
Definition: ITag.h:11
int writeDB()
Definition: RunTag.cc:162
~RunTag()
Definition: RunTag.cc:21
void fetchAllTags(std::vector< RunTag > *fillVec)
Definition: RunTag.cc:204
void setRunTypeDef(const RunTypeDef runTypeDef)
Definition: RunTag.cc:70
void fetchParentIDs(int *locId, int *runTypeID)
Definition: RunTag.cc:227
int fetchID()
Definition: RunTag.cc:80
void setByID(int id)
Definition: RunTag.cc:127
LocationDef m_locDef
Definition: RunTag.h:48
RunTypeDef getRunTypeDef() const
Definition: RunTag.cc:63
string const
Definition: compareJSON.py:14
bool operator!=(const RunTag &t) const
Definition: RunTag.h:43
std::string m_genTag
Definition: RunTag.h:47
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
Definition: RunIOV.h:13