CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- 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 boost::ptr_list
< LMFUnique
fetchAll () const throw (std::runtime_error)
 
int fetchID () throw (std::runtime_error)
 
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 () const
 
virtual bool isValid ()
 
 LMFUnique ()
 
 LMFUnique (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
 LMFUnique (EcalDBConnection *c)
 
void nodebug ()
 
virtual bool operator< (const LMFUnique &r)
 
virtual bool operator<= (const LMFUnique &r)
 
std::string sequencePostfix (const Tm &t)
 
void setByID (int id) throw (std::runtime_error)
 
LMFUniquesetInt (std::string key, int value)
 
LMFUniquesetString (std::string key, std::string value)
 
void startProfiling ()
 
void stopProfiling ()
 
virtual ~LMFUnique ()
 
- 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
 
std::string fetchAllSql (Statement *stmt) const
 
std::string fetchIdSql (Statement *stmt)
 
void getParameters (ResultSet *rset)
 
std::string setByIDSql (Statement *stmt, int id)
 

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 int const ECALDB_NROWS =1024
 
- Protected Member Functions inherited from LMFUnique
virtual void setClassName (std::string s)
 
virtual int writeDB () throw (std::runtime_error)
 
virtual int writeForeignKeys () throw (std::runtime_error)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const throw (std::runtime_error)
 
- 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::LMFPrimVers ( )

Definition at line 6 of file LMFPrimVers.cc.

Referenced by createObject().

7 {
8  setClassName("LMFPrimVers");
9  setString("description", "");
10 }
virtual void setClassName(std::string s)
Definition: LMFUnique.h:97
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
LMFPrimVers::LMFPrimVers ( EcalDBConnection c)

Definition at line 12 of file LMFPrimVers.cc.

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

12  : LMFUnique(c) {
13  setClassName("LMFPrimVers");
14  setString("description", "");
15 }
virtual void setClassName(std::string s)
Definition: LMFUnique.h:97
LMFUnique()
Definition: LMFUnique.h:23
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
LMFPrimVers::LMFPrimVers ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

Definition at line 17 of file LMFPrimVers.cc.

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

18  : LMFUnique(env, conn) {
19  setClassName("LMFPrimVers");
20  setString("description", "");
21 }
virtual void setClassName(std::string s)
Definition: LMFUnique.h:97
LMFUnique()
Definition: LMFUnique.h:23
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
tuple conn
Definition: results_mgr.py:53
LMFPrimVers::~LMFPrimVers ( )

Definition at line 23 of file LMFPrimVers.cc.

24 {
25 }

Member Function Documentation

LMFUnique * LMFPrimVers::createObject ( ) const
privatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 44 of file LMFPrimVers.cc.

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

44  {
45  LMFPrimVers *t = new LMFPrimVers;
47  return t;
48 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
std::string LMFPrimVers::fetchAllSql ( Statement stmt) const
privatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 50 of file LMFPrimVers.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

50  {
51  std::string sql = "SELECT VERS FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS";
52  stmt->setSQL(sql);
53  return sql;
54 }
std::string LMFPrimVers::fetchIdSql ( Statement stmt)
privatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 27 of file LMFPrimVers.cc.

27  {
28  return "";
29 }
std::string LMFPrimVers::getDescription ( ) const
inline

Definition at line 34 of file LMFPrimVers.h.

References LMFUnique::getString().

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

34 { return getString("description"); }
std::string getString(std::string fieldname) const
Definition: LMFUnique.cc:194
void LMFPrimVers::getParameters ( ResultSet rset)
privatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 40 of file LMFPrimVers.cc.

References LMFUnique::setString().

40  {
41  setString("description", rset->getString(1));
42 }
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
int LMFPrimVers::getVersion ( ) const
inline

Definition at line 33 of file LMFPrimVers.h.

References IUniqueDBObject::m_ID.

33 { return m_ID; }
bool LMFPrimVers::operator!= ( const LMFPrimVers t) const
inline

Definition at line 42 of file LMFPrimVers.h.

References LMFUnique::getID().

42  {
43  return (getID() != t.getID());
44  }
int getID() const
Definition: LMFUnique.h:52
bool LMFPrimVers::operator== ( const LMFPrimVers t) const
inline

Definition at line 39 of file LMFPrimVers.h.

References LMFUnique::getID().

39  {
40  return (getID() == t.getID());
41  }
int getID() const
Definition: LMFUnique.h:52
std::string LMFPrimVers::setByIDSql ( Statement stmt,
int  id 
)
privatevirtual

Reimplemented from LMFUnique.

Reimplemented in LMFSeqVers.

Definition at line 31 of file LMFPrimVers.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

32 {
33  std::string sql = "SELECT DESCR FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS "
34  "WHERE VERS = :1";
35  stmt->setSQL(sql);
36  stmt->setInt(1, id);
37  return sql;
38 }
void LMFPrimVers::setDescription ( const std::string &  s)
inline

Definition at line 36 of file LMFPrimVers.h.

References LMFUnique::setString().

36 { setString("description", s); }
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
void LMFPrimVers::setVersion ( int  v)
inline

Definition at line 35 of file LMFPrimVers.h.

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

Friends And Related Function Documentation

friend class LMFRunIOV
friend

Definition at line 24 of file LMFPrimVers.h.