7 #include "classlib/utils/RegexpMatch.h" 8 #include "classlib/utils/Regexp.h" 9 #include "classlib/utils/StringOps.h" 10 #include <google/protobuf/io/coded_stream.h> 11 #include <google/protobuf/io/gzip_stream.h> 12 #include <google/protobuf/io/zero_copy_stream_impl.h> 18 #include "TBufferFile.h" 19 #include <boost/algorithm/string.hpp> 20 #include <boost/range/iterator_range_core.hpp> 62 std::string const s_safe{
"/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "};
64 lat::Regexp
const s_rxmeval{
"^<(.*)>(i|f|s|e|t|qr)=(.*)</\\1>$"};
65 lat::Regexp
const s_rxmeqr1{
"^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$"};
66 lat::Regexp
const s_rxmeqr2{
"^st\\.(\\d+)\\.(.*)$"};
67 lat::Regexp
const s_rxtrace{
"(.*)\\((.*)\\+0x.*\\).*"};
68 lat::Regexp
const s_rxself{
"^[^()]*DQMStore::.*"};
77 return (ofdir.empty() || (path.size() >= ofdir.size() && path.compare(0, ofdir.size(), ofdir) == 0 &&
78 (path.size() == ofdir.size() || path[ofdir.size()] ==
'/')));
85 size_t len = path.size();
86 for (; len > 0 && path[len - 1] ==
'/'; --len)
89 if (len != path.size()) {
90 clean = path.substr(0, len);
96 size_t slash = path.rfind(
'/');
97 if (slash != std::string::npos) {
98 dir.append(path, 0, slash);
99 name.append(path, slash + 1, std::string::npos);
105 path.reserve(dir.size() + name.size() + 2);
114 return new T{qtname};
119 m[T::getAlgoName()] = &makeQCriterion<T>;
129 "Invalid wildcard pattern '%s' in quality" 130 " test specification",
135 size_t starCount = 0;
139 if ((
size_t)pos == std::string::npos)
153 if (starCount == 1) {
154 if (boost::algorithm::starts_with(
fastString_,
"*")) {
160 if (boost::algorithm::ends_with(
fastString_,
"*")) {
168 if (starCount == 2) {
179 if (input.size() < pattern.size())
185 auto rit_pattern = pattern.crbegin();
186 auto rit_input = input.crbegin();
188 for (; rit_pattern < pattern.rend(); ++rit_pattern, ++rit_input) {
189 if (*rit_pattern != *rit_input)
197 if (input.size() < pattern.size())
203 auto rit_pattern = pattern.cbegin();
204 auto rit_input = input.cbegin();
206 for (; rit_pattern < pattern.end(); ++rit_pattern, ++rit_input) {
207 if (*rit_pattern != *rit_input)
236 return owner_->bookString(name, value);
240 TString
const&
name, TString
const&
title,
int const nchX,
double const lowX,
double const highX) {
241 return owner_->book1D(name, title, nchX, lowX, highX);
245 return owner_->book1D(name, title, nchX, xbinsize);
251 TString
const&
name, TString
const&
title,
int nchX,
double lowX,
double highX) {
252 return owner_->book1S(name, title, nchX, lowX, highX);
258 TString
const&
name, TString
const&
title,
int nchX,
double lowX,
double highX) {
259 return owner_->book1DD(name, title, nchX, lowX, highX);
263 return owner_->book1DD(name,
object);
267 TString
const&
title,
274 return owner_->book2D(name, title, nchX, lowX, highX, nchY, lowY, highY);
278 TString
const&
name, TString
const&
title,
int nchX,
float const* xbinsize,
int nchY,
float const* ybinsize) {
279 return owner_->book2D(name, title, nchX, xbinsize, nchY, ybinsize);
285 TString
const&
title,
292 return owner_->book2S(name, title, nchX, lowX, highX, nchY, lowY, highY);
296 TString
const&
name, TString
const&
title,
int nchX,
float const* xbinsize,
int nchY,
float const* ybinsize) {
297 return owner_->book2S(name, title, nchX, xbinsize, nchY, ybinsize);
303 TString
const&
title,
310 return owner_->book2DD(name, title, nchX, lowX, highX, nchY, lowY, highY);
314 return owner_->book2DD(name,
object);
318 TString
const&
title,
328 return owner_->book3D(name, title, nchX, lowX, highX, nchY, lowY, highY, nchZ, lowZ, highZ);
334 TString
const&
title,
342 return owner_->bookProfile(name, title, nchX, lowX, highX, nchY, lowY, highY, option);
346 TString
const&
title,
353 return owner_->bookProfile(name, title, nchX, lowX, highX, lowY, highY, option);
357 TString
const&
title,
359 double const* xbinsize,
364 return owner_->bookProfile(name, title, nchX, xbinsize, nchY, lowY, highY, option);
368 TString
const&
title,
370 double const* xbinsize,
374 return owner_->bookProfile(name, title, nchX, xbinsize, lowY, highY, option);
378 return owner_->bookProfile(name,
object);
382 TString
const&
title,
392 return owner_->bookProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ, option);
396 TString
const&
title,
407 return owner_->bookProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, nchZ, lowZ, highZ, option);
411 return owner_->bookProfile2D(name,
object);
433 uint32_t
const lumi ) {
434 return owner_->getAllContents(path, run, lumi);
441 if (ptr ==
nullptr) {
442 std::stringstream
msg;
443 msg <<
"DQM object not found";
448 throw std::out_of_range(msg.str());
458 return owner_->containsAnyMonitorable(path);
470 if (
pset.getUntrackedParameter<
bool>(
"forceResetOnBeginRun",
false)) {
474 #if !WITHOUT_CMS_FRAMEWORK 489 delete qtestspec.first;
507 std::cout <<
"DQMStore: histogram collation is enabled\n";
511 std::cout <<
"DQMStore: MultiThread option is enabled\n";
515 std::cout <<
"DQMStore: LSbasedMode option is enabled\n";
519 std::cout <<
"DQMStore: saveByLumi option is enabled\n";
523 std::cout <<
"DQMStore: using reference file '" << ref <<
"'\n";
527 initQCriterion<ContentsXRange>(
qalgos_);
528 initQCriterion<ContentsYRange>(
qalgos_);
529 initQCriterion<MeanWithinExpected>(
qalgos_);
530 initQCriterion<DeadChannel>(
qalgos_);
531 initQCriterion<NoisyChannel>(
qalgos_);
532 initQCriterion<ContentSigma>(
qalgos_);
533 initQCriterion<ContentsWithinExpected>(
qalgos_);
534 initQCriterion<CompareToMedian>(
qalgos_);
535 initQCriterion<CompareLastFilledBin>(
qalgos_);
536 initQCriterion<CheckVariance>(
qalgos_);
540 std::cout <<
"DQMStore: Scaling Flag set to " << scaleFlag_ << std::endl;
557 stream_ = std::make_unique<std::ofstream>(
"histogramBookingBT.log");
566 size = backtrace(array, 10);
567 strings = backtrace_symbols(array, size);
572 if (!
s_rxtrace.match(strings[level], 0, 0, &m))
574 demangled = abi::__cxa_demangle(m.matchString(strings[level], 2).c_str(),
nullptr,
nullptr, &
r);
577 if (!
s_rxself.match(demangled, 0, 0))
583 if (demangled !=
nullptr) {
584 *
stream_ <<
"\"" << dir <<
"/" << name <<
"\" " << (r ? m.matchString(strings[level], 2) :
demangled) <<
" " 585 << m.matchString(strings[level], 1) <<
"\n";
588 *
stream_ <<
"Skipping " << dir <<
"/" << name <<
" with stack size " << size <<
"\n";
593 if (
verbose_ > 4 || demangled ==
nullptr) {
597 for (i = 0; i <
size; ++
i)
598 if (
s_rxtrace.match(strings[i], 0, 0, &m)) {
599 char* demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(),
nullptr,
nullptr, &
r);
600 *
stream_ <<
"\t\t" << i <<
"/" << size <<
" " << (r ? m.matchString(strings[i], 2) :
demangled) <<
" " 601 << m.matchString(strings[i], 1) << std::endl;
630 raiseDQMError(
"DQMStore",
"Cannot 'cd' into non-existent directory '%s'", cleaned->c_str());
650 if (pos == std::string::npos)
663 prev.reserve(path.size());
664 subdir.reserve(path.size());
665 name.reserve(path.size());
672 subdir.append(path, 0, slash);
674 name.append(subdir, prevname, std::string::npos);
675 if (!prev.empty() &&
findObject(0, 0, 0, prev, name))
677 "Attempt to create subdirectory '%s'" 678 " which already exists as a monitor element",
681 if (!
dirs_.count(subdir))
682 dirs_.insert(subdir);
685 if (slash + 1 >= path.size())
690 prevname = slash ? slash + 1 :
slash;
692 if ((slash = path.find(
'/', ++slash)) == std::string::npos)
961 template <
class HISTO,
class COLLATE>
968 assert(name.find(
'/') == std::string::npos);
975 h->SetDirectory(
nullptr);
986 std::cout <<
"DQMStore: " << context <<
": monitor element '" << path <<
"' already exists, collating" 995 assert(
dirs_.count(dir));
1006 if (
q.first->match(path))
1034 assert(name.find(
'/') == std::string::npos);
1044 std::cout <<
"DQMStore: " << context <<
": monitor element '" << path <<
"' already exists, resetting" 1051 assert(
dirs_.count(dir));
1123 return book1D_(
pwd_, name,
new TH1F(name, title, nchX, lowX, highX));
1129 return book1S_(
pwd_, name,
new TH1S(name, title, nchX, lowX, highX));
1135 return book1DD_(
pwd_, name,
new TH1D(name, title, nchX, lowX, highX));
1142 const float* xbinsize) {
1143 return book1D_(
pwd_, name,
new TH1F(name, title, nchX, xbinsize));
1148 return book1D_(
pwd_, name, static_cast<TH1F*>(source->Clone(name)));
1153 return book1S_(
pwd_, name, static_cast<TH1S*>(source->Clone(name)));
1158 return book1DD_(
pwd_, name, static_cast<TH1D*>(source->Clone(name)));
1185 double const highY) {
1186 return book2D_(
pwd_, name,
new TH2F(name, title, nchX, lowX, highX, nchY, lowY, highY));
1197 double const highY) {
1198 return book2S_(
pwd_, name,
new TH2S(name, title, nchX, lowX, highX, nchY, lowY, highY));
1209 double const highY) {
1210 return book2DD_(
pwd_, name,
new TH2D(name, title, nchX, lowX, highX, nchY, lowY, highY));
1217 const float* xbinsize,
1219 const float* ybinsize) {
1220 return book2D_(
pwd_, name,
new TH2F(name, title, nchX, xbinsize, nchY, ybinsize));
1227 const float* xbinsize,
1229 const float* ybinsize) {
1230 return book2S_(
pwd_, name,
new TH2S(name, title, nchX, xbinsize, nchY, ybinsize));
1235 return book2D_(
pwd_, name, static_cast<TH2F*>(source->Clone(name)));
1240 return book2S_(
pwd_, name, static_cast<TH2S*>(source->Clone(name)));
1245 return book2DD_(
pwd_, name, static_cast<TH2D*>(source->Clone(name)));
1265 double const highZ) {
1266 return book3D_(
pwd_, name,
new TH3F(name, title, nchX, lowX, highX, nchY, lowY, highY, nchZ, lowZ, highZ));
1271 return book3D_(
pwd_, name, static_cast<TH3F*>(source->Clone(name)));
1292 return bookProfile_(
pwd_, name,
new TProfile(name, title, nchX, lowX, highX, lowY, highY, option));
1306 return bookProfile_(
pwd_, name,
new TProfile(name, title, nchX, lowX, highX, lowY, highY, option));
1315 double const* xbinsize,
1320 return bookProfile_(
pwd_, name,
new TProfile(name, title, nchX, xbinsize, lowY, highY, option));
1329 double const* xbinsize,
1333 return bookProfile_(
pwd_, name,
new TProfile(name, title, nchX, xbinsize, lowY, highY, option));
1338 return bookProfile_(
pwd_, name, static_cast<TProfile*>(source->Clone(name)));
1363 pwd_, name,
new TProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ, option));
1381 pwd_, name,
new TProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ, option));
1393 if (me->
getTH1()->GetNbinsX() != h->GetNbinsX() || me->
getTH1()->GetNbinsY() != h->GetNbinsY() ||
1394 me->
getTH1()->GetNbinsZ() != h->GetNbinsZ() ||
1395 me->
getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin() ||
1396 me->
getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin() ||
1397 me->
getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin() ||
1398 me->
getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax() ||
1399 me->
getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax() ||
1400 me->
getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax() ||
1406 <<
"checkBinningMatches: different binning - cannot add object '" << h->GetName() <<
"' of type " 1407 << h->IsA()->GetName() <<
" to existing ME: '" << me->
getFullname() <<
"'\n";
1467 std::vector<std::string>
result;
1480 if (
i->find(
'/',
pwd_.size() + 1) == std::string::npos)
1481 result.push_back(*
i);
1489 std::vector<std::string>
result;
1491 auto i =
data_.lower_bound(proto);
1493 if (
pwd_ == *
i->data_.dirname)
1494 result.push_back(
i->getName());
1504 auto i =
data_.lower_bound(proto);
1514 auto mepos =
data_.find(proto);
1526 std::vector<MonitorElement*>
result;
1528 auto i =
data_.lower_bound(proto);
1530 if (*cleaned == *
i->data_.dirname)
1531 result.push_back(const_cast<MonitorElement*>(&*
i));
1542 into.reserve(
dirs_.size());
1547 auto mi =
data_.lower_bound(proto);
1549 size_t sz =
dir.size() + 2;
1552 if (
dir == *
m->data_.dirname) {
1553 sz +=
m->data_.objname.size() + 1;
1560 auto istr = into.insert(into.end(),
std::string());
1567 for (sz = 0; mi !=
m; ++mi) {
1568 if (
dir != *mi->data_.dirname)
1574 *istr += mi->data_.objname;
1578 istr->reserve(
dir.size() + 2);
1588 uint32_t
const lumi,
1589 uint32_t
const moduleId,
1592 if (dir.find_first_not_of(
s_safe) != std::string::npos)
1594 "Monitor element path name '%s' uses" 1595 " unacceptable characters",
1597 if (name.find_first_not_of(
s_safe) != std::string::npos)
1599 "Monitor element path name '%s' uses" 1600 " unacceptable characters",
1610 auto mepos =
data_.find(proto);
1617 uint32_t
const run ,
1618 uint32_t
const lumi )
const {
1625 std::vector<MonitorElement*>
result;
1627 auto i =
data_.lower_bound(proto);
1630 if (
i->data_.run > run
1631 ||
i->data_.moduleId != 0)
1635 if (
i->data_.lumi > lumi ||
i->data_.moduleId != 0)
1638 if (run != 0
or lumi != 0) {
1639 assert(
i->data_.moduleId == 0);
1641 result.push_back(const_cast<MonitorElement*>(&*
i));
1648 if (
i->data_.run != 0
or i->data_.moduleId != 0)
1650 result.push_back(const_cast<MonitorElement*>(&*
i));
1663 rx = lat::Regexp(pattern, 0, syntaxType);
1666 raiseDQMError(
"DQMStore",
"Invalid regular expression '%s': %s", pattern.c_str(), e.explain().c_str());
1670 std::vector<MonitorElement*>
result;
1671 for (
auto const&
me :
data_) {
1675 result.push_back(const_cast<MonitorElement*>(&
me));
1688 for (
auto const&
m :
data_) {
1690 if (
me.wasUpdated()) {
1706 for (
auto const&
m :
data_) {
1734 auto i =
data_.lower_bound(begin);
1735 const auto e =
data_.lower_bound(end);
1758 std::cout <<
"DQMStore::cloneLumiHistograms - Preparing lumi histograms for run: " << run <<
", lumi: " << lumi
1759 <<
", module: " << moduleId << std::endl;
1772 auto tobehandled = std::vector<MonitorElement const*>();
1773 for (;
i !=
e; ++
i) {
1774 tobehandled.push_back(&*
i);
1776 for (
auto i : tobehandled) {
1784 clone.setLumi(lumi);
1785 clone.markToDelete();
1798 std::cout <<
"DQMStore::cloneRunHistograms - Preparing run histograms for run: " << run
1799 <<
", module: " << moduleId << std::endl;
1812 auto tobehandled = std::vector<MonitorElement const*>();
1813 for (;
i !=
e; ++
i) {
1814 tobehandled.push_back(&*
i);
1816 for (
auto i : tobehandled) {
1824 clone.markToDelete();
1847 auto i =
data_.lower_bound(proto);
1850 if (
i->data_.moduleId != 0)
1852 if (
i->data_.lumi != lumi)
1854 if (
i->data_.run != run)
1856 if (not
i->markedToDelete()) {
1862 std::cout <<
"DQMStore::deleteUnusedLumiHistograms: deleted monitor element '" << *
i->data_.dirname <<
"/" 1863 <<
i->data_.objname <<
"'" 1864 <<
"flags " <<
i->data_.flags <<
"\n";
1879 if (
auto*
h = dynamic_cast<TProfile*>(obj)) {
1888 }
else if (
auto*
h = dynamic_cast<TProfile2D*>(obj)) {
1897 }
else if (
auto*
h = dynamic_cast<TH1F*>(obj)) {
1900 me =
book1D_(dir,
h->GetName(), (TH1F*)
h->Clone());
1906 }
else if (
auto*
h = dynamic_cast<TH1S*>(obj)) {
1909 me =
book1S_(dir,
h->GetName(), (TH1S*)
h->Clone());
1915 }
else if (
auto*
h = dynamic_cast<TH1D*>(obj)) {
1918 me =
book1DD_(dir,
h->GetName(), (TH1D*)
h->Clone());
1924 }
else if (
auto*
h = dynamic_cast<TH2F*>(obj)) {
1927 me =
book2D_(dir,
h->GetName(), (TH2F*)
h->Clone());
1933 }
else if (
auto*
h = dynamic_cast<TH2S*>(obj)) {
1936 me =
book2S_(dir,
h->GetName(), (TH2S*)
h->Clone());
1942 }
else if (
auto*
h = dynamic_cast<TH2D*>(obj)) {
1945 me =
book2DD_(dir,
h->GetName(), (TH2D*)
h->Clone());
1951 }
else if (
auto*
h = dynamic_cast<TH3F*>(obj)) {
1954 me =
book3D_(dir,
h->GetName(), (TH3F*)
h->Clone());
1960 }
else if (dynamic_cast<TObjString*>(obj)) {
1962 if (!
s_rxmeval.match(obj->GetName(), 0, 0, &
m)) {
1963 if (strstr(obj->GetName(),
"CMSSW")) {
1965 std::cout <<
"Input file version: " << obj->GetName() << std::endl;
1967 }
else if (strstr(obj->GetName(),
"DQMPATCH")) {
1969 std::cout <<
"DQM patch version: " << obj->GetName() << std::endl;
1972 std::cout <<
"*** DQMStore: WARNING: cannot extract object '" << obj->GetName() <<
"' of type '" 1973 << obj->IsA()->GetName() <<
"'\n";
1984 if (!me || overwrite) {
1987 me->
Fill(atoll(value.c_str()));
1989 }
else if (kind ==
"f") {
1991 if (!me || overwrite) {
1994 me->
Fill(atof(value.c_str()));
1996 }
else if (kind ==
"s") {
2002 }
else if (kind ==
"e") {
2005 std::cout <<
"*** DQMStore: WARNING: no monitor element '" << label <<
"' in directory '" << dir
2006 <<
"' to be marked as efficiency plot.\n";
2010 }
else if (kind ==
"t") {
2012 }
else if (kind ==
"qr") {
2015 size_t dot = label.find(
'.');
2016 if (dot == std::string::npos) {
2017 std::cout <<
"*** DQMStore: WARNING: quality report label in '" << label
2018 <<
"' is missing a '.' and cannot be extracted\n";
2023 std::string qrname(label, dot + 1, std::string::npos);
2028 qv.
code = atoi(m.matchString(value, 1).c_str());
2029 qv.
qtresult = strtod(m.matchString(value, 2).c_str(),
nullptr);
2030 qv.
message = m.matchString(value, 4);
2033 }
else if (
s_rxmeqr2.match(value, 0, 0, &m)) {
2034 qv.
code = atoi(m.matchString(value, 1).c_str());
2036 qv.
message = m.matchString(value, 2);
2040 std::cout <<
"*** DQMStore: WARNING: quality test value '" << value <<
"' is incorrectly formatted\n";
2046 std::cout <<
"*** DQMStore: WARNING: no monitor element '" << mename <<
"' in directory '" << dir
2047 <<
"' for quality test '" << label <<
"'\n";
2054 std::cout <<
"*** DQMStore: WARNING: cannot extract object '" << obj->GetName() <<
"' of type '" 2055 << obj->IsA()->GetName() <<
"'\n";
2058 }
else if (
auto*
n = dynamic_cast<TNamed*>(obj)) {
2061 s.reserve(6 + strlen(
n->GetTitle()) + 2 * strlen(
n->GetName()));
2070 TObjString os(s.c_str());
2073 std::cout <<
"*** DQMStore: WARNING: cannot extract object '" << obj->GetName() <<
"' of type '" 2074 << obj->IsA()->GetName() <<
"' and with title '" << obj->GetTitle() <<
"'\n";
2101 assert(!path.empty());
2105 size_t end = path.find(
'/', start);
2106 if (end == std::string::npos)
2113 TObject*
o = gDirectory->Get(part.c_str());
2114 if (o && !dynamic_cast<TDirectory*>(o))
2116 "Attempt to create directory '%s' in a file" 2117 " fails because the part '%s' already exists and is not" 2122 gDirectory->mkdir(part.c_str());
2124 if (!gDirectory->cd(part.c_str()))
2126 "Attempt to create directory '%s' in a file" 2127 " fails because could not cd into subdirectory '%s'",
2132 if (end + 1 >= path.size())
2137 end = path.find(
'/', start);
2138 if (end == std::string::npos)
2148 TObjString(me.
tagString().c_str()).Write();
2175 unsigned int const run,
2176 MEMap::const_iterator
const begin,
2177 MEMap::const_iterator
const end,
2180 for (
auto const&
me : boost::make_iterator_range(begin, end)) {
2186 <<
" run: " <<
me.run() <<
" lumi: " <<
me.lumi() <<
" lumiFlag: " <<
me.getLumiFlag()
2187 <<
" moduleId: " <<
me.moduleId() <<
" fullpathname: " <<
me.getFullname() <<
" flags: " << std::hex
2188 <<
me.data_.flags << std::endl;
2191 if (dir != *
me.data_.dirname) {
2193 std::cout <<
"DQMStore::save: skipping monitor element in a subfolder of " << dir <<
"/" << std::endl;
2218 for (
auto const& qreport : master->data_.qreports)
2219 status =
std::max(status, qreport.code);
2221 if (not master
or status < minStatus) {
2223 std::cout <<
"DQMStore::save: skipping monitor element '" <<
me.data_.objname
2224 <<
"' while saving, status is " << status <<
", required minimum status is " << minStatus
2232 std::cout <<
"DQMStore::save: saving monitor element" << std::endl;
2248 uint32_t
const run ,
2249 uint32_t
const lumi ,
2258 class TFileNoSync :
public TFile {
2260 TFileNoSync(
char const*
file,
char const*
opt) : TFile{
file, opt} {}
2261 Int_t SysSync(Int_t)
override {
return 0; }
2266 unsigned int nme = 0;
2270 std::cout <<
"DQMStore::save: Opening TFile '" << filename <<
"' with option '" << fileupdate <<
"'" << std::endl;
2273 TFileNoSync
f(filename.c_str(), fileupdate.c_str());
2275 raiseDQMError(
"DQMStore",
"Failed to create/update file '%s'", filename.c_str());
2279 std::unique_ptr<lat::Regexp> rxpat;
2280 if (not pattern.empty())
2281 rxpat = std::make_unique<lat::Regexp>(pattern);
2287 if (not path.empty()) {
2300 std::cout <<
"DQMStore::save: DQM folder " <<
dir <<
"/" << std::endl;
2304 gDirectory->cd(
"/");
2307 else if (rxpat.get())
2324 auto end =
data_.lower_bound(proto);
2332 if (enableMultiThread_ and
LSbasedMode_ and lumi != 0) {
2343 std::cout <<
"DQMStore::save: successfully wrote " << nme <<
" objects from path '" << path <<
"/" 2344 <<
"' into DQM file '" << filename <<
"'\n";
2350 TBufferFile
buffer(TBufferFile::kWrite);
2353 buffer.WriteObject(&
object);
2374 unsigned int const run,
2375 MEMap::const_iterator
const begin,
2376 MEMap::const_iterator
const end,
2379 for (
auto const&
me : boost::make_iterator_range(begin, end)) {
2385 <<
" run: " <<
me.run() <<
" lumi: " <<
me.lumi() <<
" lumiFlag: " <<
me.getLumiFlag()
2386 <<
" moduleId: " <<
me.moduleId() <<
" fullpathname: " <<
me.getFullname() <<
" flags: " << std::hex
2387 <<
me.data_.flags << std::endl;
2390 if (dir != *
me.data_.dirname) {
2392 std::cout <<
"DQMStore::savePB: skipping monitor element in a subfolder of " << dir <<
"/" << std::endl;
2401 std::cout <<
"DQMStore::savePB: saving monitor element" << std::endl;
2415 uint32_t
const run ,
2416 uint32_t
const lumi ) {
2417 using google::protobuf::io::FileOutputStream;
2418 using google::protobuf::io::GzipOutputStream;
2419 using google::protobuf::io::StringOutputStream;
2423 unsigned int nme = 0;
2426 std::cout <<
"DQMStore::savePB: Opening PBFile '" << filename <<
"'" << std::endl;
2438 std::cout <<
"DQMStore::savePB: DQM folder " <<
dir <<
"/" << std::endl;
2453 auto end =
data_.lower_bound(proto);
2461 if (enableMultiThread_ and
LSbasedMode_ and lumi != 0) {
2468 int filedescriptor =
2469 ::open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
2470 FileOutputStream file_stream(filedescriptor);
2472 options.format = GzipOutputStream::GZIP;
2473 options.compression_level = 1;
2474 GzipOutputStream gzip_stream(&file_stream, options);
2475 dqmstore_message.SerializeToZeroCopyStream(&gzip_stream);
2478 gzip_stream.Close();
2479 file_stream.Close();
2480 ::close(filedescriptor);
2484 std::cout <<
"DQMStore::savePB: successfully wrote " << nme <<
" objects from path '" << path <<
"/" 2485 <<
"' into DQM file '" << filename <<
"'\n";
2492 bool const overwrite,
2497 unsigned int ntot = 0;
2498 unsigned int count = 0;
2500 if (!file->cd(curdir.c_str()))
2502 "Failed to process directory '%s' while" 2503 " reading file '%s'",
2524 size_t slash = dirpart.find(
'/');
2525 size_t pos = dirpart.find(
"/Run summary");
2526 if (slash != std::string::npos && pos != std::string::npos) {
2527 dirpart.erase(pos, 12);
2529 pos = dirpart.find(
"Run ");
2530 size_t length = dirpart.find(
'/', pos + 1) - pos + 1;
2531 if (pos != std::string::npos)
2532 dirpart.erase(pos, length);
2539 size_t slash = dirpart.find(
'/');
2541 if (slash == std::string::npos
2546 slash = dirpart.find(
'/');
2548 if (slash != std::string::npos && slash + 10 == dirpart.size() &&
2549 dirpart.compare(slash + 1, 9,
"EventInfo") == 0) {
2551 std::cout <<
"DQMStore::readDirectory: skipping '" << dirpart <<
"'\n";
2556 if (dirpart.empty())
2559 dirpart = prepend +
'/' + dirpart;
2560 }
else if (!prepend.empty()) {
2561 if (dirpart.empty())
2564 dirpart = prepend +
'/' + dirpart;
2572 TIter
next(gDirectory->GetListOfKeys());
2573 std::list<TObject*> delayed;
2574 while ((key = (TKey*)
next())) {
2575 std::unique_ptr<TObject>
obj(key->ReadObj());
2576 if (dynamic_cast<TDirectory*>(
obj.get())) {
2578 subdir.reserve(curdir.size() + strlen(
obj->GetName()) + 2);
2580 if (!curdir.empty())
2582 subdir +=
obj->GetName();
2584 ntot +=
readDirectory(file, overwrite, onlypath, prepend, subdir, stripdirs);
2587 else if (dynamic_cast<TObjString*>(
obj.get())) {
2588 delayed.push_back(
obj.release());
2591 std::cout <<
"DQMStore: reading object '" <<
obj->GetName() <<
"' of type '" <<
obj->IsA()->GetName()
2592 <<
"' from '" << file->GetName() <<
"' into '" << dirpart <<
"'\n";
2600 while (!delayed.empty()) {
2602 std::cout <<
"DQMStore: reading object '" << delayed.front()->GetName() <<
"' of type '" 2603 << delayed.front()->IsA()->GetName() <<
"' from '" << file->GetName() <<
"' into '" << dirpart
2610 delete delayed.front();
2611 delayed.pop_front();
2615 std::cout <<
"DQMStore: read " << count <<
'/' << ntot <<
" objects from directory '" << dirpart <<
"'\n";
2617 return ntot +
count;
2627 bool const overwrite ,
2631 bool const fileMustExist ) {
2632 return readFile(filename, overwrite, onlypath, prepend, stripdirs, fileMustExist);
2641 bool const fileMustExist ) {
2642 bool overwrite =
true;
2646 std::cout <<
"DQMStore::load: reading from file '" << filename <<
"'\n";
2648 std::cout <<
"DQMStore::load: in collate mode " 2651 std::cout <<
"DQMStore::load: in overwrite mode " 2656 return readFile(filename, overwrite,
"",
"", stripdirs, fileMustExist);
2658 return readFilePB(filename, overwrite,
"",
"", stripdirs, fileMustExist);
2667 bool const overwrite ,
2671 bool const fileMustExist ) {
2673 std::cout <<
"DQMStore::readFile: reading from file '" << filename <<
"'\n";
2675 std::unique_ptr<TFile>
f;
2678 f.reset(TFile::Open(filename.c_str()));
2679 if (!f.get() || f->IsZombie())
2680 raiseDQMError(
"DQMStore",
"Failed to open file '%s'", filename.c_str());
2686 std::cout <<
"DQMStore::readFile: file '" << filename <<
"' does not exist, continuing\n";
2691 unsigned n =
readDirectory(f.get(), overwrite, onlypath, prepend,
"", stripdirs);
2698 std::cout <<
"DQMStore::open: successfully read " << n <<
" objects from file '" << filename <<
"'";
2699 if (!onlypath.empty())
2700 std::cout <<
" from directory '" << onlypath <<
"'";
2701 if (!prepend.empty())
2702 std::cout <<
" into directory '" << prepend <<
"'";
2712 if (buf.Length() == buf.BufferSize())
2715 void* ptr = buf.ReadObjectAny(
nullptr);
2716 return reinterpret_cast<TObject*
>(ptr);
2724 size_t dirpos = (slash == std::string::npos ? 0 :
slash);
2725 size_t namepos = (slash == std::string::npos ? 0 : slash + 1);
2727 objname.assign(h.
full_pathname(), namepos, std::string::npos);
2728 TBufferFile buf(TBufferFile::kRead, h.
size(), (
void*)h.
streamed_histo().data(), kFALSE);
2737 bool const overwrite ,
2741 bool const fileMustExist ) {
2742 using google::protobuf::io::ArrayInputStream;
2743 using google::protobuf::io::CodedInputStream;
2744 using google::protobuf::io::FileInputStream;
2745 using google::protobuf::io::FileOutputStream;
2746 using google::protobuf::io::GzipInputStream;
2747 using google::protobuf::io::GzipOutputStream;
2750 std::cout <<
"DQMStore::readFile: reading from file '" << filename <<
"'\n";
2753 if ((filedescriptor = ::
open(filename.c_str(), O_RDONLY)) == -1) {
2755 raiseDQMError(
"DQMStore",
"Failed to open file '%s'", filename.c_str());
2757 std::cout <<
"DQMStore::readFile: file '" << filename <<
"' does not exist, continuing\n";
2762 FileInputStream
fin(filedescriptor);
2763 GzipInputStream
input(&fin);
2764 CodedInputStream input_coded(&input);
2765 input_coded.SetTotalBytesLimit(1024 * 1024 * 1024, -1);
2766 if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
2767 raiseDQMError(
"DQMStore",
"Fatal parsing file '%s'", filename.c_str());
2770 ::close(filedescriptor);
2776 TObject*
obj =
nullptr;
2793 extract(static_cast<TObject*>(obj), path, overwrite, collate);
2795 if (me ==
nullptr) {
2816 return (
i ==
e ?
nullptr :
i->second);
2824 raiseDQMError(
"DQMStore",
"Attempt to create duplicate quality test '%s'", qtname.c_str());
2829 "Cannot create a quality test using unknown" 2849 if (cleaned->find_first_not_of(
s_safe) != std::string::npos)
2851 "Monitor element path name '%s'" 2852 " uses unacceptable characters",
2863 raiseDQMError(
"DQMStore",
"Cannot apply non-existent quality test '%s'", qtname.c_str());
2874 for (
auto const&
me :
data_) {
2877 if (fm->match(path)) {
2890 std::cout <<
"DQMStore: running runQTests() with reset = " << (
reset_ ?
"true" :
"false") << std::endl;
2895 const_cast<MonitorElement&>(
me).runQTests();
2909 for (
auto const&
me :
data_) {
2915 else if (
me.hasWarning())
2930 std::cout <<
" ------------------------------------------------------------\n" 2931 <<
" Directory structure: \n" 2932 <<
" ------------------------------------------------------------\n";
2934 std::copy(contents.begin(), contents.end(), std::ostream_iterator<std::string>(
std::cout,
"\n"));
2936 std::cout <<
" ------------------------------------------------------------\n";
MonitorElement * bookString(char_string const &name, char_string const &value)
Book string.
TObject * extractNextObject(TBufferFile &) const
edm::ErrorSummaryEntry Error
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
virtual TH2D * getTH2D() const
T getUntrackedParameter(std::string const &, T const &) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool compare_strings(std::string const &pattern, std::string const &input) const
::google::protobuf::uint32 size() const
virtual TH2F * getTH2F() const
MonitorElement * getElement(std::string const &path)
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
const ::std::string & full_pathname() const
void goUp()
equivalent to "cd .."
void cloneRunHistograms(uint32_t run, uint32_t moduleId)
MonitorElement * book2DD(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
DQMStore(edm::ParameterSet const &pset, edm::ActivityRegistry &)
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
void savePB(std::string const &filename, std::string const &path="", uint32_t run=0, uint32_t lumi=0)
MonitorElement * book1S(char_string const &name, char_string const &title, int nchX, double lowX, double highX)
Book 1S histogram.
void makeDirectory(std::string const &path)
MonitorElement * bookFloat(TString const &name)
std::vector< std::string > getMEs() const
get list of (non-dir) MEs of current directory
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
dqm::legacy::MonitorElement MonitorElement
unsigned int readDirectory(TFile *file, bool overwrite, std::string const &path, std::string const &prepend, std::string const &curdir, OpenRunDirs stripdirs)
MonitorElement * book_(std::string const &dir, std::string const &name, char const *context)
void setCurrentFolder(std::string const &fullpath)
void saveMonitorElementRangeToPB(std::string const &dir, unsigned int run, MEMap::const_iterator begin, MEMap::const_iterator end, dqmstorepb::ROOTFilePB &file, unsigned int &counter)
std::string const empty_str
virtual TH1F * getTH1F() const
MonitorElement * book1DD_(std::string const &dir, std::string const &name, TH1D *h)
Book 1D histogram based on TH1D.
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX)
LuminosityBlockID const & luminosityBlockID() const
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
MonitorElement * book2S_(std::string const &dir, std::string const &name, TH2S *h)
Book 2D histogram based on TH2S.
std::vector< MonitorElement * > getContents(std::string const &path) const
void setLumiFlag()
this ME is meant to be stored for each luminosity section
void saveMonitorElementToROOT(MonitorElement const &me, TFile &file)
def replace(string, replacements)
Kind kind() const
Get the type of the monitor element.
static const uint32_t DQM_PROP_TAGGED
MonitorElement * book3D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
std::string const & pwd() const
static const uint32_t DQM_PROP_EFFICIENCY_PLOT
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
bool load(std::string const &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
std::unique_ptr< std::ostream > stream_
MonitorElement * bookProfile_(std::string const &dir, std::string const &name, TProfile *h)
Book profile histogram based on TProfile.
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
MonitorElement * bookProfile2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s")
MonitorElement * bookInt(char_string const &name)
Book int.
const std::string * dirname
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
MonitorElement * book2DD_(std::string const &dir, std::string const &name, TH2D *h)
Book 2D histogram based on TH2D.
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
bool isCollateME(MonitorElement *me) const
QCriterion * createQTest(std::string const &algoname, std::string const &qtname)
void cd()
go to top directory (ie. root)
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
void set_flags(::google::protobuf::uint32 value)
MonitorElement * book1S_(std::string const &dir, std::string const &name, TH1S *h)
Book 1D histogram based on TH1S.
void saveMonitorElementToPB(MonitorElement const &me, dqmstorepb::ROOTFilePB &file)
MonitorElement * bookProfile(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
const ::std::string & streamed_histo() const
virtual TH1S * getTH1S() const
void get_info(dqmstorepb::ROOTFilePB_Histo const &, std::string &dirname, std::string &objname, TObject **obj)
bool extract(TObject *obj, std::string const &dir, bool overwrite, bool collateHistograms)
const std::string getFullname() const
get full name of ME including Pathname
static std::string const input
MatchingHeuristicEnum matching_
void setVerbose(unsigned level)
void setLumi(uint32_t ls)
void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi)
int getStatus(std::string const &path="") const
static void clean(char *s)
std::string const s_referenceDirName
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
unsigned int maxNumberOfStreams() const
virtual void Reset()
reset ME (ie. contents, errors, etc)
void mergePath(std::string &path, std::string const &dir, std::string const &name)
lat::Regexp const s_rxmeval
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
lat::Regexp const s_rxpbfile
bool dirExists(std::string const &path)
MonitorElement * book2D_(std::string const &dir, std::string const &name, TH2F *h)
Book 2D histogram based on TH2F.
lat::Regexp const s_rxmeqr2
static const uint32_t DQM_PROP_HAS_REFERENCE
std::string tagString() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
bool readFilePB(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
void print_trace(std::string const &dir, std::string const &name)
std::vector< std::string > getMEs()
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
void addQReport(const DQMNet::QValue &desc, QCriterion *qc)
Add quality report, from DQMStore.
bool match(std::string const &s) const
bool containsAnyMonitorable(std::string const &path)
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
std::vector< std::shared_ptr< fireworks::OptionNode > > Options
MonitorElement * bookFloat_(std::string const &dir, std::string const &name)
Book float.
bool forceResetOnBeginLumi_
int useQTestByMatch(std::string const &pattern, std::string const &qtname)
attach quality test <qc> to monitor elements matching <pattern>.
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s")
lat::Regexp const s_rxself
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
lat::Regexp const s_rxtrace
virtual TProfile2D * getTProfile2D() const
bool compare_strings_reverse(std::string const &pattern, std::string const &input) const
MonitorElement * book1D_(std::string const &dir, std::string const &name, TH1F *h)
Book 1D histogram based on TH1F.
std::pair< fastmatch *, QCriterion * > QTestSpec
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0) const
virtual TH2S * getTH2S() const
void useQTest(std::string const &dir, std::string const &qtname)
void postGlobalBeginLumi(const edm::GlobalContext &)
MonitorElement * findObject(uint32_t run, uint32_t lumi, uint32_t moduleId, std::string const &dir, std::string const &name) const
fastmatch(std::string fastString)
void splitPath(std::string &dir, std::string &name, std::string const &path)
MonitorElement * book2S(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
const ::dqmstorepb::ROOTFilePB_Histo & histo(int index) const
void set_size(::google::protobuf::uint32 value)
QCriterion * getQCriterion(std::string const &qtname) const
virtual TProfile * getTProfile() const
virtual TH1D * getTH1D() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
std::string const & pwd()
void setCurrentFolder(std::string const &fullpath)
std::set< std::string > dirs_
std::vector< std::string > getSubdirs() const
lat::Regexp const s_rxmeqr1
MonitorElement * bookProfile2D_(std::string const &dir, std::string const &name, TProfile2D *h)
Book 2D profile histogram based on TProfile2D.
MonitorElement * bookInt_(std::string const &dir, std::string const &name)
Book int.
void set_full_pathname(const ::std::string &value)
void setVerbose(int verbose)
probability limits for warnings, errors
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
::dqmstorepb::ROOTFilePB_Histo * add_histo()
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
std::unique_ptr< lat::Regexp > regexp_
static std::atomic< unsigned int > counter
MonitorElement * book3D_(std::string const &dir, std::string const &name, TH3F *h)
Book 3D histogram based on TH3F.
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
MonitorElement * bookFloat(char_string const &name)
Book float.
bool readFile(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
std::string const s_collateDirName
std::vector< MonitorElement * > getMatchingContents(std::string const &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
MonitorElement * bookString(TString const &name, TString const &value)
::google::protobuf::uint32 flags() const
static const int STATUS_OK
bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void showDirStructure() const
MonitorElement * initialise(MonitorElement *me, std::string const &path)
QCriterion * makeQCriterion(std::string const &qtname)
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
MonitorElement * initialise(Kind kind)
TObject * getRootObject() const override
void cloneLumiHistograms(uint32_t run, uint32_t lumi, uint32_t moduleId)
void saveMonitorElementRangeToROOT(std::string const &dir, std::string const &refpath, SaveReferenceTag ref, int minStatus, unsigned int run, MEMap::const_iterator begin, MEMap::const_iterator end, TFile &file, unsigned int &counter)
bool cdInto(std::string const &path) const
void Reset(std::vector< TH2F > &depth)
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
bool containsAnyMonitorable(std::string const &path) const
MonitorElement * get(std::string const &path)
void initializeFrom(const edm::ParameterSet &)
bool isSubdirectory(std::string const &ofdir, std::string const &path)
std::string effLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
static const uint32_t DQM_PROP_LUMI
static std::string const source
void cleanTrailingSlashes(std::string const &path, std::string &clean, std::string const *&cleaned)
MonitorElement * bookString_(std::string const &dir, std::string const &name, std::string const &value)
Book string.
MonitorElement * book1DD(char_string const &name, char_string const &title, int nchX, double lowX, double highX)
Book 1S histogram.
virtual TH1 * getTH1() const
void initQCriterion(std::map< std::string, QCriterion *(*)(std::string const &)> &m)
MonitorElement * bookInt(TString const &name)
virtual TH3F * getTH3F() const
MonitorElement * book1S(TString const &name, TString const &title, int nchX, double lowX, double highX)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0)
std::string qualityTagString(const DQMNet::QValue &qv) const
std::string const s_monitorDirName
name of global monitoring folder (containing all sources subdirectories)
bool dirExists(std::string const &path) const
true if directory exists
void setCurrentFolder(std::string const &fullpath)
std::vector< std::string > getSubdirs()
void set_streamed_histo(const ::std::string &value)
void raiseDQMError(const char *context, const char *fmt,...)