#include <ODCond2ConfInfo.h>
Definition at line 12 of file ODCond2ConfInfo.h.
ODCond2ConfInfo::ODCond2ConfInfo |
( |
| ) |
|
ODCond2ConfInfo::~ODCond2ConfInfo |
( |
| ) |
|
void ODCond2ConfInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 187 of file ODCond2ConfInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and mps_fire::result.
196 if(result->
getId()==0 ){
197 throw(std::runtime_error(
"ODCond2ConfInfo::fetchData(): no Id defined for this ODCond2ConfInfo "));
202 m_readStmt->setSQL(
"SELECT rec_id, REC_TYPE, rec_date, location, "
203 "run_number, short_desc, db_timestamp FROM " +
getTable() +
" , COND2CONF_TYPE_DEF , location_def "
204 " where rec_id = :1 AND COND2CONF_TYPE_DEF.def_id="
205 +
getTable()+
".REC_TYPE_ID AND location_def.def_id=LOCATION_ID ");
219 result->
setType(rset->getString(2));
220 Date startDate = rset->getDate(3);
224 Date endDate = rset->getDate(7);
230 throw(std::runtime_error(
"ODCond2ConfInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setDescription(std::string x)
void setLocation(std::string x)
void setRunNumber(int id)
void setType(std::string x)
int ODCond2ConfInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 234 of file ODCond2ConfInfo.cc.
References alignCSCRings::e, and DeadROCCounter::getRunNumber().
248 stmt->setSQL(
"SELECT rec_id FROM "+
getTable()+
249 "WHERE rec_type_id=:1 and (run_number=:2 or short_desc=:3 ) order by rec_id DESC " );
258 m_ID = rset->getInt(1);
262 m_conn->terminateStatement(stmt);
264 throw(std::runtime_error(
"ODCond2ConfInfo::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
std::string getDescription() const
void checkConnection() const noexcept(false)
void fetchParents() noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
int ODCond2ConfInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
Definition at line 45 of file ODCond2ConfInfo.cc.
References alignCSCRings::e, and mps_fire::result.
52 m_readStmt->setSQL(
"select COND2CONF_INFO_SQ.NextVal from DUAL ");
54 while (rset->next ()){
55 result= rset->getInt(1);
62 throw(std::runtime_error(
"ODCond2ConfInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void ODCond2ConfInfo::fetchParents |
( |
| ) |
|
|
privatenoexcept |
Definition at line 67 of file ODCond2ConfInfo.cc.
References alignCSCRings::e.
77 m_readStmt->setSQL(
"select def_id from COND2CONF_TYPE_DEF where rec_type="+
getType());
79 while (rset->next ()){
86 throw(std::runtime_error(
"ODCond2ConfInfo::fetchParents(): "+e.getMessage()));
97 while (rset->next ()){
102 throw(std::runtime_error(
"ODCond2ConfInfo::fetchParents(): "+e.getMessage()));
std::string getType() const
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
std::string getLocation() const
Tm ODCond2ConfInfo::getDBDate |
( |
| ) |
const |
|
inline |
std::string ODCond2ConfInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODCond2ConfInfo::getId |
( |
| ) |
const |
|
inline |
std::string ODCond2ConfInfo::getLocation |
( |
| ) |
const |
|
inline |
Tm ODCond2ConfInfo::getRecordDate |
( |
| ) |
const |
|
inline |
int ODCond2ConfInfo::getRunNumber |
( |
| ) |
const |
|
inline |
std::string ODCond2ConfInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
std::string ODCond2ConfInfo::getType |
( |
void |
| ) |
const |
|
inline |
void ODCond2ConfInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 109 of file ODCond2ConfInfo.cc.
References alignCSCRings::e, and getId().
123 "location_id, run_number, short_desc ) "
124 " VALUES ( :1, :2, :3 , :4, :5, :6 ) " );
133 throw(std::runtime_error(
"ODCond2ConfInfo::prepareWrite(): "+e.getMessage()));
int fetchNextId() noexcept(false)
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void fetchParents() 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 138 of file ODCond2ConfInfo.cc.
References gather_cfg::cout.
143 for( std::map<std::string, std::string >::const_iterator ci=
144 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
149 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 |
Definition at line 154 of file ODCond2ConfInfo.cc.
References cuy::dh, alignCSCRings::e, DeadROCCounter::getRunNumber(), and DateHandler::tmToDate().
177 throw(std::runtime_error(
"ODCond2ConfInfo::writeDB(): "+e.getMessage()));
181 throw(std::runtime_error(
"ODCond2ConfInfo::writeDB: Failed to write"));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getDescription() const
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
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 |