#include <ODTTCFConfig.h>
Definition at line 15 of file ODTTCFConfig.h.
ODTTCFConfig::ODTTCFConfig |
( |
| ) |
|
ODTTCFConfig::~ODTTCFConfig |
( |
| ) |
|
|
override |
void ODTTCFConfig::clear |
( |
void |
| ) |
|
|
private |
Definition at line 139 of file ODTTCFConfig.cc.
References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
146 throw(std::runtime_error(
"ODTTCFConfig::fetchData(): no Id defined for this ODTTCFConfig "));
152 "FROM ECAL_TTCF_CONFIGURATION " 153 " where (ttcf_configuration_id = :1 or ttcf_tag= :2) " );
160 result->
setId(rset->getInt(1));
163 Clob clob = rset->getClob (4);
164 cout <<
"Opening the clob in Read only mode" << endl;
165 clob.open (OCCI_LOB_READONLY);
166 int clobLength=clob.length ();
167 cout <<
"Length of the clob is: " << clobLength << endl;
174 throw(std::runtime_error(
std::string(
"ODTTCFConfig::fetchData(): ")+e.getMessage()));
unsigned char * readClob(Clob &clob, int size) noexcept(false)
void checkConnection() const noexcept(false)
void setTTCFClob(unsigned char *x)
void setTTCFConfigurationFile(std::string x)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
std::string getConfigTag()
int ODTTCFConfig::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 180 of file ODTTCFConfig.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
190 stmt->setSQL(
"SELECT ttcf_configuration_id FROM ecal_ttcf_configuration " 191 "WHERE ttcf_tag=:ttcf_tag " 196 ResultSet* rset = stmt->executeQuery();
199 m_ID = rset->getInt(1);
203 m_conn->terminateStatement(stmt);
205 throw(std::runtime_error(
std::string(
"ODTTCFConfig::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 ODTTCFConfig::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
int ODTTCFConfig::getId |
( |
void |
| ) |
const |
|
inline |
int ODTTCFConfig::getReg30 |
( |
| ) |
|
|
inline |
int ODTTCFConfig::getRxBC0Delay |
( |
| ) |
|
|
inline |
unsigned int ODTTCFConfig::getSize |
( |
| ) |
const |
|
inline |
std::string ODTTCFConfig::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
unsigned char* ODTTCFConfig::getTTCFClob |
( |
| ) |
const |
|
inline |
std::string ODTTCFConfig::getTTCFConfigurationFile |
( |
| ) |
const |
|
inline |
void ODTTCFConfig::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 60 of file ODTTCFConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
68 m_writeStmt->setSQL(
"INSERT INTO ECAL_TTCF_CONFIGURATION (ttcf_configuration_id, ttcf_tag, " 69 " rxbc0_delay, reg_30 , ttcf_configuration_file , ttcf_configuration ) " 70 "VALUES (:1, :2, :3 , :4, :5, :6)");
79 oracle::occi::Clob clob(
m_conn);
86 std::cout<<
"inserted into CONFIGURATION with id="<<next_id<<std::endl;
90 m_writeStmt->setSQL (
"SELECT ttcf_configuration FROM ECAL_TTCF_CONFIGURATION WHERE" 91 " ttcf_configuration_id=:1 FOR UPDATE");
93 std::cout<<
"updating the clob 0"<<std::endl;
97 throw(std::runtime_error(
std::string(
"ODTTCFConfig::prepareWrite(): ")+e.getMessage()));
100 std::cout<<
"updating the clob 1 "<<std::endl;
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTTCFConfigurationFile() const
oracle::occi::SQLException SQLException
int fetchNextId() noexcept(false)
std::string getConfigTag()
void ODTTCFConfig::setId |
( |
int |
id | ) |
|
|
inline |
void ODTTCFConfig::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 211 of file ODTTCFConfig.cc.
References gather_cfg::cout, end, alignmentValidation::fname, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
216 for( std::map<std::string, std::string >::const_iterator ci=
217 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
219 if(ci->first==
"TTCF_CONFIGURATION_ID")
setConfigTag(ci->second);
220 if(ci->first==
"Configuration") {
225 pos = fname.find(
"=");
227 str3 = fname.substr (pos+1, pose-pos-2);
229 cout <<
"fname="<<fname<<
" and reduced is: "<<str3 << endl;
234 std::cout <<
"Going to read file: " << str3 << endl;
237 inpFile.open(str3.c_str());
242 bufsize = inpFile.tellg();
243 std::cout <<
" bufsize ="<<bufsize<< std::endl;
245 inpFile.seekg( 0,ios::beg );
250 }
else if ( ci->first ==
"RXBC0_DELAY" ) {
252 }
else if ( ci->first ==
"REG_30" ) {
253 setReg30( atoi( ci->second.c_str() ) );
void setTTCFConfigurationFile(std::string x)
void setConfigTag(std::string x)
void setRxBC0Delay(int x)
void ODTTCFConfig::setReg30 |
( |
int |
x | ) |
|
|
inline |
void ODTTCFConfig::setRxBC0Delay |
( |
int |
x | ) |
|
|
inline |
void ODTTCFConfig::setSize |
( |
unsigned int |
id | ) |
|
|
inline |
void ODTTCFConfig::setTTCFClob |
( |
unsigned char * |
x | ) |
|
|
inline |
void ODTTCFConfig::setTTCFConfigurationFile |
( |
std::string |
x | ) |
|
|
inline |
void ODTTCFConfig::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 104 of file ODTTCFConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
108 std::cout<<
"updating the clob 2"<<std::endl;
116 oracle::occi::Clob clob = rset->getClob (1);
117 cout <<
"Opening the clob in read write mode" << endl;
119 int clobLength=clob.length ();
120 cout <<
"Length of the clob is: " << clobLength << endl;
126 throw(std::runtime_error(
std::string(
"ODTTCFConfig::writeDB(): ")+e.getMessage()));
130 throw(std::runtime_error(
"ODTTCFConfig::writeDB: Failed to write"));
void populateClob(Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
int fetchID() noexcept(false)
std::string getTTCFConfigurationFile() const
oracle::occi::SQLException SQLException
int ODTTCFConfig::m_reg_30 |
|
private |
int ODTTCFConfig::m_rxbc0_delay |
|
private |
unsigned int ODTTCFConfig::m_size |
|
private |
unsigned char* ODTTCFConfig::m_ttcf_clob |
|
private |
std::string ODTTCFConfig::m_ttcf_file |
|
private |