#include <ODRunConfigInfo.h>
Definition at line 12 of file ODRunConfigInfo.h.
◆ ODRunConfigInfo()
ODRunConfigInfo::ODRunConfigInfo |
( |
| ) |
|
◆ ~ODRunConfigInfo()
ODRunConfigInfo::~ODRunConfigInfo |
( |
| ) |
|
|
override |
◆ clear()
void ODRunConfigInfo::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 269 of file ODRunConfigInfo.cc.
274 if (
result->getId() == 0) {
280 "SELECT config_id, tag, version, run_type_def_id, run_mode_def_id, \
281 num_of_sequences, description, defaults, trg_mode, num_of_events, db_timestamp, usage_status \
282 FROM ECAL_RUN_CONFIGURATION_DAT WHERE config_id = :1 ");
288 result->setId(rset->getInt(1));
289 result->setTag(rset->getString(2));
290 result->setVersion(rset->getInt(3));
295 result->setNumberOfSequences(rset->getInt(6));
296 result->setDescription(rset->getString(7));
297 result->setDefaults(rset->getInt(8));
298 result->setTriggerMode(rset->getString(9));
299 result->setNumberOfEvents(rset->getInt(10));
300 Date dbdate = rset->getDate(11);
301 result->setDBTime(
dh.dateToTm(dbdate));
302 result->setUsageStatus(rset->getString(12));
305 cout <<
" ODRunConfigInfo::fetchData(): " <<
e.getMessage() << endl;
306 throw(std::runtime_error(
"ODRunConfigInfo::fetchData(): " +
e.getMessage()));
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
◆ fetchID()
int ODRunConfigInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 65 of file ODRunConfigInfo.cc.
78 "SELECT config_id from ECAL_RUN_CONFIGURATION_DAT "
80 " and version = :version ");
81 stmt->setString(1,
m_tag);
84 ResultSet* rset = stmt->executeQuery();
86 m_ID = rset->getInt(1);
90 m_conn->terminateStatement(stmt);
92 throw(std::runtime_error(
"ODRunConfigInfo::fetchID: " +
e.getMessage()));
References cuy::dh, and MillePedeFileConverter_cfg::e.
◆ fetchIDFromTagAndVersion()
int ODRunConfigInfo::fetchIDFromTagAndVersion |
( |
| ) |
|
|
privatenoexcept |
◆ fetchIDLast()
int ODRunConfigInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 98 of file ODRunConfigInfo.cc.
105 stmt->setSQL(
"SELECT max(config_id) FROM ecal_run_configuration_dat ");
106 ResultSet* rset = stmt->executeQuery();
109 m_ID = rset->getInt(1);
113 m_conn->terminateStatement(stmt);
115 throw(std::runtime_error(
"ODRunConfigInfo::fetchIDLast: " +
e.getMessage()));
References cuy::dh, and MillePedeFileConverter_cfg::e.
◆ fetchNextId()
int ODRunConfigInfo::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
◆ getDBTime()
Tm ODRunConfigInfo::getDBTime |
( |
| ) |
const |
|
inline |
◆ getDefaults()
int ODRunConfigInfo::getDefaults |
( |
| ) |
const |
|
inline |
◆ getDescription()
std::string ODRunConfigInfo::getDescription |
( |
| ) |
const |
|
inline |
◆ getId()
int ODRunConfigInfo::getId |
( |
void |
| ) |
const |
|
inline |
◆ getNumberOfEvents()
int ODRunConfigInfo::getNumberOfEvents |
( |
| ) |
const |
|
inline |
◆ getNumberOfSequences()
int ODRunConfigInfo::getNumberOfSequences |
( |
| ) |
const |
|
inline |
◆ getRunModeDef()
RunModeDef ODRunConfigInfo::getRunModeDef |
( |
| ) |
const |
◆ getRunTypeDef()
RunTypeDef ODRunConfigInfo::getRunTypeDef |
( |
| ) |
const |
◆ getTable()
std::string ODRunConfigInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTag()
std::string ODRunConfigInfo::getTag |
( |
| ) |
const |
|
inline |
◆ getTriggerMode()
std::string ODRunConfigInfo::getTriggerMode |
( |
| ) |
const |
|
inline |
◆ getUsageStatus()
std::string ODRunConfigInfo::getUsageStatus |
( |
| ) |
const |
|
inline |
◆ getVersion()
int ODRunConfigInfo::getVersion |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator==()
◆ prepareWrite()
void ODRunConfigInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 170 of file ODRunConfigInfo.cc.
178 "INSERT INTO ECAL_RUN_CONFIGURATION_DAT (CONFIG_ID, tag, version, run_type_def_id, "
179 " run_mode_def_id, num_of_sequences, defaults, trg_mode, num_of_events, description, usage_status ) "
180 " VALUES (:1, :2, :3 , :4, :5, :6 ,:7, :8, :9, :10 , :11)");
186 throw(std::runtime_error(
"ODRunConfigInfo::prepareWrite(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e.
◆ setByID()
void ODRunConfigInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 128 of file ODRunConfigInfo.cc.
137 "SELECT tag, version, run_type_def_id, run_mode_def_id, num_of_sequences, description, defaults,"
138 " trg_mode,num_of_events, db_timestamp, usage_status"
139 " FROM ECAL_RUN_CONFIGURATION_DAT WHERE config_id = :1");
142 ResultSet* rset = stmt->executeQuery();
144 m_tag = rset->getString(1);
146 int run_type_id = rset->getInt(3);
147 int run_mode_id = rset->getInt(4);
153 Date dbdate = rset->getDate(10);
162 throw(std::runtime_error(
"ODRunConfigInfo::setByID: Given config_id is not in the database"));
164 m_conn->terminateStatement(stmt);
166 throw(std::runtime_error(
"ODRunConfigInfo::setByID: " +
e.getMessage()));
References cuy::dh, MillePedeFileConverter_cfg::e, and triggerObjects_cff::id.
◆ setDBTime()
void ODRunConfigInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
◆ setDefaults()
void ODRunConfigInfo::setDefaults |
( |
int |
x | ) |
|
|
inline |
◆ setDescription()
void ODRunConfigInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
◆ setId()
void ODRunConfigInfo::setId |
( |
int |
id | ) |
|
|
inline |
◆ setNumberOfEvents()
void ODRunConfigInfo::setNumberOfEvents |
( |
int |
x | ) |
|
|
inline |
◆ setNumberOfSequences()
void ODRunConfigInfo::setNumberOfSequences |
( |
int |
n | ) |
|
|
inline |
◆ setRunModeDef()
void ODRunConfigInfo::setRunModeDef |
( |
const RunModeDef & |
runModeDef | ) |
|
◆ setRunTypeDef()
void ODRunConfigInfo::setRunTypeDef |
( |
const RunTypeDef & |
runTypeDef | ) |
|
◆ setTag()
void ODRunConfigInfo::setTag |
( |
std::string |
x | ) |
|
|
inline |
◆ setTriggerMode()
void ODRunConfigInfo::setTriggerMode |
( |
std::string |
x | ) |
|
|
inline |
◆ setUsageStatus()
void ODRunConfigInfo::setUsageStatus |
( |
std::string |
x | ) |
|
|
inline |
◆ setVersion()
void ODRunConfigInfo::setVersion |
( |
int |
x | ) |
|
|
inline |
◆ updateDefaultCycle()
int ODRunConfigInfo::updateDefaultCycle |
( |
| ) |
|
|
privatenoexcept |
◆ writeDB()
void ODRunConfigInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
◆ EcalCondDBInterface
◆ m_db_time
Tm ODRunConfigInfo::m_db_time |
|
private |
◆ m_defaults
int ODRunConfigInfo::m_defaults |
|
private |
◆ m_description
std::string ODRunConfigInfo::m_description |
|
private |
◆ m_ID
int ODRunConfigInfo::m_ID |
|
private |
◆ m_num_events
int ODRunConfigInfo::m_num_events |
|
private |
◆ m_num_seq
int ODRunConfigInfo::m_num_seq |
|
private |
◆ m_runModeDef
◆ m_runTypeDef
◆ m_tag
std::string ODRunConfigInfo::m_tag |
|
private |
◆ m_trigger_mode
std::string ODRunConfigInfo::m_trigger_mode |
|
private |
◆ m_usage_status
std::string ODRunConfigInfo::m_usage_status |
|
private |
◆ m_version
int ODRunConfigInfo::m_version |
|
private |