CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Friends

LMFPrimVers Class Reference

#include <LMFPrimVers.h>

Inheritance diagram for LMFPrimVers:
LMFUnique IUniqueDBObject IDBObject LMFCorrVers LMFSeqVers

List of all members.

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 ()

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

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().

{
  setClassName("LMFPrimVers");
  setString("description", "");
}
LMFPrimVers::LMFPrimVers ( EcalDBConnection c)

Definition at line 12 of file LMFPrimVers.cc.

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

                                            : LMFUnique(c) {
  setClassName("LMFPrimVers");
  setString("description", "");
}
LMFPrimVers::LMFPrimVers ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

Definition at line 17 of file LMFPrimVers.cc.

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

                                       : LMFUnique(env, conn) {
  setClassName("LMFPrimVers");
  setString("description", "");
}
LMFPrimVers::~LMFPrimVers ( )

Definition at line 23 of file LMFPrimVers.cc.

{
}

Member Function Documentation

LMFUnique * LMFPrimVers::createObject ( ) const [private, virtual]

Reimplemented from LMFUnique.

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 44 of file LMFPrimVers.cc.

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

                                            {
  LMFPrimVers *t = new LMFPrimVers;
  t->setConnection(m_env, m_conn);
  return t;
}
std::string LMFPrimVers::fetchAllSql ( Statement stmt) const [private, virtual]

Reimplemented from LMFUnique.

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 50 of file LMFPrimVers.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

                                                        {
  std::string sql = "SELECT VERS FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS";
  stmt->setSQL(sql);
  return sql;
}
std::string LMFPrimVers::fetchIdSql ( Statement stmt) [private, virtual]

Reimplemented from LMFUnique.

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 27 of file LMFPrimVers.cc.

                                                 {
  return "";
}
std::string LMFPrimVers::getDescription ( ) const [inline]

Definition at line 34 of file LMFPrimVers.h.

References LMFUnique::getString().

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

{ return getString("description"); }
void LMFPrimVers::getParameters ( ResultSet rset) [private, virtual]

Reimplemented from LMFUnique.

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 40 of file LMFPrimVers.cc.

References LMFUnique::setString().

                                               {
  setString("description", rset->getString(1));
}
int LMFPrimVers::getVersion ( ) const [inline]

Definition at line 33 of file LMFPrimVers.h.

References IUniqueDBObject::m_ID.

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

Definition at line 42 of file LMFPrimVers.h.

References LMFUnique::getID().

                                                     { 
    return (getID() != t.getID());
  }
bool LMFPrimVers::operator== ( const LMFPrimVers t) const [inline]

Definition at line 39 of file LMFPrimVers.h.

References LMFUnique::getID().

                                                     { 
    return (getID() == t.getID());
  }
std::string LMFPrimVers::setByIDSql ( Statement stmt,
int  id 
) [private, virtual]

Reimplemented from LMFUnique.

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 31 of file LMFPrimVers.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

{
  std::string sql = "SELECT DESCR FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS "
    "WHERE VERS = :1";
  stmt->setSQL(sql);
  stmt->setInt(1, id);
  return sql;
}
void LMFPrimVers::setDescription ( const std::string &  s) [inline]

Definition at line 36 of file LMFPrimVers.h.

References LMFUnique::setString().

{ setString("description", s); }
void LMFPrimVers::setVersion ( int  v) [inline]

Definition at line 35 of file LMFPrimVers.h.

References IUniqueDBObject::m_ID, and v.

{ m_ID = v; }

Friends And Related Function Documentation

friend class LMFRunIOV [friend]

Reimplemented in LMFCorrVers, and LMFSeqVers.

Definition at line 24 of file LMFPrimVers.h.