8#include "GaudiKernel/SmartDataPtr.h"
14static const InterfaceID
18 const std::string&name,
const IInterface* parent)
21 declareInterface<TBCondRunParTool>(
this);
35 "RunParams will be read from folder: " <<
m_runpfolder <<
36 " in COOL database" );
38 return StatusCode::SUCCESS;
43 return StatusCode::SUCCESS;
48 const EventContext& ctx = Gaudi::Hive::currentContext();
49 int run = ctx.eventID().run_number();
50 int event = ctx.eventID().event_number();
72 int& ncol,
int& nrow, std::vector<std::string>& names,
73 std::vector<std::string>& rows)
const {
81 bool iret =
extractCoolTest(std::string(
"/TILE/DCS/TILE_LV_62/BEAM"), 0);
84 ATH_MSG_DEBUG (
"extractCoolTest: /TILE/DCS/TILE_LV_62/BEAM failed !" );
85 return StatusCode::SUCCESS;
89 const std::vector<std::string>& names,
90 const std::vector<std::string>& rows,
91 const std::string& name,
int& ival)
const {
92 StatusCode found=StatusCode::FAILURE;
93 for (
unsigned int icol=0;icol<names.size();++icol) {
94 ATH_MSG_DEBUG (
"Check " << icol <<
" " << names[icol] << rows[icol] );
95 if (names[icol]==name) {
96 ival=atoi(rows[icol].c_str());
97 found=StatusCode::SUCCESS;
105 const std::vector<std::string>& names,
106 const std::vector<std::string>& rows,
107 const std::string& name,
float& fval)
const {
108 StatusCode found=StatusCode::FAILURE;
109 for (
unsigned int icol=0;icol<names.size();++icol) {
110 ATH_MSG_DEBUG (
"Check " << icol <<
" " << names[icol] << rows[icol] );
111 if (names[icol]==name) {
112 fval=atof(rows[icol].c_str());
113 found=StatusCode::SUCCESS;
121 const std::vector<std::string>& names,
122 const std::vector<std::string>& rows,
123 const std::string& name,std::string& sval)
const {
124 StatusCode found=StatusCode::FAILURE;
125 for (
unsigned int icol=0;icol<names.size();++icol) {
126 ATH_MSG_DEBUG (
"Check " << icol <<
" " << names[icol] << rows[icol] );
127 if (names[icol]==name) {
129 found=StatusCode::SUCCESS;
137 const std::vector<std::string>& rows)
const {
138 for (
unsigned int icol=0;icol<names.size();++icol)
139 ATH_MSG_INFO (
"Column: " << icol <<
" " << names[icol] << rows[icol] );
143 StatusCode found=StatusCode::FAILURE;
145 if (StatusCode::SUCCESS==
detStore()->retrieve(atrlist,folder)) {
148 for (; it != last; ++it) {
149 if(chnum == (*it).first) {
151 fval = (*it).second[0].data<
float>();
152 found = StatusCode::SUCCESS;
153 ATH_MSG_DEBUG (
"chnum: "<<chnum<<
" chan, attr: " << (*it).first <<
" fval: "<<fval);
168 if (StatusCode::SUCCESS==
detStore()->retrieve(atrlist,table)) {
175 m_det_mask=(*atrlist)[
"detector_mask"].data<
int>();
178 m_file_tag=(*atrlist)[
"filename_tag"].data<std::string>();
180 ldata=(*atrlist)[
"timeSOR"].data<
int>();
181 std::ostringstream timeSOR;
189 ATH_MSG_ERROR (
"Cannot retrieve AttributeList for " << table );
198 if (StatusCode::SUCCESS==
detStore()->retrieve(atrlist,folder)) {
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
An AttributeList represents a logical row of attributes in a metadata table.
This class is a collection of AttributeLists where each one is associated with a channel number.
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
void dump() const
Dump our contents to std::cout.
ChanAttrListMap::const_iterator const_iterator