CMS 3D CMS Logo

LMFPrimVers.h
Go to the documentation of this file.
1 #ifndef LMFPRIMVERS_H
2 #define LMFPRIMVERS_H
3 
4 #include <string>
5 #include <stdexcept>
6 
7 /*
8  Last updated by Giovanni.Organtini@roma1.infn.it 2010
9 */
10 
13 
22 class LMFPrimVers : public LMFUnique {
23 public:
24  friend class LMFRunIOV; // needs permission to write
25 
26  LMFPrimVers();
28  LMFPrimVers(oracle::occi::Environment *env, oracle::occi::Connection *conn);
29  ~LMFPrimVers() override;
30 
31  // Methods for user data
32  int getVersion() const { return m_ID; }
33  std::string getDescription() const { return getString("description"); }
34  void setVersion(int v) { m_ID = v; }
35  void setDescription(const std::string &s) { setString("description", s); }
36 
37  // Operators
38  inline bool operator==(const LMFPrimVers &t) const { return (getID() == t.getID()); }
39  inline bool operator!=(const LMFPrimVers &t) const { return (getID() != t.getID()); }
40 
41 private:
42  // Methods from LMFUnique
43  std::string fetchIdSql(Statement *stmt) override;
44  std::string fetchAllSql(Statement *stmt) const override;
45  std::string setByIDSql(Statement *stmt, int id) override;
46  void getParameters(ResultSet *rset) override;
47  LMFUnique *createObject() const override;
48 };
49 
50 #endif
LMFPrimVers::setDescription
void setDescription(const std::string &s)
Definition: LMFPrimVers.h:35
IUniqueDBObject::m_ID
int m_ID
Definition: IUniqueDBObject.h:18
LMFPrimVers::setByIDSql
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFPrimVers.cc:25
LMFPrimVers::fetchIdSql
std::string fetchIdSql(Statement *stmt) override
Definition: LMFPrimVers.cc:23
LMFPrimVers::LMFPrimVers
LMFPrimVers()
Definition: LMFPrimVers.cc:6
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
findQualityFiles.v
v
Definition: findQualityFiles.py:179
LMFPrimVers::getDescription
std::string getDescription() const
Definition: LMFPrimVers.h:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
LMFPrimVers::setVersion
void setVersion(int v)
Definition: LMFPrimVers.h:34
LMFPrimVers
Definition: LMFPrimVers.h:22
LMFRunIOV
Definition: LMFRunIOV.h:18
LMFUnique.h
OrderedSet.t
t
Definition: OrderedSet.py:90
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
web.browse_db.env
env
Definition: browse_db.py:18
EcalDBConnection.h
LMFUnique::getString
std::string getString(std::string fieldname) const
Definition: LMFUnique.cc:178
LMFPrimVers::operator==
bool operator==(const LMFPrimVers &t) const
Definition: LMFPrimVers.h:38
LMFPrimVers::fetchAllSql
std::string fetchAllSql(Statement *stmt) const override
Definition: LMFPrimVers.cc:42
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
LMFUnique::getID
int getID() const
Definition: LMFUnique.h:54
LMFPrimVers::operator!=
bool operator!=(const LMFPrimVers &t) const
Definition: LMFPrimVers.h:39
LMFUnique::Statement
oracle::occi::Statement Statement
Definition: LMFUnique.h:20
LMFPrimVers::getVersion
int getVersion() const
Definition: LMFPrimVers.h:32
LMFUnique::setString
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:14
LMFPrimVers::getParameters
void getParameters(ResultSet *rset) override
Definition: LMFPrimVers.cc:34
LMFPrimVers::~LMFPrimVers
~LMFPrimVers() override
Definition: LMFPrimVers.cc:21
LMFUnique
Definition: LMFUnique.h:17
LMFPrimVers::createObject
LMFUnique * createObject() const override
Definition: LMFPrimVers.cc:36
EcalDBConnection
Definition: EcalDBConnection.h:15
LMFUnique::ResultSet
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:19