ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfHLTUtils
TrigConfHLTUtils
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TrigConfHLTUtils_HLTUtils
6
#define TrigConfHLTUtils_HLTUtils
7
8
#include <string>
9
#include <inttypes.h>
10
11
#include "
CxxUtils/checker_macros.h
"
12
#include "
CxxUtils/ConcurrentStrMap.h
"
13
#include "
CxxUtils/ConcurrentStrToValMap.h
"
14
#include "
CxxUtils/ConcurrentToValMap.h
"
15
#include "
CxxUtils/SimpleUpdater.h
"
16
17
namespace
TrigConf
{
18
19
typedef
uint32_t
HLTHash
;
20
28
struct
HashMap
{
29
~HashMap
();
30
31
using
Name2HashMap_t
=
CxxUtils::ConcurrentStrMap<HLTHash, CxxUtils::SimpleUpdater>
;
32
using
Hash2NameMap_t
=
CxxUtils::ConcurrentToValMap<HLTHash, const std::string, CxxUtils::SimpleUpdater>
;
33
34
Name2HashMap_t
name2hash
{
Name2HashMap_t::Updater_t
()};
35
Hash2NameMap_t
hash2name
{Hash2NameMap_t::Updater_t()};
36
};
37
39
struct
HashStore
{
40
~HashStore
();
41
42
using
HashMap_t
=
CxxUtils::ConcurrentStrToValMap<HashMap, CxxUtils::SimpleUpdater>
;
43
HashMap_t
hashCat
{
HashMap_t::Updater_t
()};
44
};
45
46
47
class
HLTUtils
{
48
public
:
50
static
HLTHash
string2hash
(
const
std::string&,
const
std::string& category=
"TE"
);
52
static
const
std::string
hash2string
(
HLTHash
,
const
std::string& category=
"TE"
);
54
static
void
hashes2file
(
const
std::string& fileName=
"hashes2string.txt"
);
56
static
void
file2hashes
(
const
std::string& fileName=
"hashes2string.txt"
);
57
58
private
:
60
inline
static
const
std::string
s_newCategory
{
"##NewCategory"
};
61
63
inline
static
HashStore
s_hashStore
ATLAS_THREAD_SAFE
{};
64
};
65
66
}
67
68
#endif
ConcurrentStrMap.h
Hash map from strings allowing concurrent, lockless reads.
ConcurrentStrToValMap.h
Hash map from strings to arbitrary objects allowing concurrent, lockless reads.
ConcurrentToValMap.h
Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.
SimpleUpdater.h
Simple (non-deleting) Updater implementation.
checker_macros.h
Define macros for attributes used to control the static checker.
CxxUtils::ConcurrentStrMap
Hash map from strings allowing concurrent, lockless reads.
Definition
ConcurrentStrMap.h:77
CxxUtils::ConcurrentStrMap< HLTHash, CxxUtils::SimpleUpdater >::Updater_t
typename Impl_t::Updater_t Updater_t
Definition
ConcurrentStrMap.h:93
CxxUtils::ConcurrentStrToValMap
Hash map from strings to arbitrary objects allowing concurrent, lockless reads.
Definition
ConcurrentStrToValMap.h:86
CxxUtils::ConcurrentStrToValMap< HashMap, CxxUtils::SimpleUpdater >::Updater_t
typename Impl_t::Updater_t Updater_t
Definition
ConcurrentStrToValMap.h:102
TrigConf::HLTUtils::hash2string
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
TrigConf::HLTUtils::hashes2file
static void hashes2file(const std::string &fileName="hashes2string.txt")
debugging output of internal dictionary
TrigConf::HLTUtils::s_newCategory
static const std::string s_newCategory
In-file identifier.
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:60
TrigConf::HLTUtils::string2hash
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
TrigConf::HLTUtils::file2hashes
static void file2hashes(const std::string &fileName="hashes2string.txt")
debugging output of internal dictionary
TrigConf::HLTUtils::ATLAS_THREAD_SAFE
static HashStore s_hashStore ATLAS_THREAD_SAFE
Nested concurrent hash-maps to store (key=hash, value=string) pairs for different hash categories.
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:63
CxxUtils::ConcurrentToValMap
ConcurrentToValMap(Updater_t &&updater, size_type capacity=64, const Context_t &ctx=Updater_t::defaultContext())
Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.
HLTUtils
Definition
HLTUtils.py:1
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition
Config.h:22
TrigConf::HLTHash
uint32_t HLTHash
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:19
TrigConf::HashMap
Two concurrent maps to store name->hash and hash->name mappings.
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:28
TrigConf::HashMap::Hash2NameMap_t
CxxUtils::ConcurrentToValMap< HLTHash, const std::string, CxxUtils::SimpleUpdater > Hash2NameMap_t
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:32
TrigConf::HashMap::~HashMap
~HashMap()
Definition
TrigConfHLTUtils/Root/HLTUtils.cxx:21
TrigConf::HashMap::hash2name
Hash2NameMap_t hash2name
hash to name map
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:35
TrigConf::HashMap::name2hash
Name2HashMap_t name2hash
name to hash map
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:34
TrigConf::HashMap::Name2HashMap_t
CxxUtils::ConcurrentStrMap< HLTHash, CxxUtils::SimpleUpdater > Name2HashMap_t
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:31
TrigConf::HashStore
Store for hash maps per category.
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:39
TrigConf::HashStore::~HashStore
~HashStore()
Definition
TrigConfHLTUtils/Root/HLTUtils.cxx:18
TrigConf::HashStore::hashCat
HashMap_t hashCat
one HashMap per category
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:43
TrigConf::HashStore::HashMap_t
CxxUtils::ConcurrentStrToValMap< HashMap, CxxUtils::SimpleUpdater > HashMap_t
Definition
TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h:42
Generated on
for ATLAS Offline Software by
1.17.0