ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
HLT::Identifier Class Reference

#include <HLTIdentifier.h>

Collaboration diagram for HLT::Identifier:

Public Member Functions

 Identifier (const std::string &stringID)
 constructs identifier from human redable name More...
 
 Identifier (TrigCompositeUtils::DecisionID id)
 Construct wiht numeric ID. More...
 
std::string name () const
 reports human redable name if it is enabled or, empty string More...
 
TrigCompositeUtils::DecisionID numeric () const
 numeric ID More...
 
 operator TrigCompositeUtils::DecisionID () const
 
bool operator== (const Identifier &rhs) const
 comparisons, for containers of identifiers More...
 
bool operator== (TrigCompositeUtils::DecisionID id) const
 
bool operator< (const Identifier &rhs) const
 
bool operator< (TrigCompositeUtils::DecisionID id) const
 

Static Public Member Functions

static void reportStringIDs (bool report)
 disables reporting human readable names == no debugging, fast execution More...
 
static bool reportStringIDs ()
 
static HLT::Identifier fromToolName (const std::string &tname)
 

Private Attributes

TrigCompositeUtils::DecisionID m_id
 

Static Private Attributes

static std::atomic< bool > s_reportStringIDs = true
 

Detailed Description

Definition at line 20 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

Constructor & Destructor Documentation

◆ Identifier() [1/2]

Identifier::Identifier ( const std::string &  stringID)
explicit

constructs identifier from human redable name

Definition at line 11 of file HLTIdentifier.cxx.

12  : m_id( TrigConf::HLTUtils::string2hash( stringID, "Identifier" ) ) {}

◆ Identifier() [2/2]

HLT::Identifier::Identifier ( TrigCompositeUtils::DecisionID  id)
inline

Construct wiht numeric ID.

Definition at line 37 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

37 : m_id( id ) {}

Member Function Documentation

◆ fromToolName()

Identifier Identifier::fromToolName ( const std::string &  tname)
static

Definition at line 31 of file HLTIdentifier.cxx.

31  {
32  return Identifier( tname.substr( tname.find('.') + 1 ) );
33 }

◆ name()

std::string Identifier::name ( ) const

reports human redable name if it is enabled or, empty string

Definition at line 14 of file HLTIdentifier.cxx.

14  {
16  return TrigConf::HLTUtils::hash2string( numeric(), "Identifier" );
17  }
18  return "";
19 }

◆ numeric()

TrigCompositeUtils::DecisionID HLT::Identifier::numeric ( ) const
inline

numeric ID

Definition at line 47 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

47 { return m_id; }

◆ operator TrigCompositeUtils::DecisionID()

HLT::Identifier::operator TrigCompositeUtils::DecisionID ( ) const
inline

Definition at line 48 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

48 { return numeric(); }

◆ operator<() [1/2]

bool HLT::Identifier::operator< ( const Identifier rhs) const
inline

Definition at line 55 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

55 { return numeric() < rhs.numeric(); }

◆ operator<() [2/2]

bool HLT::Identifier::operator< ( TrigCompositeUtils::DecisionID  id) const
inline

Definition at line 56 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

56 { return numeric() < id; }

◆ operator==() [1/2]

bool HLT::Identifier::operator== ( const Identifier rhs) const
inline

comparisons, for containers of identifiers

Definition at line 53 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

53 { return numeric() == rhs.numeric(); }

◆ operator==() [2/2]

bool HLT::Identifier::operator== ( TrigCompositeUtils::DecisionID  id) const
inline

Definition at line 54 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

54 { return numeric() == id; }

◆ reportStringIDs() [1/2]

static bool HLT::Identifier::reportStringIDs ( )
inlinestatic

Definition at line 26 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

26 { return s_reportStringIDs; }

◆ reportStringIDs() [2/2]

static void HLT::Identifier::reportStringIDs ( bool  report)
inlinestatic

disables reporting human readable names == no debugging, fast execution

Definition at line 25 of file TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h.

Member Data Documentation

◆ m_id

TrigCompositeUtils::DecisionID HLT::Identifier::m_id
private

◆ s_reportStringIDs

std::atomic< bool > Identifier::s_reportStringIDs = true
staticprivate

The documentation for this class was generated from the following files:
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::Identifier
Identifier(const std::string &stringID)
constructs identifier from human redable name
Definition: HLTIdentifier.cxx:11
TrigConf::HLTUtils::string2hash
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
HLT::Identifier::reportStringIDs
static bool reportStringIDs()
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:26
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
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