ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::ViewContainerThinning Class Reference

#include <ViewContainerThinning.h>

Inheritance diagram for DerivationFramework::ViewContainerThinning:
Collaboration diagram for DerivationFramework::ViewContainerThinning:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual StatusCode doThinning (const EventContext &ctx) const override

Protected Member Functions

template<class T>
StatusCode doThinningT (const EventContext &ctx, const SG::ThinningHandleKey< T > &key, const SG::ReadHandleKey< T > &viewKey) const

Protected Attributes

StringProperty m_streamName { this, "StreamName", "", "Name of the stream being thinned" }
SG::ThinningHandleKey< xAOD::TrackParticleContainerm_trackParticleKey { this, "TrackParticleKey", "", "" }
SG::ThinningHandleKey< xAOD::CaloClusterContainerm_caloClusterKey { this, "CaloClusterKey", "", "" }
SG::ThinningHandleKey< xAOD::TruthParticleContainerm_truthParticleKey { this, "TruthParticleKey", "", "" }
SG::ReadHandleKey< xAOD::TrackParticleContainerm_trackParticleViewKey { this, "TrackParticleViewKey", "", "" }
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloClusterViewKey { this, "CaloClusterViewKey", "", "" }
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthParticleViewKey { this, "TruthParticleViewKey", "", "" }

Detailed Description

Definition at line 32 of file ViewContainerThinning.h.

Member Function Documentation

◆ doThinning()

StatusCode DerivationFramework::ViewContainerThinning::doThinning ( const EventContext & ctx) const
overridevirtual

Definition at line 75 of file ViewContainerThinning.cxx.

76 {
77
78 if (!m_trackParticleKey.empty()) {
80 }
81
82 if (!m_caloClusterKey.empty()) {
84 }
85
86 if (!m_truthParticleKey.empty()) {
88 }
89 return StatusCode::SUCCESS;
90 }
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleViewKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleViewKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterViewKey
SG::ThinningHandleKey< xAOD::CaloClusterContainer > m_caloClusterKey
SG::ThinningHandleKey< xAOD::TruthParticleContainer > m_truthParticleKey
StatusCode doThinningT(const EventContext &ctx, const SG::ThinningHandleKey< T > &key, const SG::ReadHandleKey< T > &viewKey) const
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_trackParticleKey

◆ doThinningT()

template<class T>
StatusCode DerivationFramework::ViewContainerThinning::doThinningT ( const EventContext & ctx,
const SG::ThinningHandleKey< T > & key,
const SG::ReadHandleKey< T > & viewKey ) const
protected

Definition at line 31 of file ViewContainerThinning.cxx.

34 {
35
36 SG::ThinningHandle<T> sourceCont (key, ctx);
37 SG::ReadHandle<T> viewCont (viewKey, ctx);
38
39 std::vector<bool> masks;
40 masks.assign( sourceCont->size(), false);
41
42 for( const auto* part: *viewCont){
43 masks[ part->index() ] = true;
44 }
45
46 sourceCont.keep (masks);
47 return StatusCode::SUCCESS;
48 }

◆ finalize()

StatusCode DerivationFramework::ViewContainerThinning::finalize ( )
overridevirtual

Definition at line 68 of file ViewContainerThinning.cxx.

69 {
70 return StatusCode::SUCCESS;
71 }

◆ initialize()

StatusCode DerivationFramework::ViewContainerThinning::initialize ( )
overridevirtual

Definition at line 53 of file ViewContainerThinning.cxx.

54 {
55 ATH_MSG_INFO ("Initializing " << name() << "...");
56
60
64
65 return StatusCode::SUCCESS;
66 }
#define ATH_MSG_INFO(x)

Member Data Documentation

◆ m_caloClusterKey

SG::ThinningHandleKey<xAOD::CaloClusterContainer> DerivationFramework::ViewContainerThinning::m_caloClusterKey { this, "CaloClusterKey", "", "" }
protected

Definition at line 60 of file ViewContainerThinning.h.

61{ this, "CaloClusterKey", "", "" };

◆ m_caloClusterViewKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> DerivationFramework::ViewContainerThinning::m_caloClusterViewKey { this, "CaloClusterViewKey", "", "" }
protected

Definition at line 67 of file ViewContainerThinning.h.

68{ this, "CaloClusterViewKey", "", "" };

◆ m_streamName

StringProperty DerivationFramework::ViewContainerThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" }
protected

Definition at line 55 of file ViewContainerThinning.h.

56{ this, "StreamName", "", "Name of the stream being thinned" };

◆ m_trackParticleKey

SG::ThinningHandleKey<xAOD::TrackParticleContainer> DerivationFramework::ViewContainerThinning::m_trackParticleKey { this, "TrackParticleKey", "", "" }
protected

Definition at line 58 of file ViewContainerThinning.h.

59{ this, "TrackParticleKey", "", "" };

◆ m_trackParticleViewKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> DerivationFramework::ViewContainerThinning::m_trackParticleViewKey { this, "TrackParticleViewKey", "", "" }
protected

Definition at line 65 of file ViewContainerThinning.h.

66{ this, "TrackParticleViewKey", "", "" };

◆ m_truthParticleKey

SG::ThinningHandleKey<xAOD::TruthParticleContainer> DerivationFramework::ViewContainerThinning::m_truthParticleKey { this, "TruthParticleKey", "", "" }
protected

Definition at line 62 of file ViewContainerThinning.h.

63{ this, "TruthParticleKey", "", "" };

◆ m_truthParticleViewKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> DerivationFramework::ViewContainerThinning::m_truthParticleViewKey { this, "TruthParticleViewKey", "", "" }
protected

Definition at line 69 of file ViewContainerThinning.h.

70{ this, "TruthParticleViewKey", "", "" };

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