CMS 3D CMS Logo

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

#include <ODTCCEEConfig.h>

Inheritance diagram for ODTCCEEConfig:
IODConfig IDBObject

Public Member Functions

int getId () const
 
unsigned char * getLUTClob () const
 
std::string getLUTConfigurationFile () const
 
int getNTestPatternsToLoad () const
 
unsigned char * getSLBClob () const
 
std::string getSLBConfigurationFile () const
 
int getSLBLatency () const
 
std::string getTable () override
 
unsigned char * getTCCClob () const
 
std::string getTCCConfigurationFile () const
 
std::string getTestPatternFileUrl () const
 
int getTrigPos () const
 
 ODTCCEEConfig ()
 
void setId (int id)
 
void setLUTClob (unsigned char *x)
 
void setLUTConfigurationFile (std::string x)
 
void setNTestPatternsToLoad (int id)
 
void setParameters (const std::map< std::string, std::string > &my_keys_map)
 
void setSLBClob (unsigned char *x)
 
void setSLBConfigurationFile (std::string x)
 
void setSLBLatency (int id)
 
void setTCCClob (unsigned char *x)
 
void setTCCConfigurationFile (std::string x)
 
void setTestPatternFileUrl (std::string x)
 
void setTriggerPos (int id)
 
 ~ODTCCEEConfig () 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 (ODTCCEEConfig *result) noexcept(false)
 
int fetchID () noexcept(false)
 
int fetchNextId () noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void writeDB () noexcept(false)
 

Private Attributes

int m_ID
 
unsigned char * m_lut_clob
 
std::string m_lut_file
 
int m_ntest
 
unsigned int m_size
 
int m_slb
 
unsigned char * m_slb_clob
 
std::string m_slb_file
 
unsigned char * m_tcc_ee_clob
 
std::string m_tcc_ee_file
 
std::string m_test_url
 
int m_trigpos
 

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 15 of file ODTCCEEConfig.h.

Constructor & Destructor Documentation

ODTCCEEConfig::ODTCCEEConfig ( )

Definition at line 12 of file ODTCCEEConfig.cc.

References hitfit::clear().

13 {
14  m_env = nullptr;
15  m_conn = nullptr;
16  m_writeStmt = nullptr;
17  m_readStmt = nullptr;
18  m_config_tag="";
19 
20  m_ID=0;
21  clear();
22  m_size=0;
23 }
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
std::string m_config_tag
Definition: IODConfig.h:27
Statement * m_readStmt
Definition: IODConfig.h:37
unsigned int m_size
Definition: ODTCCEEConfig.h:77
ODTCCEEConfig::~ODTCCEEConfig ( )
override

Definition at line 35 of file ODTCCEEConfig.cc.

36 {
37 }

Member Function Documentation

void ODTCCEEConfig::clear ( void  )
private

Definition at line 25 of file ODTCCEEConfig.cc.

Referenced by getSLBClob().

25  {
26 
27  m_tcc_ee_file="";
28  m_lut_file="";
29  m_slb_file="";
30  m_test_url="";
31  m_ntest=0;
32 }
std::string m_lut_file
Definition: ODTCCEEConfig.h:71
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:70
std::string m_test_url
Definition: ODTCCEEConfig.h:73
std::string m_slb_file
Definition: ODTCCEEConfig.h:72
void ODTCCEEConfig::fetchData ( ODTCCEEConfig result)
privatenoexcept

Definition at line 188 of file ODTCCEEConfig.cc.

References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSLBClob().

190 {
191  this->checkConnection();
192  result->clear();
193  if(result->getId()==0 && (result->getConfigTag().empty()) ){
194  throw(std::runtime_error("ODTCCEEConfig::fetchData(): no Id defined for this ODTCCEEConfig "));
195  }
196 
197  try {
198 
199  m_readStmt->setSQL("SELECT * "
200  "FROM ECAL_TCC_EE_CONFIGURATION d "
201  " where (tcc_ee_configuration_id = :1 or tcc_ee_tag=:2 )" );
202  m_readStmt->setInt(1, result->getId());
203  m_readStmt->setString(2, result->getConfigTag());
204  ResultSet* rset = m_readStmt->executeQuery();
205 
206  rset->next();
207  // the first is the id
208  result->setId(rset->getInt(1));
209  result->setConfigTag(rset->getString(2));
210 
211  result->setTCCConfigurationFile(rset->getString(3));
212  result->setLUTConfigurationFile(rset->getString(4));
213  result->setSLBConfigurationFile(rset->getString(5));
214  result->setTestPatternFileUrl(rset->getString(6));
215  result->setNTestPatternsToLoad(rset->getInt(7));
216  result->setSLBLatency(rset->getInt(12));
217  //
218 
219  Clob clob1 = rset->getClob (8);
220  cout << "Opening the clob in Read only mode" << endl;
221  clob1.open (OCCI_LOB_READONLY);
222  int clobLength=clob1.length ();
223  cout << "Length of the clob1 is: " << clobLength << endl;
224  unsigned char* buffer = readClob (clob1, clobLength);
225  clob1.close ();
226  cout<< "the clob buffer is:"<<endl;
227  for (int i = 0; i < clobLength; ++i)
228  cout << (char) buffer[i];
229  cout << endl;
230  result->setTCCClob(buffer );
231 
232  Clob clob2 = rset->getClob (9);
233  cout << "Opening the clob in Read only mode" << endl;
234  clob2.open (OCCI_LOB_READONLY);
235  clobLength=clob2.length ();
236  cout << "Length of the clob2 is: " << clobLength << endl;
237  unsigned char* buffer2 = readClob (clob2, clobLength);
238  clob2.close ();
239  cout<< "the clob buffer is:"<<endl;
240  for (int i = 0; i < clobLength; ++i)
241  cout << (char) buffer2[i];
242  cout << endl;
243  result->setLUTClob(buffer2 );
244 
245  Clob clob3 = rset->getClob (10);
246  cout << "Opening the clob in Read only mode" << endl;
247  clob3.open (OCCI_LOB_READONLY);
248  clobLength=clob3.length ();
249  cout << "Length of the clob3 is: " << clobLength << endl;
250  unsigned char* buffer3 = readClob (clob3, clobLength);
251  clob3.close ();
252  cout<< "the clob buffer is:"<<endl;
253  for (int i = 0; i < clobLength; ++i)
254  cout << (char) buffer3[i];
255  cout << endl;
256  result->setSLBClob(buffer3 );
257 
258  } catch (SQLException &e) {
259  throw(std::runtime_error(std::string("ODTCCEEConfig::fetchData(): ")+e.getMessage()));
260  }
261 }
void setSLBConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:31
unsigned char * readClob(Clob &clob, int size) noexcept(false)
Definition: IODConfig.h:154
void setLUTConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:29
void setLUTClob(unsigned char *x)
Definition: ODTCCEEConfig.h:46
int getId() const
Definition: ODTCCEEConfig.h:25
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void setId(int id)
Definition: ODTCCEEConfig.h:24
oracle::occi::Clob Clob
Definition: IODConfig.h:25
void setTCCConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:27
void setSLBLatency(int id)
Definition: ODTCCEEConfig.h:40
void setSLBClob(unsigned char *x)
Definition: ODTCCEEConfig.h:49
void setConfigTag(std::string x)
Definition: IODConfig.h:31
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
void setTCCClob(unsigned char *x)
Definition: ODTCCEEConfig.h:43
Statement * m_readStmt
Definition: IODConfig.h:37
std::string getConfigTag()
Definition: IODConfig.h:32
void setNTestPatternsToLoad(int id)
Definition: ODTCCEEConfig.h:35
void setTestPatternFileUrl(std::string x)
Definition: ODTCCEEConfig.h:33
int ODTCCEEConfig::fetchID ( )
privatenoexcept

Definition at line 265 of file ODTCCEEConfig.cc.

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

Referenced by getSLBClob().

266 {
267  if (m_ID!=0) {
268  return m_ID;
269  }
270 
271  this->checkConnection();
272 
273  try {
274  Statement* stmt = m_conn->createStatement();
275  stmt->setSQL("SELECT tcc_ee_configuration_id FROM ecal_tcc_ee_configuration "
276  "WHERE tcc_ee_tag=:tcc_ee_tag "
277  );
278 
279  stmt->setString(1, getConfigTag() );
280 
281  ResultSet* rset = stmt->executeQuery();
282 
283  if (rset->next()) {
284  m_ID = rset->getInt(1);
285  } else {
286  m_ID = 0;
287  }
288  m_conn->terminateStatement(stmt);
289  } catch (SQLException &e) {
290  throw(std::runtime_error(std::string("ODTCCEEConfig::fetchID: ")+e.getMessage()));
291  }
292 
293  return m_ID;
294 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
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
std::string getConfigTag()
Definition: IODConfig.h:32
int ODTCCEEConfig::fetchNextId ( )
privatenoexcept

Definition at line 39 of file ODTCCEEConfig.cc.

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

Referenced by getSLBClob().

39  {
40 
41  int result=0;
42  try {
43  this->checkConnection();
44 
45  m_readStmt = m_conn->createStatement();
46  m_readStmt->setSQL("select ecal_tcc_ee_config_sq.NextVal from dual");
47  ResultSet* rset = m_readStmt->executeQuery();
48  while (rset->next ()){
49  result= rset->getInt(1);
50  }
51  m_conn->terminateStatement(m_readStmt);
52  return result;
53 
54  } catch (SQLException &e) {
55  throw(std::runtime_error(std::string("ODTCCEEConfig::fetchNextId(): ")+e.getMessage()));
56  }
57 
58 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
Statement * m_readStmt
Definition: IODConfig.h:37
int ODTCCEEConfig::getId ( void  ) const
inline

Definition at line 25 of file ODTCCEEConfig.h.

References m_ID.

25 { return m_ID; }
unsigned char* ODTCCEEConfig::getLUTClob ( ) const
inline

Definition at line 47 of file ODTCCEEConfig.h.

References m_lut_clob.

47 { return m_lut_clob; }
unsigned char * m_lut_clob
Definition: ODTCCEEConfig.h:68
std::string ODTCCEEConfig::getLUTConfigurationFile ( ) const
inline

Definition at line 30 of file ODTCCEEConfig.h.

References m_lut_file.

30 { return m_lut_file; }
std::string m_lut_file
Definition: ODTCCEEConfig.h:71
int ODTCCEEConfig::getNTestPatternsToLoad ( ) const
inline

Definition at line 36 of file ODTCCEEConfig.h.

References m_ntest.

36 { return m_ntest; }
unsigned char* ODTCCEEConfig::getSLBClob ( ) const
inline
std::string ODTCCEEConfig::getSLBConfigurationFile ( ) const
inline

Definition at line 32 of file ODTCCEEConfig.h.

References m_slb_file.

32 { return m_slb_file; }
std::string m_slb_file
Definition: ODTCCEEConfig.h:72
int ODTCCEEConfig::getSLBLatency ( ) const
inline

Definition at line 41 of file ODTCCEEConfig.h.

References m_slb.

41 { return m_slb; }
std::string ODTCCEEConfig::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 22 of file ODTCCEEConfig.h.

22 { return "ECAL_TCC_EE_CONFIGURATION"; }
unsigned char* ODTCCEEConfig::getTCCClob ( ) const
inline

Definition at line 44 of file ODTCCEEConfig.h.

References m_tcc_ee_clob.

44 { return m_tcc_ee_clob; }
unsigned char * m_tcc_ee_clob
Definition: ODTCCEEConfig.h:67
std::string ODTCCEEConfig::getTCCConfigurationFile ( ) const
inline

Definition at line 28 of file ODTCCEEConfig.h.

References m_tcc_ee_file.

28 { return m_tcc_ee_file; }
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:70
std::string ODTCCEEConfig::getTestPatternFileUrl ( ) const
inline

Definition at line 34 of file ODTCCEEConfig.h.

References m_test_url.

34 { return m_test_url; }
std::string m_test_url
Definition: ODTCCEEConfig.h:73
int ODTCCEEConfig::getTrigPos ( ) const
inline

Definition at line 38 of file ODTCCEEConfig.h.

References m_trigpos.

38 { return m_trigpos; }
void ODTCCEEConfig::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 87 of file ODTCCEEConfig.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSLBClob().

89 {
90  this->checkConnection();
91 
92  int next_id=fetchNextId();
93 
94  try {
95  m_writeStmt = m_conn->createStatement();
96  m_writeStmt->setSQL("INSERT INTO ECAL_TCC_EE_CONFIGURATION (tcc_ee_configuration_id, tcc_ee_tag, "
97  "Configuration_file, LUT_CONFIGURATION_FILE, SLB_CONFIGURATION_FILE, "
98  "TESTPATTERNFILE_URL , N_TESTPATTERNS_TO_LOAD, TRIGGER_POS, "
99  "tcc_configuration, lut_configuration, slb_configuration, slblatency ) "
100  "VALUES (:1, :2, :3, :4, :5, :6, :7, :8 , :9, :10, :11, :12)");
101  m_writeStmt->setInt(1, next_id);
102  m_writeStmt->setString(2, getConfigTag());
103  m_writeStmt->setString(3, getTCCConfigurationFile());
104  m_writeStmt->setString(4, getLUTConfigurationFile());
105  m_writeStmt->setString(5, getSLBConfigurationFile());
106  m_writeStmt->setString(6, getTestPatternFileUrl());
107  m_writeStmt->setInt(7, getNTestPatternsToLoad());
108  m_writeStmt->setInt(8, getTrigPos());
109  m_writeStmt->setInt(12, getSLBLatency());
110  // and now the clobs
111  oracle::occi::Clob clob1(m_conn);
112  clob1.setEmpty();
113  m_writeStmt->setClob(9,clob1);
114 
115  oracle::occi::Clob clob2(m_conn);
116  clob2.setEmpty();
117  m_writeStmt->setClob(10,clob2);
118 
119  oracle::occi::Clob clob3(m_conn);
120  clob3.setEmpty();
121  m_writeStmt->setClob(11,clob3);
122 
123  m_writeStmt->executeUpdate ();
124  m_ID=next_id;
125 
126  m_conn->terminateStatement(m_writeStmt);
127  std::cout<<"TCC 3 empty Clobs inserted into CONFIGURATION with id="<<next_id<<std::endl;
128 
129  // now we read and update it
130  m_writeStmt = m_conn->createStatement();
131  m_writeStmt->setSQL ("SELECT tcc_configuration, lut_configuration, slb_configuration FROM ECAL_TCC_EE_CONFIGURATION WHERE"
132  " tcc_ee_configuration_id=:1 FOR UPDATE");
133 
134  std::cout<<"updating the clobs 0"<<std::endl;
135 
136 
137  } catch (SQLException &e) {
138  throw(std::runtime_error(std::string("ODTCCEEConfig::prepareWrite(): ")+e.getMessage()));
139  }
140 
141  std::cout<<"updating the clob 1 "<<std::endl;
142 
143 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
Statement * m_writeStmt
Definition: IODConfig.h:36
int getNTestPatternsToLoad() const
Definition: ODTCCEEConfig.h:36
std::string getTestPatternFileUrl() const
Definition: ODTCCEEConfig.h:34
int fetchNextId() noexcept(false)
int getSLBLatency() const
Definition: ODTCCEEConfig.h:41
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
std::string getSLBConfigurationFile() const
Definition: ODTCCEEConfig.h:32
int getTrigPos() const
Definition: ODTCCEEConfig.h:38
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
std::string getConfigTag()
Definition: IODConfig.h:32
std::string getTCCConfigurationFile() const
Definition: ODTCCEEConfig.h:28
std::string getLUTConfigurationFile() const
Definition: ODTCCEEConfig.h:30
void ODTCCEEConfig::setId ( int  id)
inline

Definition at line 24 of file ODTCCEEConfig.h.

References triggerObjects_cff::id, and m_ID.

void ODTCCEEConfig::setLUTClob ( unsigned char *  x)
inline

Definition at line 46 of file ODTCCEEConfig.h.

References m_lut_clob, and x.

46 { m_lut_clob = x; }
unsigned char * m_lut_clob
Definition: ODTCCEEConfig.h:68
void ODTCCEEConfig::setLUTConfigurationFile ( std::string  x)
inline

Definition at line 29 of file ODTCCEEConfig.h.

References m_lut_file, and x.

29 { m_lut_file = x; }
std::string m_lut_file
Definition: ODTCCEEConfig.h:71
void ODTCCEEConfig::setNTestPatternsToLoad ( int  id)
inline

Definition at line 35 of file ODTCCEEConfig.h.

References triggerObjects_cff::id, and m_ntest.

void ODTCCEEConfig::setParameters ( const std::map< std::string, std::string > &  my_keys_map)

Definition at line 61 of file ODTCCEEConfig.cc.

Referenced by getSLBClob().

61  {
62 
63  // parses the result of the XML parser that is a map of
64  // string string with variable name variable value
65 
66  for( std::map<std::string, std::string >::const_iterator ci=
67  my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
68 
69  if(ci->first== "TCC_EE_CONFIGURATION_ID") setConfigTag(ci->second);
70  if(ci->first== "N_TESTPATTERNS_TO_LOAD") setNTestPatternsToLoad(atoi(ci->second.c_str()));
71  if(ci->first== "LUT_CONFIGURATION_FILE") setLUTConfigurationFile(ci->second );
72  if(ci->first== "CONFIGURATION_FILE") setTCCConfigurationFile(ci->second );
73  if(ci->first== "SLB_CONFIGURATION_FILE") setSLBConfigurationFile(ci->second );
74  if(ci->first== "TESTPATTERNFILE_URL") setTestPatternFileUrl(ci->second );
75 
76  if(ci->first== "SLB_LATENCY") setSLBLatency(atoi(ci->second.c_str()) );
77  if(ci->first== "SLBLATENCY") setSLBLatency(atoi(ci->second.c_str()) );
78 
79  if(ci->first== "TRIGGER_POS") setTriggerPos(atoi(ci->second.c_str()));
80 
81  }
82 
83 }
void setSLBConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:31
void setLUTConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:29
void setTriggerPos(int id)
Definition: ODTCCEEConfig.h:37
void setTCCConfigurationFile(std::string x)
Definition: ODTCCEEConfig.h:27
void setSLBLatency(int id)
Definition: ODTCCEEConfig.h:40
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void setNTestPatternsToLoad(int id)
Definition: ODTCCEEConfig.h:35
void setTestPatternFileUrl(std::string x)
Definition: ODTCCEEConfig.h:33
void ODTCCEEConfig::setSLBClob ( unsigned char *  x)
inline

Definition at line 49 of file ODTCCEEConfig.h.

References m_slb_clob, and x.

49 { m_slb_clob = x; }
unsigned char * m_slb_clob
Definition: ODTCCEEConfig.h:69
void ODTCCEEConfig::setSLBConfigurationFile ( std::string  x)
inline

Definition at line 31 of file ODTCCEEConfig.h.

References m_slb_file, and x.

31 { m_slb_file = x; }
std::string m_slb_file
Definition: ODTCCEEConfig.h:72
void ODTCCEEConfig::setSLBLatency ( int  id)
inline

Definition at line 40 of file ODTCCEEConfig.h.

References triggerObjects_cff::id, and m_slb.

void ODTCCEEConfig::setTCCClob ( unsigned char *  x)
inline

Definition at line 43 of file ODTCCEEConfig.h.

References m_tcc_ee_clob, and x.

43 { m_tcc_ee_clob = x; }
unsigned char * m_tcc_ee_clob
Definition: ODTCCEEConfig.h:67
void ODTCCEEConfig::setTCCConfigurationFile ( std::string  x)
inline

Definition at line 27 of file ODTCCEEConfig.h.

References m_tcc_ee_file, and x.

27 { m_tcc_ee_file = x; }
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:70
void ODTCCEEConfig::setTestPatternFileUrl ( std::string  x)
inline

Definition at line 33 of file ODTCCEEConfig.h.

References m_test_url, and x.

33 { m_test_url = x; }
std::string m_test_url
Definition: ODTCCEEConfig.h:73
void ODTCCEEConfig::setTriggerPos ( int  id)
inline

Definition at line 37 of file ODTCCEEConfig.h.

References triggerObjects_cff::id, and m_trigpos.

void ODTCCEEConfig::writeDB ( )
privatenoexcept

Definition at line 145 of file ODTCCEEConfig.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getSLBClob().

147 {
148 
149  std::cout<<"updating the clob 2"<<std::endl;
150 
151  try {
152 
153  m_writeStmt->setInt(1, m_ID);
154  ResultSet* rset = m_writeStmt->executeQuery();
155 
156  while (rset->next ())
157  {
158  oracle::occi::Clob clob1 = rset->getClob (1);
159  oracle::occi::Clob clob2 = rset->getClob (2);
160  oracle::occi::Clob clob3 = rset->getClob (3);
161  cout << "Opening the clob in read write mode" << endl;
162  cout << "Populating the clobs" << endl;
166 
167  }
168 
169  m_writeStmt->executeUpdate();
170  m_writeStmt->closeResultSet (rset);
171 
172  } catch (SQLException &e) {
173  throw(std::runtime_error(std::string("ODTCCEEConfig::writeDB(): ")+e.getMessage()));
174  }
175  // Now get the ID
176  if (!this->fetchID()) {
177  throw(std::runtime_error("ODTCCEEConfig::writeDB: Failed to write"));
178  }
179 
180 
181 }
Statement * m_writeStmt
Definition: IODConfig.h:36
void populateClob(Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
Definition: IODConfig.h:83
std::string getSLBConfigurationFile() const
Definition: ODTCCEEConfig.h:32
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
Definition: IODConfig.h:22
std::string getTCCConfigurationFile() const
Definition: ODTCCEEConfig.h:28
std::string getLUTConfigurationFile() const
Definition: ODTCCEEConfig.h:30
unsigned int m_size
Definition: ODTCCEEConfig.h:77

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 17 of file ODTCCEEConfig.h.

Member Data Documentation

int ODTCCEEConfig::m_ID
private

Definition at line 66 of file ODTCCEEConfig.h.

Referenced by getId(), and setId().

unsigned char* ODTCCEEConfig::m_lut_clob
private

Definition at line 68 of file ODTCCEEConfig.h.

Referenced by getLUTClob(), and setLUTClob().

std::string ODTCCEEConfig::m_lut_file
private

Definition at line 71 of file ODTCCEEConfig.h.

Referenced by getLUTConfigurationFile(), and setLUTConfigurationFile().

int ODTCCEEConfig::m_ntest
private

Definition at line 74 of file ODTCCEEConfig.h.

Referenced by getNTestPatternsToLoad(), and setNTestPatternsToLoad().

unsigned int ODTCCEEConfig::m_size
private

Definition at line 77 of file ODTCCEEConfig.h.

int ODTCCEEConfig::m_slb
private

Definition at line 76 of file ODTCCEEConfig.h.

Referenced by getSLBLatency(), and setSLBLatency().

unsigned char* ODTCCEEConfig::m_slb_clob
private

Definition at line 69 of file ODTCCEEConfig.h.

Referenced by getSLBClob(), and setSLBClob().

std::string ODTCCEEConfig::m_slb_file
private

Definition at line 72 of file ODTCCEEConfig.h.

Referenced by getSLBConfigurationFile(), and setSLBConfigurationFile().

unsigned char* ODTCCEEConfig::m_tcc_ee_clob
private

Definition at line 67 of file ODTCCEEConfig.h.

Referenced by getTCCClob(), and setTCCClob().

std::string ODTCCEEConfig::m_tcc_ee_file
private

Definition at line 70 of file ODTCCEEConfig.h.

Referenced by getTCCConfigurationFile(), and setTCCConfigurationFile().

std::string ODTCCEEConfig::m_test_url
private

Definition at line 73 of file ODTCCEEConfig.h.

Referenced by getTestPatternFileUrl(), and setTestPatternFileUrl().

int ODTCCEEConfig::m_trigpos
private

Definition at line 75 of file ODTCCEEConfig.h.

Referenced by getTrigPos(), and setTriggerPos().