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

Go to the source code of this file.

Typedefs

typedef xAOD::TrigComposite Decision
typedef xAOD::TrigCompositeContainer DecisionContainer
typedef unsigned int DecisionID
typedef std::set< DecisionIDDecisionIDContainer

Functions

SG::WriteHandle< DecisionContainercreateAndStore (const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
 Creates and right away records the DecisionContainer with the key.
void decisionIDs (const Decision *d, DecisionIDContainer &id)
 Extracts DecisionIDs stored in the Decision object.
DecisionnewDecisionIn (DecisionContainer *dc, const std::string &name="")
 Helper method to create a Decision object, place it in the container and return a pointer to it.
const std::string & hypoAlgNodeName ()

Typedef Documentation

◆ Decision

◆ DecisionContainer

◆ DecisionID

typedef unsigned int TrigCompositeUtils::DecisionID

Definition at line 27 of file TrigComposite_v1.h.

◆ DecisionIDContainer

Definition at line 28 of file TrigComposite_v1.h.

Function Documentation

◆ createAndStore()

SG::WriteHandle< DecisionContainer > TrigCompositeUtils::createAndStore ( const SG::WriteHandleKey< DecisionContainer > & key,
const EventContext & ctx )

Creates and right away records the DecisionContainer with the key.

Returns the WriteHandle.

Definition at line 28 of file TrigCompositeUtilsRoot.cxx.

28 {
29 SG::WriteHandle<DecisionContainer> handle( key, ctx );
30 auto data = std::make_unique<DecisionContainer>() ;
31 auto aux = std::make_unique<DecisionAuxContainer>() ;
32 data->setStore( aux.get() );
33 handle.record( std::move( data ), std::move( aux ) ).ignore();
34 return handle;
35 }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ decisionIDs()

void TrigCompositeUtils::decisionIDs ( const Decision * d,
DecisionIDContainer & destination )

Extracts DecisionIDs stored in the Decision object.

Definition at line 65 of file TrigCompositeUtilsRoot.cxx.

65 {
66 const std::vector<DecisionID>& decisions = readOnlyAccessor( *d );
67 destination.insert( decisions.begin(), decisions.end() );
68 }
static const SG::AuxElement::ConstAccessor< std::vector< TrigCompositeUtils::DecisionID > > readOnlyAccessor("decisions")

◆ hypoAlgNodeName()

const std::string & TrigCompositeUtils::hypoAlgNodeName ( )
inline

Definition at line 427 of file TrigCompositeUtils.h.

static const std::string s_hypoAlgNodeNameString
Constant used to identify a navigation graph node as being from a Hypo Alg.

◆ newDecisionIn()

Decision * TrigCompositeUtils::newDecisionIn ( DecisionContainer * dc,
const std::string & name = "" )

Helper method to create a Decision object, place it in the container and return a pointer to it.

This is to make this: auto d = newDecisionIn(output); instead of: auto d = new Decision; output->push_back(d); If provided, the name is assigned to the TC object Note that the supplied DecisionContainer must have been recorded in the event store.

Definition at line 44 of file TrigCompositeUtilsRoot.cxx.

44 {
45 Decision * x = new Decision;
46 dc->push_back( x );
47 if ( ! name.empty() ) {
48 x->setName( name );
49 }
50 return x;
51 }
#define x
value_type push_back(value_type pElem)
Add an element to the end of the collection.