ATLAS Offline Software
NoopFilterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // NoopFilterTool.cxx
7 // Implementation file for class NoopFilterTool
8 // Author: S.Binet<binet@cern.ch>
10 
11 
12 // STL includes
13 
14 // FrameWork includes
15 #include "Gaudi/Property.h"
16 
17 // McParticleKernel includes
19 
20 // McParticleTools includes
21 #include "NoopFilterTool.h"
22 
26 
27 
30 NoopFilterTool::NoopFilterTool( const std::string& type,
31  const std::string& name,
32  const IInterface* parent ) :
34 {
35  //
36  // Property declaration
37  //
38 }
39 
43 {
44  ATH_MSG_DEBUG("Calling destructor");
45 }
46 
50 
53 {
54  if ( nullptr == in || nullptr == out ) {
55  ATH_MSG_ERROR("Invalid pointer to McEventCollection !" << endmsg
56  << " in: " << in << endmsg
57  << " out: " << out);
58  return StatusCode::FAILURE;
59  }
60 
61  // we just copy the input McEventCollection and put it into the output one
62  // No filtering is applied
63  out->operator=( *in );
64 
65  for ( unsigned int iEvt = 0; iEvt != out->size(); ++iEvt ) {
66  const HepMC::GenEvent * outEvt = (*out)[iEvt];
67  if ( nullptr == outEvt ) {
69  ("Could not launch filtering procedure for GenEvent number ["
70  << iEvt << "] from McEventCollection ["
71  << m_mcEventsReadHandleKey.key() << "] !!"
72  << endmsg
73  << " outEvt: " << outEvt);
74  continue;
75  }
76  }
77 
78  return StatusCode::SUCCESS;
79 }
80 
NoopFilterTool.h
NoopFilterTool::~NoopFilterTool
virtual ~NoopFilterTool()
Destructor:
Definition: NoopFilterTool.cxx:42
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TruthParticleFilterBaseTool::m_mcEventsReadHandleKey
SG::ReadHandleKey< McEventCollection > m_mcEventsReadHandleKey
ReadHandleKey for the input McEventCollection one wants to filter.
Definition: TruthParticleFilterBaseTool.h:100
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
TruthParticleFilterBaseTool
Definition: TruthParticleFilterBaseTool.h:33
NoopFilterTool::buildMcAod
StatusCode buildMcAod(const McEventCollection *in, McEventCollection *out)
This method will check the validity of the input McEventCollection and build a filtered one from the ...
Definition: NoopFilterTool.cxx:51
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IMcVtxFilterTool.h
NoopFilterTool::NoopFilterTool
NoopFilterTool()
Default constructor: