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 
23  void setSince(const Tm& since);
24  Tm getSince() const;
25  void setTill(const Tm& till);
26  Tm getTill() const;
27  void setCaliTag(const CaliTag& tag);
28  CaliTag getCaliTag() const;
29 
30  // Methods from IUniqueDBObject
31  int getID(){ return m_ID;} ;
32  int fetchID() noexcept(false) override;
33  void setByID(int id) noexcept(false) override;
34 
35  // Operators
36  inline bool operator==(const CaliIOV &m) const
37  {
38  return ( m_caliTag == m.m_caliTag &&
39  m_since == m.m_since &&
40  m_till == m.m_till );
41  }
42 
43  inline bool operator!=(const CaliIOV &m) const { return !(*this == m); }
44 
45 
46  private:
47  // User data for this IOV
51 
52  int writeDB() noexcept(false);
53  void setByTm(CaliTag* tag, const Tm& time) noexcept(false);
54 };
55 
56 #endif
Definition: IIOV.h:11
int run_t
Definition: CaliIOV.h:11
Tm getSince() const
Definition: CaliIOV.cc:38
bool operator==(const CaliIOV &m) const
Definition: CaliIOV.h:36
int writeDB() noexcept(false)
Definition: CaliIOV.cc:165
Tm m_since
Definition: CaliIOV.h:48
void setSince(const Tm &since)
Definition: CaliIOV.cc:28
int getID()
Definition: CaliIOV.h:31
void setByID(int id) noexcept(false) override
Definition: CaliIOV.cc:128
CaliIOV()
Definition: CaliIOV.cc:12
CaliTag getCaliTag() const
Definition: CaliIOV.cc:72
Tm m_till
Definition: CaliIOV.h:49
~CaliIOV() override
Definition: CaliIOV.cc:22
#define noexcept
void setCaliTag(const CaliTag &tag)
Definition: CaliIOV.cc:62
void setByTm(CaliTag *tag, const Tm &time) noexcept(false)
Definition: CaliIOV.cc:215
Tm getTill() const
Definition: CaliIOV.cc:55
int fetchID() noexcept(false) override
Definition: CaliIOV.cc:79
CaliTag m_caliTag
Definition: CaliIOV.h:50
Definition: Tm.h:13
void setTill(const Tm &till)
Definition: CaliIOV.cc:45
bool operator!=(const CaliIOV &m) const
Definition: CaliIOV.h:43