CMS 3D CMS Logo

LMFRunIOV.h
Go to the documentation of this file.
1 #ifndef LMFRUNIOV_H
2 #define LMFRUNIOV_H
3 
11 
12 #include <string>
13 
14 /*
15  Last updated by Giovanni.Organtini@roma1.infn.it 2010
16 */
17 
18 class LMFRunIOV : public LMFUnique {
19 public:
20  friend class EcalCondDBInterface;
21 
22  LMFRunIOV();
23  LMFRunIOV(oracle::occi::Environment *env, oracle::occi::Connection *conn);
25  LMFRunIOV(const LMFRunIOV &r);
26  ~LMFRunIOV() override;
27 
28  // Methods for user data
30  LMFRunIOV &setLMFRunTag(int tag_id);
34  LMFRunIOV &setTriggerType(int trigType_id);
35  LMFRunIOV &setTriggerType(std::string trigShortName);
36  LMFRunIOV &setLmr(int n);
37  LMFRunIOV &setColor(const LMFColor &c);
39  LMFRunIOV &setColor(int color_id);
40  LMFRunIOV &setColorIndex(int color_index);
42  LMFRunIOV &setSubRunEnd(const Tm &end);
44 
45  LMFRunTag getLMFRunTag() const;
46  LMFSeqDat getSequence() const;
48 
49  int getLmr() const;
50  std::string getSubRunType() const;
53  LMFColor getLMFColor() const;
54  LMFColor getColor() const { return getLMFColor(); }
55  Tm getSubRunStart() const;
56  Tm getSubRunEnd() const;
57  Tm getDBInsertionTime() const;
58  bool isValid() override;
59 
60  void dump() const override;
61  virtual LMFRunIOV &operator=(const LMFRunIOV &r);
62  std::list<LMFRunIOV> fetchBySequence(const LMFSeqDat &s);
63  std::list<LMFRunIOV> fetchBySequence(const LMFSeqDat &s, int lmr);
64  std::list<LMFRunIOV> fetchBySequence(const LMFSeqDat &s, int lmr, int type, int color);
65  std::list<LMFRunIOV> fetchLastBeforeSequence(const LMFSeqDat &s, int lmr, int type, int color);
66 
67  // Operators
68  bool operator==(const LMFRunIOV &m) const {
69  return (getLMFRunTag() == m.getLMFRunTag() && getSequence() == m.getSequence() && getLmr() == m.getLmr() &&
70  getLMFColor() == m.getLMFColor() && getTriggerType() == m.getTriggerType() &&
71  getSubRunType() == m.getSubRunType() && getSubRunStart() == m.getSubRunStart() &&
72  getSubRunEnd() == m.getSubRunEnd());
73  }
74 
75  bool operator!=(const LMFRunIOV &m) const { return !(*this == m); }
76 
78  std::string setByIDSql(Statement *stmt, int id) override;
80  void getParameters(ResultSet *rset) override;
81 
82 private:
83  void checkFabric();
84  void initialize();
85  std::list<LMFRunIOV> fetchBySequence(const std::vector<int> &par,
86  const std::string &sql,
87  const std::string &method) noexcept(false);
88 
90 };
91 
92 #endif
~LMFRunIOV() override
Definition: LMFRunIOV.cc:41
Definition: start.py:1
Tm getSubRunStart() const
Definition: LMFRunIOV.cc:141
LMFRunIOV & setSubRunStart(const Tm &start)
Definition: LMFRunIOV.cc:136
bool operator!=(const LMFRunIOV &m) const
Definition: LMFRunIOV.h:75
std::list< LMFRunIOV > fetchBySequence(const LMFSeqDat &s)
Definition: LMFRunIOV.cc:353
LMFSeqDat getSequence() const
Definition: LMFRunIOV.cc:180
LMFRunIOV & setLMFRunTag(const LMFRunTag &tag)
Definition: LMFRunIOV.cc:47
virtual LMFRunIOV & operator=(const LMFRunIOV &r)
Definition: LMFRunIOV.cc:408
LMFRunIOV & setSubRunType(const std::string &x)
Definition: LMFRunIOV.cc:165
LMFRunTag getLMFRunTag() const
Definition: LMFRunIOV.cc:57
std::string fetchIdSql(Statement *stmt) override
Definition: LMFRunIOV.cc:194
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:23
Tm getSubRunEnd() const
Definition: LMFRunIOV.cc:152
int getLmr() const
Definition: LMFRunIOV.cc:134
std::string getColorShortName() const
Definition: LMFRunIOV.cc:97
LMFRunIOV & setSubRunEnd(const Tm &end)
Definition: LMFRunIOV.cc:147
LMFRunIOV & setSequence(LMFSeqDat &seq)
Definition: LMFRunIOV.cc:172
bool operator==(const LMFRunIOV &m) const
Definition: LMFRunIOV.h:68
void dump() const override
Definition: LMFRunIOV.cc:186
void checkFabric()
Definition: LMFRunIOV.cc:73
LMFRunIOV & setTriggerType(LMFTrigType &tt)
Definition: LMFRunIOV.cc:107
oracle::occi::Statement Statement
Definition: LMFUnique.h:24
Tm getDBInsertionTime() const
Definition: LMFRunIOV.cc:159
void initialize()
Definition: LMFRunIOV.cc:10
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFRunIOV.cc:213
std::string getSubRunType() const
Definition: LMFRunIOV.cc:170
LMFRunIOV & setColorIndex(int color_index)
Definition: LMFRunIOV.cc:79
LMFDefFabric * _fabric
Definition: LMFRunIOV.h:89
LMFRunIOV & setLmr(int n)
Definition: LMFRunIOV.cc:129
LMFColor getColor() const
Definition: LMFRunIOV.h:54
conn
Definition: getInfo.py:9
oracle::occi::Statement * stmt
bool isValid() override
Definition: LMFRunIOV.cc:281
LMFTrigType getTriggerType() const
Definition: LMFRunIOV.cc:123
std::list< LMFRunIOV > fetchLastBeforeSequence(const LMFSeqDat &s, int lmr, int type, int color)
Definition: LMFRunIOV.cc:391
LMFRunIOV & setColor(const LMFColor &c)
Definition: LMFRunIOV.cc:63
std::string writeDBSql(Statement *stmt) override
Definition: LMFRunIOV.cc:302
Definition: Tm.h:13
std::string getColorLongName() const
Definition: LMFRunIOV.cc:102
LMFColor getLMFColor() const
Definition: LMFRunIOV.cc:91
void getParameters(ResultSet *rset) override
Definition: LMFRunIOV.cc:225