#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 18 of file GenericObjectThinning.cxx.
20 :
21base_class(t,n,p),
25{
27}
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 |
|
overridevirtual |
Definition at line 63 of file GenericObjectThinning.cxx.
64{
65 const EventContext& ctx = Gaudi::Hive::currentContext();
66
67
69
70
71 unsigned int nObjects =
particles->size();
72 if (nObjects==0) return StatusCode::SUCCESS;
73
74
75 std::vector<bool>
mask;
76 mask.assign(nObjects,
false);
78
79
80 if (m_parser) {
81 std::vector<int>
entries = m_parser->evaluateAsVector();
83
84 if (nObjects != nEntries ) {
85 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
86 return StatusCode::FAILURE;
87 } else {
88
89 for (
unsigned int i=0;
i<nObjects; ++
i)
if (
entries[i]==1)
mask[
i]=
true;
90 }
91 }
92
94
95
97
98 return StatusCode::SUCCESS;
99}
SG::ThinningHandleKey< xAOD::IParticleContainer > m_SGKey
◆ finalize()
| StatusCode DerivationFramework::GenericObjectThinning::finalize |
( |
| ) |
|
|
overridevirtual |
Definition at line 54 of file GenericObjectThinning.cxx.
55{
59 return StatusCode::SUCCESS;
60}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ initialize()
| StatusCode DerivationFramework::GenericObjectThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 34 of file GenericObjectThinning.cxx.
35{
39 return StatusCode::FAILURE;
41
42
45 }
46
47
50
51 return StatusCode::SUCCESS;
52}
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: