#include <ODTTCFConfig.h>
Definition at line 15 of file ODTTCFConfig.h.
ODTTCFConfig::ODTTCFConfig |
( |
| ) |
|
ODTTCFConfig::~ODTTCFConfig |
( |
| ) |
|
|
override |
void ODTTCFConfig::clear |
( |
void |
| ) |
|
|
private |
Definition at line 117 of file ODTTCFConfig.cc.
References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
122 throw(std::runtime_error(
"ODTTCFConfig::fetchData(): no Id defined for this ODTTCFConfig "));
128 "FROM ECAL_TTCF_CONFIGURATION " 129 " where (ttcf_configuration_id = :1 or ttcf_tag= :2) ");
136 result->
setId(rset->getInt(1));
139 Clob clob = rset->getClob(4);
140 cout <<
"Opening the clob in Read only mode" << endl;
141 clob.open(OCCI_LOB_READONLY);
142 int clobLength = clob.length();
143 cout <<
"Length of the clob is: " << clobLength << endl;
150 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 154 of file ODTTCFConfig.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
164 "SELECT ttcf_configuration_id FROM ecal_ttcf_configuration " 165 "WHERE ttcf_tag=:ttcf_tag ");
169 ResultSet* rset = stmt->executeQuery();
172 m_ID = rset->getInt(1);
176 m_conn->terminateStatement(stmt);
178 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 48 of file ODTTCFConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
55 "INSERT INTO ECAL_TTCF_CONFIGURATION (ttcf_configuration_id, ttcf_tag, " 56 " rxbc0_delay, reg_30 , ttcf_configuration_file , ttcf_configuration ) " 57 "VALUES (:1, :2, :3 , :4, :5, :6)");
66 oracle::occi::Clob clob(
m_conn);
73 std::cout <<
"inserted into CONFIGURATION with id=" << next_id << std::endl;
78 "SELECT ttcf_configuration FROM ECAL_TTCF_CONFIGURATION WHERE" 79 " ttcf_configuration_id=:1 FOR UPDATE");
81 std::cout <<
"updating the clob 0" << std::endl;
84 throw(std::runtime_error(
std::string(
"ODTTCFConfig::prepareWrite(): ") + e.getMessage()));
87 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 184 of file ODTTCFConfig.cc.
References gather_cfg::cout, end, alignmentValidation::fname, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
188 for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
189 if (ci->first ==
"TTCF_CONFIGURATION_ID")
191 if (ci->first ==
"Configuration") {
196 pos = fname.find(
"=");
198 str3 = fname.substr(pos + 1, pose - pos - 2);
200 cout <<
"fname=" << fname <<
" and reduced is: " << str3 << endl;
204 std::cout <<
"Going to read file: " << str3 << endl;
207 inpFile.open(str3.c_str());
212 bufsize = inpFile.tellg();
213 std::cout <<
" bufsize =" << bufsize << std::endl;
215 inpFile.seekg(0, ios::beg);
220 }
else if (ci->first ==
"RXBC0_DELAY") {
222 }
else if (ci->first ==
"REG_30") {
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 90 of file ODTTCFConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getReg30().
91 std::cout <<
"updating the clob 2" << std::endl;
99 oracle::occi::Clob clob = rset->getClob(1);
100 cout <<
"Opening the clob in read write mode" << endl;
102 int clobLength = clob.length();
103 cout <<
"Length of the clob is: " << clobLength << endl;
109 throw(std::runtime_error(
std::string(
"ODTTCFConfig::writeDB(): ") + e.getMessage()));
113 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 |