CMS 3D CMS Logo

LMFLmrSubIOV.h
Go to the documentation of this file.
1 #ifndef LMFLMRSUBIOV_H
2 #define LMFLMRSUBIOV_H
3 
4 /*
5  Last updated by Giovanni.Organtini@roma1.infn.it 2010
6  */
7 
8 #include <map>
9 
12 
13 class LMFLmrSubIOV : public LMFUnique {
14 public:
15  friend class EcalCondDBInterface;
16 
17  LMFLmrSubIOV();
19  LMFLmrSubIOV(oracle::occi::Environment *env, oracle::occi::Connection *conn);
20  ~LMFLmrSubIOV() override;
21 
22  LMFLmrSubIOV &setLMFIOV(const LMFIOV &iov);
23  LMFLmrSubIOV &setLMFIOV(int i);
24  LMFLmrSubIOV &setTimes(const Tm &t1, const Tm &t2, const Tm &t3);
25  LMFLmrSubIOV &setTimes(const std::vector<Tm> &t);
26  LMFLmrSubIOV &setTimes(Tm *t); // array of three components
27 
28  int getLMFIOVID() const { return m_lmfIOV; };
29  LMFIOV getLMFIOV() const {
30  LMFIOV iov(m_env, m_conn);
31  iov.setByID(m_lmfIOV);
32  return iov;
33  };
34  inline void getTimes(Tm *t1, Tm *t2, Tm *t3) const {
35  *t1 = m_t[0];
36  *t2 = m_t[1];
37  *t3 = m_t[2];
38  }
39  std::vector<Tm> getTimes() const {
40  std::vector<Tm> v;
41  v.push_back(m_t[0]);
42  v.push_back(m_t[1]);
43  v.push_back(m_t[2]);
44  return v;
45  }
46  inline void getTimes(Tm *t) const {
47  t[0] = m_t[0];
48  t[1] = m_t[1];
49  t[2] = m_t[2];
50  }
51  inline Tm getTime(int i) {
52  Tm t;
53  if ((i > 0) && (i < 4)) {
54  t = m_t[i - 1];
55  }
56  return t;
57  }
58  inline Tm getT1() { return m_t[0]; }
59  inline Tm getT2() { return m_t[1]; }
60  inline Tm getT3() { return m_t[2]; }
61 
62  std::list<int> getIOVIDsLaterThan(const Tm &t) noexcept(false);
63  std::list<int> getIOVIDsLaterThan(const Tm &tmin, const Tm &tmax) noexcept(false);
64  std::list<int> getIOVIDsLaterThan(const Tm &t, int howMany) noexcept(false);
65  std::list<int> getIOVIDsLaterThan(const Tm &t, const Tm &tmax, int howMany) noexcept(false);
66 
67  // Operators
68  inline bool operator==(const LMFLmrSubIOV &m) const {
69  return ((m_lmfIOV == m.m_lmfIOV) && (m_t[0] == m.m_t[0]) && (m_t[1] == m.m_t[1]) && (m_t[2] == m.m_t[2]));
70  }
71 
72  inline bool operator!=(const LMFLmrSubIOV &m) const { return !(*this == m); }
73 
74  std::list<LMFLmrSubIOV> fetchByLMFIOV(const LMFIOV &iov);
75 
76 private:
77  int m_lmfIOV;
78  Tm m_t[3];
79 
81  std::string setByIDSql(Statement *stmt, int id) override;
83  void getParameters(ResultSet *rset) override;
84  void init();
85 };
86 
87 #endif
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
mps_fire.i
i
Definition: mps_fire.py:428
LMFUnique::setByID
void setByID(int id) noexcept(false) override
Definition: LMFUnique.cc:267
LMFLmrSubIOV::LMFLmrSubIOV
LMFLmrSubIOV()
Definition: LMFLmrSubIOV.cc:15
LMFLmrSubIOV::fetchIdSql
std::string fetchIdSql(Statement *stmt) override
Definition: LMFLmrSubIOV.cc:47
muonTiming_cfi.tmin
tmin
Definition: muonTiming_cfi.py:24
LMFLmrSubIOV::getLMFIOV
LMFIOV getLMFIOV() const
Definition: LMFLmrSubIOV.h:29
LMFLmrSubIOV::operator==
bool operator==(const LMFLmrSubIOV &m) const
Definition: LMFLmrSubIOV.h:68
LMFLmrSubIOV::setByIDSql
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFLmrSubIOV.cc:73
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
findQualityFiles.v
v
Definition: findQualityFiles.py:179
tmax
static const double tmax[3]
Definition: CastorTimeSlew.cc:7
EcalDBConnection::stmt
oracle::occi::Statement * stmt
Definition: EcalDBConnection.h:73
LMFLmrSubIOV::getTime
Tm getTime(int i)
Definition: LMFLmrSubIOV.h:51
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
IDBObject::m_conn
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
LMFIOV
Definition: LMFIOV.h:17
LMFLmrSubIOV
Definition: LMFLmrSubIOV.h:13
LMFLmrSubIOV::m_t
Tm m_t[3]
Definition: LMFLmrSubIOV.h:78
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
LMFUnique.h
RandomServiceHelper.t3
t3
Definition: RandomServiceHelper.py:258
Tm
Definition: Tm.h:13
LMFLmrSubIOV::getTimes
void getTimes(Tm *t) const
Definition: LMFLmrSubIOV.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
web.browse_db.env
env
Definition: browse_db.py:18
LMFLmrSubIOV::getT1
Tm getT1()
Definition: LMFLmrSubIOV.h:58
LMFLmrSubIOV::setTimes
LMFLmrSubIOV & setTimes(const Tm &t1, const Tm &t2, const Tm &t3)
Definition: LMFLmrSubIOV.cc:40
LMFLmrSubIOV::getT3
Tm getT3()
Definition: LMFLmrSubIOV.h:60
LMFLmrSubIOV::getLMFIOVID
int getLMFIOVID() const
Definition: LMFLmrSubIOV.h:28
LMFLmrSubIOV::m_lmfIOV
int m_lmfIOV
Definition: LMFLmrSubIOV.h:77
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
LMFLmrSubIOV::writeDBSql
std::string writeDBSql(Statement *stmt) override
Definition: LMFLmrSubIOV.cc:83
LMFLmrSubIOV::getTimes
std::vector< Tm > getTimes() const
Definition: LMFLmrSubIOV.h:39
LMFLmrSubIOV::operator!=
bool operator!=(const LMFLmrSubIOV &m) const
Definition: LMFLmrSubIOV.h:72
LMFLmrSubIOV::getIOVIDsLaterThan
std::list< int > getIOVIDsLaterThan(const Tm &t) noexcept(false)
Definition: LMFLmrSubIOV.cc:145
LMFLmrSubIOV::getParameters
void getParameters(ResultSet *rset) override
Definition: LMFLmrSubIOV.cc:110
LMFLmrSubIOV::setLMFIOV
LMFLmrSubIOV & setLMFIOV(const LMFIOV &iov)
Definition: LMFLmrSubIOV.cc:25
LMFUnique::Statement
oracle::occi::Statement Statement
Definition: LMFUnique.h:24
LMFLmrSubIOV::fetchByLMFIOV
std::list< LMFLmrSubIOV > fetchByLMFIOV(const LMFIOV &iov)
LMFLmrSubIOV::~LMFLmrSubIOV
~LMFLmrSubIOV() override
Definition: LMFLmrSubIOV.cc:23
LMFLmrSubIOV::init
void init()
Definition: LMFLmrSubIOV.cc:6
IDBObject::m_env
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
LMFLmrSubIOV::getTimes
void getTimes(Tm *t1, Tm *t2, Tm *t3) const
Definition: LMFLmrSubIOV.h:34
LMFUnique
Definition: LMFUnique.h:21
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
LMFIOV.h
EcalDBConnection
Definition: EcalDBConnection.h:15
LMFUnique::ResultSet
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:23
LMFLmrSubIOV::getT2
Tm getT2()
Definition: LMFLmrSubIOV.h:59