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::ODTCCEEConfig ( )

Definition at line 12 of file ODTCCEEConfig.cc.

References l1ct::clear().

12  {
13  m_env = nullptr;
14  m_conn = nullptr;
15  m_writeStmt = nullptr;
16  m_readStmt = nullptr;
17  m_config_tag = "";
18 
19  m_ID = 0;
20  clear();
21  m_size = 0;
22 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
std::string m_config_tag
Definition: IODConfig.h:25
Statement * m_readStmt
Definition: IODConfig.h:34
unsigned int m_size
Definition: ODTCCEEConfig.h:75

◆ ~ODTCCEEConfig()

ODTCCEEConfig::~ODTCCEEConfig ( )
override

Definition at line 32 of file ODTCCEEConfig.cc.

32 {}

Member Function Documentation

◆ clear()

void ODTCCEEConfig::clear ( void  )
private

Definition at line 24 of file ODTCCEEConfig.cc.

24  {
25  m_tcc_ee_file = "";
26  m_lut_file = "";
27  m_slb_file = "";
28  m_test_url = "";
29  m_ntest = 0;
30 }
std::string m_lut_file
Definition: ODTCCEEConfig.h:69
std::string m_tcc_ee_file
Definition: ODTCCEEConfig.h:68
std::string m_test_url
Definition: ODTCCEEConfig.h:71
std::string m_slb_file
Definition: ODTCCEEConfig.h:70

◆ fetchData()

void ODTCCEEConfig::fetchData ( ODTCCEEConfig result)
privatenoexcept

Definition at line 167 of file ODTCCEEConfig.cc.

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

167  {
168  this->checkConnection();
169  result->clear();
170  if (result->getId() == 0 && (result->getConfigTag().empty())) {
171  throw(std::runtime_error("ODTCCEEConfig::fetchData(): no Id defined for this ODTCCEEConfig "));
172  }
173 
174  try {
175  m_readStmt->setSQL(
176  "SELECT * "
177  "FROM ECAL_TCC_EE_CONFIGURATION d "
178  " where (tcc_ee_configuration_id = :1 or tcc_ee_tag=:2 )");
179  m_readStmt->setInt(1, result->getId());
180  m_readStmt->setString(2, result->getConfigTag());
181  ResultSet* rset = m_readStmt->executeQuery();
182 
183  rset->next();
184  // the first is the id
185  result->setId(rset->getInt(1));
186  result->setConfigTag(rset->getString(2));
187 
188  result->setTCCConfigurationFile(rset->getString(3));
189  result->setLUTConfigurationFile(rset->getString(4));
190  result->setSLBConfigurationFile(rset->getString(5));
191  result->setTestPatternFileUrl(rset->getString(6));
192  result->setNTestPatternsToLoad(rset->getInt(7));
193  result->setSLBLatency(rset->getInt(12));
194  //
195 
196  Clob clob1 = rset->getClob(8);
197  cout << "Opening the clob in Read only mode" << endl;
198  clob1.open(OCCI_LOB_READONLY);
199  int clobLength = clob1.length();
200  cout << "Length of the clob1 is: " << clobLength << endl;
201  unsigned char* buffer = readClob(clob1, clobLength);
202  clob1.close();
203  cout << "the clob buffer is:" << endl;
204  for (int i = 0; i < clobLength; ++i)
205  cout << (char)buffer[i];
206  cout << endl;
207  result->setTCCClob(buffer);
208 
209  Clob clob2 = rset->getClob(9);
210  cout << "Opening the clob in Read only mode" << endl;
211  clob2.open(OCCI_LOB_READONLY);
212  clobLength = clob2.length();
213  cout << "Length of the clob2 is: " << clobLength << endl;
214  unsigned char* buffer2 = readClob(clob2, clobLength);
215  clob2.close();
216  cout << "the clob buffer is:" << endl;
217  for (int i = 0; i < clobLength; ++i)
218  cout << (char)buffer2[i];
219  cout << endl;
220  result->setLUTClob(buffer2);
221 
222  Clob clob3 = rset->getClob(10);
223  cout << "Opening the clob in Read only mode" << endl;
224  clob3.open(OCCI_LOB_READONLY);
225  clobLength = clob3.length();
226  cout << "Length of the clob3 is: " << clobLength << endl;
227  unsigned char* buffer3 = readClob(clob3, clobLength);
228  clob3.close();
229  cout << "the clob buffer is:" << endl;
230  for (int i = 0; i < clobLength; ++i)
231  cout << (char)buffer3[i];
232  cout << endl;
233  result->setSLBClob(buffer3);
234 
235  } catch (SQLException& e) {
236  throw(std::runtime_error(std::string("ODTCCEEConfig::fetchData(): ") + e.getMessage()));
237  }
238 }
unsigned char * readClob(Clob &clob, int size) noexcept(false)
Definition: IODConfig.h:124
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::Clob Clob
Definition: IODConfig.h:23
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34

◆ fetchID()

int ODTCCEEConfig::fetchID ( )
privatenoexcept

Definition at line 240 of file ODTCCEEConfig.cc.

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

240  {
241  if (m_ID != 0) {
242  return m_ID;
243  }
244 
245  this->checkConnection();
246 
247  try {
248  Statement* stmt = m_conn->createStatement();
249  stmt->setSQL(
250  "SELECT tcc_ee_configuration_id FROM ecal_tcc_ee_configuration "
251  "WHERE tcc_ee_tag=:tcc_ee_tag ");
252 
253  stmt->setString(1, getConfigTag());
254 
255  ResultSet* rset = stmt->executeQuery();
256 
257  if (rset->next()) {
258  m_ID = rset->getInt(1);
259  } else {
260  m_ID = 0;
261  }
262  m_conn->terminateStatement(stmt);
263  } catch (SQLException& e) {
264  throw(std::runtime_error(std::string("ODTCCEEConfig::fetchID: ") + e.getMessage()));
265  }
266 
267  return m_ID;
268 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::Statement Statement
Definition: IODConfig.h:21
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getConfigTag()
Definition: IODConfig.h:30

◆ fetchNextId()

int ODTCCEEConfig::fetchNextId ( )
privatenoexcept

Definition at line 34 of file ODTCCEEConfig.cc.

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

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

◆ getId()

int ODTCCEEConfig::getId ( void  ) const
inline

Definition at line 25 of file ODTCCEEConfig.h.

References m_ID.

25 { return m_ID; }

◆ getLUTClob()

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:66

◆ getLUTConfigurationFile()

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:69

◆ getNTestPatternsToLoad()

int ODTCCEEConfig::getNTestPatternsToLoad ( ) const
inline

Definition at line 36 of file ODTCCEEConfig.h.

References m_ntest.

36 { return m_ntest; }

◆ getSLBClob()

unsigned char* ODTCCEEConfig::getSLBClob ( ) const
inline

Definition at line 50 of file ODTCCEEConfig.h.

References m_slb_clob.

50 { return m_slb_clob; }
unsigned char * m_slb_clob
Definition: ODTCCEEConfig.h:67

◆ getSLBConfigurationFile()

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:70

◆ getSLBLatency()

int ODTCCEEConfig::getSLBLatency ( ) const
inline

Definition at line 41 of file ODTCCEEConfig.h.

References m_slb.

41 { return m_slb; }

◆ getTable()

std::string ODTCCEEConfig::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 22 of file ODTCCEEConfig.h.

22 { return "ECAL_TCC_EE_CONFIGURATION"; }

◆ getTCCClob()

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:65

◆ getTCCConfigurationFile()

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:68

◆ getTestPatternFileUrl()

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:71

◆ getTrigPos()

int ODTCCEEConfig::getTrigPos ( ) const
inline

Definition at line 38 of file ODTCCEEConfig.h.

References m_trigpos.

38 { return m_trigpos; }

◆ prepareWrite()

void ODTCCEEConfig::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 81 of file ODTCCEEConfig.cc.

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

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

◆ setId()

void ODTCCEEConfig::setId ( int  id)
inline

Definition at line 24 of file ODTCCEEConfig.h.

References l1ctLayer2EG_cff::id, and m_ID.

◆ setLUTClob()

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:66

◆ setLUTConfigurationFile()

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:69

◆ setNTestPatternsToLoad()

void ODTCCEEConfig::setNTestPatternsToLoad ( int  id)
inline

Definition at line 35 of file ODTCCEEConfig.h.

References l1ctLayer2EG_cff::id, and m_ntest.

◆ setParameters()

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

Definition at line 53 of file ODTCCEEConfig.cc.

53  {
54  // parses the result of the XML parser that is a map of
55  // string string with variable name variable value
56 
57  for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
58  if (ci->first == "TCC_EE_CONFIGURATION_ID")
59  setConfigTag(ci->second);
60  if (ci->first == "N_TESTPATTERNS_TO_LOAD")
61  setNTestPatternsToLoad(atoi(ci->second.c_str()));
62  if (ci->first == "LUT_CONFIGURATION_FILE")
63  setLUTConfigurationFile(ci->second);
64  if (ci->first == "CONFIGURATION_FILE")
65  setTCCConfigurationFile(ci->second);
66  if (ci->first == "SLB_CONFIGURATION_FILE")
67  setSLBConfigurationFile(ci->second);
68  if (ci->first == "TESTPATTERNFILE_URL")
69  setTestPatternFileUrl(ci->second);
70 
71  if (ci->first == "SLB_LATENCY")
72  setSLBLatency(atoi(ci->second.c_str()));
73  if (ci->first == "SLBLATENCY")
74  setSLBLatency(atoi(ci->second.c_str()));
75 
76  if (ci->first == "TRIGGER_POS")
77  setTriggerPos(atoi(ci->second.c_str()));
78  }
79 }
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:29
void setNTestPatternsToLoad(int id)
Definition: ODTCCEEConfig.h:35
void setTestPatternFileUrl(std::string x)
Definition: ODTCCEEConfig.h:33

◆ setSLBClob()

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:67

◆ setSLBConfigurationFile()

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:70

◆ setSLBLatency()

void ODTCCEEConfig::setSLBLatency ( int  id)
inline

Definition at line 40 of file ODTCCEEConfig.h.

References l1ctLayer2EG_cff::id, and m_slb.

◆ setTCCClob()

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:65

◆ setTCCConfigurationFile()

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:68

◆ setTestPatternFileUrl()

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:71

◆ setTriggerPos()

void ODTCCEEConfig::setTriggerPos ( int  id)
inline

Definition at line 37 of file ODTCCEEConfig.h.

References l1ctLayer2EG_cff::id, and m_trigpos.

◆ writeDB()

void ODTCCEEConfig::writeDB ( )
privatenoexcept

Definition at line 137 of file ODTCCEEConfig.cc.

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

137  {
138  std::cout << "updating the clob 2" << std::endl;
139 
140  try {
141  m_writeStmt->setInt(1, m_ID);
142  ResultSet* rset = m_writeStmt->executeQuery();
143 
144  while (rset->next()) {
145  oracle::occi::Clob clob1 = rset->getClob(1);
146  oracle::occi::Clob clob2 = rset->getClob(2);
147  oracle::occi::Clob clob3 = rset->getClob(3);
148  cout << "Opening the clob in read write mode" << endl;
149  cout << "Populating the clobs" << endl;
153  }
154 
155  m_writeStmt->executeUpdate();
156  m_writeStmt->closeResultSet(rset);
157 
158  } catch (SQLException& e) {
159  throw(std::runtime_error(std::string("ODTCCEEConfig::writeDB(): ") + e.getMessage()));
160  }
161  // Now get the ID
162  if (!this->fetchID()) {
163  throw(std::runtime_error("ODTCCEEConfig::writeDB: Failed to write"));
164  }
165 }
std::string getTCCConfigurationFile() const
Definition: ODTCCEEConfig.h:28
Statement * m_writeStmt
Definition: IODConfig.h:33
std::string getSLBConfigurationFile() const
Definition: ODTCCEEConfig.h:32
void populateClob(Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
Definition: IODConfig.h:67
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getLUTConfigurationFile() const
Definition: ODTCCEEConfig.h:30
unsigned int m_size
Definition: ODTCCEEConfig.h:75

Friends And Related Function Documentation

◆ EcalCondDBInterface

friend class EcalCondDBInterface
friend

Definition at line 17 of file ODTCCEEConfig.h.

Member Data Documentation

◆ m_ID

int ODTCCEEConfig::m_ID
private

Definition at line 64 of file ODTCCEEConfig.h.

Referenced by getId(), and setId().

◆ m_lut_clob

unsigned char* ODTCCEEConfig::m_lut_clob
private

Definition at line 66 of file ODTCCEEConfig.h.

Referenced by getLUTClob(), and setLUTClob().

◆ m_lut_file

std::string ODTCCEEConfig::m_lut_file
private

Definition at line 69 of file ODTCCEEConfig.h.

Referenced by getLUTConfigurationFile(), and setLUTConfigurationFile().

◆ m_ntest

int ODTCCEEConfig::m_ntest
private

Definition at line 72 of file ODTCCEEConfig.h.

Referenced by getNTestPatternsToLoad(), and setNTestPatternsToLoad().

◆ m_size

unsigned int ODTCCEEConfig::m_size
private

Definition at line 75 of file ODTCCEEConfig.h.

◆ m_slb

int ODTCCEEConfig::m_slb
private

Definition at line 74 of file ODTCCEEConfig.h.

Referenced by getSLBLatency(), and setSLBLatency().

◆ m_slb_clob

unsigned char* ODTCCEEConfig::m_slb_clob
private

Definition at line 67 of file ODTCCEEConfig.h.

Referenced by getSLBClob(), and setSLBClob().

◆ m_slb_file

std::string ODTCCEEConfig::m_slb_file
private

Definition at line 70 of file ODTCCEEConfig.h.

Referenced by getSLBConfigurationFile(), and setSLBConfigurationFile().

◆ m_tcc_ee_clob

unsigned char* ODTCCEEConfig::m_tcc_ee_clob
private

Definition at line 65 of file ODTCCEEConfig.h.

Referenced by getTCCClob(), and setTCCClob().

◆ m_tcc_ee_file

std::string ODTCCEEConfig::m_tcc_ee_file
private

Definition at line 68 of file ODTCCEEConfig.h.

Referenced by getTCCConfigurationFile(), and setTCCConfigurationFile().

◆ m_test_url

std::string ODTCCEEConfig::m_test_url
private

Definition at line 71 of file ODTCCEEConfig.h.

Referenced by getTestPatternFileUrl(), and setTestPatternFileUrl().

◆ m_trigpos

int ODTCCEEConfig::m_trigpos
private

Definition at line 73 of file ODTCCEEConfig.h.

Referenced by getTrigPos(), and setTriggerPos().