ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleSortingTool Class Reference

#include <ParticleSortingTool.h>

Inheritance diagram for ParticleSortingTool:
Collaboration diagram for ParticleSortingTool:

Public Member Functions

 ParticleSortingTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters:
virtual ~ParticleSortingTool ()
 Destructor:
virtual StatusCode initialize () override
 Athena algtool's initialize.
virtual StatusCode finalize () override
 Athena algtool's finalize.
virtual StatusCode addBranches (const EventContext &ctx) const final override
 Implement the method from the ISkimmingTool interface.
 DeclareInterfaceID (IAugmentationTool, 1, 0)
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode doSort (xAOD::IParticleContainer *cont) const
 Helper method that implements the call to the right sort function.
template<class CONTAINERTYPE>
StatusCode doSortConst (ConstDataVector< CONTAINERTYPE > *cont) const
 Helper method to sort a ConstDataVector.
bool comparePt (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's pt.
bool compareEta (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's eta.
bool comparePhi (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's phi.
bool compareMass (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's mass.
bool compareEnergy (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's energy.
bool compareRapidity (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare the particle's rapidity.
bool compareAuxData (const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
 The method to compare an auxdata member of the particle.
bool compareDouble (double a, double b) const
 Method to compare two doubles.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StringProperty m_inCollKey { this, "InputContainer", "", "Input container name" }
 Input container name.
StringProperty m_outCollKey { this, "OutputContainer", "", "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" }
 The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects.
StringProperty m_sortVar { this, "SortVariable", "pt", "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" }
 Define by what parameter to sort (default: 'pt')
BooleanProperty m_sortDescending { this, "SortDescending", true, "Define if the container should be sorted in a descending order (default=true)" }
 Define if the container should be sorted in a descending order (default=true)
int m_sortID {0}
 Internal identifier for the type of sorting.
std::atomic< unsigned long > m_nEventsProcessed {0}
 Internal event counter.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 29 of file ParticleSortingTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ParticleSortingTool()

ParticleSortingTool::ParticleSortingTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor with parameters:

Definition at line 34 of file ParticleSortingTool.cxx.

36 :
37 ::AthAlgTool ( type, name, parent )
38{
39 declareInterface< DerivationFramework::IAugmentationTool >(this);
40}
AthAlgTool()
Default constructor:

◆ ~ParticleSortingTool()

ParticleSortingTool::~ParticleSortingTool ( )
virtual

Destructor:

Definition at line 45 of file ParticleSortingTool.cxx.

46{}

Member Function Documentation

◆ addBranches()

StatusCode ParticleSortingTool::addBranches ( const EventContext & ctx) const
finaloverridevirtual

Implement the method from the ISkimmingTool interface.

Implements DerivationFramework::IAugmentationTool.

Definition at line 122 of file ParticleSortingTool.cxx.

123{
124 // Increase the event counter
126
127 // Simple status message at the beginning of each event execute,
128 ATH_MSG_DEBUG ( "==> addBranches " << name() << " on " << m_nEventsProcessed << ". event..." );
129
130 if ( m_outCollKey.value().empty() ) {
131 // Try to get the input container as non-const
132 ATH_MSG_DEBUG("Got an empty 'OutputCollection' property. "
133 << "Trying to retrieve a non-const version of the 'InputContainer'...");
134 xAOD::IParticleContainer* inCont = evtStore()->tryRetrieve<xAOD::IParticleContainer>( m_inCollKey.value() ); // FIXME Use Handles
135 if (inCont){ ATH_CHECK( this->doSort(inCont) ); }
136 else {
137 ATH_MSG_DEBUG("We couldn't retrieve a non-const version of the input container... try const.");
138 const xAOD::IParticleContainer* inCont2 = nullptr;
139 ATH_CHECK( evtStore()->retrieve( inCont2, m_inCollKey.value()) ); // FIXME Use Handles
140 // Now, do the copy and sorting and overwriting of all known container types
141 if (false) {
142 }
155 else {
156 ATH_MSG_ERROR("Couln't find the provided intput container in store gate for later overwriting");
157 return StatusCode::FAILURE;
158 }
159 }
160 }
161 else {
162 ATH_MSG_DEBUG("Got a non-empty 'OutputCollection' property. "
163 << "Trying to retrieve a const version of the 'InputContainer'...");
164
165 // Now, do the copy and sorting of all known container types
166 if (false) {
167 }
180 else {
181 ATH_MSG_ERROR("Couln't find the provided intput container in store gate");
182 return StatusCode::FAILURE;
183 }
184
185 }
186
187 return StatusCode::SUCCESS;
188}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
#define OVERWRITE_AND_SORT_CONTAINER(CONTAINERTYPE)
#define COPY_AND_SORT_CONTAINER(CONTAINERTYPE)
ServiceHandle< StoreGateSvc > & evtStore()
StatusCode doSort(xAOD::IParticleContainer *cont) const
Helper method that implements the call to the right sort function.
StringProperty m_inCollKey
Input container name.
std::atomic< unsigned long > m_nEventsProcessed
Internal event counter.
StringProperty m_outCollKey
The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
PFOContainer_v1 PFOContainer
Definition of the current "pfo container version".
NeutralParticleContainer_v1 NeutralParticleContainer
Definition of the current "NeutralParticle container version".
ParticleContainer_v1 ParticleContainer
Define the latest version of the particle class.
CompositeParticleContainer_v1 CompositeParticleContainer
Define the latest version of the CompositeParticle class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.

◆ compareAuxData()

bool ParticleSortingTool::compareAuxData ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare an auxdata member of the particle.

Definition at line 293 of file ParticleSortingTool.cxx.

295{
296 SG::ConstAccessor<float> acc( this->m_sortVar.value() );
297 return this->compareDouble(acc(*partA),acc(*partB));
298}
StringProperty m_sortVar
Define by what parameter to sort (default: 'pt')
bool compareDouble(double a, double b) const
Method to compare two doubles.

◆ compareDouble()

bool ParticleSortingTool::compareDouble ( double a,
double b ) const
inlineprivate

Method to compare two doubles.

Definition at line 122 of file ParticleSortingTool.h.

123{
124 if ( m_sortID < 0 ) { return CxxUtils::fpcompare::greater(a,b); }
125 else { return CxxUtils::fpcompare::less(a,b); }
126}
static Double_t a
int m_sortID
Internal identifier for the type of sorting.
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition fpcompare.h:140
bool less(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition fpcompare.h:166

◆ compareEnergy()

bool ParticleSortingTool::compareEnergy ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's energy.

Definition at line 276 of file ParticleSortingTool.cxx.

278{
279 const double a = partA->e();
280 const double b = partB->e();
281 return this->compareDouble(a,b);
282}
virtual double e() const =0
The total energy of the particle.

◆ compareEta()

bool ParticleSortingTool::compareEta ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's eta.

Definition at line 249 of file ParticleSortingTool.cxx.

251{
252 const double a = partA->eta();
253 const double b = partB->eta();
254 return this->compareDouble(a,b);
255}
virtual double eta() const =0
The pseudorapidity ( ) of the particle.

◆ compareMass()

bool ParticleSortingTool::compareMass ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's mass.

Definition at line 267 of file ParticleSortingTool.cxx.

269{
270 const double a = partA->m();
271 const double b = partB->m();
272 return this->compareDouble(a,b);
273}
virtual double m() const =0
The invariant mass of the particle.

◆ comparePhi()

bool ParticleSortingTool::comparePhi ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's phi.

Definition at line 258 of file ParticleSortingTool.cxx.

260{
261 const double a = partA->phi();
262 const double b = partB->phi();
263 return this->compareDouble(a,b);
264}
virtual double phi() const =0
The azimuthal angle ( ) of the particle.

◆ comparePt()

bool ParticleSortingTool::comparePt ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's pt.

Definition at line 240 of file ParticleSortingTool.cxx.

242{
243 const double a = partA->pt();
244 const double b = partB->pt();
245 return this->compareDouble(a,b);
246}
virtual double pt() const =0
The transverse momentum ( ) of the particle.

◆ compareRapidity()

bool ParticleSortingTool::compareRapidity ( const xAOD::IParticle * partA,
const xAOD::IParticle * partB ) const
private

The method to compare the particle's rapidity.

Definition at line 285 of file ParticleSortingTool.cxx.

287{
288 const double a = partA->rapidity();
289 const double b = partB->rapidity();
290 return this->compareDouble(a,b);
291}
virtual double rapidity() const =0
The true rapidity (y) of the particle.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ DeclareInterfaceID()

DerivationFramework::IAugmentationTool::DeclareInterfaceID ( IAugmentationTool ,
1 ,
0  )
inherited

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ doSort()

StatusCode ParticleSortingTool::doSort ( xAOD::IParticleContainer * cont) const
private

Helper method that implements the call to the right sort function.

Definition at line 192 of file ParticleSortingTool.cxx.

193{
194 if ( !cont ) {
195 ATH_MSG_ERROR("No container to be sorted");
196 return StatusCode::FAILURE;
197 }
198 // Actually do the sorting, using a C++11 lambda function construct
199 // to be able to use the member function here
200 if ( std::abs(m_sortID) == 1 ) {
201 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
202 return this->comparePt(a,b);
203 } );
204 }
205 else if ( std::abs(m_sortID) == 2 ) {
206 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
207 return this->compareEta(a,b);
208 } );
209 }
210 else if ( std::abs(m_sortID) == 3 ) {
211 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
212 return this->comparePhi(a,b);
213 } );
214 }
215 else if ( std::abs(m_sortID) == 4 ) {
216 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
217 return this->compareMass(a,b);
218 } );
219 }
220 else if ( std::abs(m_sortID) == 5 ) {
221 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
222 return this->compareEnergy(a,b);
223 } );
224 }
225 else if ( std::abs(m_sortID) == 6 ) {
226 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
227 return this->compareRapidity(a,b);
228 } );
229 }
230 else if ( std::abs(m_sortID) == 7 ) {
231 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
232 return this->compareAuxData(a,b);
233 } );
234 }
235
236 return StatusCode::SUCCESS;
237}
void sort()
Sort the container.
bool compareEnergy(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's energy.
bool compareAuxData(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare an auxdata member of the particle.
bool comparePt(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's pt.
bool compareRapidity(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's rapidity.
bool compareEta(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's eta.
bool compareMass(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's mass.
bool comparePhi(const xAOD::IParticle *partA, const xAOD::IParticle *partB) const
The method to compare the particle's phi.

◆ doSortConst()

template<class CONTAINERTYPE>
StatusCode ParticleSortingTool::doSortConst ( ConstDataVector< CONTAINERTYPE > * cont) const
private

Helper method to sort a ConstDataVector.

Definition at line 130 of file ParticleSortingTool.h.

131{
132 if ( !cont ) {
133 ATH_MSG_ERROR("No ConstDataVector to be sorted");
134 return StatusCode::FAILURE;
135 }
136 // Actually do the sorting, using a C++11 lambda function construct
137 // to be able to use the member function here
138 if ( std::abs(m_sortID) == 1 ) {
139 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
140 return this->comparePt(a,b);
141 } );
142 }
143 else if ( std::abs(m_sortID) == 2 ) {
144 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
145 return this->compareEta(a,b);
146 } );
147 }
148 else if ( std::abs(m_sortID) == 3 ) {
149 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
150 return this->comparePhi(a,b);
151 } );
152 }
153 else if ( std::abs(m_sortID) == 4 ) {
154 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
155 return this->compareMass(a,b);
156 } );
157 }
158 else if ( std::abs(m_sortID) == 5 ) {
159 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
160 return this->compareEnergy(a,b);
161 } );
162 }
163 else if ( std::abs(m_sortID) == 6 ) {
164 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
165 return this->compareRapidity(a,b);
166 } );
167 }
168 else if ( std::abs(m_sortID) == 7 ) {
169 cont->sort( [this](const xAOD::IParticle* a, const xAOD::IParticle* b) {
170 return this->compareAuxData(a,b);
171 } );
172 }
173
174 return StatusCode::SUCCESS;
175}

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode ParticleSortingTool::finalize ( )
overridevirtual

Athena algtool's finalize.

Definition at line 84 of file ParticleSortingTool.cxx.

85{
86 ATH_MSG_DEBUG ("Finalizing " << name() << "...");
87
88 return StatusCode::SUCCESS;
89}

◆ initialize()

StatusCode ParticleSortingTool::initialize ( )
overridevirtual

Athena algtool's initialize.

Definition at line 52 of file ParticleSortingTool.cxx.

53{
54 ATH_MSG_DEBUG ("Initializing " << name() << "...");
55
56 // Print out the used configuration
57 ATH_MSG_DEBUG ( " using = " << m_inCollKey );
58 ATH_MSG_DEBUG ( " using = " << m_outCollKey );
59
60 // initialize the counters
61 m_sortID = 0;
63
64 // Figure out how to sort
65 if ( m_sortVar.value() == "pt" ) { m_sortID = 1; }
66 else if ( m_sortVar.value() == "eta" ) { m_sortID = 2; }
67 else if ( m_sortVar.value() == "phi" ) { m_sortID = 3; }
68 else if ( m_sortVar.value() == "m" ) { m_sortID = 4; }
69 else if ( m_sortVar.value() == "e" ) { m_sortID = 5; }
70 else if ( m_sortVar.value() == "rapidity" ) { m_sortID = 6; }
71 else {
72 ATH_MSG_INFO("Didn't find a valid value for SortVariable=" << m_sortVar.value() << "."
73 << " Assuming it's an auxdata member");
74 m_sortID = 7;
75 }
76 if ( m_sortDescending.value() ) { m_sortID *= -1; }
77
78 return StatusCode::SUCCESS;
79}
#define ATH_MSG_INFO(x)
BooleanProperty m_sortDescending
Define if the container should be sorted in a descending order (default=true)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inCollKey

StringProperty ParticleSortingTool::m_inCollKey { this, "InputContainer", "", "Input container name" }
private

Input container name.

Definition at line 102 of file ParticleSortingTool.h.

102{ this, "InputContainer", "", "Input container name" };

◆ m_nEventsProcessed

std::atomic<unsigned long> ParticleSortingTool::m_nEventsProcessed {0}
mutableprivate

Internal event counter.

Definition at line 117 of file ParticleSortingTool.h.

117{0};

◆ m_outCollKey

StringProperty ParticleSortingTool::m_outCollKey { this, "OutputContainer", "", "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" }
private

The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects.

Definition at line 105 of file ParticleSortingTool.h.

105{ this, "OutputContainer", "", "The name of the output container (with SG::VIEW_ELEMENTS) with the sorted copy of input objects" };

◆ m_sortDescending

BooleanProperty ParticleSortingTool::m_sortDescending { this, "SortDescending", true, "Define if the container should be sorted in a descending order (default=true)" }
private

Define if the container should be sorted in a descending order (default=true)

Definition at line 111 of file ParticleSortingTool.h.

111{ this, "SortDescending", true, "Define if the container should be sorted in a descending order (default=true)" };

◆ m_sortID

int ParticleSortingTool::m_sortID {0}
private

Internal identifier for the type of sorting.

Definition at line 114 of file ParticleSortingTool.h.

114{0};

◆ m_sortVar

StringProperty ParticleSortingTool::m_sortVar { this, "SortVariable", "pt", "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" }
private

Define by what parameter to sort (default: 'pt')

Definition at line 108 of file ParticleSortingTool.h.

108{ this, "SortVariable", "pt", "Define by what parameter to sort (default: 'pt'; allowed: 'pt', 'eta', 'phi', 'm', 'e', 'rapidity')" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: