CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Friends
LMFPrimVers Class Reference

#include <LMFPrimVers.h>

Inheritance diagram for LMFPrimVers:
LMFUnique IUniqueDBObject IDBObject LMFCorrVers LMFSeqVers

Public Member Functions

std::string getDescription () const
 
int getVersion () const
 
 LMFPrimVers ()
 
 LMFPrimVers (EcalDBConnection *c)
 
 LMFPrimVers (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
bool operator!= (const LMFPrimVers &t) const
 
bool operator== (const LMFPrimVers &t) const
 
void setDescription (const std::string &s)
 
void setVersion (int v)
 
 ~LMFPrimVers () override
 
- Public Member Functions inherited from LMFUnique
void attach (std::string name, LMFUnique *u)
 
void debug ()
 
virtual void dump () const
 
virtual void dump (int n) const
 
virtual bool exists ()
 
virtual std::list< std::unique_ptr< LMFUnique > > fetchAll () const noexcept(false)
 
int fetchID () noexcept(false) override
 
std::string getClassName ()
 
std::string getClassName () const
 
int getID () const
 
int getInt (std::string fieldname) const
 
std::string getString (std::string fieldname) const
 
virtual bool isValid ()
 
virtual bool isValid () const
 
 LMFUnique ()
 
 LMFUnique (EcalDBConnection *c)
 
 LMFUnique (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
void nodebug ()
 
virtual bool operator< (const LMFUnique &r)
 
virtual bool operator<= (const LMFUnique &r)
 
std::string sequencePostfix (const Tm &t)
 
void setByID (int id) noexcept(false) override
 
LMFUniquesetInt (std::string key, int value)
 
LMFUniquesetString (std::string key, std::string value)
 
void startProfiling ()
 
void stopProfiling ()
 
 ~LMFUnique () override
 
- Public Member Functions inherited from IDBObject
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void setConnection (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
virtual ~IDBObject ()
 

Private Member Functions

LMFUniquecreateObject () const override
 
std::string fetchAllSql (Statement *stmt) const override
 
std::string fetchIdSql (Statement *stmt) override
 
void getParameters (ResultSet *rset) override
 
std::string setByIDSql (Statement *stmt, int id) override
 

Friends

class LMFRunIOV
 

Additional Inherited Members

- Public Types inherited from LMFUnique
typedef oracle::occi::ResultSet ResultSet
 
typedef oracle::occi::Statement Statement
 
- Static Public Attributes inherited from IDBObject
static const int ECALDB_NROWS = 1024
 
- Protected Member Functions inherited from LMFUnique
virtual void setClassName (std::string s)
 
virtual int writeDB () noexcept(false)
 
virtual int writeForeignKeys () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 
- Protected Attributes inherited from LMFUnique
bool _profiling
 
std::string m_className
 
char m_debug
 
std::map< std::string, LMFUnique * > m_foreignKeys
 
std::map< std::string, int > m_intFields
 
std::map< std::string, std::string > m_stringFields
 
- Protected Attributes inherited from IUniqueDBObject
int m_ID
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

LMF version

Versions cannot be written into the database using these classes, but only via the administration shell. To insert a new version: INSERT INTO <TABLE_NAME> VALUES (<VERS>, DEFAULT, <DESCR>);

Definition at line 22 of file LMFPrimVers.h.

Constructor & Destructor Documentation

◆ LMFPrimVers() [1/3]

LMFPrimVers::LMFPrimVers ( )

Definition at line 6 of file LMFPrimVers.cc.

6  {
7  setClassName("LMFPrimVers");
8  setString("description", "");
9 }

Referenced by createObject().

◆ LMFPrimVers() [2/3]

LMFPrimVers::LMFPrimVers ( EcalDBConnection c)

Definition at line 11 of file LMFPrimVers.cc.

11  : LMFUnique(c) {
12  setClassName("LMFPrimVers");
13  setString("description", "");
14 }

References LMFUnique::setClassName(), and LMFUnique::setString().

◆ LMFPrimVers() [3/3]

LMFPrimVers::LMFPrimVers ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

Definition at line 16 of file LMFPrimVers.cc.

16  : LMFUnique(env, conn) {
17  setClassName("LMFPrimVers");
18  setString("description", "");
19 }

References LMFUnique::setClassName(), and LMFUnique::setString().

◆ ~LMFPrimVers()

LMFPrimVers::~LMFPrimVers ( )
override

Definition at line 21 of file LMFPrimVers.cc.

21 {}

Member Function Documentation

◆ createObject()

LMFUnique * LMFPrimVers::createObject ( ) const
overrideprivatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 36 of file LMFPrimVers.cc.

36  {
37  LMFPrimVers *t = new LMFPrimVers;
38  t->setConnection(m_env, m_conn);
39  return t;
40 }

References LMFPrimVers(), IDBObject::m_conn, IDBObject::m_env, and submitPVValidationJobs::t.

◆ fetchAllSql()

std::string LMFPrimVers::fetchAllSql ( Statement stmt) const
overrideprivatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 42 of file LMFPrimVers.cc.

42  {
43  std::string sql = "SELECT VERS FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS";
44  stmt->setSQL(sql);
45  return sql;
46 }

References AlCaHLTBitMon_QueryRunRegistry::string.

◆ fetchIdSql()

std::string LMFPrimVers::fetchIdSql ( Statement stmt)
overrideprivatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 23 of file LMFPrimVers.cc.

23 { return ""; }

◆ getDescription()

std::string LMFPrimVers::getDescription ( ) const
inline

Definition at line 33 of file LMFPrimVers.h.

33 { return getString("description"); }

References LMFUnique::getString().

Referenced by LMFSeqVers::operator!=(), and LMFSeqVers::operator==().

◆ getParameters()

void LMFPrimVers::getParameters ( ResultSet rset)
overrideprivatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 34 of file LMFPrimVers.cc.

34 { setString("description", rset->getString(1)); }

References LMFUnique::setString().

◆ getVersion()

int LMFPrimVers::getVersion ( ) const
inline

Definition at line 32 of file LMFPrimVers.h.

32 { return m_ID; }

References IUniqueDBObject::m_ID.

◆ operator!=()

bool LMFPrimVers::operator!= ( const LMFPrimVers t) const
inline

Definition at line 39 of file LMFPrimVers.h.

39 { return (getID() != t.getID()); }

References LMFUnique::getID(), and submitPVValidationJobs::t.

◆ operator==()

bool LMFPrimVers::operator== ( const LMFPrimVers t) const
inline

Definition at line 38 of file LMFPrimVers.h.

38 { return (getID() == t.getID()); }

References LMFUnique::getID(), and submitPVValidationJobs::t.

◆ setByIDSql()

std::string LMFPrimVers::setByIDSql ( Statement stmt,
int  id 
)
overrideprivatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 25 of file LMFPrimVers.cc.

25  {
26  std::string sql =
27  "SELECT DESCR FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS "
28  "WHERE VERS = :1";
29  stmt->setSQL(sql);
30  stmt->setInt(1, id);
31  return sql;
32 }

References AlCaHLTBitMon_QueryRunRegistry::string.

◆ setDescription()

void LMFPrimVers::setDescription ( const std::string &  s)
inline

Definition at line 35 of file LMFPrimVers.h.

35 { setString("description", s); }

References alignCSCRings::s, and LMFUnique::setString().

◆ setVersion()

void LMFPrimVers::setVersion ( int  v)
inline

Definition at line 34 of file LMFPrimVers.h.

34 { m_ID = v; }

References IUniqueDBObject::m_ID, and findQualityFiles::v.

Friends And Related Function Documentation

◆ LMFRunIOV

friend class LMFRunIOV
friend

Definition at line 24 of file LMFPrimVers.h.

LMFUnique::setClassName
virtual void setClassName(std::string s)
Definition: LMFUnique.h:97
IUniqueDBObject::m_ID
int m_ID
Definition: IUniqueDBObject.h:18
LMFPrimVers::LMFPrimVers
LMFPrimVers()
Definition: LMFPrimVers.cc:6
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
findQualityFiles.v
v
Definition: findQualityFiles.py:179
alignCSCRings.s
s
Definition: alignCSCRings.py:92
IDBObject::m_conn
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
LMFPrimVers
Definition: LMFPrimVers.h:22
web.browse_db.env
env
Definition: browse_db.py:18
LMFUnique::getString
std::string getString(std::string fieldname) const
Definition: LMFUnique.cc:178
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LMFUnique::LMFUnique
LMFUnique()
Definition: LMFUnique.h:27
LMFUnique::getID
int getID() const
Definition: LMFUnique.h:58
LMFUnique::setString
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:14
IDBObject::m_env
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644