![]() |
![]() |
#include <OnlineDB/EcalCondDB/interface/ODEcalCycle.h>
Definition at line 9 of file ODEcalCycle.h.
ODEcalCycle::ODEcalCycle | ( | ) |
Definition at line 23 of file ODEcalCycle.cc.
References clear(), IDBObject::m_conn, IDBObject::m_env, m_ID, IODConfig::m_readStmt, IODConfig::m_writeStmt, and NULL.
00024 { 00025 m_env = NULL; 00026 m_conn = NULL; 00027 m_writeStmt = NULL; 00028 m_readStmt = NULL; 00029 00030 m_ID=0; 00031 clear(); 00032 }
ODEcalCycle::~ODEcalCycle | ( | ) |
Definition at line 169 of file ODEcalCycle.cc.
References m_ccs, m_cycle_description, m_cycle_num, m_cycle_tag, m_dcc, m_dcu, m_jbh4, m_laser, m_ltc, m_lts, m_scan, m_seq_id, m_seq_num, m_srp, m_tag, m_tcc, m_ttcci, m_ttcf, and m_version.
Referenced by ODEcalCycle().
00169 { 00170 m_tag=""; 00171 m_version=0; 00172 m_seq_num=0; 00173 m_cycle_num=0; 00174 m_cycle_tag=""; 00175 m_cycle_description=""; 00176 m_ccs=0; 00177 m_dcc=0; 00178 m_laser=0; 00179 m_ltc=0; 00180 m_lts=0; 00181 m_dcu=0; 00182 m_tcc=0; 00183 m_ttcci=0; 00184 m_jbh4=0; 00185 m_scan=0; 00186 m_seq_id=0; 00187 m_ttcf=0; 00188 m_srp=0; 00189 }
void ODEcalCycle::fetchData | ( | ODEcalCycle * | result | ) | throw (std::runtime_error) [private] |
Definition at line 213 of file ODEcalCycle.cc.
References IDBObject::checkConnection(), e, IODConfig::m_readStmt, and HLT_VtxMuL3::result.
00215 { 00216 this->checkConnection(); 00217 result->clear(); 00218 if(result->getId()==0){ 00219 throw(runtime_error("ODEcalCycle::fetchData(): no Id defined for this ODEcalCycle ")); 00220 } 00221 00222 try { 00223 00224 m_readStmt->setSQL("SELECT d.tag, d.version, d.sequence_num, d.cycle_num, d.cycle_tag, d.description, d.ccs_configuration_id, " 00225 " d.dcc_configuration_id, d.laser_configuration_id, d.ltc_configuration_id, d.lts_configuration_id, d.tcc_configuration_id," 00226 " d.\"TTCci_CONFIGURATION_ID\" , d.jbh4_configuration_id, d.scan_id, d.TTCF_configuration_id, d.srp_configuration_id, d.dcu_configuration_id " 00227 "FROM ECAL_CYCLE d " 00228 " where d.cycle_id = :1 " ); 00229 m_readStmt->setInt(1, result->getId()); 00230 ResultSet* rset = m_readStmt->executeQuery(); 00231 00232 rset->next(); 00233 00234 result->setTag( rset->getString(1) ); 00235 result->setVersion( rset->getInt(2) ); 00236 result->setSeqNum( rset->getInt(3) ); 00237 result->setCycleNum( rset->getInt(4) ); 00238 result->setCycleTag( rset->getString(5) ); 00239 result->setCycleDescription( rset->getString(6) ); 00240 result->setCCSId( rset->getInt(7) ); 00241 result->setDCCId( rset->getInt(8) ); 00242 result->setLaserId( rset->getInt(9) ); 00243 result->setLTCId( rset->getInt(10) ); 00244 result->setLTSId( rset->getInt(11) ); 00245 result->setTCCId( rset->getInt(12) ); 00246 result->setTTCCIId( rset->getInt(13) ); 00247 00248 00249 result->setJBH4Id( rset->getInt(14) ); 00250 result->setScanId( rset->getInt(15) ); 00251 00252 result->setTTCFId( rset->getInt(16) ); 00253 result->setSRPId( rset->getInt(17) ); 00254 result->setDCUId( rset->getInt(18) ); 00255 00256 } catch (SQLException &e) { 00257 throw(runtime_error("ODEcalCycle::fetchData(): "+e.getMessage())); 00258 } 00259 }
int ODEcalCycle::getCCSId | ( | ) | const [inline] |
Definition at line 38 of file ODEcalCycle.h.
References m_ccs.
Referenced by writeDB().
00038 { return m_ccs; }
std::string ODEcalCycle::getCycleDescription | ( | ) | const [inline] |
Definition at line 36 of file ODEcalCycle.h.
References m_cycle_description.
00036 { return m_cycle_description; }
int ODEcalCycle::getCycleNum | ( | ) | const [inline] |
std::string ODEcalCycle::getCycleTag | ( | ) | const [inline] |
int ODEcalCycle::getDCCId | ( | ) | const [inline] |
Definition at line 40 of file ODEcalCycle.h.
References m_dcc.
Referenced by writeDB().
00040 { return m_dcc; }
int ODEcalCycle::getDCUId | ( | ) | const [inline] |
Definition at line 48 of file ODEcalCycle.h.
References m_dcu.
Referenced by writeDB().
00048 { return m_dcu; }
int ODEcalCycle::getId | ( | ) | const [inline] |
int ODEcalCycle::getJBH4Id | ( | ) | const [inline] |
Definition at line 56 of file ODEcalCycle.h.
References m_jbh4.
Referenced by writeDB().
00056 { return m_jbh4; }
int ODEcalCycle::getLaserId | ( | ) | const [inline] |
Definition at line 42 of file ODEcalCycle.h.
References m_laser.
Referenced by writeDB().
00042 { return m_laser; }
int ODEcalCycle::getLTCId | ( | ) | const [inline] |
Definition at line 44 of file ODEcalCycle.h.
References m_ltc.
Referenced by writeDB().
00044 { return m_ltc; }
int ODEcalCycle::getLTSId | ( | ) | const [inline] |
Definition at line 46 of file ODEcalCycle.h.
References m_lts.
Referenced by writeDB().
00046 { return m_lts; }
int ODEcalCycle::getMataqId | ( | ) | const [inline] |
int ODEcalCycle::getScanId | ( | ) | const [inline] |
Definition at line 58 of file ODEcalCycle.h.
References m_scan.
Referenced by writeDB().
00058 { return m_scan; }
int ODEcalCycle::getSeqNum | ( | ) | const [inline] |
int ODEcalCycle::getSequenceId | ( | ) | const [inline] |
int ODEcalCycle::getSRPId | ( | ) | const [inline] |
Definition at line 62 of file ODEcalCycle.h.
References m_srp.
Referenced by writeDB().
00062 { return m_srp; }
std::string ODEcalCycle::getTable | ( | ) | [inline, virtual] |
std::string ODEcalCycle::getTag | ( | void | ) | const [inline] |
int ODEcalCycle::getTCCId | ( | ) | const [inline] |
Definition at line 50 of file ODEcalCycle.h.
References m_tcc.
Referenced by writeDB().
00050 { return m_tcc; }
int ODEcalCycle::getTTCCIId | ( | ) | const [inline] |
Definition at line 52 of file ODEcalCycle.h.
References m_ttcci.
Referenced by writeDB().
00052 { return m_ttcci; }
int ODEcalCycle::getTTCFId | ( | ) | const [inline] |
Definition at line 60 of file ODEcalCycle.h.
References m_ttcf.
Referenced by writeDB().
00060 { return m_ttcf; }
int ODEcalCycle::getVersion | ( | ) | const [inline] |
void ODEcalCycle::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IODConfig.
Definition at line 42 of file ODEcalCycle.cc.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00044 { 00045 00046 std::cout<< "ODEcalCycle::prepareWrite(): this is a view writing specific tables "<< endl; 00047 00048 }
void ODEcalCycle::printout | ( | ) |
Definition at line 191 of file ODEcalCycle.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), m_ccs, m_cycle_description, m_cycle_num, m_cycle_tag, m_dcc, m_ID, m_laser, m_scan, m_seq_num, m_srp, m_tag, m_ttcf, and m_version.
00191 { 00192 00193 std::cout << "**** ODEcalCycle ****"<< std::endl; 00194 std::cout << "**** id: "<< m_ID << std::endl; 00195 std::cout << "**** tag: "<< m_tag << std::endl; 00196 std::cout << "**** version: "<< m_version << std::endl; 00197 std::cout << "**** seq_num: "<< m_seq_num << std::endl; 00198 std::cout << "**** cycle num: "<< m_cycle_num << std::endl; 00199 std::cout << "**** cycle tag: "<< m_cycle_tag << std::endl; 00200 std::cout << "**** cycle description: "<< m_cycle_description<< std::endl; 00201 std::cout << "**** ccs_id: "<< m_ccs <<std::endl; 00202 std::cout << "**** dcc_id: "<< m_dcc <<std::endl; 00203 std::cout << "**** laser: "<< m_laser << std::endl; 00204 std::cout << "**** ttcf_id: "<< m_ttcf << std::endl; 00205 std::cout << "**** srp_id: "<< m_srp << std::endl; 00206 std::cout << "**** scan_id: "<< m_scan << std::endl; 00207 std::cout << "**** ODEcalCycle ****"<< std::endl; 00208 00209 00210 }
void ODEcalCycle::setCycleDescription | ( | std::string | x | ) | [inline] |
Definition at line 35 of file ODEcalCycle.h.
References m_cycle_description.
00035 { m_cycle_description = x; }
void ODEcalCycle::setCycleTag | ( | std::string | x | ) | [inline] |
void ODEcalCycle::setTag | ( | std::string | x | ) | [inline] |
void ODEcalCycle::writeDB | ( | ) | throw (std::runtime_error) [private] |
Definition at line 52 of file ODEcalCycle.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), flush(), getCCSId(), getDCCId(), getDCUId(), ODRunConfigCycleInfo::getId(), getJBH4Id(), getLaserId(), getLTCId(), getLTSId(), getScanId(), getSRPId(), getTCCId(), getTTCCIId(), getTTCFId(), ODCCSCycle::insertConfig(), ODSRPCycle::insertConfig(), ODDCCCycle::insertConfig(), ODRunConfigCycleInfo::insertConfig(), ODTCCCycle::insertConfig(), ODTTCciCycle::insertConfig(), ODDCUCycle::insertConfig(), ODLTSCycle::insertConfig(), ODTTCFCycle::insertConfig(), ODLTCCycle::insertConfig(), ODLaserCycle::insertConfig(), ODScanCycle::insertConfig(), ODJBH4Cycle::insertConfig(), IDBObject::m_conn, IDBObject::m_env, m_ID, ODCCSCycle::setCCSConfigurationID(), IDBObject::setConnection(), ODRunConfigCycleInfo::setCycleNumber(), ODDCCCycle::setDCCConfigurationID(), ODDCUCycle::setDCUConfigurationID(), ODRunConfigCycleInfo::setDescription(), ODTTCciCycle::setId(), ODScanCycle::setId(), ODTCCCycle::setId(), ODSRPCycle::setId(), ODDCCCycle::setId(), ODJBH4Cycle::setId(), ODDCUCycle::setId(), ODLTSCycle::setId(), ODLaserCycle::setId(), ODCCSCycle::setId(), ODLTCCycle::setId(), ODTTCFCycle::setId(), ODJBH4Cycle::setJBH4ConfigurationID(), ODLaserCycle::setLaserConfigurationID(), ODLTCCycle::setLTCConfigurationID(), ODLTSCycle::setLTSConfigurationID(), ODScanCycle::setScanConfigurationID(), ODRunConfigCycleInfo::setSequenceID(), ODSRPCycle::setSRPConfigurationID(), ODRunConfigCycleInfo::setTag(), ODTCCCycle::setTCCConfigurationID(), ODTTCciCycle::setTTCciConfigurationID(), and ODTTCFCycle::setTTCFConfigurationID().
00054 { 00055 00056 ODRunConfigCycleInfo cyc; 00057 cyc.setTag(this->getCycleTag()); 00058 cyc.setDescription(this->getCycleDescription()); 00059 cyc.setCycleNumber(this->getCycleNum()); 00060 cyc.setSequenceID(this->getSequenceId()); 00061 // here we insert the cycle and get back the id 00062 cyc.setConnection(m_env, m_conn); 00063 cyc.insertConfig(); 00064 int cyc_id=cyc.getId(); 00065 cout << "Cycle inserted with ID "<< cyc_id<< endl; 00066 m_ID=cyc_id; 00067 00068 if(getCCSId()!=0){ 00069 ODCCSCycle ccs_cycle; 00070 ccs_cycle.setId(cyc_id); 00071 ccs_cycle.setCCSConfigurationID(getCCSId()); 00072 ccs_cycle.setConnection(m_env, m_conn); 00073 ccs_cycle.insertConfig(); 00074 cout << "Inserting CCS-cycle in DB..." << flush; 00075 } 00076 if(getDCCId()!=0){ 00077 ODDCCCycle dcc_cycle; 00078 dcc_cycle.setId(cyc_id); 00079 dcc_cycle.setDCCConfigurationID(getDCCId()); 00080 dcc_cycle.setConnection(m_env, m_conn); 00081 dcc_cycle.insertConfig(); 00082 cout << "Inserting DCC-cycle in DB..." << flush; 00083 } 00084 if(getLaserId()!=0){ 00085 ODLaserCycle laser_cycle; 00086 laser_cycle.setId(cyc_id); 00087 laser_cycle.setLaserConfigurationID(getLaserId()); 00088 laser_cycle.setConnection(m_env, m_conn); 00089 laser_cycle.insertConfig(); 00090 cout << "Inserting LASER-cycle in DB..." << flush; 00091 } 00092 if(getLTCId()!=0){ 00093 ODLTCCycle ltc_cycle; 00094 ltc_cycle.setId(cyc_id); 00095 ltc_cycle.setLTCConfigurationID(getLTCId()); 00096 ltc_cycle.setConnection(m_env, m_conn); 00097 ltc_cycle.insertConfig(); 00098 cout << "Inserting LTC-cycle in DB..." << flush; 00099 } 00100 if(getLTSId()!=0){ 00101 ODLTSCycle lts_cycle; 00102 lts_cycle.setId(cyc_id); 00103 lts_cycle.setLTSConfigurationID(getLTSId()); 00104 lts_cycle.setConnection(m_env, m_conn); 00105 lts_cycle.insertConfig(); 00106 cout << "Inserting LTS-cycle in DB..." << flush; 00107 } 00108 if(getDCUId()!=0){ 00109 ODDCUCycle dcu_cycle; 00110 dcu_cycle.setId(cyc_id); 00111 dcu_cycle.setDCUConfigurationID(getDCUId()); 00112 dcu_cycle.setConnection(m_env, m_conn); 00113 dcu_cycle.insertConfig(); 00114 cout << "Inserting DCU-cycle in DB..." << flush; 00115 } 00116 if(getTCCId()!=0){ 00117 ODTCCCycle tcc_cycle; 00118 tcc_cycle.setId(cyc_id); 00119 tcc_cycle.setTCCConfigurationID(getTCCId()); 00120 tcc_cycle.setConnection(m_env, m_conn); 00121 tcc_cycle.insertConfig(); 00122 cout << "Inserting TCC-cycle in DB..." << flush; 00123 } 00124 if(getTTCCIId()!=0){ 00125 ODTTCciCycle ttcci_cycle; 00126 ttcci_cycle.setId(cyc_id); 00127 ttcci_cycle.setTTCciConfigurationID(getTTCCIId()); 00128 ttcci_cycle.setConnection(m_env, m_conn); 00129 ttcci_cycle.insertConfig(); 00130 cout << "Inserting TTCCI-cycle in DB..." << flush; 00131 } 00132 if(getTTCFId()!=0){ 00133 ODTTCFCycle ttcf_cycle; 00134 ttcf_cycle.setId(cyc_id); 00135 ttcf_cycle.setTTCFConfigurationID(getTTCFId()); 00136 ttcf_cycle.setConnection(m_env, m_conn); 00137 ttcf_cycle.insertConfig(); 00138 cout << "Inserting TTCF-cycle in DB..." << flush; 00139 } 00140 if(getSRPId()!=0){ 00141 ODSRPCycle srp_cycle; 00142 srp_cycle.setId(cyc_id); 00143 srp_cycle.setSRPConfigurationID(getSRPId()); 00144 srp_cycle.setConnection(m_env, m_conn); 00145 srp_cycle.insertConfig(); 00146 cout << "Inserting SRP-cycle in DB..." << flush; 00147 } 00148 if(getJBH4Id()!=0){ 00149 ODJBH4Cycle jbh4_cycle; 00150 jbh4_cycle.setId(cyc_id); 00151 jbh4_cycle.setJBH4ConfigurationID(getJBH4Id()); 00152 jbh4_cycle.setConnection(m_env, m_conn); 00153 jbh4_cycle.insertConfig(); 00154 cout << "Inserting JBH4-cycle in DB..." << flush; 00155 } 00156 if(getScanId()!=0){ 00157 ODScanCycle scan_cycle; 00158 scan_cycle.setId(cyc_id); 00159 scan_cycle.setScanConfigurationID(getScanId()); 00160 scan_cycle.setConnection(m_env, m_conn); 00161 scan_cycle.insertConfig(); 00162 cout << "Inserting SCAN-cycle in DB..." << flush; 00163 } 00164 00165 00166 }
friend class EcalCondDBInterface [friend] |
int ODEcalCycle::m_ccs [private] |
Definition at line 81 of file ODEcalCycle.h.
Referenced by clear(), getCCSId(), printout(), and setCCSId().
std::string ODEcalCycle::m_cycle_description [private] |
Definition at line 80 of file ODEcalCycle.h.
Referenced by clear(), getCycleDescription(), printout(), and setCycleDescription().
int ODEcalCycle::m_cycle_num [private] |
Definition at line 78 of file ODEcalCycle.h.
Referenced by clear(), getCycleNum(), printout(), and setCycleNum().
std::string ODEcalCycle::m_cycle_tag [private] |
Definition at line 79 of file ODEcalCycle.h.
Referenced by clear(), getCycleTag(), printout(), and setCycleTag().
int ODEcalCycle::m_dcc [private] |
Definition at line 82 of file ODEcalCycle.h.
Referenced by clear(), getDCCId(), printout(), and setDCCId().
int ODEcalCycle::m_dcu [private] |
int ODEcalCycle::m_ID [private] |
Definition at line 73 of file ODEcalCycle.h.
Referenced by getId(), ODEcalCycle(), printout(), setId(), and writeDB().
int ODEcalCycle::m_jbh4 [private] |
int ODEcalCycle::m_laser [private] |
Definition at line 83 of file ODEcalCycle.h.
Referenced by clear(), getLaserId(), printout(), and setLaserId().
int ODEcalCycle::m_ltc [private] |
int ODEcalCycle::m_lts [private] |
int ODEcalCycle::m_mataq [private] |
int ODEcalCycle::m_scan [private] |
Definition at line 91 of file ODEcalCycle.h.
Referenced by clear(), getScanId(), printout(), and setScanId().
int ODEcalCycle::m_seq_id [private] |
Definition at line 77 of file ODEcalCycle.h.
Referenced by clear(), getSequenceId(), and setSequenceId().
int ODEcalCycle::m_seq_num [private] |
Definition at line 76 of file ODEcalCycle.h.
Referenced by clear(), getSeqNum(), printout(), and setSeqNum().
int ODEcalCycle::m_srp [private] |
Definition at line 92 of file ODEcalCycle.h.
Referenced by clear(), getSRPId(), printout(), and setSRPId().
std::string ODEcalCycle::m_tag [private] |
Definition at line 74 of file ODEcalCycle.h.
Referenced by clear(), getTag(), printout(), and setTag().
int ODEcalCycle::m_tcc [private] |
int ODEcalCycle::m_ttcci [private] |
int ODEcalCycle::m_ttcf [private] |
Definition at line 93 of file ODEcalCycle.h.
Referenced by clear(), getTTCFId(), printout(), and setTTCFId().
int ODEcalCycle::m_version [private] |
Definition at line 75 of file ODEcalCycle.h.
Referenced by clear(), getVersion(), printout(), and setVersion().