ATLAS Offline Software
Loading...
Searching...
No Matches
AlgorithmIdentifier.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCOSTMONITOR_TRIGCOSTALGORITHMIDENTIFIER_H
6#define TRIGCOSTMONITOR_TRIGCOSTALGORITHMIDENTIFIER_H 1
7
8#include "GaudiKernel/EventContext.h"
9
11
12#include <functional>
13#include <string>
14
23 AlgorithmIdentifier(const size_t realSlot, const size_t saveSlot, const std::string& caller, const std::string& storeName, const int16_t viewID = -1);
25
26 TrigConf::HLTHash callerHash (MsgStream& msg) const;
27 TrigConf::HLTHash storeHash (MsgStream& msg) const;
28 StatusCode isValid() const;
29 void dump (MsgStream& msg);
30
31 size_t m_realSlot;
33 std::string m_caller;
34 std::string m_store;
35 int16_t m_viewID;
36 size_t m_hash;
37
38 static constexpr int16_t s_noView = -1;
39};
40
53 static AlgorithmIdentifier make(const EventContext& context, const std::string& caller, MsgStream& msg, const int16_t slotOverride = -1);
54};
55
66 static size_t hash(const AlgorithmIdentifier& ai);
67
74 static bool equal(const AlgorithmIdentifier& x, const AlgorithmIdentifier& y);
75};
76
78 return ai.m_hash;
79}
80
82 return (x.m_caller == y.m_caller && x.m_store == y.m_store && x.m_realSlot == y.m_realSlot);
83}
84
85#endif // TRIGCOSTMONITOR_TRIGCOSTALGORITHMIDENTIFIER_H
#define y
#define x
-event-from-file
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.
MsgStream & msg
Definition testRead.cxx:32