CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 () throw (std::runtime_error)
 
void createReadStatement () throw (std::runtime_error)
 
virtual void prepareWrite ()=0 throw (std::runtime_error)
 
void setPrefetchRowCount (int ncount) throw (std::runtime_error)
 
void terminateReadStatement () throw (std::runtime_error)
 
void terminateWriteStatement () throw (std::runtime_error)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const throw (std::runtime_error)
 

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.

20  : m_writeStmt(0),
21  m_readStmt(0)
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 ( )
throw (std::runtime_error
)
inlineprotected

Definition at line 31 of file IDataItem.h.

References m_writeStmt, and NULL.

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

33  {
34  if (m_writeStmt == NULL) {
35  throw(std::runtime_error("Write statement not prepared"));
36  }
37  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
#define NULL
Definition: scimark2.h:8
void IDataItem::createReadStatement ( )
throw (std::runtime_error
)
inlineprotected

Definition at line 50 of file IDataItem.h.

References IDBObject::m_conn, and m_readStmt.

52  {
53  m_readStmt=m_conn->createStatement();
54  }
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.

virtual void IDataItem::prepareWrite ( )
throw (std::runtime_error
)
protectedpure virtual
void IDataItem::setPrefetchRowCount ( int  ncount)
throw (std::runtime_error
)
inlineprotected

Definition at line 56 of file IDataItem.h.

References m_readStmt.

58  {
59  m_readStmt->setPrefetchRowCount(ncount);
60  }
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
void IDataItem::terminateReadStatement ( )
throw (std::runtime_error
)
inlineprotected

Definition at line 62 of file IDataItem.h.

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

64  {
65  if (m_readStmt != NULL) {
66  m_conn->terminateStatement(m_readStmt);
67  } else {
68  std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl;
69  }
70  }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
#define NULL
Definition: scimark2.h:8
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
tuple cout
Definition: gather_cfg.py:121
void IDataItem::terminateWriteStatement ( )
throw (std::runtime_error
)
inlineprotected

Definition at line 39 of file IDataItem.h.

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

41  {
42  if (m_writeStmt != NULL) {
43  m_conn->terminateStatement(m_writeStmt);
44  } else {
45  std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl;
46  }
47  }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
#define NULL
Definition: scimark2.h:8
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

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