ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigCostMonitor
src
TrigCostDataStore.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_TRIGCOSTDATASTORE_H
6
#define TRIGCOSTMONITOR_TRIGCOSTDATASTORE_H 1
7
8
#include <tbb/concurrent_hash_map.h>
9
#include <tbb/concurrent_vector.h>
10
11
#include "
TrigCostMonitor/AlgorithmIdentifier.h
"
12
13
#include "
TrigTimeAlgs/TrigTimeStamp.h
"
14
15
#include "GaudiKernel/EventContext.h"
16
#include "
AthViews/View.h
"
17
27
template
<
typename
PAYLOAD>
28
class
TrigCostDataStore
{
29
public
:
30
34
TrigCostDataStore
() :
m_store
() {}
35
39
~TrigCostDataStore
() {}
40
45
StatusCode
initialize
(
size_t
nSlots);
46
54
StatusCode
insert
(
const
AlgorithmIdentifier
& ai,
const
PAYLOAD& payload,
55
MsgStream&
msg
);
56
64
template
<
typename
ENTRY>
65
StatusCode
push_back
(
const
AlgorithmIdentifier
& ai, ENTRY&& entry,
66
MsgStream&
msg
);
67
75
StatusCode
retrieve
(
const
AlgorithmIdentifier
& ai,
76
typename
tbb::concurrent_hash_map<AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_accessor& payload,
77
MsgStream&
msg
)
const
;
78
85
StatusCode
clear
(
const
EventContext& context, MsgStream&
msg
);
86
95
StatusCode
getIterators
(
const
EventContext& context, MsgStream&
msg
,
96
typename
tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_iterator& begin,
97
typename
tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare>::const_iterator& end);
98
99
private
:
100
107
StatusCode
checkSlot
(
const
size_t
slot, MsgStream&
msg
)
const
;
108
109
std::vector< tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare> >
m_store
;
110
};
111
112
#include "
TrigCostDataStore.icc
"
113
114
#endif
// TRIGCOSTMONITOR_TRIGCOSTDATASTORE_H
115
AlgorithmIdentifier.h
TrigCostDataStore.icc
TrigTimeStamp.h
View.h
TrigCostDataStore::retrieve
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::TrigCostDataStore
TrigCostDataStore()
Default constructor.
Definition
TrigCostDataStore.h:34
TrigCostDataStore::m_store
std::vector< tbb::concurrent_hash_map< AlgorithmIdentifier, PAYLOAD, AlgorithmIdentifierHashCompare > > m_store
Underlying thread-safe data store for all slots: vector< hashmap< AlgorithmIdentifier,...
Definition
TrigCostDataStore.h:109
TrigCostDataStore::insert
StatusCode insert(const AlgorithmIdentifier &ai, const PAYLOAD &payload, MsgStream &msg)
Inserts the payload into the map.
TrigCostDataStore::checkSlot
StatusCode checkSlot(const size_t slot, MsgStream &msg) const
Internal check that the supplied slot number is in range.
TrigCostDataStore::initialize
StatusCode initialize(size_t nSlots)
Initialise internal storage.
TrigCostDataStore::~TrigCostDataStore
~TrigCostDataStore()
Destructor.
Definition
TrigCostDataStore.h:39
TrigCostDataStore::getIterators
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.
TrigCostDataStore::clear
StatusCode clear(const EventContext &context, MsgStream &msg)
Clears all data stored in an event slot.
TrigCostDataStore::push_back
StatusCode push_back(const AlgorithmIdentifier &ai, ENTRY &&entry, MsgStream &msg)
Inserts the entry in the vector payload into the map.
AlgorithmIdentifier
Small structure to hold an algorithm's name and store, plus some details on its EventView.
Definition
AlgorithmIdentifier.h:21
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0