Fill histograms from contents of a FullEventFragment.
285 if (rawEvent.nstatus() > 1) {
287 std::ostringstream
ss;
294 std::vector<eformat::helper::StreamTag> streamTags;
299 ATH_MSG_ERROR(
"StreamTag decoding failed, caught an unexpected std::exception " << ex.what());
303 ATH_MSG_ERROR(
"StreamTag decoding failed, caught an unexpected exception");
308 std::vector<eformat::read::ROBFragment>
robs;
310 std::vector<uint16_t> resultSizeMap_moduleID;
311 std::vector<uint32_t> resultSizeMap_size;
315 eformat::helper::SourceIdentifier sid(rob.rob_source_id());
316 if (sid.subdetector_id() != eformat::SubDetector::TDAQ_HLT)
318 const uint16_t module_id = sid.module_id();
320 totalSizeWords +=
size;
321 if (!
contains(resultSizeMap_moduleID, module_id)) {
322 resultSizeMap_moduleID.push_back(module_id);
323 resultSizeMap_size.push_back(
size);
326 ATH_MSG_ERROR(
"HLT result ROB monitoring found multiple HLT ROBs with the same module ID " << module_id);
331 ATH_MSG_ERROR(
"HLT result ROB monitoring failed, caught an unexpected std::exception " << ex.what());
335 ATH_MSG_ERROR(
"HLT result ROB monitoring failed, caught an unexpected exception");
340 std::vector<std::string> sdFromRobList;
341 std::vector<std::string> sdFromSubDetList;
342 std::vector<std::string> streamTagCorrA;
343 std::vector<std::string> streamTagCorrB;
344 std::vector<float> streamResultSize;
345 streamTagCorrA.reserve(streamTags.size() * streamTags.size());
346 streamTagCorrB.reserve(streamTags.size() * streamTags.size());
347 streamResultSize.reserve(streamTags.size());
348 for (
const eformat::helper::StreamTag& st : streamTags) {
349 bool hasHLTSubDet = st.dets.find(eformat::SubDetector::TDAQ_HLT) != st.dets.end();
350 bool includeAll = st.robs.empty() && (st.dets.empty() || hasHLTSubDet);
352 uint32_t sizeWords = includeAll ? totalSizeWords : 0;
353 for (
const eformat::SubDetector
sd : st.dets) {
354 const std::string&
detName = eformat::helper::SubDetectorDictionary.string(
sd);
357 for (
const uint32_t robid : st.robs) {
358 eformat::helper::SourceIdentifier sid(robid);
359 const std::string&
detName = sid.human_detector();
361 if (!includeAll && sid.subdetector_id() == eformat::SubDetector::TDAQ_HLT) {
362 if (
const int ix =
index(resultSizeMap_moduleID, sid.module_id()); ix >= 0) {
363 sizeWords += resultSizeMap_size[ix];
366 ATH_MSG_WARNING(
"Stream tag " << st.type <<
"_" << st.name <<
" declares " << sid.human()
367 <<
" in ROB list, but the ROBFragment is missing");
371 streamResultSize.push_back(sizeWords*wordsToKiloBytes);
372 for (
const eformat::helper::StreamTag& st2 : streamTags) {
373 streamTagCorrA.push_back(mon_streamTypeName(st));
374 streamTagCorrB.push_back(mon_streamTypeName(st2));
386 auto monPebRobsNum =
Monitored::Collection(
"StreamTagsPebRobsNum", streamTags, mon_streamPebRobsNum);
387 auto monPebSubDetsNum =
Monitored::Collection(
"StreamTagsPebSubDetsNum", streamTags, mon_streamPebSubDetsNum);
388 auto monSubDetsFromRobList =
Monitored::Collection(
"StreamTagsPebSubDetsFromRobList", sdFromRobList);
389 auto monSubDetsFromSubDetList =
Monitored::Collection(
"StreamTagsPebSubDetsFromSubDetList", sdFromSubDetList);
392 auto monResultSizeFullEvFrag =
Monitored::Scalar<float>(
"ResultSizeFullEvFrag", rawEvent.fragment_size_word()*wordsToKiloBytes);
398 monStreamTagCorrB, monStreamIsPeb, monPebRobsNum, monPebSubDetsNum, monSubDetsFromRobList,
399 monSubDetsFromSubDetList, monResultSizeTotal, monResultSizeFullEvFrag, monResultCollModuleID,
400 monResultCollModuleSize, monResultSizeByStream);