ATLAS Offline Software
|
Caches and propagates event data to be used by monitoring algorithms. More...
#include <CostData.h>
Public Member Functions | |
CostData () | |
Construct an empty CostData. More... | |
~CostData ()=default | |
Default destructor. More... | |
CostData & | operator= (const CostData &)=delete |
Forbid assignment. More... | |
CostData (const CostData &)=delete | |
Forbid copy. More... | |
StatusCode | set (const xAOD::TrigCompositeContainer *costCollection, const xAOD::TrigCompositeContainer *rosCollection, uint32_t onlineSlot) |
Cache the cost and ros collections, after formally requesting it from storegate. More... | |
const xAOD::TrigCompositeContainer & | costCollection () const |
Getter of the cached algorithm cost collection pointer. More... | |
const xAOD::TrigCompositeContainer & | rosCollection () const |
Getter of the cached ros cost collection pointer. More... | |
const CostROSData & | costROSData () const |
Getter of the ROS to ROB map. More... | |
void | setCostROSData (const CostROSData &costROSData) |
Set ROS to ROB map. More... | |
const std::map< std::string, std::set< size_t > > & | chainToAlgMap () const |
Getter of the alg name to chains map. More... | |
void | setChainToAlgMap (const std::map< std::string, std::set< size_t >> &algToChains) |
Set the alg name to chains map. More... | |
const std::map< std::string, std::set< size_t > > & | chainToUniqAlgMap () const |
Getter of the chain to its unique alg names map. More... | |
void | setChainToUniqAlgMap (const std::map< std::string, std::set< size_t >> &algToChains) |
Set the chain to its unique alg names map. More... | |
const std::map< std::string, std::map< int16_t, std::set< size_t > > > & | sequencersMap () const |
Getter of the sequence to alg idx map. More... | |
void | setSequencersMap (const std::map< std::string, std::map< int16_t, std::set< size_t >>> &seqToAlg) |
Set the sequence to alg idx map. More... | |
const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > & | seededChains () const |
Getter of the seeded chains set. More... | |
void | setSeededChains (const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > &seededChains) |
Set the seeded chains set. More... | |
const std::map< size_t, std::vector< size_t > > & | algToRequestMap () const |
Getter of map between algorithm (index in costCollection) and ROS requests (indicies in rosCollection) More... | |
void | setLb (uint32_t lb) |
Setter of effective P1 walltime represented by the current event. More... | |
void | setOnlineSlot (uint32_t slot) |
Setter of the online Slot number of the current event. More... | |
void | setLivetime (float time, bool liveTimeIsPerEvent) |
Setter of effective P1 walltime represented by the current event, or the current lumi block. More... | |
float | liveTime () const |
Getter of effective P1 walltime represented by either the current event, or the current lumi block. More... | |
bool | liveTimeIsPerEvent () const |
If a call to liveTime() is providing data on a single event or a whole LB. More... | |
uint32_t | lb () const |
Current luminosity block number. More... | |
uint32_t | onlineSlot () const |
bool | isMasterSlot () const |
float | algTotalTimeMilliSec () const |
Getter of the total algorithm CPU time in the event. More... | |
const std::string & | algNameToClassType (size_t algNameHash) const |
Get the class typename given an algorithm instance name. More... | |
void | setTypeMap (const std::unordered_map< uint32_t, std::string > &typeMap) |
Set internal type map pointer. More... | |
Private Member Functions | |
StatusCode | cache () |
Compute and cache derived quantities, called automatically after set(). More... | |
Private Attributes | |
const xAOD::TrigCompositeContainer * | m_costCollection |
Cached non-owning pointer to main algorithm cost collection. More... | |
const xAOD::TrigCompositeContainer * | m_rosCollection = nullptr |
Cached non-owning pointer to ros cost collection. More... | |
uint64_t | m_algTotalTime |
Integrated CPU time of all algorithms in the event. More... | |
float | m_liveTime |
Effective walltime of either the event or the LB, in seconds (. More... | |
uint32_t | m_lb |
Current luminosity block number. More... | |
uint32_t | m_slot |
Current online slot number. More... | |
bool | m_liveTimeIsPerEvent |
If the livetime represents a single event or all of the current LB. More... | |
const std::unordered_map< uint32_t, std::string > * | m_typeMapPtr |
Cached non-owning pointer mapping algorithm instance names to types. More... | |
std::map< size_t, std::vector< size_t > > | m_algToRos |
Mapping of indexes from m_costCollection to corresponding ROS requests made by algorithm. More... | |
const CostROSData * | m_costROSData = nullptr |
Helper class to store ROS to ROB mapping. More... | |
const std::map< std::string, std::set< size_t > > * | m_chainToAlgIdx = nullptr |
Mapping of chain to algorithms idx. More... | |
const std::map< std::string, std::set< size_t > > * | m_chainToUniqAlgIdx = nullptr |
Mapping of chain name to its unique algorithms. More... | |
const std::map< std::string, std::map< int16_t, std::set< size_t > > > * | m_sequencers = nullptr |
Mapping of sequence to algorithms. More... | |
const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > * | m_seededChains = nullptr |
Set of seeded chains to monitor. More... | |
Caches and propagates event data to be used by monitoring algorithms.
Cost Monitors and their Counters need access to different storegate collections, derived data, and other normalisation factors. The CostData object wraps all of these, providing a single "data" object which is passed down to all clients.
Definition at line 26 of file CostData.h.
CostData::CostData | ( | ) |
|
default |
Default destructor.
const std::string & CostData::algNameToClassType | ( | size_t | algNameHash | ) | const |
Get the class typename given an algorithm instance name.
Name is supplied in serialised hashed form.
Definition at line 117 of file CostData.cxx.
const std::map< size_t, std::vector< size_t > > & CostData::algToRequestMap | ( | ) | const |
Getter of map between algorithm (index in costCollection) and ROS requests (indicies in rosCollection)
Definition at line 91 of file CostData.cxx.
float CostData::algTotalTimeMilliSec | ( | ) | const |
Getter of the total algorithm CPU time in the event.
Definition at line 95 of file CostData.cxx.
|
private |
Compute and cache derived quantities, called automatically after set().
Computes algTotalTimeMilliSec()
Definition at line 39 of file CostData.cxx.
const std::map< std::string, std::set< size_t > > & CostData::chainToAlgMap | ( | ) | const |
Getter of the alg name to chains map.
Definition at line 147 of file CostData.cxx.
const std::map< std::string, std::set< size_t > > & CostData::chainToUniqAlgMap | ( | ) | const |
Getter of the chain to its unique alg names map.
Definition at line 151 of file CostData.cxx.
const xAOD::TrigCompositeContainer & CostData::costCollection | ( | ) | const |
Getter of the cached algorithm cost collection pointer.
Definition at line 72 of file CostData.cxx.
const CostROSData & CostData::costROSData | ( | ) | const |
Getter of the ROS to ROB map.
Definition at line 87 of file CostData.cxx.
bool CostData::isMasterSlot | ( | ) | const |
Definition at line 107 of file CostData.cxx.
uint32_t CostData::lb | ( | ) | const |
Current luminosity block number.
Definition at line 99 of file CostData.cxx.
float CostData::liveTime | ( | ) | const |
Getter of effective P1 walltime represented by either the current event, or the current lumi block.
Definition at line 112 of file CostData.cxx.
bool CostData::liveTimeIsPerEvent | ( | ) | const |
If a call to liveTime() is providing data on a single event or a whole LB.
Definition at line 67 of file CostData.cxx.
uint32_t CostData::onlineSlot | ( | ) | const |
Definition at line 103 of file CostData.cxx.
const xAOD::TrigCompositeContainer & CostData::rosCollection | ( | ) | const |
Getter of the cached ros cost collection pointer.
Definition at line 80 of file CostData.cxx.
const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > & CostData::seededChains | ( | ) | const |
Getter of the seeded chains set.
Definition at line 159 of file CostData.cxx.
const std::map< std::string, std::map< int16_t, std::set< size_t > > > & CostData::sequencersMap | ( | ) | const |
Getter of the sequence to alg idx map.
Definition at line 155 of file CostData.cxx.
StatusCode CostData::set | ( | const xAOD::TrigCompositeContainer * | costCollection, |
const xAOD::TrigCompositeContainer * | rosCollection, | ||
uint32_t | onlineSlot | ||
) |
Cache the cost and ros collections, after formally requesting it from storegate.
Definition at line 20 of file CostData.cxx.
void CostData::setChainToAlgMap | ( | const std::map< std::string, std::set< size_t >> & | algToChains | ) |
Set the alg name to chains map.
Definition at line 134 of file CostData.cxx.
void CostData::setChainToUniqAlgMap | ( | const std::map< std::string, std::set< size_t >> & | algToChains | ) |
Set the chain to its unique alg names map.
Definition at line 138 of file CostData.cxx.
void CostData::setCostROSData | ( | const CostROSData & | costROSData | ) |
Set ROS to ROB map.
Definition at line 49 of file CostData.cxx.
void CostData::setLb | ( | uint32_t | lb | ) |
Setter of effective P1 walltime represented by the current event.
Definition at line 53 of file CostData.cxx.
void CostData::setLivetime | ( | float | time, |
bool | liveTimeIsPerEvent | ||
) |
Setter of effective P1 walltime represented by the current event, or the current lumi block.
As specified by the second parameter
Definition at line 61 of file CostData.cxx.
void CostData::setOnlineSlot | ( | uint32_t | slot | ) |
Setter of the online Slot number of the current event.
Definition at line 57 of file CostData.cxx.
void CostData::setSeededChains | ( | const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > & | seededChains | ) |
Set the seeded chains set.
Definition at line 163 of file CostData.cxx.
void CostData::setSequencersMap | ( | const std::map< std::string, std::map< int16_t, std::set< size_t >>> & | seqToAlg | ) |
Set the sequence to alg idx map.
Definition at line 142 of file CostData.cxx.
void CostData::setTypeMap | ( | const std::unordered_map< uint32_t, std::string > & | typeMap | ) |
Set internal type map pointer.
Definition at line 130 of file CostData.cxx.
|
private |
Mapping of indexes from m_costCollection to corresponding ROS requests made by algorithm.
Definition at line 195 of file CostData.h.
|
private |
Integrated CPU time of all algorithms in the event.
Stored in discrete microseconds.
Definition at line 189 of file CostData.h.
|
private |
Mapping of chain to algorithms idx.
Definition at line 197 of file CostData.h.
|
private |
Mapping of chain name to its unique algorithms.
Definition at line 198 of file CostData.h.
|
private |
Cached non-owning pointer to main algorithm cost collection.
Definition at line 187 of file CostData.h.
|
private |
Helper class to store ROS to ROB mapping.
Definition at line 196 of file CostData.h.
|
private |
Current luminosity block number.
Definition at line 191 of file CostData.h.
|
private |
Effective walltime of either the event or the LB, in seconds (.
Definition at line 190 of file CostData.h.
|
private |
If the livetime represents a single event or all of the current LB.
Definition at line 193 of file CostData.h.
|
private |
Cached non-owning pointer to ros cost collection.
Definition at line 188 of file CostData.h.
|
private |
Set of seeded chains to monitor.
Definition at line 200 of file CostData.h.
|
private |
Mapping of sequence to algorithms.
Definition at line 199 of file CostData.h.
|
private |
Current online slot number.
Definition at line 192 of file CostData.h.
|
private |
Cached non-owning pointer mapping algorithm instance names to types.
Definition at line 194 of file CostData.h.