ATLAS Offline Software
PhysicsAnalysis
TruthParticleID
McParticleTools
src
TruthParticleValidationBaseTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// TruthParticleValidationBaseTool.cxx
7
// Implementation file for class TruthParticleValidationBaseTool
8
// Author: S.Binet<binet@cern.ch>
10
11
12
// STL includes
13
14
// FrameWork includes
15
16
#include "
GeneratorObjects/McEventCollection.h
"
17
18
// McParticleTools includes
19
#include "
TruthParticleValidationBaseTool.h
"
20
24
27
TruthParticleValidationBaseTool::TruthParticleValidationBaseTool
(
const
std::string&
type
,
28
const
std::string&
name
,
29
const
IInterface*
parent
) :
30
AthAlgTool
(
type
,
name
,
parent
),
31
m_nAnalysedEvents ( 0 )
32
{
33
//
34
// Property declaration
35
//
36
37
declareInterface<ITruthParticleValidationTool>(
this
);
38
}
39
42
TruthParticleValidationBaseTool::~TruthParticleValidationBaseTool
()
43
{
44
ATH_MSG_DEBUG
(
"Calling destructor"
);
45
}
46
49
StatusCode
TruthParticleValidationBaseTool::initialize
()
50
{
51
ATH_MSG_INFO
(
"Initializing "
<<
name
() <<
"..."
);
52
53
// Give the concrete (derived) tool a chance to initialize itself
54
if
(
initializeTool
().isFailure() ) {
55
ATH_MSG_ERROR
(
"Could not initialize concrete tool !"
);
56
return
StatusCode::FAILURE;
57
}
58
59
// initializing the event counter
60
m_nAnalysedEvents
= 0;
61
return
StatusCode::SUCCESS;
62
}
63
64
StatusCode
TruthParticleValidationBaseTool::finalize
()
65
{
66
ATH_MSG_INFO
(
"Finalizing "
<<
name
() <<
"..."
);
67
ATH_MSG_INFO
(
"Analysed ["
<<
m_nAnalysedEvents
<<
"] events."
);
68
69
// Give the concrete (derived) tool a chance to finalize itself
70
if
(
finalizeTool
().isFailure() ) {
71
ATH_MSG_ERROR
(
"Could not finalize concrete tool !"
);
72
return
StatusCode::FAILURE;
73
}
74
75
return
StatusCode::SUCCESS;
76
}
77
78
StatusCode
TruthParticleValidationBaseTool::execute
()
79
{
80
++
m_nAnalysedEvents
;
81
return
executeTool
();
82
}
83
87
91
95
99
103
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
TruthParticleValidationBaseTool::TruthParticleValidationBaseTool
TruthParticleValidationBaseTool()
Default constructor:
TruthParticleValidationBaseTool::finalizeTool
virtual StatusCode finalizeTool()
Definition:
TruthParticleValidationBaseTool.h:94
TruthParticleValidationBaseTool::~TruthParticleValidationBaseTool
virtual ~TruthParticleValidationBaseTool()
Destructor:
Definition:
TruthParticleValidationBaseTool.cxx:42
TruthParticleValidationBaseTool::execute
StatusCode execute()
Definition:
TruthParticleValidationBaseTool.cxx:78
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
TruthParticleValidationBaseTool::executeTool
virtual StatusCode executeTool()=0
Main method to perform the validation.
McEventCollection.h
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
TruthParticleValidationBaseTool.h
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
TruthParticleValidationBaseTool::initializeTool
virtual StatusCode initializeTool()
I/O operators.
Definition:
TruthParticleValidationBaseTool.h:87
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
TruthParticleValidationBaseTool::initialize
StatusCode initialize()
Athena Algorithm's Hooks.
Definition:
TruthParticleValidationBaseTool.cxx:49
TruthParticleValidationBaseTool::finalize
StatusCode finalize()
Definition:
TruthParticleValidationBaseTool.cxx:64
AthAlgTool
Definition:
AthAlgTool.h:26
TruthParticleValidationBaseTool::m_nAnalysedEvents
unsigned int m_nAnalysedEvents
Counter of analysed events.
Definition:
TruthParticleValidationBaseTool.h:75
Generated on Fri Jan 10 2025 21:21:15 for ATLAS Offline Software by
1.8.18