ATLAS Offline Software
Loading...
Searching...
No Matches
AFPToFTrack_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
13
14
15// xAOD include(s):
17
18// Local include(s):
21
22namespace xAOD
23{
24 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFTrack_v1, int, stationID, setStationID)
26 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFTrack_v1, float, trainTime, setTrainTime)
27 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFTrack_v1, int, trainSize, setTrainSize)
28 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (AFPToFTrack_v1, int, trainNSat, setTrainNSat)
30
31 AUXSTORE_OBJECT_SETTER_AND_GETTER (AFPToFTrack_v1, std::vector< AFPToFTrack_v1::AFPToFHitLink_t >, hits, setHits)
32 static const SG::AuxElement::Accessor< std::vector<AFPToFTrack_v1::AFPToFHitLink_t> > hitsAcc( "bars" );
33
35 {
36 hitsAcc( *this ).push_back( link );
37 }
38
40 // Prepare the hits links for persistification:
41 if( hitsAcc.isAvailableWritable( *this ) ) {
42 std::vector<AFPToFTrack_v1::AFPToFHitLink_t>::iterator end = hitsAcc( *this ).end();
43 for(std::vector<AFPToFTrack_v1::AFPToFHitLink_t>::iterator itr = hitsAcc( *this ).begin(); itr != end; ++itr )
44 itr->toPersistent();
45
46 }
47 }
48
49}
Header file for the AFPToFTrack class.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
Class representing a track reconstructed in AFP ToF.
void toPersistent()
Function making sure that the object is ready for persistification i.e. saving.
void addBar(const AFPToFHitLink_t &newHit)
Add a link to a bar used to reconstruct the track.
ElementLink< AFPToFHitContainer > AFPToFHitLink_t
Type of a link to the hit.
Forward declaration.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static const SG::AuxElement::Accessor< std::vector< AFPToFTrack_v1::AFPToFHitLink_t > > hitsAcc("bars")