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 FEConfigCokeDat FEConfigFgrDat FEConfigFgrEEStripDat FEConfigFgrEETowerDat FEConfigFgrGroupDat FEConfigFgrParamDat FEConfigLinDat FEConfigLinParamDat FEConfigLUTDat FEConfigLUTGroupDat FEConfigLUTParamDat FEConfigOddWeightDat FEConfigOddWeightGroupDat FEConfigOddWeightModeDat 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::IDataItem ( )
inline

Definition at line 18 of file IDataItem.h.

18 : m_writeStmt(nullptr), m_readStmt(nullptr) {}
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24

Member Function Documentation

◆ checkPrepare()

void IDataItem::checkPrepare ( )
inlineprotectednoexcept

Definition at line 26 of file IDataItem.h.

References m_writeStmt.

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

26  {
27  if (m_writeStmt == nullptr) {
28  throw(std::runtime_error("Write statement not prepared"));
29  }
30  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23

◆ createReadStatement()

void IDataItem::createReadStatement ( )
inlineprotectednoexcept

Definition at line 40 of file IDataItem.h.

References IDBObject::m_conn, and m_readStmt.

40 { m_readStmt = m_conn->createStatement(); }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24

◆ getTable()

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, FEConfigCokeDat, FEConfigFgrDat, FEConfigFgrEEStripDat, FEConfigFgrEETowerDat, FEConfigFgrGroupDat, FEConfigFgrParamDat, FEConfigLinDat, FEConfigLinParamDat, FEConfigLUTDat, FEConfigLUTGroupDat, FEConfigLUTParamDat, FEConfigOddWeightDat, FEConfigOddWeightGroupDat, FEConfigOddWeightModeDat, 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.

◆ prepareWrite()

virtual void IDataItem::prepareWrite ( )
protectedpure virtualnoexcept

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

◆ setPrefetchRowCount()

void IDataItem::setPrefetchRowCount ( int  ncount)
inlineprotectednoexcept

Definition at line 42 of file IDataItem.h.

References m_readStmt.

42 { m_readStmt->setPrefetchRowCount(ncount); }
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24

◆ terminateReadStatement()

void IDataItem::terminateReadStatement ( )
inlineprotectednoexcept

Definition at line 44 of file IDataItem.h.

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

44  {
45  if (m_readStmt != nullptr) {
46  m_conn->terminateStatement(m_readStmt);
47  } else {
48  std::cout << "Warning from IDataItem: statement was aleady closed" << std::endl;
49  }
50  }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24

◆ terminateWriteStatement()

void IDataItem::terminateWriteStatement ( )
inlineprotectednoexcept

Definition at line 32 of file IDataItem.h.

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

32  {
33  if (m_writeStmt != nullptr) {
34  m_conn->terminateStatement(m_writeStmt);
35  } else {
36  std::cout << "Warning from IDataItem: statement was aleady closed" << std::endl;
37  }
38  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34

Member Data Documentation

◆ m_readStmt

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

◆ m_writeStmt

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