ATLAS Offline Software
|
A container class for data required to build online output from HLT. More...
#include <HLTResultMT.h>
Public Types | |
using | RODMinorVersion = std::pair< uint8_t, uint8_t > |
Type to store decoded ROD minor version (16-bit version split into two 8-bit numbers) More... | |
Public Member Functions | |
HLTResultMT (std::vector< eformat::helper::StreamTag > streamTags={}, boost::dynamic_bitset< uint32_t > hltPassRawBits=boost::dynamic_bitset< uint32_t >(), boost::dynamic_bitset< uint32_t > hltPrescaledBits=boost::dynamic_bitset< uint32_t >(), std::unordered_map< uint16_t, std::vector< uint32_t > > data={}) | |
Standard constructor. More... | |
const std::vector< eformat::helper::StreamTag > & | getStreamTags () const |
Const-getter for stream tags. More... | |
std::vector< eformat::helper::StreamTag > & | getStreamTagsNonConst () |
Non-const-getter for stream tags needed by the result maker to remove disabled ROBs/SubDets. More... | |
StatusCode | setStreamTags (const std::vector< eformat::helper::StreamTag > &streamTags) |
Replace the stored list of stream tags with the given one. More... | |
StatusCode | addStreamTag (const eformat::helper::StreamTag &streamTag) |
Append one stream tag to the stored list. More... | |
const boost::dynamic_bitset< uint32_t > & | getHltPassRawBits () const |
Const-getter for HLT pass raw bits. More... | |
const boost::dynamic_bitset< uint32_t > & | getHltPrescaledBits () const |
Const-getter for HLT prescaled bits. More... | |
const std::vector< uint32_t > & | getHltBitsAsWords () const |
Const-getter for HLT bits as uint32_t array. Ordering: PassRaw, Prescaled. More... | |
void | setHltPassRawBits (const boost::dynamic_bitset< uint32_t > &bitset) |
Replace HLT pass raw bits with the given bitset. More... | |
void | setHltPrescaledBits (const boost::dynamic_bitset< uint32_t > &bitset) |
Replace HLT prescaled bits with the given bitset. More... | |
void | setHltBits (const boost::dynamic_bitset< uint32_t > &passRawBitset, const boost::dynamic_bitset< uint32_t > &prescaledBitset) |
Replace both HLT pass raw and prescaled bits with the given bitsets. More... | |
const std::unordered_map< uint16_t, std::vector< uint32_t > > & | getSerialisedData () const |
Serialised data getter. More... | |
StatusCode | getSerialisedData (const uint16_t moduleId, const std::vector< uint32_t > *&data) const |
Serialised data getter for a given moduleId @in moduleId @out data - const pointer to the stored data, nullptr on failure. More... | |
void | setSerialisedData (std::unordered_map< uint16_t, std::vector< uint32_t > > data) |
Replaces serialised data with a copy of the given data. More... | |
void | addSerialisedData (const uint16_t moduleId, const std::vector< uint32_t > &data) |
Append serialised data (copy of input) for a given moduleId, doesn't remove existing data. More... | |
StatusCode | addSerialisedDataWithCheck (const uint16_t moduleId, std::vector< uint32_t > data) |
Add serialised data for a given moduleId. More... | |
const std::vector< uint32_t > & | getStatus () const |
Full event status reference getter (1 bit-mask status word + error code words) More... | |
const std::vector< HLT::OnlineErrorCode > | getErrorCodes () const |
Error codes getter (by value) - strips off the first bit-mask status word. More... | |
void | setStatus (std::vector< uint32_t > status) |
Replace the full status words with the given data. More... | |
void | addErrorCode (const HLT::OnlineErrorCode &errorCode, const eformat::helper::Status &firstStatusWord={ eformat::GenericStatus::DATA_CORRUPTION, eformat::FullEventStatus::PSC_PROBLEM }) |
Append an error code. More... | |
const std::vector< uint32_t > & | getRobStatus (uint16_t moduleId) const |
Status words for ROB with given moduleId. More... | |
RODMinorVersion | getVersion () const |
ROD minor version getter. More... | |
void | setVersion (RODMinorVersion version) |
ROD minor version setter. More... | |
const std::set< uint16_t > & | getTruncatedModuleIds () const |
Getter for the truncation information. More... | |
void | addTruncatedModuleId (const uint16_t moduleId, bool severeTruncation=true) |
Add module ID to the list of truncated results. More... | |
bool | severeTruncation () const |
Truncation in at least one collection that is not allowed to be truncated. More... | |
bool | isAccepted () const |
If there is at least one stream tag set, it means the event is accepted. More... | |
Private Member Functions | |
void | updateHltBitWords () |
Update m_hltBitWords with the contents of m_hltPassRawBits and m_hltPrescaledBits. More... | |
Private Attributes | |
std::vector< eformat::helper::StreamTag > | m_streamTags |
Stream tags of the event. More... | |
boost::dynamic_bitset< uint32_t > | m_hltPassRawBits |
HLT bits (flagging which chains passed) More... | |
boost::dynamic_bitset< uint32_t > | m_hltPrescaledBits |
std::vector< uint32_t > | m_hltBitWords |
Vector storing m_hltBits converted to 4-byte words. More... | |
std::unordered_map< uint16_t, std::vector< uint32_t > > | m_data |
Serialised result (ROBFragment payload) for each moduleId (0 for full result, >0 for data scouting) More... | |
std::vector< uint32_t > | m_status |
FullEvent status words (first word is eformat::helper::Status, next words are optional error codes) More... | |
std::unordered_map< uint16_t, std::vector< uint32_t > > | m_robStatus |
ROBFragment status words for each moduleId. More... | |
RODMinorVersion | m_version |
Stores the ROD minor version of the HLT ROBFragments. More... | |
std::set< uint16_t > | m_truncatedModuleIds |
List of module IDs with truncation. More... | |
bool | m_severeTruncation {false} |
Should the event be sent to the debug stream due to severe truncation? More... | |
A container class for data required to build online output from HLT.
This is not an EDM class and it is not meant to be serialised and persistified. It is a transient container for collecting serialised EDM objects and other event data before saving to ByteStream or after reading from ByteStream. It provides only getter and setter methods for the stored data. It does not serialise/deserialise the data on its own.
Definition at line 38 of file HLTResultMT.h.
using HLT::HLTResultMT::RODMinorVersion = std::pair<uint8_t,uint8_t> |
Type to store decoded ROD minor version (16-bit version split into two 8-bit numbers)
Definition at line 50 of file HLTResultMT.h.
HLT::HLTResultMT::HLTResultMT | ( | std::vector< eformat::helper::StreamTag > | streamTags = {} , |
boost::dynamic_bitset< uint32_t > | hltPassRawBits = boost::dynamic_bitset<uint32_t>() , |
||
boost::dynamic_bitset< uint32_t > | hltPrescaledBits = boost::dynamic_bitset<uint32_t>() , |
||
std::unordered_map< uint16_t, std::vector< uint32_t > > | data = {} |
||
) |
void HLT::HLTResultMT::addErrorCode | ( | const HLT::OnlineErrorCode & | errorCode, |
const eformat::helper::Status & | firstStatusWord = { eformat::GenericStatus::DATA_CORRUPTION, eformat::FullEventStatus::PSC_PROBLEM } |
||
) |
Append an error code.
Makes the current first word |= new first word and appends errorCode to the vector of optional error codes
Definition at line 218 of file HLTResultMT.cxx.
void HLT::HLTResultMT::addSerialisedData | ( | const uint16_t | moduleId, |
const std::vector< uint32_t > & | data | ||
) |
Append serialised data (copy of input) for a given moduleId, doesn't remove existing data.
Definition at line 173 of file HLTResultMT.cxx.
StatusCode HLT::HLTResultMT::addSerialisedDataWithCheck | ( | const uint16_t | moduleId, |
std::vector< uint32_t > | data | ||
) |
Add serialised data for a given moduleId.
Fails if any data for the given module already exist
Definition at line 180 of file HLTResultMT.cxx.
StatusCode HLT::HLTResultMT::addStreamTag | ( | const eformat::helper::StreamTag & | streamTag | ) |
Append one stream tag to the stored list.
Removes duplicates by merging robs and dets lists of stream tags with equal name and type.
Definition at line 62 of file HLTResultMT.cxx.
void HLT::HLTResultMT::addTruncatedModuleId | ( | const uint16_t | moduleId, |
bool | severeTruncation = true |
||
) |
Add module ID to the list of truncated results.
moduleId | ROB module ID |
severeTruncation | is the result severely truncated (debug stream) |
Definition at line 256 of file HLTResultMT.cxx.
const std::vector< HLT::OnlineErrorCode > HLT::HLTResultMT::getErrorCodes | ( | ) | const |
Error codes getter (by value) - strips off the first bit-mask status word.
Definition at line 201 of file HLTResultMT.cxx.
const std::vector< uint32_t > & HLT::HLTResultMT::getHltBitsAsWords | ( | ) | const |
Const-getter for HLT bits as uint32_t array. Ordering: PassRaw, Prescaled.
Definition at line 100 of file HLTResultMT.cxx.
const boost::dynamic_bitset< uint32_t > & HLT::HLTResultMT::getHltPassRawBits | ( | ) | const |
Const-getter for HLT pass raw bits.
Definition at line 90 of file HLTResultMT.cxx.
const boost::dynamic_bitset< uint32_t > & HLT::HLTResultMT::getHltPrescaledBits | ( | ) | const |
Const-getter for HLT prescaled bits.
Definition at line 95 of file HLTResultMT.cxx.
const std::vector< uint32_t > & HLT::HLTResultMT::getRobStatus | ( | uint16_t | moduleId | ) | const |
const std::unordered_map< uint16_t, std::vector< uint32_t > > & HLT::HLTResultMT::getSerialisedData | ( | ) | const |
Serialised data getter.
The only way to retrieve the data by reference with no exception throwing.
Definition at line 147 of file HLTResultMT.cxx.
StatusCode HLT::HLTResultMT::getSerialisedData | ( | const uint16_t | moduleId, |
const std::vector< uint32_t > *& | data | ||
) | const |
Serialised data getter for a given moduleId @in moduleId @out data - const pointer to the stored data, nullptr on failure.
Definition at line 152 of file HLTResultMT.cxx.
const std::vector< uint32_t > & HLT::HLTResultMT::getStatus | ( | ) | const |
Full event status reference getter (1 bit-mask status word + error code words)
Definition at line 196 of file HLTResultMT.cxx.
const std::vector< eformat::helper::StreamTag > & HLT::HLTResultMT::getStreamTags | ( | ) | const |
Const-getter for stream tags.
Definition at line 43 of file HLTResultMT.cxx.
std::vector< eformat::helper::StreamTag > & HLT::HLTResultMT::getStreamTagsNonConst | ( | ) |
Non-const-getter for stream tags needed by the result maker to remove disabled ROBs/SubDets.
Definition at line 48 of file HLTResultMT.cxx.
const std::set< uint16_t > & HLT::HLTResultMT::getTruncatedModuleIds | ( | ) | const |
Getter for the truncation information.
Definition at line 251 of file HLTResultMT.cxx.
HLT::HLTResultMT::RODMinorVersion HLT::HLTResultMT::getVersion | ( | ) | const |
ROD minor version getter.
Definition at line 239 of file HLTResultMT.cxx.
|
inline |
If there is at least one stream tag set, it means the event is accepted.
Definition at line 178 of file HLTResultMT.h.
void HLT::HLTResultMT::setHltBits | ( | const boost::dynamic_bitset< uint32_t > & | passRawBitset, |
const boost::dynamic_bitset< uint32_t > & | prescaledBitset | ||
) |
Replace both HLT pass raw and prescaled bits with the given bitsets.
Definition at line 125 of file HLTResultMT.cxx.
void HLT::HLTResultMT::setHltPassRawBits | ( | const boost::dynamic_bitset< uint32_t > & | bitset | ) |
Replace HLT pass raw bits with the given bitset.
Definition at line 111 of file HLTResultMT.cxx.
void HLT::HLTResultMT::setHltPrescaledBits | ( | const boost::dynamic_bitset< uint32_t > & | bitset | ) |
Replace HLT prescaled bits with the given bitset.
Definition at line 118 of file HLTResultMT.cxx.
void HLT::HLTResultMT::setSerialisedData | ( | std::unordered_map< uint16_t, std::vector< uint32_t > > | data | ) |
Replaces serialised data with a copy of the given data.
Definition at line 167 of file HLTResultMT.cxx.
void HLT::HLTResultMT::setStatus | ( | std::vector< uint32_t > | status | ) |
Replace the full status words with the given data.
Definition at line 212 of file HLTResultMT.cxx.
StatusCode HLT::HLTResultMT::setStreamTags | ( | const std::vector< eformat::helper::StreamTag > & | streamTags | ) |
Replace the stored list of stream tags with the given one.
Removes duplicates from the input list by merging robs and dets lists of stream tags with equal name and type.
Definition at line 53 of file HLTResultMT.cxx.
void HLT::HLTResultMT::setVersion | ( | RODMinorVersion | version | ) |
ROD minor version setter.
Definition at line 244 of file HLTResultMT.cxx.
|
inline |
Truncation in at least one collection that is not allowed to be truncated.
Definition at line 174 of file HLTResultMT.h.
|
private |
Update m_hltBitWords with the contents of m_hltPassRawBits and m_hltPrescaledBits.
Definition at line 137 of file HLTResultMT.cxx.
|
private |
Serialised result (ROBFragment payload) for each moduleId (0 for full result, >0 for data scouting)
Definition at line 198 of file HLTResultMT.h.
|
private |
Vector storing m_hltBits converted to 4-byte words.
HLTResultMT needs to own this vector because its lifetime has to be ensured until the serialisation is finished. This vector is updated internally from m_hltPassRawBits and m_hltPrescaledBits and does not have a setter method.
Definition at line 195 of file HLTResultMT.h.
|
private |
HLT bits (flagging which chains passed)
Definition at line 187 of file HLTResultMT.h.
|
private |
Definition at line 188 of file HLTResultMT.h.
|
private |
ROBFragment status words for each moduleId.
Definition at line 204 of file HLTResultMT.h.
|
private |
Should the event be sent to the debug stream due to severe truncation?
Definition at line 214 of file HLTResultMT.h.
|
private |
FullEvent status words (first word is eformat::helper::Status, next words are optional error codes)
Definition at line 201 of file HLTResultMT.h.
|
private |
Stream tags of the event.
Definition at line 184 of file HLTResultMT.h.
|
private |
List of module IDs with truncation.
Used only by the framework while creating the result. It is not stored in ByteStream files.
Definition at line 211 of file HLTResultMT.h.
|
private |
Stores the ROD minor version of the HLT ROBFragments.
Definition at line 207 of file HLTResultMT.h.