#include <ODFEDAQConfig.h>
Definition at line 9 of file ODFEDAQConfig.h.
ODFEDAQConfig::ODFEDAQConfig |
( |
| ) |
|
ODFEDAQConfig::~ODFEDAQConfig |
( |
| ) |
|
void ODFEDAQConfig::clear |
( |
void |
| ) |
|
|
private |
void ODFEDAQConfig::fetchData |
( |
ODFEDAQConfig * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 157 of file ODFEDAQConfig.cc.
References gather_cfg::cout, alignCSCRings::e, getInt(), and query::result.
Referenced by EcalCondDBInterface::fetchFEDelaysForRun().
163 throw(std::runtime_error(
"ODFEDAQConfig::fetchData(): no Id defined for this ODFEDAQConfig "));
169 std::cout<<
"using new method : retrieving last version for this tag "<<endl;
175 std::cout <<
"Getting last ver" << std::endl << std::flush;
177 while (rset->next ()){
178 new_version= rset->getInt(1);
187 throw(std::runtime_error(
"ODFEDAQConfig::fetchData(): "+e.getMessage()));
197 " where ( config_id = :1 or (tag=:2 AND version=:3 ) )" );
207 result->
setId(rset->getInt(1));
221 throw(std::runtime_error(
"ODFEDAQConfig::fetchData(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void setTriggerBadTTId(int x)
int getInt(ResultSet *rset, int ipar)
oracle::occi::SQLException SQLException
void setPedestalId(int x)
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void setComment(std::string x)
std::string getConfigTag()
void setTriggerBadXtId(int x)
void checkConnection() const
int ODFEDAQConfig::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 225 of file ODFEDAQConfig.cc.
References alignCSCRings::e.
236 stmt->setSQL(
"SELECT config_id FROM "+
getTable()+
237 "WHERE tag=:1 and version=:2 " );
245 m_ID = rset->getInt(1);
249 m_conn->terminateStatement(stmt);
251 throw(std::runtime_error(
"ODFEDAQConfig::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
std::string getConfigTag()
void checkConnection() const
int ODFEDAQConfig::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 55 of file ODFEDAQConfig.cc.
References alignCSCRings::e, and query::result.
62 m_readStmt->setSQL(
"select fe_daq_conDfig_sq.nextVal from dual");
64 while (rset->next ()){
65 result= rset->getInt(1);
71 throw(std::runtime_error(
"ODFEDAQConfig::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
int ODFEDAQConfig::getBadTTId |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getBadXtId |
( |
| ) |
const |
|
inline |
std::string ODFEDAQConfig::getComment |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getDelayId |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getId |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getPedestalId |
( |
| ) |
const |
|
inline |
std::string ODFEDAQConfig::getTable |
( |
| ) |
|
|
inlinevirtual |
int ODFEDAQConfig::getTriggerBadTTId |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getTriggerBadXtId |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getVersion |
( |
| ) |
const |
|
inline |
int ODFEDAQConfig::getWeightId |
( |
| ) |
const |
|
inline |
void ODFEDAQConfig::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 76 of file ODFEDAQConfig.cc.
References alignCSCRings::e.
84 m_writeStmt->setSQL(
"INSERT INTO FE_DAQ_CONFIG ( config_id, tag, version, ped_id, "
85 " del_id, wei_id,bxt_id, btt_id, tr_bxt_id, tr_btt_id, user_comment ) "
86 "VALUES ( :1, :2, :3, :4, :5, :6, :7 ,:8, :9, :10, :11 )" );
92 throw(std::runtime_error(
"ODFEDAQConfig::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODFEDAQConfig::setBadTTId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setBadXtId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setComment |
( |
std::string |
x | ) |
|
|
inline |
void ODFEDAQConfig::setDelayId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setId |
( |
int |
id | ) |
|
|
inline |
void ODFEDAQConfig::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 97 of file ODFEDAQConfig.cc.
102 for( std::map<std::string, std::string >::const_iterator ci=
103 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
105 if(ci->first==
"VERSION")
setVersion(atoi(ci->second.c_str()) );
106 if(ci->first==
"PED_ID")
setPedestalId(atoi(ci->second.c_str()) );
107 if(ci->first==
"DEL_ID")
setDelayId(atoi(ci->second.c_str()));
108 if(ci->first==
"WEI_ID")
setWeightId(atoi(ci->second.c_str()));
110 if(ci->first==
"BXT_ID")
setBadXtId(atoi(ci->second.c_str()));
111 if(ci->first==
"BTT_ID")
setBadTTId(atoi(ci->second.c_str()));
115 if(ci->first==
"COMMENT" || ci->first==
"USER_COMMENT")
setComment(ci->second);
void setTriggerBadTTId(int x)
void setPedestalId(int x)
void setComment(std::string x)
void setTriggerBadXtId(int x)
void ODFEDAQConfig::setPedestalId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setTriggerBadTTId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setTriggerBadXtId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::setVersion |
( |
int |
id | ) |
|
|
inline |
void ODFEDAQConfig::setWeightId |
( |
int |
x | ) |
|
|
inline |
void ODFEDAQConfig::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 121 of file ODFEDAQConfig.cc.
References alignCSCRings::e, and SET_INT.
146 throw(std::runtime_error(
"ODFEDAQConfig::writeDB(): "+e.getMessage()));
150 throw(std::runtime_error(
"ODFEDAQConfig::writeDB: Failed to write"));
int getTriggerBadXtId() const
int getTriggerBadTTId() const
oracle::occi::SQLException SQLException
int getPedestalId() const
#define SET_INT(statement, paramNum, paramVal)
std::string getConfigTag()
std::string getComment() const
void checkConnection() const
std::string ODFEDAQConfig::m_com |
|
private |
int ODFEDAQConfig::m_tbtt |
|
private |
int ODFEDAQConfig::m_tbxt |
|
private |
int ODFEDAQConfig::m_version |
|
private |