Go to the source code of this file.
◆ TimeStoreItem
◆ printfWithMap()
std::string printfWithMap |
( |
std::string |
strFmt, |
|
|
std::unordered_map< std::string, Int_t > |
mapArg |
|
) |
| |
Definition at line 609 of file GEMDQMStatusDigi.cc.
612 size_t unPos, unPosEnd;
614 for (unPos = strRes.find(
'%'); unPos != std::string::npos; unPos = strRes.find(
'%', unPos + 1)) {
615 unPosEnd = strRes.find(
')', unPos);
616 if (strRes[unPos + 1] !=
'(' || unPosEnd == std::string::npos)
620 std::string strKey = strRes.substr(unPos + 2, unPosEnd - (unPos + 2));
627 for (;; unPosEnd++) {
628 if (!(
'0' <= strRes[unPosEnd] && strRes[unPosEnd] <=
'9') && strRes[unPosEnd] !=
'+')
630 strOptNum += strRes[unPosEnd];
633 if (strRes[unPosEnd] !=
'i' && strRes[unPosEnd] !=
'd')
635 strOptNum += strRes[unPosEnd];
638 sprintf(szOutFmt, strOptNum.c_str(), mapArg[strKey]);
639 strRes = strRes.substr(0, unPos) + szOutFmt + strRes.substr(unPosEnd);
642 if (unPos != std::string::npos) {
643 std::cerr <<
"ERROR: Syntax error on printfWithMap(); " << std::endl;
References beam_dqm_sourceclient-live_cfg::cerr, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by GEMDQMStatusDigi::bookHistograms().
◆ s_filler__LINE__()
◆ s_maker__LINE__()