#include <ODCond2ConfInfo.h>
Definition at line 12 of file ODCond2ConfInfo.h.
ODCond2ConfInfo::ODCond2ConfInfo |
( |
| ) |
|
ODCond2ConfInfo::~ODCond2ConfInfo |
( |
| ) |
|
|
override |
void ODCond2ConfInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 154 of file ODCond2ConfInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getDBDate().
160 if (result->
getId() == 0) {
161 throw(std::runtime_error(
"ODCond2ConfInfo::fetchData(): no Id defined for this ODCond2ConfInfo "));
166 "SELECT rec_id, REC_TYPE, rec_date, location, " 167 "run_number, short_desc, db_timestamp FROM " +
169 " , COND2CONF_TYPE_DEF , location_def " 170 " where rec_id = :1 AND COND2CONF_TYPE_DEF.def_id=" +
171 getTable() +
".REC_TYPE_ID AND location_def.def_id=LOCATION_ID ");
181 result->
setType(rset->getString(2));
182 Date startDate = rset->getDate(3);
186 Date endDate = rset->getDate(7);
192 throw(std::runtime_error(
std::string(
"ODCond2ConfInfo::fetchData(): ") + e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
void setDescription(std::string x)
oracle::occi::SQLException SQLException
void setLocation(std::string x)
void setRunNumber(int id)
void setType(std::string x)
int ODCond2ConfInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 196 of file ODCond2ConfInfo.cc.
References MillePedeFileConverter_cfg::e, DeadROCCounter::getRunNumber(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getDBDate().
208 stmt->setSQL(
"SELECT rec_id FROM " +
getTable() +
209 "WHERE rec_type_id=:1 and (run_number=:2 or short_desc=:3 ) order by rec_id DESC ");
215 ResultSet* rset = stmt->executeQuery();
218 m_ID = rset->getInt(1);
222 m_conn->terminateStatement(stmt);
224 throw(std::runtime_error(
std::string(
"ODCond2ConfInfo::fetchID: ") + e.getMessage()));
oracle::occi::Connection * m_conn
std::string getDescription() const
std::string getTable() override
void fetchParents() noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
int ODCond2ConfInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
void ODCond2ConfInfo::fetchParents |
( |
| ) |
|
|
privatenoexcept |
Tm ODCond2ConfInfo::getDBDate |
( |
| ) |
const |
|
inline |
Definition at line 40 of file ODCond2ConfInfo.h.
References clear(), fetchData(), fetchID(), fetchNextId(), fetchParents(), m_db_time, noexcept, prepareWrite(), mps_fire::result, setParameters(), and writeDB().
std::string ODCond2ConfInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODCond2ConfInfo::getId |
( |
void |
| ) |
const |
|
inline |
std::string ODCond2ConfInfo::getLocation |
( |
| ) |
const |
|
inline |
Tm ODCond2ConfInfo::getRecordDate |
( |
| ) |
const |
|
inline |
int ODCond2ConfInfo::getRunNumber |
( |
| ) |
const |
|
inline |
std::string ODCond2ConfInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
std::string ODCond2ConfInfo::getType |
( |
void |
| ) |
const |
|
inline |
void ODCond2ConfInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 91 of file ODCond2ConfInfo.cc.
References MillePedeFileConverter_cfg::e, getId(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getDBDate().
103 " ( rec_id, rec_type_id, rec_date, " 104 "location_id, run_number, short_desc ) " 105 " VALUES ( :1, :2, :3 , :4, :5, :6 ) ");
114 throw(std::runtime_error(
std::string(
"ODCond2ConfInfo::prepareWrite(): ") + e.getMessage()));
int fetchNextId() noexcept(false)
oracle::occi::Connection * m_conn
std::string getTable() override
void fetchParents() noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void ODCond2ConfInfo::setDBDate |
( |
const Tm & |
x | ) |
|
|
inline |
void ODCond2ConfInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
void ODCond2ConfInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODCond2ConfInfo::setLocation |
( |
std::string |
x | ) |
|
|
inline |
void ODCond2ConfInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 118 of file ODCond2ConfInfo.cc.
References gather_cfg::cout.
Referenced by getDBDate().
122 for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
125 std::cout <<
"method not yet implemented" << std::endl;
void ODCond2ConfInfo::setRecordDate |
( |
const Tm & |
x | ) |
|
|
inline |
void ODCond2ConfInfo::setRunNumber |
( |
int |
id | ) |
|
|
inline |
void ODCond2ConfInfo::setType |
( |
std::string |
x | ) |
|
|
inline |
void ODCond2ConfInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Tm ODCond2ConfInfo::m_db_time |
|
private |
std::string ODCond2ConfInfo::m_desc |
|
private |
int ODCond2ConfInfo::m_ID |
|
private |
std::string ODCond2ConfInfo::m_loc |
|
private |
int ODCond2ConfInfo::m_loc_id |
|
private |
Tm ODCond2ConfInfo::m_rec_time |
|
private |
int ODCond2ConfInfo::m_run |
|
private |
int ODCond2ConfInfo::m_typ_id |
|
private |
std::string ODCond2ConfInfo::m_type |
|
private |