ATLAS Offline Software
ITruthParticleCnvTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // ITruthParticleCnvTool.h
8 // Header file for class ITruthParticleCnvTool
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef MCPARTICLEKERNEL_ITRUTHPARTICLECNVTOOL_H
12 #define MCPARTICLEKERNEL_ITRUTHPARTICLECNVTOOL_H
13 
22 // STL includes
23 
24 // FrameWork includes
25 #include "GaudiKernel/IAlgTool.h"
26 #include "GaudiKernel/IProperty.h"
27 
28 // McParticleKernel includes
30 
31 // Forward declaration
32 class McEventCollection;
33 class TruthParticle;
35 class EventContext;
36 
37 
38 class ITruthParticleCnvTool : virtual public extend_interfaces<IAlgTool, IProperty>
39 {
40 
42  // Public methods:
44  public:
45  // Declare interface ID
47 
50  virtual ~ITruthParticleCnvTool();
51 
52  // Athena algorithm's Hooks
53  virtual StatusCode execute() const = 0;
54  virtual StatusCode execute(const EventContext& ctx) const = 0;
55 
63  virtual
65  const unsigned int genEvtIndex,
66  TruthParticleContainer* mcParts,
67  const ITruthParticleVisitor* visitor = 0 ) const = 0;
68 
72  StatusCode convert( const McEventCollection* mcCollection,
73  TruthParticleContainer* container ) const;
74 
80  StatusCode
81  convertMcEventCollection( const McEventCollection* mcCollection,
82  TruthParticleContainer* container ) const;
86 };
87 
88 
92 
93 inline StatusCode
95  TruthParticleContainer* container ) const
96 {
97  const unsigned int genEvtIndex = 0;
98  const ITruthParticleVisitor* dummyVisitor = 0;
99  return this->convert( mcCollection, genEvtIndex, container, dummyVisitor );
100 }
101 
102 inline StatusCode
104  TruthParticleContainer* container ) const
105 {
106  const unsigned int genEvtIndex = 0;
107  const ITruthParticleVisitor* dummyVisitor = 0;
108  return this->convert( mcCollection, genEvtIndex, container, dummyVisitor );
109 }
110 
111 #endif //> MCPARTICLEKERNEL_ITRUTHPARTICLECNVTOOL_H
ITruthParticleCnvTool::convert
virtual StatusCode convert(const McEventCollection *mcEvts, const unsigned int genEvtIndex, TruthParticleContainer *mcParts, const ITruthParticleVisitor *visitor=0) const =0
Convert a McEventCollection into an TruthParticleContainer.
ITruthParticleCnvTool::execute
virtual StatusCode execute() const =0
ITruthParticleCnvTool::convertMcEventCollection
StatusCode convertMcEventCollection(const McEventCollection *mcCollection, TruthParticleContainer *container) const
Convert a McEventCollection into an TruthParticleContainer.
Definition: ITruthParticleCnvTool.h:103
TruthParticle
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticle.h:58
TruthParticleContainer
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:42
ITruthParticleCnvTool::DeclareInterfaceID
DeclareInterfaceID(ITruthParticleCnvTool, 1, 0)
ITruthParticleCnvTool::~ITruthParticleCnvTool
virtual ~ITruthParticleCnvTool()
Destructor:
Definition: ITruthParticleCnvTool.cxx:25
ITruthParticleCnvTool::execute
virtual StatusCode execute(const EventContext &ctx) const =0
ITruthParticleVisitor
Definition: ITruthParticleVisitor.h:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ITruthParticleVisitor.h
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
ITruthParticleCnvTool
Definition: ITruthParticleCnvTool.h:39