ATLAS Offline Software
Loading...
Searching...
No Matches
TrigJetHypoTool.cxx File Reference
Include dependency graph for TrigJetHypoTool.cxx:

Go to the source code of this file.

Typedefs

typedef unsigned int DecisionID
typedef xAOD::TrigComposite Decision
typedef xAOD::TrigCompositeContainer DecisionContainer

Functions

bool isLegId (const HLT::Identifier &legIdentifier)
 Recognise whether the chain ID is a leg ID.
HLT::Identifier getIDFromLeg (const HLT::Identifier &legIdentifier)
 Generate the HLT::Identifier which corresponds to the chain name from the leg name.
HLT::Identifier createLegName (const HLT::Identifier &chainIdentifier, size_t counter)
 Generate the HLT::Identifier which corresponds to a specific leg of a given chain.

Typedef Documentation

◆ Decision

◆ DecisionContainer

◆ DecisionID

typedef unsigned int TrigCompositeUtils::DecisionID

Definition at line 27 of file TrigComposite_v1.h.

Function Documentation

◆ createLegName()

HLT::Identifier TrigCompositeUtils::createLegName ( const HLT::Identifier & chainIdentifier,
size_t counter )

Generate the HLT::Identifier which corresponds to a specific leg of a given chain.

This can be queried for its DecisionID.

Parameters
chainIdentifierThe HLT::Identifier corresponding to the chain.
counterThe numeral of the leg.
Returns
HLT::Identifier corresponding to the specified leg. Call .numeric() on this to get the DecisionID.

Definition at line 166 of file TrigCompositeUtilsRoot.cxx.

166 {
167 return createLegName( chainIdentifier.name(), counter );
168 }
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
std::string name() const
reports human redable name

◆ getIDFromLeg()

HLT::Identifier TrigCompositeUtils::getIDFromLeg ( const HLT::Identifier & legIdentifier)

Generate the HLT::Identifier which corresponds to the chain name from the leg name.

This can be queried for its DecisionID.

Parameters
legIdentifierThe HLT::Identifier corresponding to the specific leg.
Returns
HLT::Identifier corresponding to the chain. Call .numeric() on this to get the DecisionID.

Definition at line 180 of file TrigCompositeUtilsRoot.cxx.

180 {
181 const std::string& name = legIdentifier.name();
182 if (isChainId(name)){
183 return legIdentifier;
184 } else if (isLegId(name)){
185 return HLT::Identifier(name.substr(7));
186 } else{
187 throw std::runtime_error("TrigCompositeUtils::getIDFromLeg legIdentifier '"+name+"' does not start with 'HLT_' or 'leg' ");
188 }
189 }
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.
bool isChainId(const HLT::Identifier &chainIdentifier)
Recognise whether the HLT identifier corresponds to a whole chain.

◆ isLegId()

bool TrigCompositeUtils::isLegId ( const HLT::Identifier & legIdentifier)

Recognise whether the chain ID is a leg ID.

Parameters
legIdentifierThe HLT::Identifier corresponding to the specific ID.
Returns
True if leg-ID, else false

Definition at line 219 of file TrigCompositeUtilsRoot.cxx.

219 {
220 return isLegId(legIdentifier.name());
221 }