ATLAS Offline Software
Loading...
Searching...
No Matches
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
16
17namespace TrigConf {
18
19 typedef uint32_t HLTHash;
20
37
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
Hash map from strings allowing concurrent, lockless reads.
Hash map from strings to arbitrary objects allowing concurrent, lockless reads.
Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.
Simple (non-deleting) Updater implementation.
Define macros for attributes used to control the static checker.
Hash map from strings allowing concurrent, lockless reads.
Hash map from strings to arbitrary objects allowing concurrent, lockless reads.
Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
static void hashes2file(const std::string &fileName="hashes2string.txt")
debugging output of internal dictionary
static const std::string s_newCategory
In-file identifier.
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
static void file2hashes(const std::string &fileName="hashes2string.txt")
debugging output of internal dictionary
static HashStore s_hashStore ATLAS_THREAD_SAFE
Nested concurrent hash-maps to store (key=hash, value=string) pairs for different hash categories.
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
Two concurrent maps to store name->hash and hash->name mappings.
CxxUtils::ConcurrentToValMap< HLTHash, const std::string, CxxUtils::SimpleUpdater > Hash2NameMap_t
Hash2NameMap_t hash2name
hash to name map
Name2HashMap_t name2hash
name to hash map
CxxUtils::ConcurrentStrMap< HLTHash, CxxUtils::SimpleUpdater > Name2HashMap_t
Store for hash maps per category.
HashMap_t hashCat
one HashMap per category
CxxUtils::ConcurrentStrToValMap< HashMap, CxxUtils::SimpleUpdater > HashMap_t