ATLAS Offline Software
sgkey_utilities.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
13 #ifndef CXXUTILS_SGKEY_UTILITIES_H
14 #define CXXUTILS_SGKEY_UTILITIES_H
15 
16 #include "CxxUtils/sgkey_t.h"
17 #include "CxxUtils/ConcurrentMap.h"
18 #include "CxxUtils/SimpleUpdater.h"
19 
20 
21 namespace SG {
22 
23  // Separating this avoids a cppcheck syntax error.
24  static constexpr auto s_sgkey_nullval =
26 
28  template <class T>
29  using ConcurrentSGKeyMap = CxxUtils::ConcurrentMap<
30  sgkey_t, T,
33  0, s_sgkey_nullval>;
34 
35 } // namespace SG
36 
37 
38 #endif
CxxUtils::SimpleUpdater
Simple (non-deleting) Updater implementation.
Definition: SimpleUpdater.h:37
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
CxxUtils::detail::ConcurrentHashmapVal_t
uintptr_t ConcurrentHashmapVal_t
Type used for keys and values — an unsigned big enough to hold a pointer.
Definition: ConcurrentHashmapImpl.h:40
ConcurrentMap.h
Hash map from integers/pointers allowing concurrent, lockless reads.
SG::SGKeyHash
Hash functional for sgkey_t.
Definition: CxxUtils/CxxUtils/sgkey_t.h:59
SG::ConcurrentSGKeyMap
CxxUtils::ConcurrentMap< sgkey_t, T, CxxUtils::SimpleUpdater, SGKeyHash, SGKeyEqual, 0, s_sgkey_nullval > ConcurrentSGKeyMap
A concurrent map using sgkey_t as key.
Definition: sgkey_utilities.h:33
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
SimpleUpdater.h
Simple (non-deleting) Updater implementation.
SG::SGKeyEqual
Comparison functional for sgkey_t.
Definition: CxxUtils/CxxUtils/sgkey_t.h:72