ATLAS Offline Software
Macros
ParticleSortingTool.cxx File Reference
#include "ParticleSortingTool.h"
#include "xAODBase/IParticle.h"
#include "xAODBase/IParticleContainer.h"
#include "xAODMuon/MuonContainer.h"
#include "xAODJet/JetContainer.h"
#include "xAODEgamma/ElectronContainer.h"
#include "xAODEgamma/PhotonContainer.h"
#include "xAODTau/TauJetContainer.h"
#include "xAODPFlow/PFOContainer.h"
#include "xAODTracking/NeutralParticleContainer.h"
#include "xAODTracking/TrackParticleContainer.h"
#include "xAODTruth/TruthParticleContainer.h"
#include "xAODParticleEvent/CompositeParticleContainer.h"
#include "xAODParticleEvent/ParticleContainer.h"
#include "xAODCaloEvent/CaloClusterContainer.h"
#include "AthContainers/ConstDataVector.h"

Go to the source code of this file.

Macros

#define COPY_AND_SORT_CONTAINER(CONTAINERTYPE)
 
#define OVERWRITE_AND_SORT_CONTAINER(CONTAINERTYPE)
 

Macro Definition Documentation

◆ COPY_AND_SORT_CONTAINER

#define COPY_AND_SORT_CONTAINER (   CONTAINERTYPE)
Value:
else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
const CONTAINERTYPE* inCont; \
ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS ); \
*outCont = *inCont; \
ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) ); \
ATH_CHECK( this->doSort(outCont) ); \
}

Definition at line 112 of file ParticleSortingTool.cxx.

◆ OVERWRITE_AND_SORT_CONTAINER

#define OVERWRITE_AND_SORT_CONTAINER (   CONTAINERTYPE)
Value:
else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE ); \
const CONTAINERTYPE* inCont; \
ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
ConstDataVector<CONTAINERTYPE>* outCont = new ConstDataVector<CONTAINERTYPE>( SG::VIEW_ELEMENTS ); \
for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){ \
outCont->push_back(inPart); \
} \
ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) ); \
ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) ); \
}

Definition at line 125 of file ParticleSortingTool.cxx.

python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76