ATLAS Offline Software
Loading...
Searching...
No Matches
HLTResultMT.cxx File Reference
#include "TrigSteeringEvent/HLTResultMT.h"
#include "AthenaBaseComps/AthCheckMacros.h"
#include <algorithm>
#include <utility>
#include <string_view>
Include dependency graph for HLTResultMT.cxx:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &str, const HLT::HLTResultMT &hltResult)
 operator<< overload for printing to std::ostream

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & str,
const HLT::HLTResultMT & hltResult )

operator<< overload for printing to std::ostream

Definition at line 274 of file HLTResultMT.cxx.

274 {
275 auto printWord = [&str](const uint32_t word, const size_t width=8){
276 str << "0x" << std::hex << std::setw(width) << std::setfill('0') << word << " " << std::dec;
277 };
278 str << "Printing HLTResultMT:" << std::endl;
279
280 // Status
281 str << "--> Status words = ";
282 for (const uint32_t word : hltResult.getStatus()) {
283 printWord(word);
284 }
285 str << std::endl;
286
287 // Stream tags
288 str << "--> Stream tags = ";
289 bool first = true;
290 for (const eformat::helper::StreamTag& st : hltResult.getStreamTags()) {
291 if (first) first=false;
292 else str << " ";
293 str << "{" << st.name << ", " << st.type << ", obeysLB=" << st.obeys_lumiblock << ", robs=[";
294 for (const auto& robid : st.robs) printWord(robid);
295 str << "], dets = [";
296 for (const auto& detid : st.dets) printWord(detid,2);
297 str << "]}" << std::endl;
298 }
299 if (hltResult.getStreamTags().empty()) str << std::endl;
300
301 // HLT bits
302 std::vector<uint32_t> hltPassRawBitWords;
303 std::vector<uint32_t> hltPrescaledBitWords;
304 hltPassRawBitWords.resize(hltResult.getHltPassRawBits().num_blocks());
305 hltPrescaledBitWords.resize(hltResult.getHltPrescaledBits().num_blocks());
306 boost::to_block_range(hltResult.getHltPassRawBits(),hltPassRawBitWords.begin());
307 boost::to_block_range(hltResult.getHltPrescaledBits(),hltPrescaledBitWords.begin());
308 str << "--> HLT bits = ";
309 for (const uint32_t word : hltPassRawBitWords) {
310 printWord(word);
311 }
312 for (const uint32_t word : hltPrescaledBitWords) {
313 printWord(word);
314 }
315 str << std::endl;
316
317 // Payload size
318 str << "--> Payload size = ";
319 first = true;
320 for (const auto& p : hltResult.getSerialisedData()) {
321 if (first) first=false;
322 else str << " ";
323 str << "{module " << p.first << ": " << p.second.size() << " words}" << std::endl;
324 }
325
326 // Truncation information
327 if (!hltResult.getTruncatedModuleIds().empty()) {
328 str << "--> Truncated results = ";
329 first = true;
330 for (const uint16_t moduleId : hltResult.getTruncatedModuleIds()) {
331 if (first) first=false;
332 else str << ", ";
333 str << moduleId;
334 }
335 str << std::endl;
336 }
337
338 return str;
339}
const double width
const std::set< uint16_t > & getTruncatedModuleIds() const
Getter for the truncation information.
const boost::dynamic_bitset< uint32_t > & getHltPassRawBits() const
Const-getter for HLT pass raw bits.
const std::vector< eformat::helper::StreamTag > & getStreamTags() const
Const-getter for stream tags.
const std::unordered_map< uint16_t, std::vector< uint32_t > > & getSerialisedData() const
Serialised data getter.
const boost::dynamic_bitset< uint32_t > & getHltPrescaledBits() const
Const-getter for HLT prescaled bits.
const std::vector< uint32_t > & getStatus() const
Full event status reference getter (1 bit-mask status word + error code words)
bool first
Definition DeMoScan.py:534
setEventNumber uint32_t