|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRIGCOSTMONITOR_TRIGCOSTDATASTORE_H
6 #define TRIGCOSTMONITOR_TRIGCOSTDATASTORE_H 1
8 #include <tbb/concurrent_hash_map.h>
9 #include <tbb/concurrent_vector.h>
15 #include "GaudiKernel/EventContext.h"
27 template<
typename PAYLOAD>
64 template<
typename ENTRY>
76 typename tbb::concurrent_hash_map<AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_accessor&
payload,
77 MsgStream&
msg)
const;
96 typename tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_iterator&
begin,
97 typename tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_iterator&
end);
109 std::vector< tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare> >
m_store;
114 #endif // TRIGCOSTMONITOR_TRIGCOSTDATASTORE_H
std::vector< tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare > > m_store
Underlying thread-safe data store for all slots: vector< hashmap< AlgorithmIdentifier,...
StatusCode push_back(const AlgorithmIdentifier &ai, ENTRY &&entry, MsgStream &msg)
Inserts the entry in the vector payload into the map.
StatusCode checkSlot(const size_t slot, MsgStream &msg) const
Internal check that the supplied slot number is in range.
Small structure to hold an algorithm's name and store, plus some details on its EventView....
Thread safe and multi-slot hash-map to cache PAYLOAD objects/primitives during event execution.
StatusCode retrieve(const AlgorithmIdentifier &ai, typename tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare >::const_accessor &payload, MsgStream &msg) const
Retrieve a payload from the map given an AlgorithmIdentifier.
~TrigCostDataStore()
Destructor.
StatusCode getIterators(const EventContext &context, MsgStream &msg, typename tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare >::const_iterator &begin, typename tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare >::const_iterator &end)
Fetches Begin and End const iterators to iterate over the data store.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode clear(const EventContext &context, MsgStream &msg)
Clears all data stored in an event slot.
TrigCostDataStore()
Default constructor.
StatusCode initialize(size_t nSlots)
Initialise internal storage.
StatusCode insert(const AlgorithmIdentifier &ai, const PAYLOAD &payload, MsgStream &msg)
Inserts the payload into the map.