#include <ODRunConfigInfo.h>
Definition at line 12 of file ODRunConfigInfo.h.
ODRunConfigInfo::ODRunConfigInfo |
( |
| ) |
|
Definition at line 12 of file ODRunConfigInfo.cc.
References NULL.
std::string m_trigger_mode
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
ODRunConfigInfo::~ODRunConfigInfo |
( |
| ) |
|
void ODRunConfigInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 303 of file ODRunConfigInfo.cc.
References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
310 if(result->
getId()==0){
315 m_readStmt->setSQL(
"SELECT config_id, tag, version, run_type_def_id, run_mode_def_id, \ 316 num_of_sequences, description, defaults, trg_mode, num_of_events, db_timestamp, usage_status \ 317 FROM ECAL_RUN_CONFIGURATION_DAT WHERE config_id = :1 ");
323 result->
setId( rset->getInt(1) );
324 result->
setTag( rset->getString(2) );
335 Date dbdate = rset->getDate(11);
340 cout <<
" ODRunConfigInfo::fetchData(): " << e.getMessage() << endl;
341 throw(std::runtime_error(
"ODRunConfigInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
int fetchID() noexcept(false)
void setUsageStatus(std::string x)
void setDescription(std::string x)
void checkConnection() const noexcept(false)
void setNumberOfSequences(int n)
void setTriggerMode(std::string x)
oracle::occi::SQLException SQLException
void setTag(std::string x)
void setDBTime(const Tm &x)
void setNumberOfEvents(int x)
int ODRunConfigInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 75 of file ODRunConfigInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
90 stmt->setSQL(
"SELECT config_id from ECAL_RUN_CONFIGURATION_DAT " 92 " and version = :version " );
93 stmt->setString(1,
m_tag);
96 ResultSet* rset = stmt->executeQuery();
98 m_ID = rset->getInt(1);
102 m_conn->terminateStatement(stmt);
104 throw(std::runtime_error(
"ODRunConfigInfo::fetchID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setByID(int id) noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
int ODRunConfigInfo::fetchIDFromTagAndVersion |
( |
| ) |
|
|
privatenoexcept |
int ODRunConfigInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 112 of file ODRunConfigInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
122 stmt->setSQL(
"SELECT max(config_id) FROM ecal_run_configuration_dat " );
123 ResultSet* rset = stmt->executeQuery();
126 m_ID = rset->getInt(1);
130 m_conn->terminateStatement(stmt);
132 throw(std::runtime_error(
"ODRunConfigInfo::fetchIDLast: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setByID(int id) noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
int ODRunConfigInfo::fetchNextId |
( |
| ) |
|
|
privatenoexcept |
Definition at line 54 of file ODRunConfigInfo.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::result.
61 m_readStmt->setSQL(
"select ecal_run_sq.NextVal from dual");
63 while (rset->next ()){
64 result= rset->getInt(1);
70 throw(std::runtime_error(
"ODDCCConfig::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
Tm ODRunConfigInfo::getDBTime |
( |
| ) |
const |
|
inline |
int ODRunConfigInfo::getDefaults |
( |
| ) |
const |
|
inline |
std::string ODRunConfigInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODRunConfigInfo::getId |
( |
void |
| ) |
const |
|
inline |
int ODRunConfigInfo::getNumberOfEvents |
( |
| ) |
const |
|
inline |
int ODRunConfigInfo::getNumberOfSequences |
( |
| ) |
const |
|
inline |
RunModeDef ODRunConfigInfo::getRunModeDef |
( |
| ) |
const |
RunTypeDef ODRunConfigInfo::getRunTypeDef |
( |
| ) |
const |
std::string ODRunConfigInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
std::string ODRunConfigInfo::getTag |
( |
void |
| ) |
const |
|
inline |
std::string ODRunConfigInfo::getTriggerMode |
( |
| ) |
const |
|
inline |
std::string ODRunConfigInfo::getUsageStatus |
( |
| ) |
const |
|
inline |
int ODRunConfigInfo::getVersion |
( |
| ) |
const |
|
inline |
void ODRunConfigInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 192 of file ODRunConfigInfo.cc.
References MillePedeFileConverter_cfg::e.
204 m_writeStmt->setSQL(
"INSERT INTO ECAL_RUN_CONFIGURATION_DAT (CONFIG_ID, tag, version, run_type_def_id, " 205 " run_mode_def_id, num_of_sequences, defaults, trg_mode, num_of_events, description, usage_status ) " 206 " VALUES (:1, :2, :3 , :4, :5, :6 ,:7, :8, :9, :10 , :11)");
212 throw(std::runtime_error(
"ODRunConfigInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
int fetchNextId() noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void ODRunConfigInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 149 of file ODRunConfigInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and hcalTTPDigis_cfi::id.
159 stmt->setSQL(
"SELECT tag, version, run_type_def_id, run_mode_def_id, num_of_sequences, description, defaults," 160 " trg_mode,num_of_events, db_timestamp, usage_status" 161 " FROM ECAL_RUN_CONFIGURATION_DAT WHERE config_id = :1");
164 ResultSet* rset = stmt->executeQuery();
166 m_tag= rset->getString(1);
168 int run_type_id=rset->getInt(3);
169 int run_mode_id=rset->getInt(4);
175 Date dbdate = rset->getDate(10);
184 throw(std::runtime_error(
"ODRunConfigInfo::setByID: Given config_id is not in the database"));
186 m_conn->terminateStatement(stmt);
188 throw(std::runtime_error(
"ODRunConfigInfo::setByID: "+e.getMessage()));
std::string m_trigger_mode
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void setByID(int id) noexcept(false)
void setByID(int id) noexcept(false)
std::string m_description
void checkConnection() const noexcept(false)
std::string m_usage_status
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void ODRunConfigInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void ODRunConfigInfo::setDefaults |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODRunConfigInfo::setNumberOfEvents |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigInfo::setNumberOfSequences |
( |
int |
n | ) |
|
|
inline |
void ODRunConfigInfo::setRunModeDef |
( |
const RunModeDef & |
runModeDef | ) |
|
void ODRunConfigInfo::setRunTypeDef |
( |
const RunTypeDef & |
runTypeDef | ) |
|
void ODRunConfigInfo::setTag |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigInfo::setTriggerMode |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigInfo::setUsageStatus |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigInfo::setVersion |
( |
int |
x | ) |
|
|
inline |
int ODRunConfigInfo::updateDefaultCycle |
( |
| ) |
|
|
privatenoexcept |
Definition at line 265 of file ODRunConfigInfo.cc.
References MillePedeFileConverter_cfg::e, and GlobalTrackerMuonAlignment_cfi::writeDB.
279 stmt->setSQL(
"UPDATE ecal_run_configuration_dat set defaults=:1 where config_id=:2 " );
282 stmt->setInt(2,
m_ID);
284 stmt->executeUpdate();
286 m_conn->terminateStatement(stmt);
288 throw(std::runtime_error(
"ODRunConfigInfo::writeDB: "+e.getMessage()));
oracle::occi::Connection * m_conn
void writeDB() noexcept(false)
int fetchID() noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void ODRunConfigInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 217 of file ODRunConfigInfo.cc.
References gather_cfg::cout, cuy::dh, and MillePedeFileConverter_cfg::e.
252 throw(std::runtime_error(
"ODRunConfigInfo::writeDB: "+e.getMessage()));
256 throw(std::runtime_error(
"ODRunConfigInfo::writeDB Failed to write"));
261 cout<<
"ODRunConfigInfo::writeDB>> done inserting ODRunConfigInfo with id="<<
m_ID<<endl;
std::string getTriggerMode() const
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
int fetchID() noexcept(false)
std::string getDescription() const
int fetchID() noexcept(false)
void checkConnection() const noexcept(false)
void setByID(int id) noexcept(false)
int getNumberOfEvents() const
std::string getTag() const
oracle::occi::SQLException SQLException
int getNumberOfSequences() const
std::string getUsageStatus() const
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
Tm ODRunConfigInfo::m_db_time |
|
private |
int ODRunConfigInfo::m_defaults |
|
private |
std::string ODRunConfigInfo::m_description |
|
private |
int ODRunConfigInfo::m_ID |
|
private |
int ODRunConfigInfo::m_num_events |
|
private |
int ODRunConfigInfo::m_num_seq |
|
private |
std::string ODRunConfigInfo::m_tag |
|
private |
std::string ODRunConfigInfo::m_trigger_mode |
|
private |
std::string ODRunConfigInfo::m_usage_status |
|
private |
int ODRunConfigInfo::m_version |
|
private |