ATLAS Offline Software
TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigCompositeUtils_HLTIdentifier_h
6 #define TrigCompositeUtils_HLTIdentifier_h
7 
8 #include <string>
9 #include <vector>
10 #include <set>
11 #include <map>
12 
13 #include "AsgMessaging/MsgStream.h"
15 
19 namespace HLT {
20 class Identifier {
21 public:
25  static void reportStringIDs( bool report ) { s_reportStringIDs = report; }
26  static bool reportStringIDs() { return s_reportStringIDs; }
27 
28  static HLT::Identifier fromToolName( const std::string& tname );
32  explicit Identifier( const std::string& stringID );
33 
38 
42  std::string name() const;
43 
47  inline TrigCompositeUtils::DecisionID numeric() const { return m_id; }
48  inline operator TrigCompositeUtils::DecisionID () const { return numeric(); }
49 
53  bool operator == ( const Identifier& rhs ) const { return numeric() == rhs.numeric(); }
54  bool operator == ( TrigCompositeUtils::DecisionID id ) const { return numeric() == id; }
55  bool operator < ( const Identifier& rhs ) const { return numeric() < rhs.numeric(); }
56  bool operator < ( TrigCompositeUtils::DecisionID id ) const { return numeric() < id; }
57 private:
59  static std::atomic<bool> s_reportStringIDs;
60 
61 };
62  typedef std::vector<HLT::Identifier> IDVec;
63  typedef std::set<HLT::Identifier> IDSet;
64  typedef std::map<HLT::Identifier, IDVec> IDtoIDVecMap;
65 }
66 
67 MsgStream& operator<< ( MsgStream& m, const HLT::Identifier& id );
68 
69 
70 
71 #endif // HLTIdentifier
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
HLT::Identifier::m_id
TrigCompositeUtils::DecisionID m_id
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:58
checkTP.report
report
Definition: checkTP.py:127
HLT::Identifier::operator<
bool operator<(const Identifier &rhs) const
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:55
HLT::Identifier::Identifier
Identifier(const std::string &stringID)
constructs identifier from human redable name
Definition: HLTIdentifier.cxx:11
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
HLT::Identifier::reportStringIDs
static void reportStringIDs(bool report)
disables reporting human readable names == no debugging, fast execution
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:25
HLT::Identifier::operator==
bool operator==(const Identifier &rhs) const
comparisons, for containers of identifiers
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:53
HLT::IDVec
std::vector< HLT::Identifier > IDVec
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:62
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
HLT::Identifier::reportStringIDs
static bool reportStringIDs()
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:26
HLT::Identifier::Identifier
Identifier(TrigCompositeUtils::DecisionID id)
Construct wiht numeric ID.
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:37
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
TrigCompositeContainer.h
HLT::IDtoIDVecMap
std::map< HLT::Identifier, IDVec > IDtoIDVecMap
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:64
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
operator<<
MsgStream & operator<<(MsgStream &m, const HLT::Identifier &id)
Definition: HLTIdentifier.cxx:21
HLT::Identifier::s_reportStringIDs
static std::atomic< bool > s_reportStringIDs
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:59
HLT::Identifier::name
std::string name() const
reports human redable name if it is enabled or, empty string
Definition: HLTIdentifier.cxx:14
HLT::IDSet
std::set< HLT::Identifier > IDSet
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:63
MsgStream.h
Identifier
Definition: IdentifierFieldParser.cxx:14