ATLAS Offline Software
HLTIdentifier.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 using namespace HLT;
9 std::atomic<bool> Identifier::s_reportStringIDs = true; // default for now
10 
11 Identifier::Identifier( const std::string& stringID )
12  : m_id( TrigConf::HLTUtils::string2hash( stringID, "Identifier" ) ) {}
13 
14 std::string Identifier::name() const {
16  return TrigConf::HLTUtils::hash2string( numeric(), "Identifier" );
17  }
18  return "";
19 }
20 
21 MsgStream& operator<< ( MsgStream& m, const HLT::Identifier& id ) {
23  m << id.name() << " ID#" << id.numeric();
24  } else {
25  m << "ID#" << id.numeric();
26  }
27  return m;
28 }
29 
30 
31 Identifier Identifier::fromToolName( const std::string& tname ) {
32  return Identifier( tname.substr( tname.find('.') + 1 ) );
33 }
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
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::operator<<
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
Definition: Navigation.cxx:168
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
HLTUtils.h
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
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
TrigConf::HLTUtils::hash2string
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
HLT::Identifier::s_reportStringIDs
static std::atomic< bool > s_reportStringIDs
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:59
HLTUtils.string2hash
def string2hash(string)
Definition: HLTUtils.py:5
HLTIdentifier.h
HLT::Identifier::name
std::string name() const
reports human redable name if it is enabled or, empty string
Definition: HLTIdentifier.cxx:14
HLTUtils
Definition: HLTUtils.py:1
Identifier
Definition: IdentifierFieldParser.cxx:14