CMS 3D CMS Logo

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() override;
20 
21  // Methods for user data
22  std::string getGeneralTag() const;
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() noexcept(false) override;
33  void setByID(int id) noexcept(false) override;
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
50 
51  // Methods from ITag
52  int writeDB() noexcept(false);
53  void fetchParentIDs(int* locId, int* runTypeID) noexcept(false);
54 
55  // Public access methods
56  void fetchAllTags( std::vector<RunTag>* fillVec) noexcept(false);
57 
58 };
59 
60 #endif
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:70
void fetchAllTags(std::vector< RunTag > *fillVec) noexcept(false)
Definition: RunTag.cc:204
int writeDB() noexcept(false)
Definition: RunTag.cc:162
void fetchParentIDs(int *locId, int *runTypeID) noexcept(false)
Definition: RunTag.cc:227
void setByID(int id) noexcept(false) override
Definition: RunTag.cc:127
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
LocationDef m_locDef
Definition: RunTag.h:48
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
~RunTag() override
Definition: RunTag.cc:21
#define noexcept
RunTypeDef getRunTypeDef() const
Definition: RunTag.cc:63
int fetchID() noexcept(false) override
Definition: RunTag.cc:80
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