CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
ODEcalCycle Class Reference

#include <ODEcalCycle.h>

Inheritance diagram for ODEcalCycle:
IODConfig IDBObject

Public Member Functions

int getCCSId () const
 
std::string getCycleDescription () const
 
int getCycleNum () const
 
std::string getCycleTag () const
 
int getDCCId () const
 
int getDCUId () const
 
int getId () const
 
int getJBH4Id () const
 
int getLaserId () const
 
int getLTCId () const
 
int getLTSId () const
 
int getMataqId () const
 
int getScanId () const
 
int getSeqNum () const
 
int getSequenceId () const
 
int getSRPId () const
 
std::string getTable () override
 
std::string getTag () const
 
int getTCCEEId () const
 
int getTCCId () const
 
int getTTCCIId () const
 
int getTTCFId () const
 
int getVersion () const
 
 ODEcalCycle ()
 
void printout ()
 
void setCCSId (int x)
 
void setCycleDescription (std::string x)
 
void setCycleNum (int x)
 
void setCycleTag (std::string x)
 
void setDCCId (int x)
 
void setDCUId (int x)
 
void setId (int id)
 
void setJBH4Id (int x)
 
void setLaserId (int x)
 
void setLTCId (int x)
 
void setLTSId (int x)
 
void setMataqId (int x)
 
void setScanId (int x)
 
void setSeqNum (int x)
 
void setSequenceId (int x)
 
void setSRPId (int x)
 
void setTag (std::string x)
 
void setTCCEEId (int x)
 
void setTCCId (int x)
 
void setTTCCIId (int x)
 
void setTTCFId (int x)
 
void setVersion (int x)
 
 ~ODEcalCycle () override
 
- Public Member Functions inherited from IODConfig
std::string getConfigTag ()
 
void setConfigTag (std::string x)
 
- 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 ()
 

Private Member Functions

void clear ()
 
void fetchData (ODEcalCycle *result) noexcept(false)
 
int fetchID () noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void setByID (int id) noexcept(false)
 
void writeDB () noexcept(false)
 

Private Attributes

int m_ccs
 
std::string m_cycle_description
 
int m_cycle_num
 
std::string m_cycle_tag
 
int m_dcc
 
int m_dcu
 
int m_ID
 
int m_jbh4
 
int m_laser
 
int m_ltc
 
int m_lts
 
int m_mataq
 
int m_scan
 
int m_seq_id
 
int m_seq_num
 
int m_srp
 
std::string m_tag
 
int m_tcc
 
int m_tcc_ee
 
int m_ttcci
 
int m_ttcf
 
int m_version
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Public Types inherited from IODConfig
typedef oracle::occi::Clob Clob
 
typedef oracle::occi::SQLException SQLException
 
typedef oracle::occi::Statement Statement
 
typedef oracle::occi::Stream Stream
 
- Public Attributes inherited from IODConfig
std::string m_config_tag
 
- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS =1024
 
- Protected Member Functions inherited from IODConfig
void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
 
unsigned char * readClob (Clob &clob, int size) noexcept(false)
 
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 inherited from IODConfig
Statementm_readStmt
 
Statementm_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 9 of file ODEcalCycle.h.

Constructor & Destructor Documentation

ODEcalCycle::ODEcalCycle ( )

Definition at line 25 of file ODEcalCycle.cc.

References hitfit::clear().

26 {
27  m_env = nullptr;
28  m_conn = nullptr;
29  m_writeStmt = nullptr;
30  m_readStmt = nullptr;
31 
32  m_ID=0;
33  clear();
34 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
Statement * m_writeStmt
Definition: IODConfig.h:36
void clear()
Definition: ODEcalCycle.cc:179
Statement * m_readStmt
Definition: IODConfig.h:37
ODEcalCycle::~ODEcalCycle ( )
override

Definition at line 38 of file ODEcalCycle.cc.

39 {
40 }

Member Function Documentation

void ODEcalCycle::clear ( void  )
private

Definition at line 179 of file ODEcalCycle.cc.

Referenced by getSRPId().

179  {
180  m_tag="";
181  m_version=0;
182  m_seq_num=0;
183  m_cycle_num=0;
184  m_cycle_tag="";
186  m_ccs=0;
187  m_dcc=0;
188  m_laser=0;
189  m_ltc=0;
190  m_lts=0;
191  m_dcu=0;
192  m_tcc=0;
193  m_tcc_ee=0;
194  m_ttcci=0;
195  m_jbh4=0;
196  m_scan=0;
197  // m_seq_id=0;
198  m_ttcf=0;
199  m_srp=0;
200 }
int m_cycle_num
Definition: ODEcalCycle.h:82
std::string m_cycle_tag
Definition: ODEcalCycle.h:83
std::string m_tag
Definition: ODEcalCycle.h:78
std::string m_cycle_description
Definition: ODEcalCycle.h:84
void ODEcalCycle::fetchData ( ODEcalCycle result)
privatenoexcept

Definition at line 308 of file ODEcalCycle.cc.

References MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSRPId().

310 {
311  this->checkConnection();
312  // result->clear();
313  if(result->getId()==0){
314  // throw(std::runtime_error("ODEcalCycle::fetchData(): no Id defined for this ODEcalCycle "));
315  result->fetchID();
316  }
317 
318  try {
319 
320  m_readStmt->setSQL("SELECT tag, version, sequence_num, cycle_num, cycle_tag, description, "
321  "ccs_configuration_id, dcc_configuration_id, laser_configuration_id, "
322  "ltc_configuration_id, lts_configuration_id, tcc_configuration_id, "
323  "\"TTCci_CONFIGURATION_ID\", jbh4_configuration_id, scan_id, TTCF_configuration_id, "
324  "srp_configuration_id, dcu_configuration_id, tcc_ee_configuration_id "
325  "FROM ECAL_CYCLE where cycle_id = :1 " );
326  m_readStmt->setInt(1, result->getId());
327  ResultSet* rset = m_readStmt->executeQuery();
328 
329  rset->next();
330 
331  result->setTag( getOraString(rset,1) );
332  result->setVersion( rset->getInt(2) );
333  result->setSeqNum( rset->getInt(3) );
334  result->setCycleNum( rset->getInt(4) );
335  result->setCycleTag( getOraString(rset,5) );
336  result->setCycleDescription( getOraString(rset,6) );
337  result->setCCSId( rset->getInt(7) );
338  result->setDCCId( rset->getInt(8) );
339  result->setLaserId( rset->getInt(9) );
340  result->setLTCId( rset->getInt(10) );
341  result->setLTSId( rset->getInt(11) );
342  result->setTCCId( rset->getInt(12) );
343  result->setTTCCIId( rset->getInt(13) );
344 
345 
346  result->setJBH4Id( rset->getInt(14) );
347  result->setScanId( rset->getInt(15) );
348 
349  result->setTTCFId( rset->getInt(16) );
350  result->setSRPId( rset->getInt(17) );
351  result->setDCUId( rset->getInt(18) );
352  result->setTCCEEId( rset->getInt(19) );
353 
354  } catch (SQLException &e) {
355  throw(std::runtime_error(std::string("ODEcalCycle::fetchData(): ")+getOraMessage(&e)));
356  }
357 }
void setDCUId(int x)
Definition: ODEcalCycle.h:47
void setDCCId(int x)
Definition: ODEcalCycle.h:39
void setVersion(int x)
Definition: ODEcalCycle.h:23
void setTCCEEId(int x)
Definition: ODEcalCycle.h:51
void setTTCFId(int x)
Definition: ODEcalCycle.h:61
void setJBH4Id(int x)
Definition: ODEcalCycle.h:57
void setSRPId(int x)
Definition: ODEcalCycle.h:63
void setTTCCIId(int x)
Definition: ODEcalCycle.h:53
void setCycleTag(std::string x)
Definition: ODEcalCycle.h:33
void setTag(std::string x)
Definition: ODEcalCycle.h:21
void setCCSId(int x)
Definition: ODEcalCycle.h:37
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void setTCCId(int x)
Definition: ODEcalCycle.h:49
void setLTCId(int x)
Definition: ODEcalCycle.h:43
void setLTSId(int x)
Definition: ODEcalCycle.h:45
int getId() const
Definition: ODEcalCycle.h:20
void setScanId(int x)
Definition: ODEcalCycle.h:59
void setCycleNum(int x)
Definition: ODEcalCycle.h:31
void setSeqNum(int x)
Definition: ODEcalCycle.h:25
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
void setLaserId(int x)
Definition: ODEcalCycle.h:41
int fetchID() noexcept(false)
Definition: ODEcalCycle.cc:202
Statement * m_readStmt
Definition: IODConfig.h:37
void setCycleDescription(std::string x)
Definition: ODEcalCycle.h:35
int ODEcalCycle::fetchID ( )
privatenoexcept

Definition at line 202 of file ODEcalCycle.cc.

References cuy::dh, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSRPId().

204 {
205  // Return from memory if available
206  if (m_ID>0) {
207  return m_ID;
208  }
209 
210  this->checkConnection();
211 
212 
214 
215  try {
216  Statement* stmt = m_conn->createStatement();
217  stmt->setSQL("SELECT cycle_id from ECAL_CYCLE_DAT "
218  "WHERE sequence_id = :1 ");
219  stmt->setInt(1, m_seq_id);
220 
221  ResultSet* rset = stmt->executeQuery();
222 
223  if (rset->next()) {
224  m_ID = rset->getInt(1);
225  } else {
226  m_ID = 0;
227  }
228  m_conn->terminateStatement(stmt);
229  } catch (SQLException &e) {
230  throw(std::runtime_error(std::string("ODEcalCycle::fetchID: ")+getOraMessage(&e)));
231  }
232  setByID(m_ID);
233  return m_ID;
234 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void setByID(int id) noexcept(false)
Definition: ODEcalCycle.cc:236
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
oracle::occi::Statement Statement
Definition: IODConfig.h:23
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
dh
Definition: cuy.py:355
int ODEcalCycle::getCCSId ( ) const
inline

Definition at line 38 of file ODEcalCycle.h.

References m_ccs.

38 { return m_ccs; }
std::string ODEcalCycle::getCycleDescription ( ) const
inline

Definition at line 36 of file ODEcalCycle.h.

References m_cycle_description.

36 { return m_cycle_description; }
std::string m_cycle_description
Definition: ODEcalCycle.h:84
int ODEcalCycle::getCycleNum ( ) const
inline

Definition at line 32 of file ODEcalCycle.h.

References m_cycle_num.

32 { return m_cycle_num; }
int m_cycle_num
Definition: ODEcalCycle.h:82
std::string ODEcalCycle::getCycleTag ( ) const
inline

Definition at line 34 of file ODEcalCycle.h.

References m_cycle_tag.

34 { return m_cycle_tag; }
std::string m_cycle_tag
Definition: ODEcalCycle.h:83
int ODEcalCycle::getDCCId ( ) const
inline

Definition at line 40 of file ODEcalCycle.h.

References m_dcc.

Referenced by popcon::EcalSRPHandler::getNewObjects().

40 { return m_dcc; }
int ODEcalCycle::getDCUId ( ) const
inline

Definition at line 48 of file ODEcalCycle.h.

References m_dcu.

48 { return m_dcu; }
int ODEcalCycle::getId ( void  ) const
inline

Definition at line 20 of file ODEcalCycle.h.

References m_ID.

Referenced by popcon::EcalSRPHandler::getNewObjects().

20 { return m_ID; }
int ODEcalCycle::getJBH4Id ( ) const
inline

Definition at line 58 of file ODEcalCycle.h.

References m_jbh4.

58 { return m_jbh4; }
int ODEcalCycle::getLaserId ( ) const
inline

Definition at line 42 of file ODEcalCycle.h.

References m_laser.

42 { return m_laser; }
int ODEcalCycle::getLTCId ( ) const
inline

Definition at line 44 of file ODEcalCycle.h.

References m_ltc.

44 { return m_ltc; }
int ODEcalCycle::getLTSId ( ) const
inline

Definition at line 46 of file ODEcalCycle.h.

References m_lts.

46 { return m_lts; }
int ODEcalCycle::getMataqId ( ) const
inline

Definition at line 56 of file ODEcalCycle.h.

References m_mataq.

56 { return m_mataq; }
int ODEcalCycle::getScanId ( ) const
inline

Definition at line 60 of file ODEcalCycle.h.

References m_scan.

60 { return m_scan; }
int ODEcalCycle::getSeqNum ( ) const
inline

Definition at line 26 of file ODEcalCycle.h.

References m_seq_num.

26 { return m_seq_num; }
int ODEcalCycle::getSequenceId ( ) const
inline

Definition at line 29 of file ODEcalCycle.h.

References m_seq_id.

29 { return m_seq_id; }
int ODEcalCycle::getSRPId ( ) const
inline
std::string ODEcalCycle::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 17 of file ODEcalCycle.h.

17 { return "ECAL_CYCLE"; }
std::string ODEcalCycle::getTag ( ) const
inline

Definition at line 22 of file ODEcalCycle.h.

References m_tag.

22 { return m_tag; }
std::string m_tag
Definition: ODEcalCycle.h:78
int ODEcalCycle::getTCCEEId ( ) const
inline

Definition at line 52 of file ODEcalCycle.h.

References m_tcc_ee.

52 { return m_tcc_ee; }
int ODEcalCycle::getTCCId ( ) const
inline

Definition at line 50 of file ODEcalCycle.h.

References m_tcc.

50 { return m_tcc; }
int ODEcalCycle::getTTCCIId ( ) const
inline

Definition at line 54 of file ODEcalCycle.h.

References m_ttcci.

54 { return m_ttcci; }
int ODEcalCycle::getTTCFId ( ) const
inline

Definition at line 62 of file ODEcalCycle.h.

References m_ttcf.

62 { return m_ttcf; }
int ODEcalCycle::getVersion ( ) const
inline

Definition at line 24 of file ODEcalCycle.h.

References m_version.

24 { return m_version; }
void ODEcalCycle::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 44 of file ODEcalCycle.cc.

References gather_cfg::cout.

Referenced by getSRPId().

46 {
47 
48  std::cout<< "ODEcalCycle::prepareWrite(): this is a view writing specific tables "<< endl;
49 
50 }
void ODEcalCycle::printout ( )

Definition at line 286 of file ODEcalCycle.cc.

References gather_cfg::cout.

Referenced by getSRPId().

286  {
287 
288  std::cout << "**** ODEcalCycle ****"<< std::endl;
289  std::cout << "**** id: "<< m_ID << std::endl;
290  std::cout << "**** tag: "<< m_tag << std::endl;
291  std::cout << "**** version: "<< m_version << std::endl;
292  std::cout << "**** seq_num: "<< m_seq_num << std::endl;
293  std::cout << "**** cycle num: "<< m_cycle_num << std::endl;
294  std::cout << "**** cycle tag: "<< m_cycle_tag << std::endl;
295  std::cout << "**** cycle description: "<< m_cycle_description<< std::endl;
296  std::cout << "**** ccs_id: "<< m_ccs <<std::endl;
297  std::cout << "**** dcc_id: "<< m_dcc <<std::endl;
298  std::cout << "**** laser: "<< m_laser << std::endl;
299  std::cout << "**** ttcf_id: "<< m_ttcf << std::endl;
300  std::cout << "**** srp_id: "<< m_srp << std::endl;
301  std::cout << "**** scan_id: "<< m_scan << std::endl;
302  std::cout << "**** ODEcalCycle ****"<< std::endl;
303 
304 
305 }
int m_cycle_num
Definition: ODEcalCycle.h:82
std::string m_cycle_tag
Definition: ODEcalCycle.h:83
std::string m_tag
Definition: ODEcalCycle.h:78
std::string m_cycle_description
Definition: ODEcalCycle.h:84
void ODEcalCycle::setByID ( int  id)
privatenoexcept

Definition at line 236 of file ODEcalCycle.cc.

References cuy::dh, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSRPId().

238 {
239  this->checkConnection();
240 
242 
243  try {
244  Statement* stmt = m_conn->createStatement();
245 
246  stmt->setSQL("SELECT tag, version, sequence_num, cycle_num, cycle_tag, description, "
247  "ccs_configuration_id, dcc_configuration_id, laser_configuration_id, "
248  "ltc_configuration_id, lts_configuration_id, tcc_configuration_id, "
249  "\"TTCci_CONFIGURATION_ID\", jbh4_configuration_id, scan_id, TTCF_configuration_id, "
250  "srp_configuration_id, dcu_configuration_id, tcc_ee_configuration_id "
251  "FROM ECAL_CYCLE where cycle_id = :1 " );
252  stmt->setInt(1, id);
253 
254  ResultSet* rset = stmt->executeQuery();
255  if (rset->next()) {
256  m_tag = getOraString(rset,1);
257  m_version = rset->getInt(2);
258  m_seq_num = rset->getInt(3);
259  m_cycle_num = rset->getInt(4);
260  m_cycle_tag = getOraString(rset,5);
261  m_cycle_description = getOraString(rset,6);
262  m_ccs = rset->getInt(7);
263  m_dcc = rset->getInt(8);
264  m_laser = rset->getInt(9);
265  m_ltc = rset->getInt(10);
266  m_lts = rset->getInt(11);
267  m_tcc = rset->getInt(12);
268  m_ttcci = rset->getInt(13);
269  m_jbh4 = rset->getInt(14);
270  m_scan = rset->getInt(15);
271  m_ttcf = rset->getInt(16);
272  m_srp = rset->getInt(17);
273  m_dcu = rset->getInt(18);
274  m_tcc_ee = rset->getInt(19);
275 
276  } else {
277  throw(std::runtime_error("ODEcalCycle::setByID: Given config_id is not in the database"));
278  }
279  m_conn->terminateStatement(stmt);
280  } catch (SQLException &e) {
281  throw(std::runtime_error(std::string("ODEcalCycle::setByID: ")+getOraMessage(&e)));
282  }
283 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
int m_cycle_num
Definition: ODEcalCycle.h:82
std::string m_cycle_tag
Definition: ODEcalCycle.h:83
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
oracle::occi::Statement Statement
Definition: IODConfig.h:23
std::string m_tag
Definition: ODEcalCycle.h:78
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
dh
Definition: cuy.py:355
std::string m_cycle_description
Definition: ODEcalCycle.h:84
void ODEcalCycle::setCCSId ( int  x)
inline

Definition at line 37 of file ODEcalCycle.h.

References m_ccs, and x.

37 { m_ccs = x; }
void ODEcalCycle::setCycleDescription ( std::string  x)
inline

Definition at line 35 of file ODEcalCycle.h.

References m_cycle_description, and x.

std::string m_cycle_description
Definition: ODEcalCycle.h:84
void ODEcalCycle::setCycleNum ( int  x)
inline

Definition at line 31 of file ODEcalCycle.h.

References m_cycle_num, and x.

31 { m_cycle_num = x; }
int m_cycle_num
Definition: ODEcalCycle.h:82
void ODEcalCycle::setCycleTag ( std::string  x)
inline

Definition at line 33 of file ODEcalCycle.h.

References m_cycle_tag, and x.

33 { m_cycle_tag = x; }
std::string m_cycle_tag
Definition: ODEcalCycle.h:83
void ODEcalCycle::setDCCId ( int  x)
inline

Definition at line 39 of file ODEcalCycle.h.

References m_dcc, and x.

39 { m_dcc = x; }
void ODEcalCycle::setDCUId ( int  x)
inline

Definition at line 47 of file ODEcalCycle.h.

References m_dcu, and x.

47 { m_dcu = x; }
void ODEcalCycle::setId ( int  id)
inline

Definition at line 19 of file ODEcalCycle.h.

References triggerObjects_cff::id, and m_ID.

void ODEcalCycle::setJBH4Id ( int  x)
inline

Definition at line 57 of file ODEcalCycle.h.

References m_jbh4, and x.

57 { m_jbh4 = x; }
void ODEcalCycle::setLaserId ( int  x)
inline

Definition at line 41 of file ODEcalCycle.h.

References m_laser, and x.

41 { m_laser = x; }
void ODEcalCycle::setLTCId ( int  x)
inline

Definition at line 43 of file ODEcalCycle.h.

References m_ltc, and x.

43 { m_ltc = x; }
void ODEcalCycle::setLTSId ( int  x)
inline

Definition at line 45 of file ODEcalCycle.h.

References m_lts, and x.

45 { m_lts = x; }
void ODEcalCycle::setMataqId ( int  x)
inline

Definition at line 55 of file ODEcalCycle.h.

References m_mataq, and x.

55 { m_mataq = x; }
void ODEcalCycle::setScanId ( int  x)
inline

Definition at line 59 of file ODEcalCycle.h.

References m_scan, and x.

59 { m_scan = x; }
void ODEcalCycle::setSeqNum ( int  x)
inline

Definition at line 25 of file ODEcalCycle.h.

References m_seq_num, and x.

25 { m_seq_num = x; }
void ODEcalCycle::setSequenceId ( int  x)
inline

Definition at line 28 of file ODEcalCycle.h.

References m_seq_id, and x.

Referenced by popcon::EcalSRPHandler::getNewObjects().

28 { m_seq_id = x; }
void ODEcalCycle::setSRPId ( int  x)
inline

Definition at line 63 of file ODEcalCycle.h.

References m_srp, and x.

63 { m_srp = x; }
void ODEcalCycle::setTag ( std::string  x)
inline

Definition at line 21 of file ODEcalCycle.h.

References m_tag, and x.

21 { m_tag = x; }
std::string m_tag
Definition: ODEcalCycle.h:78
void ODEcalCycle::setTCCEEId ( int  x)
inline

Definition at line 51 of file ODEcalCycle.h.

References m_tcc_ee, and x.

51 { m_tcc_ee = x; }
void ODEcalCycle::setTCCId ( int  x)
inline

Definition at line 49 of file ODEcalCycle.h.

References m_tcc, and x.

49 { m_tcc = x; }
void ODEcalCycle::setTTCCIId ( int  x)
inline

Definition at line 53 of file ODEcalCycle.h.

References m_ttcci, and x.

53 { m_ttcci = x; }
void ODEcalCycle::setTTCFId ( int  x)
inline

Definition at line 61 of file ODEcalCycle.h.

References m_ttcf, and x.

61 { m_ttcf = x; }
void ODEcalCycle::setVersion ( int  x)
inline

Definition at line 23 of file ODEcalCycle.h.

References m_version, and x.

23 { m_version = x; }
void ODEcalCycle::writeDB ( )
privatenoexcept

Definition at line 54 of file ODEcalCycle.cc.

References gather_cfg::cout, ODRunConfigCycleInfo::getId(), ODLaserCycle::insertConfig(), ODTCCEECycle::insertConfig(), ODTTCciCycle::insertConfig(), ODTTCFCycle::insertConfig(), ODLTSCycle::insertConfig(), ODSRPCycle::insertConfig(), ODJBH4Cycle::insertConfig(), ODDCCCycle::insertConfig(), ODDCUCycle::insertConfig(), ODTCCCycle::insertConfig(), ODLTCCycle::insertConfig(), ODScanCycle::insertConfig(), ODCCSCycle::insertConfig(), ODRunConfigCycleInfo::insertConfig(), ODCCSCycle::setCCSConfigurationID(), IDBObject::setConnection(), ODRunConfigCycleInfo::setCycleNumber(), ODDCCCycle::setDCCConfigurationID(), ODDCUCycle::setDCUConfigurationID(), ODRunConfigCycleInfo::setDescription(), ODTTCciCycle::setId(), ODTTCFCycle::setId(), ODCCSCycle::setId(), ODLTSCycle::setId(), ODJBH4Cycle::setId(), ODTCCCycle::setId(), ODDCUCycle::setId(), ODDCCCycle::setId(), ODSRPCycle::setId(), ODLaserCycle::setId(), ODTCCEECycle::setId(), ODScanCycle::setId(), ODLTCCycle::setId(), ODJBH4Cycle::setJBH4ConfigurationID(), ODLaserCycle::setLaserConfigurationID(), ODLTCCycle::setLTCConfigurationID(), ODLTSCycle::setLTSConfigurationID(), ODScanCycle::setScanConfigurationID(), ODRunConfigCycleInfo::setSequenceID(), ODSRPCycle::setSRPConfigurationID(), ODRunConfigCycleInfo::setTag(), ODTCCEECycle::setTCCConfigurationID(), ODTCCCycle::setTCCConfigurationID(), ODTTCciCycle::setTTCciConfigurationID(), and ODTTCFCycle::setTTCFConfigurationID().

Referenced by getSRPId().

56 {
57 
59  cyc.setTag(this->getCycleTag());
61  cyc.setCycleNumber(this->getCycleNum());
62  cyc.setSequenceID(this->getSequenceId());
63  // here we insert the cycle and get back the id
65  cyc.insertConfig();
66  int cyc_id=cyc.getId();
67  cout << "Cycle inserted with ID "<< cyc_id<< endl;
68  m_ID=cyc_id;
69 
70  if(getCCSId()!=0){
71  ODCCSCycle ccs_cycle;
72  ccs_cycle.setId(cyc_id);
73  ccs_cycle.setCCSConfigurationID(getCCSId());
74  ccs_cycle.setConnection(m_env, m_conn);
75  ccs_cycle.insertConfig();
76  cout << "Inserting CCS-cycle in DB..." << flush;
77  }
78  if(getDCCId()!=0){
79  ODDCCCycle dcc_cycle;
80  dcc_cycle.setId(cyc_id);
81  dcc_cycle.setDCCConfigurationID(getDCCId());
82  dcc_cycle.setConnection(m_env, m_conn);
83  dcc_cycle.insertConfig();
84  cout << "Inserting DCC-cycle in DB..." << flush;
85  }
86  if(getLaserId()!=0){
87  ODLaserCycle laser_cycle;
88  laser_cycle.setId(cyc_id);
89  laser_cycle.setLaserConfigurationID(getLaserId());
90  laser_cycle.setConnection(m_env, m_conn);
91  laser_cycle.insertConfig();
92  cout << "Inserting LASER-cycle in DB..." << flush;
93  }
94  if(getLTCId()!=0){
95  ODLTCCycle ltc_cycle;
96  ltc_cycle.setId(cyc_id);
97  ltc_cycle.setLTCConfigurationID(getLTCId());
98  ltc_cycle.setConnection(m_env, m_conn);
99  ltc_cycle.insertConfig();
100  cout << "Inserting LTC-cycle in DB..." << flush;
101  }
102  if(getLTSId()!=0){
103  ODLTSCycle lts_cycle;
104  lts_cycle.setId(cyc_id);
105  lts_cycle.setLTSConfigurationID(getLTSId());
106  lts_cycle.setConnection(m_env, m_conn);
107  lts_cycle.insertConfig();
108  cout << "Inserting LTS-cycle in DB..." << flush;
109  }
110  if(getDCUId()!=0){
111  ODDCUCycle dcu_cycle;
112  dcu_cycle.setId(cyc_id);
113  dcu_cycle.setDCUConfigurationID(getDCUId());
114  dcu_cycle.setConnection(m_env, m_conn);
115  dcu_cycle.insertConfig();
116  cout << "Inserting DCU-cycle in DB..." << flush;
117  }
118  if(getTCCId()!=0){
119  ODTCCCycle tcc_cycle;
120  tcc_cycle.setId(cyc_id);
121  tcc_cycle.setTCCConfigurationID(getTCCId());
122  tcc_cycle.setConnection(m_env, m_conn);
123  tcc_cycle.insertConfig();
124  cout << "Inserting TCC-cycle in DB..." << flush;
125  }
126  if(getTCCEEId()!=0){
127  ODTCCEECycle tcc_ee_cycle;
128  tcc_ee_cycle.setId(cyc_id);
129  tcc_ee_cycle.setTCCConfigurationID(getTCCEEId());
130  tcc_ee_cycle.setConnection(m_env, m_conn);
131  tcc_ee_cycle.insertConfig();
132  cout << "Inserting TCCEE-cycle in DB..." << flush;
133  }
134  if(getTTCCIId()!=0){
135  ODTTCciCycle ttcci_cycle;
136  ttcci_cycle.setId(cyc_id);
137  ttcci_cycle.setTTCciConfigurationID(getTTCCIId());
138  ttcci_cycle.setConnection(m_env, m_conn);
139  ttcci_cycle.insertConfig();
140  cout << "Inserting TTCCI-cycle in DB..." << flush;
141  }
142  if(getTTCFId()!=0){
143  ODTTCFCycle ttcf_cycle;
144  ttcf_cycle.setId(cyc_id);
145  ttcf_cycle.setTTCFConfigurationID(getTTCFId());
146  ttcf_cycle.setConnection(m_env, m_conn);
147  ttcf_cycle.insertConfig();
148  cout << "Inserting TTCF-cycle in DB..." << flush;
149  }
150  if(getSRPId()!=0){
151  ODSRPCycle srp_cycle;
152  srp_cycle.setId(cyc_id);
153  srp_cycle.setSRPConfigurationID(getSRPId());
154  srp_cycle.setConnection(m_env, m_conn);
155  srp_cycle.insertConfig();
156  cout << "Inserting SRP-cycle in DB..." << flush;
157  }
158  if(getJBH4Id()!=0){
159  ODJBH4Cycle jbh4_cycle;
160  jbh4_cycle.setId(cyc_id);
161  jbh4_cycle.setJBH4ConfigurationID(getJBH4Id());
162  jbh4_cycle.setConnection(m_env, m_conn);
163  jbh4_cycle.insertConfig();
164  cout << "Inserting JBH4-cycle in DB..." << flush;
165  }
166  if(getScanId()!=0){
167  ODScanCycle scan_cycle;
168  scan_cycle.setId(cyc_id);
169  scan_cycle.setScanConfigurationID(getScanId());
170  scan_cycle.setConnection(m_env, m_conn);
171  scan_cycle.insertConfig();
172  cout << "Inserting SCAN-cycle in DB..." << flush;
173  }
174 
175 
176 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
void setId(int id)
Definition: ODTCCEECycle.h:21
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
std::string getCycleTag() const
Definition: ODEcalCycle.h:34
int getJBH4Id() const
Definition: ODEcalCycle.h:58
void setId(int id)
Definition: ODTTCFCycle.h:21
void setId(int id)
Definition: ODLaserCycle.h:21
void insertConfig() noexcept(false)
Definition: ODLTCCycle.cc:158
int getSequenceId() const
Definition: ODEcalCycle.h:29
void insertConfig() noexcept(false)
Definition: ODDCCCycle.cc:158
void setDescription(std::string x)
void setJBH4ConfigurationID(int x)
Definition: ODJBH4Cycle.h:25
void setId(int id)
Definition: ODDCUCycle.h:21
void setId(int id)
Definition: ODLTSCycle.h:21
void setLTCConfigurationID(int x)
Definition: ODLTCCycle.h:26
void insertConfig() noexcept(false)
Definition: ODDCUCycle.cc:158
void setId(int id)
Definition: ODCCSCycle.h:21
int getLTSId() const
Definition: ODEcalCycle.h:46
int getTCCId() const
Definition: ODEcalCycle.h:50
int getTTCCIId() const
Definition: ODEcalCycle.h:54
void setId(int id)
Definition: ODScanCycle.h:22
int getDCCId() const
Definition: ODEcalCycle.h:40
int getLaserId() const
Definition: ODEcalCycle.h:42
void setDCCConfigurationID(int x)
Definition: ODDCCCycle.h:25
void setTCCConfigurationID(int x)
Definition: ODTCCEECycle.h:25
void setId(int id)
Definition: ODTTCciCycle.h:21
std::string getCycleDescription() const
Definition: ODEcalCycle.h:36
void insertConfig() noexcept(false)
int getTCCEEId() const
Definition: ODEcalCycle.h:52
int getSRPId() const
Definition: ODEcalCycle.h:64
void setId(int id)
Definition: ODTCCCycle.h:21
void setTTCFConfigurationID(int x)
Definition: ODTTCFCycle.h:25
void insertConfig() noexcept(false)
Definition: ODCCSCycle.cc:158
void insertConfig() noexcept(false)
Definition: ODJBH4Cycle.cc:158
void setTCCConfigurationID(int x)
Definition: ODTCCCycle.h:25
void insertConfig() noexcept(false)
Definition: ODTTCFCycle.cc:158
int getTTCFId() const
Definition: ODEcalCycle.h:62
void setTag(std::string x)
void insertConfig() noexcept(false)
void setId(int id)
Definition: ODSRPCycle.h:21
int getCCSId() const
Definition: ODEcalCycle.h:38
void insertConfig() noexcept(false)
void setDCUConfigurationID(int x)
Definition: ODDCUCycle.h:25
void setLTSConfigurationID(int x)
Definition: ODLTSCycle.h:25
int getDCUId() const
Definition: ODEcalCycle.h:48
void setSRPConfigurationID(int x)
Definition: ODSRPCycle.h:25
void setCCSConfigurationID(int x)
Definition: ODCCSCycle.h:25
void insertConfig() noexcept(false)
Definition: ODTCCCycle.cc:158
void insertConfig() noexcept(false)
Definition: ODSRPCycle.cc:158
int getLTCId() const
Definition: ODEcalCycle.h:44
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
void setId(int id)
Definition: ODLTCCycle.h:22
int getCycleNum() const
Definition: ODEcalCycle.h:32
void setId(int id)
Definition: ODDCCCycle.h:21
void setScanConfigurationID(int x)
Definition: ODScanCycle.h:26
void setTTCciConfigurationID(int x)
Definition: ODTTCciCycle.h:25
void setId(int id)
Definition: ODJBH4Cycle.h:21
int getScanId() const
Definition: ODEcalCycle.h:60
void setLaserConfigurationID(int x)
Definition: ODLaserCycle.h:25
void insertConfig() noexcept(false)
Definition: ODScanCycle.cc:158
void insertConfig() noexcept(false)
Definition: ODLTSCycle.cc:158
void insertConfig() noexcept(false)

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 11 of file ODEcalCycle.h.

Member Data Documentation

int ODEcalCycle::m_ccs
private

Definition at line 85 of file ODEcalCycle.h.

Referenced by getCCSId(), and setCCSId().

std::string ODEcalCycle::m_cycle_description
private

Definition at line 84 of file ODEcalCycle.h.

Referenced by getCycleDescription(), and setCycleDescription().

int ODEcalCycle::m_cycle_num
private

Definition at line 82 of file ODEcalCycle.h.

Referenced by getCycleNum(), and setCycleNum().

std::string ODEcalCycle::m_cycle_tag
private

Definition at line 83 of file ODEcalCycle.h.

Referenced by getCycleTag(), and setCycleTag().

int ODEcalCycle::m_dcc
private

Definition at line 86 of file ODEcalCycle.h.

Referenced by getDCCId(), and setDCCId().

int ODEcalCycle::m_dcu
private

Definition at line 90 of file ODEcalCycle.h.

Referenced by getDCUId(), and setDCUId().

int ODEcalCycle::m_ID
private

Definition at line 77 of file ODEcalCycle.h.

Referenced by getId(), and setId().

int ODEcalCycle::m_jbh4
private

Definition at line 95 of file ODEcalCycle.h.

Referenced by getJBH4Id(), and setJBH4Id().

int ODEcalCycle::m_laser
private

Definition at line 87 of file ODEcalCycle.h.

Referenced by getLaserId(), and setLaserId().

int ODEcalCycle::m_ltc
private

Definition at line 88 of file ODEcalCycle.h.

Referenced by getLTCId(), and setLTCId().

int ODEcalCycle::m_lts
private

Definition at line 89 of file ODEcalCycle.h.

Referenced by getLTSId(), and setLTSId().

int ODEcalCycle::m_mataq
private

Definition at line 94 of file ODEcalCycle.h.

Referenced by getMataqId(), and setMataqId().

int ODEcalCycle::m_scan
private

Definition at line 96 of file ODEcalCycle.h.

Referenced by getScanId(), and setScanId().

int ODEcalCycle::m_seq_id
private

Definition at line 81 of file ODEcalCycle.h.

Referenced by getSequenceId(), and setSequenceId().

int ODEcalCycle::m_seq_num
private

Definition at line 80 of file ODEcalCycle.h.

Referenced by getSeqNum(), and setSeqNum().

int ODEcalCycle::m_srp
private

Definition at line 97 of file ODEcalCycle.h.

Referenced by getSRPId(), and setSRPId().

std::string ODEcalCycle::m_tag
private

Definition at line 78 of file ODEcalCycle.h.

Referenced by getTag(), and setTag().

int ODEcalCycle::m_tcc
private

Definition at line 91 of file ODEcalCycle.h.

Referenced by getTCCId(), and setTCCId().

int ODEcalCycle::m_tcc_ee
private

Definition at line 92 of file ODEcalCycle.h.

Referenced by getTCCEEId(), and setTCCEEId().

int ODEcalCycle::m_ttcci
private

Definition at line 93 of file ODEcalCycle.h.

Referenced by getTTCCIId(), and setTTCCIId().

int ODEcalCycle::m_ttcf
private

Definition at line 98 of file ODEcalCycle.h.

Referenced by getTTCFId(), and setTTCFId().

int ODEcalCycle::m_version
private

Definition at line 79 of file ODEcalCycle.h.

Referenced by getVersion(), and setVersion().