CMS 3D CMS Logo

CaliTag.h
Go to the documentation of this file.
1 #ifndef CALITAG_H
2 #define CALITAG_H
3 
4 #include <string>
5 #include <stdexcept>
6 
13 class CaliTag : public ITag {
14  public:
15  friend class CaliIOV; // needs permission to write
16  friend class EcalCondDBInterface;
17 
18  CaliTag();
19  ~CaliTag() override;
20 
21  // Methods for user data
22  std::string getGeneralTag() const;
24 
26  void setLocationDef(const LocationDef& locDef);
27 
28  std::string getMethod() const;
30 
31  std::string getVersion() const;
33 
34  std::string getDataType() const;
36 
37 
38  // Methods using ID
39  int fetchID() noexcept(false) override;
40  void setByID(int id) noexcept(false) override;
41 
42  // Operators
43  inline bool operator==(const CaliTag &t) const
44  {
45  return (m_genTag == t.m_genTag &&
46  m_locDef == t.m_locDef);
47  }
48 
49  inline bool operator!=(const CaliTag &t) const { return !(*this == t); }
50 
51  private:
52  // User data for this tag
58 
59  // Methods from ITag
60  int writeDB() noexcept(false);
61  void fetchParentIDs(int* locId) noexcept(false);
62 
63  // Public access methods
64  void fetchAllTags( std::vector<CaliTag>* fillVec) noexcept(false);
65 
66 };
67 
68 #endif
std::string m_version
Definition: CaliTag.h:56
void setMethod(std::string method)
Definition: CaliTag.cc:70
CaliTag()
Definition: CaliTag.cc:9
LocationDef getLocationDef() const
Definition: CaliTag.cc:46
bool operator!=(const CaliTag &t) const
Definition: CaliTag.h:49
void setLocationDef(const LocationDef &locDef)
Definition: CaliTag.cc:53
std::string getGeneralTag() const
Definition: CaliTag.cc:29
void setByID(int id) noexcept(false) override
Definition: CaliTag.cc:160
Definition: ITag.h:11
std::string getVersion() const
Definition: CaliTag.cc:80
int writeDB() noexcept(false)
Definition: CaliTag.cc:194
std::string m_method
Definition: CaliTag.h:55
void fetchParentIDs(int *locId) noexcept(false)
Definition: CaliTag.cc:261
int fetchID() noexcept(false) override
Definition: CaliTag.cc:114
void setVersion(std::string version)
Definition: CaliTag.cc:87
void fetchAllTags(std::vector< CaliTag > *fillVec) noexcept(false)
Definition: CaliTag.cc:238
std::string getDataType() const
Definition: CaliTag.cc:97
#define noexcept
void setDataType(std::string dataType)
Definition: CaliTag.cc:104
LocationDef m_locDef
Definition: CaliTag.h:54
std::string m_dataType
Definition: CaliTag.h:57
std::string m_genTag
Definition: CaliTag.h:53
std::string getMethod() const
Definition: CaliTag.cc:63
void setGeneralTag(std::string tag)
Definition: CaliTag.cc:36
~CaliTag() override
Definition: CaliTag.cc:23