#include <ODTTCFConfig.h>
Definition at line 15 of file ODTTCFConfig.h.
◆ ODTTCFConfig()
ODTTCFConfig::ODTTCFConfig |
( |
| ) |
|
Definition at line 12 of file ODTTCFConfig.cc.
References clear().
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
◆ ~ODTTCFConfig()
ODTTCFConfig::~ODTTCFConfig |
( |
| ) |
|
|
override |
◆ clear()
void ODTTCFConfig::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 117 of file ODTTCFConfig.cc.
References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
121 if (
result->getId() == 0 && (
result->getConfigTag().empty())) {
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));
137 result->setConfigTag(rset->getString(2));
138 result->setTTCFConfigurationFile(rset->getString(3));
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)
oracle::occi::SQLException SQLException
◆ fetchID()
int ODTTCFConfig::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 154 of file ODTTCFConfig.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
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()
◆ fetchNextId()
int ODTTCFConfig::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
◆ getId()
int ODTTCFConfig::getId |
( |
void |
| ) |
const |
|
inline |
◆ getReg30()
int ODTTCFConfig::getReg30 |
( |
| ) |
|
|
inline |
◆ getRxBC0Delay()
int ODTTCFConfig::getRxBC0Delay |
( |
| ) |
|
|
inline |
◆ getSize()
unsigned int ODTTCFConfig::getSize |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string ODTTCFConfig::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTTCFClob()
unsigned char* ODTTCFConfig::getTTCFClob |
( |
| ) |
const |
|
inline |
◆ getTTCFConfigurationFile()
std::string ODTTCFConfig::getTTCFConfigurationFile |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
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.
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()
◆ setId()
void ODTTCFConfig::setId |
( |
int |
id | ) |
|
|
inline |
◆ setParameters()
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, mps_fire::end, alignmentValidation::fname, and AlCaHLTBitMon_QueryRunRegistry::string.
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") {
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)
◆ setReg30()
void ODTTCFConfig::setReg30 |
( |
int |
x | ) |
|
|
inline |
◆ setRxBC0Delay()
void ODTTCFConfig::setRxBC0Delay |
( |
int |
x | ) |
|
|
inline |
◆ setSize()
void ODTTCFConfig::setSize |
( |
unsigned int |
id | ) |
|
|
inline |
◆ setTTCFClob()
void ODTTCFConfig::setTTCFClob |
( |
unsigned char * |
x | ) |
|
|
inline |
◆ setTTCFConfigurationFile()
void ODTTCFConfig::setTTCFConfigurationFile |
( |
std::string |
x | ) |
|
|
inline |
◆ writeDB()
void ODTTCFConfig::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 90 of file ODTTCFConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
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)
std::string getTTCFConfigurationFile() const
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
◆ EcalCondDBInterface
◆ m_ID
◆ m_reg_30
int ODTTCFConfig::m_reg_30 |
|
private |
◆ m_rxbc0_delay
int ODTTCFConfig::m_rxbc0_delay |
|
private |
◆ m_size
unsigned int ODTTCFConfig::m_size |
|
private |
◆ m_ttcf_clob
unsigned char* ODTTCFConfig::m_ttcf_clob |
|
private |
◆ m_ttcf_file
std::string ODTTCFConfig::m_ttcf_file |
|
private |