CMS 3D CMS Logo

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