#include <ASCIICondDbSvc.h>
Definition at line 20 of file ASCIICondDbSvc.h.
◆ registry_t
◆ ASCIICondDbSvc()
ASCIICondDbSvc::ASCIICondDbSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
◆ ~ASCIICondDbSvc()
ASCIICondDbSvc::~ASCIICondDbSvc |
( |
| ) |
|
◆ dump() [1/2]
void ASCIICondDbSvc::dump |
( |
| ) |
const |
|
virtual |
◆ dump() [2/2]
void ASCIICondDbSvc::dump |
( |
std::ostringstream & |
ost | ) |
const |
|
virtual |
◆ finalize()
StatusCode ASCIICondDbSvc::finalize |
( |
| ) |
|
|
virtual |
Definition at line 154 of file ASCIICondDbSvc.cxx.
159 std::ostringstream
ost;
166 for (
auto ie :
e.second ) {
173 return StatusCode::SUCCESS;
◆ getRange()
Definition at line 246 of file ASCIICondDbSvc.cxx.
249 std::lock_guard<std::mutex> lock(
m_lock);
251 registry_t::const_iterator itr =
m_registry.find(dbKey);
254 error() <<
"getRange: no dbKey " << dbKey <<
" found in registry"
256 return StatusCode::FAILURE;
259 for (
auto e : itr->second) {
260 debug() <<
"compare " <<
e.range() <<
" with " << ctx.eventID()
262 if (
e.range().isInRange(EventIDBase(ctx.eventID()))) {
265 return StatusCode::SUCCESS;
269 error() <<
"getRange: no range for Time " << ctx.eventID()
270 <<
" found for dbKey " << dbKey <<
endmsg;
272 return StatusCode::FAILURE;
◆ initialize()
StatusCode ASCIICondDbSvc::initialize |
( |
| ) |
|
|
virtual |
Definition at line 38 of file ASCIICondDbSvc.cxx.
42 msg().setLevel( m_outputLevel.value() );
44 if (!
sc.isSuccess()) {
45 warning () <<
"Base class could not be initialized" <<
endmsg;
46 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
55 return StatusCode::FAILURE;
58 std::ostringstream
ost;
59 ost <<
" Printing CondDB registry";
61 ost << std::endl <<
" - id: " <<
e.first <<
" r:";
62 for (
auto r :
e.second) {
63 ost <<
" " <<
r.range() <<
" :: " << *
r.objPtr();
69 return StatusCode::SUCCESS;
◆ parse() [1/2]
bool ASCIICondDbSvc::parse |
( |
EventIDRange & |
t, |
|
|
const std::string & |
s |
|
) |
| |
|
private |
Definition at line 180 of file ASCIICondDbSvc.cxx.
183 boost::regex_match(
s,
m,
rr);
189 if (
m.size() != 5) {
return false; }
192 EventIDBase
start(std::stoi(
m[1]), EventIDBase::UNDEFEVT, std::stoi(
m[2]));
193 EventIDBase
end(std::stoi(
m[3]), EventIDBase::UNDEFEVT, std::stoi(
m[4]));
◆ parse() [2/2]
Definition at line 207 of file ASCIICondDbSvc.cxx.
210 boost::regex_match(
s,
m,
ref);
212 if (
m.size() != 6) {
return false; }
221 EventIDBase
start(0, EventIDBase::UNDEFEVT,
223 EventIDBase
end(EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT,
225 start.set_lumi_block(std::stoi(
m[1]));
226 end.set_lumi_block(std::stoi(
m[3]));
◆ readDbFile()
StatusCode ASCIICondDbSvc::readDbFile |
( |
const std::string & |
fname | ) |
|
|
private |
Definition at line 75 of file ASCIICondDbSvc.cxx.
81 std::ifstream ifs (
fname);
85 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
86 boost::char_separator<char>
sep(
" ");
90 while( getline (ifs,
line) ) {
93 size_t fh =
line.find(
"#");
94 if(
fh != std::string::npos)
96 if (
line.length() == 0)
continue;
101 std::string dbKey = *
it;
109 error() <<
"while reading " <<
fname <<
" problem parsing " << *
it
111 sc = StatusCode::FAILURE;
119 sc = StatusCode::FAILURE;
◆ m_file
Gaudi::Property<std::string> ASCIICondDbSvc::m_file {this, "CondFile", "", "cond db file name"} |
|
private |
◆ m_lbn
Gaudi::Property<unsigned int> ASCIICondDbSvc::m_lbn {this, "LBN", 1, "explicit lumi block number"} |
|
private |
◆ m_lock
std::mutex ASCIICondDbSvc::m_lock |
|
mutableprivate |
◆ m_registry
The documentation for this class was generated from the following files: