ATLAS Offline Software
McEventCollectionCnv_p3.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // McEventCollectionCnv_p3.h
8 // Header file for class McEventCollectionCnv_p3
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
12 #define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
13 
14 // STL includes
15 #include <unordered_map>
16 
17 #ifdef __clang__
18 #pragma clang diagnostic push
19 #pragma clang diagnostic ignored "-Wkeyword-macro"
20 #endif
21 #define private public
22 #define protected public
24 #include "AtlasHepMC/GenVertex.h"
25 #include "AtlasHepMC/GenParticle.h"
26 #undef private
27 #undef protected
28 #ifdef __clang__
29 #pragma clang diagnostic pop
30 #endif
32 
33 // AthenaPoolCnvSvc includes
35 
36 // GeneratorObjectsTPCnv includes
38 
39 // Forward declaration
40 class MsgStream;
41 namespace HepMC { struct DataPool; }
42 
44  McEventCollection,
45  McEventCollection_p3
46  >
47 {
48 
51 
53  // Public methods:
55  public:
56 
60 
64 
68 
72 
76  virtual void persToTrans( const McEventCollection_p3* persObj,
77  McEventCollection* transObj,
78  MsgStream &log ) ;
79 
83  virtual void transToPers( const McEventCollection* transObj,
84  McEventCollection_p3* persObj,
85  MsgStream &log ) ;
86 
88  // Protected method:
90  protected:
91 
92  typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
93 
103  static HepMC::GenVertexPtr
104  createGenVertex( const McEventCollection_p3& persEvts,
105  const GenVertex_p3& vtx,
106  ParticlesMap_t& bcToPart,
107  HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr ) ;
108 
114  static HepMC::GenParticlePtr
116  ParticlesMap_t& partToEndVtx,
117  HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr , bool add_to_output = true ) ;
118 
119 };
120 #endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
McEventCollectionCnv_p3
Definition: McEventCollectionCnv_p3.h:47
GenEvent.h
HepMC::DataPool
Definition: HepMcDataPool.h:81
McEventCollectionCnv_p3::Base_t
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p3 > Base_t
Definition: McEventCollectionCnv_p3.h:50
McEventCollectionCnv_p3::persToTrans
virtual void persToTrans(const McEventCollection_p3 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
Definition: McEventCollectionCnv_p3.cxx:52
McEventCollectionCnv_p3::transToPers
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p3 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p3 from its transient representation ...
Definition: McEventCollectionCnv_p3.cxx:152
GenVertex.h
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
McEventCollection
McEventCollection
Definition: GeneratorObjectsTPCnv.cxx:60
TPConverterBase
Definition: TPConverter.h:738
McEventCollectionCnv_p3::createGenParticle
static HepMC::GenParticlePtr createGenParticle(const GenParticle_p3 &p, ParticlesMap_t &partToEndVtx, HepMC::DataPool &datapools, const HepMC::GenVertexPtr &parent=nullptr, bool add_to_output=true)
Create a transient GenParticle from a persistent one (vers.1) It returns the new GenParticle.
Definition: McEventCollectionCnv_p3.cxx:228
GenVertex_p3
Definition: GenVertex_p3.h:24
GenParticle.h
McEventCollection_p3.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
McEventCollection.h
McEventCollectionCnv_p3::McEventCollectionCnv_p3
McEventCollectionCnv_p3()
Default constructor:
Definition: McEventCollectionCnv_p3.cxx:27
T_AthenaPoolTPConverter.h
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
McEventCollectionCnv_p3::operator=
McEventCollectionCnv_p3 & operator=(const McEventCollectionCnv_p3 &rhs)
Assignement operator.
Definition: McEventCollectionCnv_p3.cxx:36
McEventCollectionCnv_p3::~McEventCollectionCnv_p3
virtual ~McEventCollectionCnv_p3()
Destructor.
McEventCollection_p3
Definition: McEventCollection_p3.h:27
McEventCollectionCnv_p3::createGenVertex
static HepMC::GenVertexPtr createGenVertex(const McEventCollection_p3 &persEvts, const GenVertex_p3 &vtx, ParticlesMap_t &bcToPart, HepMC::DataPool &datapools, HepMC::GenEvent *parent=nullptr)
Create a transient GenVertex from a persistent one (version 1) It returns the new GenVertex.
Definition: McEventCollectionCnv_p3.cxx:167
HepMC
Definition: Barcode.h:14
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
GenParticle_p3
Definition: GenParticle_p3.h:22
McEventCollectionCnv_p3::ParticlesMap_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
Definition: McEventCollectionCnv_p3.h:92
McEventCollectionCnv_p3::McEventCollectionCnv_p3
McEventCollectionCnv_p3(const McEventCollectionCnv_p3 &rhs)
Copy constructor.