31 m_algToRos[
tc->getDetail<
size_t>(
"alg_idx")].push_back(rosIdx);
35 return StatusCode::SUCCESS;
44 m_algTotalTime += (
tc->getDetail<uint64_t>(
"stop") -
tc->getDetail<uint64_t>(
"start"));
46 return StatusCode::SUCCESS;
74 throw std::runtime_error(
"nullptr in CostData::costCollection(). Make sure CostData::set() is called.");
82 throw std::runtime_error(
"nullptr in CostData::rosCollection(). Make sure CostData::set() is called.");
118 const static std::string unknown =
"UNKNOWN_CLASS";
#define ATH_CHECK
Evaluate an expression and check for errors.
const std::map< std::string, std::set< size_t > > & chainToUniqAlgMap() const
Getter of the chain to its unique alg names map.
const std::map< std::string, std::set< size_t > > * m_chainToUniqAlgIdx
Mapping of chain name to its unique algorithms.
const CostROSData * m_costROSData
Helper class to store ROS to ROB mapping.
const xAOD::TrigCompositeContainer & costCollection() const
Getter of the cached algorithm cost collection pointer.
bool isMasterSlot() const
const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > * m_seededChains
Set of seeded chains to monitor.
uint32_t m_lb
Current luminosity block number.
bool m_liveTimeIsPerEvent
If the livetime represents a single event or all of the current LB.
const CostROSData & costROSData() const
Getter of the ROS to ROB map.
void setLb(uint32_t lb)
Setter of effective P1 walltime represented by the current event.
void setSequencersMap(const std::map< std::string, std::map< int16_t, std::set< size_t > > > &seqToAlg)
Set the sequence to alg idx map.
const std::map< std::string, std::set< size_t > > & chainToAlgMap() const
Getter of the alg name to chains map.
const xAOD::TrigCompositeContainer & rosCollection() const
Getter of the cached ros cost collection pointer.
const std::string & algNameToClassType(size_t algNameHash) const
Get the class typename given an algorithm instance name.
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...
uint32_t lb() const
Current luminosity block number.
const std::map< std::string, std::map< int16_t, std::set< size_t > > > & sequencersMap() const
Getter of the sequence to alg idx map.
uint32_t onlineSlot() const
CostData()
Construct an empty CostData.
void setCostROSData(const CostROSData &costROSData)
Set ROS to ROB map.
void setTypeMap(const std::unordered_map< uint32_t, std::string > &typeMap)
Set internal type map pointer.
void setChainToAlgMap(const std::map< std::string, std::set< size_t > > &algToChains)
Set the alg name to chains map.
uint64_t m_algTotalTime
Integrated CPU time of all algorithms in the event.
const std::unordered_map< uint32_t, std::string > * m_typeMapPtr
Cached non-owning pointer mapping algorithm instance names to types.
bool liveTimeIsPerEvent() const
If a call to liveTime() is providing data on a single event or a whole LB.
uint32_t m_slot
Current online slot number.
const std::map< std::string, std::map< int16_t, std::set< size_t > > > * m_sequencers
Mapping of sequence to algorithms.
void setSeededChains(const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > &seededChains)
Set the seeded chains set.
const xAOD::TrigCompositeContainer * m_costCollection
Cached non-owning pointer to main algorithm cost collection.
float m_liveTime
Effective walltime of either the event or the LB, in seconds (.
StatusCode cache()
Compute and cache derived quantities, called automatically after set().
const std::vector< TrigCompositeUtils::AlgToChainTool::ChainInfo > & seededChains() const
Getter of the seeded chains set.
std::map< size_t, std::vector< size_t > > m_algToRos
Mapping of indexes from m_costCollection to corresponding ROS requests made by algorithm.
float liveTime() const
Getter of effective P1 walltime represented by either the current event, or the current lumi block.
void setLivetime(float time, bool liveTimeIsPerEvent)
Setter of effective P1 walltime represented by the current event, or the current lumi block.
void setOnlineSlot(uint32_t slot)
Setter of the online Slot number of the current event.
void setChainToUniqAlgMap(const std::map< std::string, std::set< size_t > > &algToChains)
Set the chain to its unique alg names map.
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.
float algTotalTimeMilliSec() const
Getter of the total algorithm CPU time in the event.
const std::map< std::string, std::set< size_t > > * m_chainToAlgIdx
Mapping of chain to algorithms idx.
const xAOD::TrigCompositeContainer * m_rosCollection
Cached non-owning pointer to ros cost collection.
Caches and propagates event data to be used by monitoring algorithms.
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.