ATLAS Offline Software
Classes | Namespaces | Functions
HLTResultMT.h File Reference
#include "TrigSteeringEvent/OnlineErrorCode.h"
#include "AthenaKernel/CLASS_DEF.h"
#include "GaudiKernel/StatusCode.h"
#include "eformat/Status.h"
#include "eformat/StreamTag.h"
#include <boost/dynamic_bitset.hpp>
#include <vector>
#include <unordered_map>
#include <utility>
#include <cstdint>

Go to the source code of this file.

Classes

class  HLT::HLTResultMT
 A container class for data required to build online output from HLT. More...
 

Namespaces

 HLT
 It used to be useful piece of code for replacing actual SG with other store of similar functionality In fact it used to be more like interface adapter for ARA objects access, nevertheless since the ARA project is gone it is only an unnecessary extra layer.
 

Functions

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

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 }
HLT::HLTResultMT::getStreamTags
const std::vector< eformat::helper::StreamTag > & getStreamTags() const
Const-getter for stream tags.
Definition: HLTResultMT.cxx:43
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
HLT::HLTResultMT::getTruncatedModuleIds
const std::set< uint16_t > & getTruncatedModuleIds() const
Getter for the truncation information.
Definition: HLTResultMT.cxx:251
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
HLT::HLTResultMT::getSerialisedData
const std::unordered_map< uint16_t, std::vector< uint32_t > > & getSerialisedData() const
Serialised data getter.
Definition: HLTResultMT.cxx:147
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:534
HLT::HLTResultMT::getStatus
const std::vector< uint32_t > & getStatus() const
Full event status reference getter (1 bit-mask status word + error code words)
Definition: HLTResultMT.cxx:196
HLT::HLTResultMT::getHltPrescaledBits
const boost::dynamic_bitset< uint32_t > & getHltPrescaledBits() const
Const-getter for HLT prescaled bits.
Definition: HLTResultMT.cxx:95
str
Definition: BTagTrackIpAccessor.cxx:11
HLT::HLTResultMT::getHltPassRawBits
const boost::dynamic_bitset< uint32_t > & getHltPassRawBits() const
Const-getter for HLT pass raw bits.
Definition: HLTResultMT.cxx:90