#include <GenericObjectThinning.h>
Definition at line 26 of file GenericObjectThinning.h.
◆ GenericObjectThinning()
| DerivationFramework::GenericObjectThinning::GenericObjectThinning |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
Definition at line 17 of file GenericObjectThinning.cxx.
19 :
20base_class(t,n,p),
24{
26}
std::atomic< unsigned int > m_ntot
std::atomic< unsigned int > m_npass
std::string m_selectionString
◆ ~GenericObjectThinning()
| DerivationFramework::GenericObjectThinning::~GenericObjectThinning |
( |
| ) |
|
◆ doThinning()
| StatusCode DerivationFramework::GenericObjectThinning::doThinning |
( |
const EventContext & | ctx | ) |
const |
|
overridevirtual |
Definition at line 62 of file GenericObjectThinning.cxx.
63{
64
65
67
68
69 unsigned int nObjects =
particles->size();
70 if (nObjects==0) return StatusCode::SUCCESS;
71
72
73 std::vector<bool>
mask;
74 mask.assign(nObjects,
false);
76
77
78 if (m_parser) {
79 std::vector<int>
entries = m_parser->evaluateAsVector();
81
82 if (nObjects != nEntries ) {
83 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
84 return StatusCode::FAILURE;
85 } else {
86
87 for (
unsigned int i=0;
i<nObjects; ++
i)
if (
entries[i]==1)
mask[
i]=
true;
88 }
89 }
90
92
93
95
96 return StatusCode::SUCCESS;
97}
SG::ThinningHandleKey< xAOD::IParticleContainer > m_SGKey
◆ finalize()
| StatusCode DerivationFramework::GenericObjectThinning::finalize |
( |
| ) |
|
|
overridevirtual |
Definition at line 53 of file GenericObjectThinning.cxx.
54{
58 return StatusCode::SUCCESS;
59}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ initialize()
| StatusCode DerivationFramework::GenericObjectThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 33 of file GenericObjectThinning.cxx.
34{
38 return StatusCode::FAILURE;
40
41
44 }
45
46
49
50 return StatusCode::SUCCESS;
51}
StringProperty m_streamName
◆ m_npass
| std::atomic<unsigned int> DerivationFramework::GenericObjectThinning::m_npass |
|
private |
◆ m_ntot
| std::atomic<unsigned int> DerivationFramework::GenericObjectThinning::m_ntot |
|
mutableprivate |
◆ m_selectionString
| std::string DerivationFramework::GenericObjectThinning::m_selectionString |
|
private |
◆ m_SGKey
◆ m_streamName
| StringProperty DerivationFramework::GenericObjectThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
The documentation for this class was generated from the following files: