#include <ODTTCciConfig.h>
Definition at line 15 of file ODTTCciConfig.h.
◆ ODTTCciConfig()
ODTTCciConfig::ODTTCciConfig |
( |
| ) |
|
Definition at line 15 of file ODTTCciConfig.cc.
References l1ct::clear().
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_configuration_script
std::string m_configuration_script_params
◆ ~ODTTCciConfig()
ODTTCciConfig::~ODTTCciConfig |
( |
| ) |
|
|
override |
◆ clear()
void ODTTCciConfig::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 182 of file ODTTCciConfig.cc.
References edmScanValgrind::buffer, gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
185 if (
result->getId() == 0 && (
result->getConfigTag().empty())) {
186 throw(std::runtime_error(
"ODTTCciConfig::fetchData(): no Id defined for this ODTTCciConfig "));
192 "FROM ECAL_TTCci_CONFIGURATION " 193 " where ( ttcci_configuration_id = :1 or ttcci_tag=:2 )");
201 result->setId(rset->getInt(1));
202 result->setConfigTag(rset->getString(2));
204 result->setTTCciConfigurationFile(rset->getString(3));
205 result->setTrgMode(rset->getString(4));
206 result->setTrgSleep(rset->getInt(5));
208 result->setConfigurationScript(rset->getString(7));
209 result->setConfigurationScriptParams(rset->getString(8));
211 Clob clob = rset->getClob(6);
212 cout <<
"Opening the clob in Read only mode" << endl;
213 clob.open(OCCI_LOB_READONLY);
214 int clobLength = clob.length();
215 cout <<
"Length of the clob is: " << clobLength << endl;
219 cout <<
"the clob buffer is:" << endl;
220 for (
int i = 0;
i < clobLength; ++
i)
227 throw(std::runtime_error(
std::string(
"ODTTCciConfig::fetchData(): ") +
e.getMessage()));
unsigned char * readClob(Clob &clob, int size) noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
◆ fetchID()
int ODTTCciConfig::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 231 of file ODTTCciConfig.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
241 "SELECT ttcci_configuration_id FROM ecal_ttcci_configuration " 242 "WHERE ttcci_tag=:ttcci_tag ");
246 ResultSet* rset = stmt->executeQuery();
249 m_ID = rset->getInt(1);
253 m_conn->terminateStatement(stmt);
255 throw(std::runtime_error(
std::string(
"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()
◆ fetchNextId()
int ODTTCciConfig::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
◆ getConfigurationScript()
std::string ODTTCciConfig::getConfigurationScript |
( |
| ) |
const |
|
inline |
◆ getConfigurationScriptParams()
std::string ODTTCciConfig::getConfigurationScriptParams |
( |
| ) |
const |
|
inline |
◆ getId()
int ODTTCciConfig::getId |
( |
void |
| ) |
const |
|
inline |
◆ getSize()
unsigned int ODTTCciConfig::getSize |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string ODTTCciConfig::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTrgMode()
std::string ODTTCciConfig::getTrgMode |
( |
| ) |
const |
|
inline |
◆ getTrgSleep()
int ODTTCciConfig::getTrgSleep |
( |
| ) |
const |
|
inline |
◆ getTTCciClob()
unsigned char* ODTTCciConfig::getTTCciClob |
( |
| ) |
const |
|
inline |
◆ getTTCciConfigurationFile()
std::string ODTTCciConfig::getTTCciConfigurationFile |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void ODTTCciConfig::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 58 of file ODTTCciConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
66 "INSERT INTO ECAL_TTCci_CONFIGURATION (ttcci_configuration_id, ttcci_tag, " 67 " TTCCI_configuration_file, TRG_MODE, TRG_SLEEP, Configuration, configuration_script, " 68 "configuration_script_params ) " 69 "VALUES (:1, :2, :3, :4, :5, :6, :7, :8 )");
79 oracle::occi::Clob clob(
m_conn);
86 std::cout <<
"TTCci Clob inserted into CONFIGURATION with id=" << next_id << std::endl;
91 "SELECT Configuration FROM ECAL_TTCci_CONFIGURATION WHERE" 92 " ttcci_configuration_id=:1 FOR UPDATE");
94 std::cout <<
"updating the clob 0" << std::endl;
97 throw(std::runtime_error(
std::string(
"ODTTCciConfig::prepareWrite(): ") +
e.getMessage()));
100 std::cout <<
"updating the clob 1 " << std::endl;
std::string getTTCciConfigurationFile() const
oracle::occi::Connection * m_conn
std::string getConfigurationScriptParams() const
void checkConnection() const noexcept(false)
std::string getConfigurationScript() const
std::string getTrgMode() const
int fetchNextId() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
◆ setConfigurationScript()
void ODTTCciConfig::setConfigurationScript |
( |
std::string |
x | ) |
|
|
inline |
◆ setConfigurationScriptParams()
void ODTTCciConfig::setConfigurationScriptParams |
( |
std::string |
x | ) |
|
|
inline |
◆ setId()
void ODTTCciConfig::setId |
( |
int |
id | ) |
|
|
inline |
◆ setParameters()
void ODTTCciConfig::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 103 of file ODTTCciConfig.cc.
References gather_cfg::cout, mps_fire::end, alignmentValidation::fname, and AlCaHLTBitMon_QueryRunRegistry::string.
107 for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
108 if (ci->first ==
"TRG_MODE")
110 if (ci->first ==
"TRG_SLEEP")
112 if (ci->first ==
"TTCci_CONFIGURATION_ID")
114 if (ci->first ==
"CONFIGURATION_SCRIPT")
116 if (ci->first ==
"CONFIGURATION_SCRIPT_PARAMS")
118 if (ci->first ==
"CONFIGURATION_SCRIPT_PARAMETERS")
120 if (ci->first ==
"Configuration") {
129 cout <<
"fname=" <<
fname <<
" and reduced is: " << str3 << endl;
133 std::cout <<
"Going to read file: " << str3 << endl;
136 inpFile.open(str3.c_str());
141 bufsize = inpFile.tellg();
142 std::cout <<
" bufsize =" << bufsize << std::endl;
144 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)
◆ setSize()
void ODTTCciConfig::setSize |
( |
unsigned int |
id | ) |
|
|
inline |
◆ setTrgMode()
void ODTTCciConfig::setTrgMode |
( |
std::string |
x | ) |
|
|
inline |
◆ setTrgSleep()
void ODTTCciConfig::setTrgSleep |
( |
int |
id | ) |
|
|
inline |
◆ setTTCciClob()
void ODTTCciConfig::setTTCciClob |
( |
unsigned char * |
x | ) |
|
|
inline |
◆ setTTCciConfigurationFile()
void ODTTCciConfig::setTTCciConfigurationFile |
( |
std::string |
x | ) |
|
|
inline |
◆ writeDB()
void ODTTCciConfig::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 152 of file ODTTCciConfig.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
153 std::cout <<
"updating the clob 2" << std::endl;
159 while (rset->next()) {
160 oracle::occi::Clob clob = rset->getClob(1);
161 cout <<
"Opening the clob in read write mode" << endl;
162 cout <<
"Populating the clob" << endl;
164 int clobLength = clob.length();
165 cout <<
"Length of the clob is: " << clobLength << endl;
174 throw(std::runtime_error(
std::string(
"ODTTCciConfig::writeDB(): ") +
e.getMessage()));
178 throw(std::runtime_error(
"ODTTCciConfig::writeDB: Failed to write"));
std::string getTTCciConfigurationFile() const
void populateClob(Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
◆ EcalCondDBInterface
◆ m_configuration_script
std::string ODTTCciConfig::m_configuration_script |
|
private |
◆ m_configuration_script_params
std::string ODTTCciConfig::m_configuration_script_params |
|
private |
◆ m_ID
◆ m_size
int ODTTCciConfig::m_size |
|
private |
◆ m_trg_mode
std::string ODTTCciConfig::m_trg_mode |
|
private |
◆ m_trg_sleep
int ODTTCciConfig::m_trg_sleep |
|
private |
◆ m_ttcci_clob
unsigned char* ODTTCciConfig::m_ttcci_clob |
|
private |
◆ m_ttcci_file
std::string ODTTCciConfig::m_ttcci_file |
|
private |