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() &&
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;
79  std::string writeDBSql(Statement *stmt) 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
std::string getSubRunType() const
Definition: LMFRunIOV.cc:170
type
Definition: HCALResponse.h:21
LMFColor getColor() const
Definition: LMFRunIOV.h:54
LMFRunIOV & setSubRunStart(const Tm &start)
Definition: LMFRunIOV.cc:136
void dump() const override
Definition: LMFRunIOV.cc:186
std::list< LMFRunIOV > fetchBySequence(const LMFSeqDat &s)
Definition: LMFRunIOV.cc:353
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
Tm getDBInsertionTime() const
Definition: LMFRunIOV.cc:159
bool operator!=(const LMFRunIOV &m) const
Definition: LMFRunIOV.h:75
Tm getSubRunStart() const
Definition: LMFRunIOV.cc:141
LMFColor getLMFColor() const
Definition: LMFRunIOV.cc:91
std::string fetchIdSql(Statement *stmt) override
Definition: LMFRunIOV.cc:194
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:19
std::string getColorShortName() const
Definition: LMFRunIOV.cc:97
bool operator==(const LMFRunIOV &m) const
Definition: LMFRunIOV.h:68
LMFRunIOV & setSubRunEnd(const Tm &end)
Definition: LMFRunIOV.cc:147
LMFRunIOV & setSequence(LMFSeqDat &seq)
Definition: LMFRunIOV.cc:172
void checkFabric()
Definition: LMFRunIOV.cc:73
LMFSeqDat getSequence() const
Definition: LMFRunIOV.cc:180
LMFRunIOV & setTriggerType(LMFTrigType &tt)
Definition: LMFRunIOV.cc:107
int getLmr() const
Definition: LMFRunIOV.cc:134
oracle::occi::Statement Statement
Definition: LMFUnique.h:20
LMFTrigType getTriggerType() const
Definition: LMFRunIOV.cc:123
void initialize()
Definition: LMFRunIOV.cc:10
#define end
Definition: vmac.h:39
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFRunIOV.cc:213
#define noexcept
LMFRunIOV & setColorIndex(int color_index)
Definition: LMFRunIOV.cc:79
Tm getSubRunEnd() const
Definition: LMFRunIOV.cc:152
LMFDefFabric * _fabric
Definition: LMFRunIOV.h:89
std::string getColorLongName() const
Definition: LMFRunIOV.cc:102
LMFRunIOV & setLmr(int n)
Definition: LMFRunIOV.cc:129
oracle::occi::Statement * stmt
bool isValid() override
Definition: LMFRunIOV.cc:281
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
LMFRunTag getLMFRunTag() const
Definition: LMFRunIOV.cc:57
std::string writeDBSql(Statement *stmt) override
Definition: LMFRunIOV.cc:302
Definition: Tm.h:13
void getParameters(ResultSet *rset) override
Definition: LMFRunIOV.cc:225