#include <ODTTCciConfig.h>
Definition at line 15 of file ODTTCciConfig.h.
ODTTCciConfig::ODTTCciConfig |
( |
| ) |
|
Definition at line 15 of file ODTTCciConfig.cc.
References hitfit::clear(), and NULL.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_configuration_script
std::string m_configuration_script_params
ODTTCciConfig::~ODTTCciConfig |
( |
| ) |
|
void ODTTCciConfig::clear |
( |
void |
| ) |
|
|
private |
Definition at line 207 of file ODTTCciConfig.cc.
References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::i, and mps_fire::result.
Referenced by getSize().
213 throw(std::runtime_error(
"ODTTCciConfig::fetchData(): no Id defined for this ODTTCciConfig "));
219 "FROM ECAL_TTCci_CONFIGURATION " 220 " where ( ttcci_configuration_id = :1 or ttcci_tag=:2 )" );
228 result->
setId(rset->getInt(1));
239 Clob clob = rset->getClob (6);
240 cout <<
"Opening the clob in Read only mode" << endl;
241 clob.open (OCCI_LOB_READONLY);
242 int clobLength=clob.length ();
243 cout <<
"Length of the clob is: " << clobLength << endl;
247 cout<<
"the clob buffer is:"<<endl;
248 for (
int i = 0;
i < clobLength; ++
i)
249 cout << (
char) buffer[
i];
256 throw(std::runtime_error(
"ODTTCciConfig::fetchData(): "+e.getMessage()));
void setConfigurationScript(std::string x)
unsigned char * readClob(Clob &clob, int size) noexcept(false)
void setTTCciClob(unsigned char *x)
void checkConnection() const noexcept(false)
void setTTCciConfigurationFile(std::string x)
void setTrgMode(std::string x)
void setConfigurationScriptParams(std::string x)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
std::string getConfigTag()
int ODTTCciConfig::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 262 of file ODTTCciConfig.cc.
References MillePedeFileConverter_cfg::e.
Referenced by getSize().
272 stmt->setSQL(
"SELECT ttcci_configuration_id FROM ecal_ttcci_configuration " 273 "WHERE ttcci_tag=:ttcci_tag " 278 ResultSet* rset = stmt->executeQuery();
281 m_ID = rset->getInt(1);
285 m_conn->terminateStatement(stmt);
287 throw(std::runtime_error(
"ODTTCciConfig::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
std::string getConfigTag()
int ODTTCciConfig::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
Definition at line 43 of file ODTTCciConfig.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::result.
Referenced by getSize().
50 m_readStmt->setSQL(
"select ecal_ttcci_config_sq.NextVal from dual");
52 while (rset->next ()){
53 result= rset->getInt(1);
59 throw(std::runtime_error(
"ODTTCciConfig::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
std::string ODTTCciConfig::getConfigurationScript |
( |
| ) |
const |
|
inline |
std::string ODTTCciConfig::getConfigurationScriptParams |
( |
| ) |
const |
|
inline |
int ODTTCciConfig::getId |
( |
void |
| ) |
const |
|
inline |
unsigned int ODTTCciConfig::getSize |
( |
| ) |
const |
|
inline |
std::string ODTTCciConfig::getTable |
( |
| ) |
|
|
inlinevirtual |
std::string ODTTCciConfig::getTrgMode |
( |
| ) |
const |
|
inline |
int ODTTCciConfig::getTrgSleep |
( |
| ) |
const |
|
inline |
unsigned char* ODTTCciConfig::getTTCciClob |
( |
| ) |
const |
|
inline |
std::string ODTTCciConfig::getTTCciConfigurationFile |
( |
| ) |
const |
|
inline |
void ODTTCciConfig::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 67 of file ODTTCciConfig.cc.
References gather_cfg::cout, and MillePedeFileConverter_cfg::e.
Referenced by getSize().
76 m_writeStmt->setSQL(
"INSERT INTO ECAL_TTCci_CONFIGURATION (ttcci_configuration_id, ttcci_tag, " 77 " TTCCI_configuration_file, TRG_MODE, TRG_SLEEP, Configuration, configuration_script, configuration_script_params ) " 78 "VALUES (:1, :2, :3, :4, :5, :6, :7, :8 )");
88 oracle::occi::Clob clob(
m_conn);
95 std::cout<<
"TTCci Clob inserted into CONFIGURATION with id="<<next_id<<std::endl;
99 m_writeStmt->setSQL (
"SELECT Configuration FROM ECAL_TTCci_CONFIGURATION WHERE" 100 " ttcci_configuration_id=:1 FOR UPDATE");
102 std::cout<<
"updating the clob 0"<<std::endl;
106 throw(std::runtime_error(
"ODTTCciConfig::prepareWrite(): "+e.getMessage()));
109 std::cout<<
"updating the clob 1 "<<std::endl;
oracle::occi::Connection * m_conn
std::string getConfigurationScript() const
std::string getTTCciConfigurationFile() const
void checkConnection() const noexcept(false)
std::string getConfigurationScriptParams() const
int fetchNextId() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
std::string getTrgMode() const
void ODTTCciConfig::setConfigurationScript |
( |
std::string |
x | ) |
|
|
inline |
void ODTTCciConfig::setConfigurationScriptParams |
( |
std::string |
x | ) |
|
|
inline |
void ODTTCciConfig::setId |
( |
int |
id | ) |
|
|
inline |
void ODTTCciConfig::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 113 of file ODTTCciConfig.cc.
References gather_cfg::cout, end, alignmentValidation::fname, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getSize().
118 for( std::map<std::string, std::string >::const_iterator ci=
119 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
121 if(ci->first==
"TRG_MODE")
setTrgMode(ci->second);
122 if(ci->first==
"TRG_SLEEP")
setTrgSleep(atoi(ci->second.c_str()));
123 if(ci->first==
"TTCci_CONFIGURATION_ID")
setConfigTag(ci->second);
127 if(ci->first==
"Configuration") {
132 pos = fname.find(
"=");
134 str3 = fname.substr (pos+1, pose-pos-2);
136 cout <<
"fname="<<fname<<
" and reduced is: "<<str3 << endl;
141 std::cout <<
"Going to read file: " << str3 << endl;
144 inpFile.open(str3.c_str());
149 bufsize = inpFile.tellg();
150 std::cout <<
" bufsize ="<<bufsize<< std::endl;
152 inpFile.seekg( 0,ios::beg );
void setConfigurationScript(std::string x)
void setTTCciConfigurationFile(std::string x)
void setTrgMode(std::string x)
void setConfigurationScriptParams(std::string x)
void setConfigTag(std::string x)
void ODTTCciConfig::setSize |
( |
unsigned int |
id | ) |
|
|
inline |
void ODTTCciConfig::setTrgMode |
( |
std::string |
x | ) |
|
|
inline |
void ODTTCciConfig::setTrgSleep |
( |
int |
id | ) |
|
|
inline |
void ODTTCciConfig::setTTCciClob |
( |
unsigned char * |
x | ) |
|
|
inline |
void ODTTCciConfig::setTTCciConfigurationFile |
( |
std::string |
x | ) |
|
|
inline |
void ODTTCciConfig::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 163 of file ODTTCciConfig.cc.
References gather_cfg::cout, and MillePedeFileConverter_cfg::e.
Referenced by getSize().
168 std::cout<<
"updating the clob 2"<<std::endl;
177 while (rset->next ())
179 oracle::occi::Clob clob = rset->getClob (1);
180 cout <<
"Opening the clob in read write mode" << endl;
181 cout <<
"Populating the clob" << endl;
183 int clobLength=clob.length ();
184 cout <<
"Length of the clob is: " << clobLength << endl;
193 throw(std::runtime_error(
"ODTTCciConfig::writeDB(): "+e.getMessage()));
197 throw(std::runtime_error(
"ODTTCciConfig::writeDB: Failed to write"));
void populateClob(Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
std::string getTTCciConfigurationFile() const
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
std::string ODTTCciConfig::m_configuration_script |
|
private |
std::string ODTTCciConfig::m_configuration_script_params |
|
private |
int ODTTCciConfig::m_size |
|
private |
std::string ODTTCciConfig::m_trg_mode |
|
private |
int ODTTCciConfig::m_trg_sleep |
|
private |
unsigned char* ODTTCciConfig::m_ttcci_clob |
|
private |
std::string ODTTCciConfig::m_ttcci_file |
|
private |