CMS 3D CMS Logo

CaliIOV.h
Go to the documentation of this file.
1 #ifndef CALIIOV_H
2 #define CALIIOV_H
3 
4 #include <stdexcept>
5 #include <iostream>
6 
10 
11 typedef int run_t;
12 
13 class CaliIOV : public IIOV {
14 public:
15  friend class EcalCondDBInterface;
16 
17  CaliIOV();
18  ~CaliIOV() override;
19 
20  // Methods for user data
21 
22  void setSince(const Tm& since);
23  Tm getSince() const;
24  void setTill(const Tm& till);
25  Tm getTill() const;
26  void setCaliTag(const CaliTag& tag);
27  CaliTag getCaliTag() const;
28 
29  // Methods from IUniqueDBObject
30  int getID() { return m_ID; };
31  int fetchID() noexcept(false) override;
32  void setByID(int id) noexcept(false) override;
33 
34  // Operators
35  inline bool operator==(const CaliIOV& m) const {
36  return (m_caliTag == m.m_caliTag && m_since == m.m_since && m_till == m.m_till);
37  }
38 
39  inline bool operator!=(const CaliIOV& m) const { return !(*this == m); }
40 
41 private:
42  // User data for this IOV
46 
47  int writeDB() noexcept(false);
48  void setByTm(CaliTag* tag, const Tm& time) noexcept(false);
49 };
50 
51 #endif
Definition: IIOV.h:11
int run_t
Definition: CaliIOV.h:11
bool operator!=(const CaliIOV &m) const
Definition: CaliIOV.h:39
int writeDB() noexcept(false)
Definition: CaliIOV.cc:127
Tm m_since
Definition: CaliIOV.h:43
void setSince(const Tm &since)
Definition: CaliIOV.cc:21
int getID()
Definition: CaliIOV.h:30
void setByID(int id) noexcept(false) override
Definition: CaliIOV.cc:94
CaliIOV()
Definition: CaliIOV.cc:12
Tm m_till
Definition: CaliIOV.h:44
Tm getTill() const
Definition: CaliIOV.cc:37
~CaliIOV() override
Definition: CaliIOV.cc:19
void setCaliTag(const CaliTag &tag)
Definition: CaliIOV.cc:39
void setByTm(CaliTag *tag, const Tm &time) noexcept(false)
Definition: CaliIOV.cc:174
int fetchID() noexcept(false) override
Definition: CaliIOV.cc:48
CaliTag m_caliTag
Definition: CaliIOV.h:45
Definition: Tm.h:13
Tm getSince() const
Definition: CaliIOV.cc:28
CaliTag getCaliTag() const
Definition: CaliIOV.cc:46
void setTill(const Tm &till)
Definition: CaliIOV.cc:30