Go to the source code of this file.
◆ printfWithMap()
std::string printfWithMap |
( |
std::string |
strFmt, |
|
|
std::unordered_map< std::string, Int_t > |
mapArg |
|
) |
| |
Definition at line 416 of file GEMDQMStatusDigi.cc.
419 size_t unPos, unPosEnd;
421 for (unPos = strRes.find(
'%'); unPos != std::string::npos; unPos = strRes.find(
'%', unPos + 1)) {
422 unPosEnd = strRes.find(
')', unPos);
423 if (strRes[unPos + 1] !=
'(' || unPosEnd == std::string::npos)
427 std::string strKey = strRes.substr(unPos + 2, unPosEnd - (unPos + 2));
434 for (;; unPosEnd++) {
435 if (!(
'0' <= strRes[unPosEnd] && strRes[unPosEnd] <=
'9') && strRes[unPosEnd] !=
'+')
437 strOptNum += strRes[unPosEnd];
440 if (strRes[unPosEnd] !=
'i' && strRes[unPosEnd] !=
'd')
442 strOptNum += strRes[unPosEnd];
445 sprintf(szOutFmt, strOptNum.c_str(), mapArg[strKey]);
446 strRes = strRes.substr(0, unPos) + szOutFmt + strRes.substr(unPosEnd);
449 if (unPos != std::string::npos) {
450 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__()