CMS 3D CMS Logo

LMFSeqDat.h
Go to the documentation of this file.
1 #ifndef LMFSEQDAT_H
2 #define LMFSEQDAT_H
3 
4 /*
5  Last updated by Giovanni.Organtini@roma1.infn.it 2010
6  */
7 
8 #include <map>
9 
13 
14 class LMFSeqDat : public LMFUnique {
15 public:
16  friend class EcalCondDBInterface;
17 
18  LMFSeqDat();
19  LMFSeqDat(oracle::occi::Environment *env, oracle::occi::Connection *conn);
21  ~LMFSeqDat() override;
22 
23  // Methods for user data
24  LMFSeqDat &setRunIOV(const RunIOV &iov);
26  setInt("seq_num", n);
27  return *this;
28  }
30  setString("seq_start", start.str());
31  return *this;
32  }
34  setString("seq_stop", end.str());
35  return *this;
36  }
37  LMFSeqDat &setVersions(int vmin, int vmax) {
38  setVmin(vmin);
39  setVmax(vmax);
40  return *this;
41  }
42 
43  RunIOV getRunIOV() const;
44  int getSequenceNumber() const { return getInt("seq_num"); }
45  Tm getSequenceStart() const {
46  Tm t;
47  t.setToString(getString("seq_start"));
48  return t;
49  }
50  Tm getSequenceStop() const;
51  int getVmin() const { return getInt("vmin"); }
52  int getVmax() const { return getInt("vmax"); }
53 
54  bool isValid() const override;
55  // Operators
56  bool operator==(const LMFSeqDat &m) const {
57  return (getSequenceNumber() == m.getSequenceNumber() && getRunIOV() == m.getRunIOV() &&
58  getSequenceStart() == m.getSequenceStart() && getSequenceStop() == m.getSequenceStop() &&
59  getVmin() == m.getVmin() && getVmax() == m.getVmax());
60  }
61 
62  bool operator!=(const LMFSeqDat &m) const { return !(*this == m); }
63  std::map<int, LMFSeqDat> fetchByRunIOV(RunIOV &iov);
64  std::map<int, LMFSeqDat> fetchByRunIOV(RunIOV &iov, const LMFColor &col);
65  LMFSeqDat fetchByRunIOV(RunIOV &iov, int seq_num) { return fetchByRunIOV(iov)[seq_num]; }
66  std::map<int, LMFSeqDat> fetchByRunNumber(int runno);
67  LMFSeqDat fetchByRunNumber(int runno, int seq_num) { return fetchByRunNumber(runno)[seq_num]; }
68  LMFSeqDat fetchByRunNumber(int runno, const Tm &taken_at);
72 
73 private:
75 
76  void setVmin(int v) { setInt("vmin", v); }
77  void setVmax(int v) { setInt("vmax", v); }
79  std::string setByIDSql(Statement *stmt, int id) override;
81  void getParameters(ResultSet *rset) override;
82 
83  void fetchParentIDs() noexcept(false) override;
84  std::map<int, LMFSeqDat> fetchByRunIOV(const std::vector<std::string> &par,
85  std::string sql,
86  std::string method) noexcept(false);
87  std::map<int, LMFSeqDat> fetchByRunIOV(int par, std::string sql, std::string method) noexcept(false);
88  std::map<int, LMFSeqDat> fetchByRunIOV(std::string sql, std::string method) noexcept(false);
89 };
90 
91 #endif
LMFSeqDat::getVmin
int getVmin() const
Definition: LMFSeqDat.h:51
LMFSeqDat::operator!=
bool operator!=(const LMFSeqDat &m) const
Definition: LMFSeqDat.h:62
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
RunIOV
Definition: RunIOV.h:13
LMFSeqDat::fetchIdSql
std::string fetchIdSql(Statement *stmt) override
Definition: LMFSeqDat.cc:67
start
Definition: start.py:1
funct::false
false
Definition: Factorize.h:34
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
LMFSeqDat::setVmax
void setVmax(int v)
Definition: LMFSeqDat.h:77
RunIOV.h
LMFSeqDat::getRunIOV
RunIOV getRunIOV() const
Definition: LMFSeqDat.cc:57
cuy.col
col
Definition: cuy.py:1010
AlcaSiPixelAliHarvester0T_cff.method
method
Definition: AlcaSiPixelAliHarvester0T_cff.py:41
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
LMFSeqDat::fetchByRunIOV
LMFSeqDat fetchByRunIOV(RunIOV &iov, int seq_num)
Definition: LMFSeqDat.h:65
LMFColor
Definition: LMFColor.h:12
LMFUnique::setInt
LMFUnique & setInt(std::string key, int value)
Definition: LMFUnique.cc:31
findQualityFiles.v
v
Definition: findQualityFiles.py:179
LMFUnique::getInt
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:187
watchdog.const
const
Definition: watchdog.py:83
LMFSeqDat::setVersions
LMFSeqDat & setVersions(int vmin, int vmax)
Definition: LMFSeqDat.h:37
end
#define end
Definition: vmac.h:39
EcalDBConnection::stmt
oracle::occi::Statement * stmt
Definition: EcalDBConnection.h:73
LMFSeqDat::writeDBSql
std::string writeDBSql(Statement *stmt) override
Definition: LMFSeqDat.cc:141
LMFSeqDat::fetchParentIDs
void fetchParentIDs() noexcept(false) override
Definition: LMFSeqDat.cc:174
LMFSeqDat::m_runIOV
RunIOV m_runIOV
Definition: LMFSeqDat.h:74
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
LMFUnique.h
LMFSeqDat::fetchByRunIOV
std::map< int, LMFSeqDat > fetchByRunIOV(RunIOV &iov)
Definition: LMFSeqDat.cc:245
OrderedSet.t
t
Definition: OrderedSet.py:90
Tm
Definition: Tm.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
web.browse_db.env
env
Definition: browse_db.py:18
LMFSeqDat::setVmin
void setVmin(int v)
Definition: LMFSeqDat.h:76
LMFSeqDat::getSequenceStop
Tm getSequenceStop() const
Definition: LMFSeqDat.cc:51
LMFSeqDat::fetchByRunNumber
std::map< int, LMFSeqDat > fetchByRunNumber(int runno)
Definition: LMFSeqDat.cc:271
LMFSeqDat::fetchByRunNumber
LMFSeqDat fetchByRunNumber(int runno, int seq_num)
Definition: LMFSeqDat.h:67
LMFSeqDat::getSequenceNumber
int getSequenceNumber() const
Definition: LMFSeqDat.h:44
visualization-live-secondInstance_cfg.runno
runno
Definition: visualization-live-secondInstance_cfg.py:73
LMFUnique::getString
std::string getString(std::string fieldname) const
Definition: LMFUnique.cc:178
LMFSeqDat::LMFSeqDat
LMFSeqDat()
Definition: LMFSeqDat.cc:10
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
LMFSeqDat
Definition: LMFSeqDat.h:14
LMFSeqDat::setByIDSql
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFSeqDat.cc:102
LMFSeqDat::~LMFSeqDat
~LMFSeqDat() override
Definition: LMFSeqDat.cc:49
LMFColor.h
LMFSeqDat::setRunIOV
LMFSeqDat & setRunIOV(const RunIOV &iov)
Definition: LMFSeqDat.cc:59
LMFSeqDat::getSequenceStart
Tm getSequenceStart() const
Definition: LMFSeqDat.h:45
LMFSeqDat::getParameters
void getParameters(ResultSet *rset) override
Definition: LMFSeqDat.cc:111
std
Definition: JetResolutionObject.h:76
LMFSeqDat::operator==
bool operator==(const LMFSeqDat &m) const
Definition: LMFSeqDat.h:56
LMFUnique::Statement
oracle::occi::Statement Statement
Definition: LMFUnique.h:20
LMFSeqDat::setSequenceNumber
LMFSeqDat & setSequenceNumber(int n)
Definition: LMFSeqDat.h:25
LMFSeqDat::fetchLast
LMFSeqDat fetchLast()
Definition: LMFSeqDat.cc:230
LMFSeqDat::fetchLastRun
RunIOV fetchLastRun()
Definition: LMFSeqDat.cc:243
LMFSeqDat::setSequenceStart
LMFSeqDat & setSequenceStart(const Tm &start)
Definition: LMFSeqDat.h:29
LMFUnique::setString
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:14
LMFSeqDat::getVmax
int getVmax() const
Definition: LMFSeqDat.h:52
genParticles_cff.map
map
Definition: genParticles_cff.py:11
LMFUnique
Definition: LMFUnique.h:17
LMFSeqDat::isValid
bool isValid() const override
Definition: LMFSeqDat.cc:127
EcalDBConnection
Definition: EcalDBConnection.h:15
LMFSeqDat::setSequenceStop
LMFSeqDat & setSequenceStop(const Tm &end)
Definition: LMFSeqDat.h:33
LMFUnique::ResultSet
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:19