CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
IDataItem Class Referenceabstract

#include <IDataItem.h>

Inheritance diagram for IDataItem:
IDBObject CaliCrystalIntercalDat CaliGainRatioDat CaliGeneralDat CaliHVScanRatioDat CaliTempDat DCUCapsuleTempDat DCUCapsuleTempRawDat DCUCCSDat DCUIDarkDat DCUIDarkPedDat DCULVRBTempsDat DCULVRTempsDat DCULVRVoltagesDat DCUVFETempDat FEConfigFgrDat FEConfigFgrEEStripDat FEConfigFgrEETowerDat FEConfigFgrGroupDat FEConfigFgrParamDat FEConfigLinDat FEConfigLinParamDat FEConfigLUTDat FEConfigLUTGroupDat FEConfigLUTParamDat FEConfigParamDat FEConfigPedDat FEConfigSlidingDat FEConfigSpikeDat FEConfigTimingDat FEConfigWeightDat FEConfigWeightGroupDat ITimingDat MODCCSFEDat MODCCSHFDat MODCCSTRDat MODDCCDetailsDat MODDCCOperationDat MonCrystalConsistencyDat MonDelaysTTDat MonH4TablePositionDat MonLaserBlueDat MonLaserGreenDat MonLaserIRedDat MonLaserPulseDat MonLaserRedDat MonLaserStatusDat MonLed1Dat MonLed2Dat MonMemChConsistencyDat MonMemTTConsistencyDat MonOccupancyDat MonPedestalOffsetsDat MonPedestalsDat MonPedestalsOnlineDat MonPNBlueDat MonPNGreenDat MonPNIRedDat MonPNLed1Dat MonPNLed2Dat MonPNMGPADat MonPNPedDat MonPNRedDat MonPulseShapeDat MonRunDat MonShapeQualityDat MonTestPulseDat MonTTConsistencyDat RunCommentDat RunConfigDat RunCrystalErrorsDat RunDat RunDCSHVDat RunDCSLVDat RunDCSMagnetDat RunFEConfigDat RunH4TablePositionDat RunLaserRunDat RunMemChErrorsDat RunMemTTErrorsDat RunPNErrorsDat RunPTMTempDat RunTPGConfigDat RunTTErrorsDat

Public Member Functions

virtual std::string getTable ()=0
 
 IDataItem ()
 
- 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 ()
 

Protected Member Functions

void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
virtual void prepareWrite () noexcept(false)=0
 
void setPrefetchRowCount (int ncount) noexcept(false)
 
void terminateReadStatement () noexcept(false)
 
void terminateWriteStatement () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 

Protected Attributes

oracle::occi::Statement * m_readStmt
 
oracle::occi::Statement * m_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Additional Inherited Members

- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS =1024
 

Detailed Description

Abstract interface for data in the conditions DB

Definition at line 16 of file IDataItem.h.

Constructor & Destructor Documentation

IDataItem::IDataItem ( )
inline

Definition at line 19 of file IDataItem.h.

References getTable(), and AlCaHLTBitMon_QueryRunRegistry::string.

20  : m_writeStmt(nullptr),
21  m_readStmt(nullptr)
22  {}
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29

Member Function Documentation

void IDataItem::checkPrepare ( )
inlineprotectednoexcept

Definition at line 31 of file IDataItem.h.

Referenced by ITimingDat::writeArrayDB(), and ITimingDat::writeDB().

32  {
33  if (m_writeStmt == nullptr) {
34  throw(std::runtime_error("Write statement not prepared"));
35  }
36  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
void IDataItem::createReadStatement ( )
inlineprotectednoexcept

Definition at line 48 of file IDataItem.h.

References IDBObject::m_conn.

49  {
50  m_readStmt=m_conn->createStatement();
51  }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
virtual std::string IDataItem::getTable ( )
pure virtual

Implemented in ITimingDat, RunDCSHVDat, RunDCSLVDat, MODCCSHFDat, RunDCSMagnetDat, MonPulseShapeDat, CaliCrystalIntercalDat, CaliGainRatioDat, CaliGeneralDat, CaliHVScanRatioDat, CaliTempDat, DCUCapsuleTempDat, DCUCapsuleTempRawDat, DCUCCSDat, DCUIDarkDat, DCUIDarkPedDat, DCULVRBTempsDat, DCULVRTempsDat, DCULVRVoltagesDat, DCUVFETempDat, MonCrystalConsistencyDat, MonDelaysTTDat, MonLaserBlueDat, MonLaserGreenDat, MonLaserIRedDat, MonLaserRedDat, MonLed1Dat, MonLed2Dat, MonMemChConsistencyDat, MonMemTTConsistencyDat, MonOccupancyDat, MonPedestalOffsetsDat, MonPedestalsOnlineDat, MonPNBlueDat, MonPNGreenDat, MonPNIRedDat, MonPNLed1Dat, MonPNLed2Dat, MonPNMGPADat, MonPNPedDat, MonPNRedDat, MonRunDat, MonShapeQualityDat, MonTestPulseDat, MonTTConsistencyDat, RunCrystalErrorsDat, RunFEConfigDat, RunMemChErrorsDat, RunMemTTErrorsDat, RunPNErrorsDat, RunTTErrorsDat, FEConfigFgrDat, FEConfigFgrEEStripDat, FEConfigFgrEETowerDat, FEConfigFgrGroupDat, FEConfigFgrParamDat, FEConfigLinDat, FEConfigLinParamDat, FEConfigLUTDat, FEConfigLUTGroupDat, FEConfigLUTParamDat, FEConfigParamDat, FEConfigPedDat, FEConfigSlidingDat, FEConfigSpikeDat, FEConfigTimingDat, FEConfigWeightDat, FEConfigWeightGroupDat, MODCCSFEDat, MODCCSTRDat, MODDCCDetailsDat, MODDCCOperationDat, MonH4TablePositionDat, MonLaserPulseDat, MonLaserStatusDat, MonPedestalsDat, RunCommentDat, RunConfigDat, RunDat, RunH4TablePositionDat, RunLaserRunDat, RunPTMTempDat, RunTPGConfigDat, MonTimingLaserBlueCrystalDat, MonTimingCrystalDat, MonTimingLaserBlueTTDat, MonTimingLaserGreenCrystalDat, MonTimingLaserGreenTTDat, MonTimingLaserIRedCrystalDat, MonTimingLaserIRedTTDat, MonTimingLaserRedCrystalDat, MonTimingLaserRedTTDat, MonTimingLed1CrystalDat, MonTimingLed1TTDat, MonTimingLed2CrystalDat, MonTimingLed2TTDat, and MonTimingTTDat.

Referenced by IDataItem().

virtual void IDataItem::prepareWrite ( )
protectedpure virtualnoexcept
void IDataItem::setPrefetchRowCount ( int  ncount)
inlineprotectednoexcept

Definition at line 53 of file IDataItem.h.

54  {
55  m_readStmt->setPrefetchRowCount(ncount);
56  }
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
void IDataItem::terminateReadStatement ( )
inlineprotectednoexcept

Definition at line 58 of file IDataItem.h.

References gather_cfg::cout, IDBObject::m_conn, noexcept, and prepareWrite().

59  {
60  if (m_readStmt != nullptr) {
61  m_conn->terminateStatement(m_readStmt);
62  } else {
63  std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl;
64  }
65  }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
void IDataItem::terminateWriteStatement ( )
inlineprotectednoexcept

Definition at line 38 of file IDataItem.h.

References gather_cfg::cout, and IDBObject::m_conn.

39  {
40  if (m_writeStmt != nullptr) {
41  m_conn->terminateStatement(m_writeStmt);
42  } else {
43  std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl;
44  }
45  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39

Member Data Documentation

oracle::occi::Statement* IDataItem::m_readStmt
protected

Definition at line 29 of file IDataItem.h.

Referenced by ITimingDat::fetchData(), and ITimingDat::ITimingDat().

oracle::occi::Statement* IDataItem::m_writeStmt
protected