5#ifndef TRIGCOSTMONITOR_TRIGCOSTALGORITHMIDENTIFIER_H
6#define TRIGCOSTMONITOR_TRIGCOSTALGORITHMIDENTIFIER_H 1
8#include "GaudiKernel/EventContext.h"
23 AlgorithmIdentifier(
const size_t realSlot,
const size_t saveSlot,
const std::string& caller,
const std::string& storeName,
const int16_t viewID = -1);
53 static AlgorithmIdentifier make(
const EventContext& context,
const std::string& caller, MsgStream&
msg,
const int16_t slotOverride = -1);
82 return (
x.m_caller ==
y.m_caller &&
x.m_store ==
y.m_store &&
x.m_realSlot ==
y.m_realSlot);
Static hash and equal members as required by tbb::concurrent_hash_map.
static bool equal(const AlgorithmIdentifier &x, const AlgorithmIdentifier &y)
Equality function for AlgorithmIdentifier to check for uniqueness within hash bucket.
static size_t hash(const AlgorithmIdentifier &ai)
Hash function for AlgorithmIdentifier to assign bucket in hash map.
Simple factory class to construct an AlgorithmIdentifier from an algorithm name and context.
static AlgorithmIdentifier make(const EventContext &context, const std::string &caller, MsgStream &msg, const int16_t slotOverride=-1)
Construct an AlgorithmIdentifier.
Small structure to hold an algorithm's name and store, plus some details on its EventView.
std::string m_caller
Name of the algorithm.
std::string m_store
Name of the algorithm's store.
TrigConf::HLTHash callerHash(MsgStream &msg) const
size_t m_slotToSaveInto
The slot which is used for the purposes of recording data on this algorithm's execution.
static constexpr int16_t s_noView
Constant value used to express an Algorithm which is not running in a View.
TrigConf::HLTHash storeHash(MsgStream &msg) const
size_t m_realSlot
The actual slot of the algorithm.
~AlgorithmIdentifier()=default
size_t m_hash
Hash of algorithm + store + realSlot.
StatusCode isValid() const
int16_t m_viewID
If not within an event view, then the m_iewID = s_noView = -1.