ATLAS Offline Software
McEventCollectionCnv_p2.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_p2.h
8 // Header file for class McEventCollectionCnv_p2
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
12 #define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
13 
14 // STL includes
15 #include <unordered_map>
16 
17 // HepMC / CLHEP includes
18 #ifdef __clang__
19 #pragma clang diagnostic push
20 #pragma clang diagnostic ignored "-Wkeyword-macro"
21 #endif
22 #define private public
23 #define protected public
25 #include "AtlasHepMC/GenVertex.h"
26 #include "AtlasHepMC/GenParticle.h"
27 #ifdef __clang__
28 #pragma clang diagnostic pop
29 #endif
30 #undef private
31 #undef protected
33 
34 // AthenaPoolCnvSvc includes
36 
37 // GeneratorObjectsTPCnv includes
39 
40 // Forward declaration
41 class MsgStream;
42 namespace HepMC { struct DataPool; }
43 
45  McEventCollection,
46  McEventCollection_p2
47  >
48 {
49 
52 
54  // Public methods:
56  public:
57 
61 
65 
69 
73 
77  virtual void persToTrans( const McEventCollection_p2* persObj,
78  McEventCollection* transObj,
79  MsgStream &log ) ;
80 
84  virtual void transToPers( const McEventCollection* transObj,
85  McEventCollection_p2* persObj,
86  MsgStream &log ) ;
87 
89  // Protected method:
91  protected:
92 
93  typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
94 
104  static HepMC::GenVertexPtr
105  createGenVertex( const McEventCollection_p2& persEvts,
106  const GenVertex_p2& vtx,
107  ParticlesMap_t& bcToPart,
108  HepMC::DataPool& datapools,HepMC::GenEvent* parent=nullptr ) ;
109 
115  static HepMC::GenParticlePtr
117  ParticlesMap_t& partToEndVtx,
118  HepMC::DataPool& datapools,const HepMC::GenVertexPtr& parent=nullptr ) ;
119 
120 };
121 #endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
GenParticle_p2
Definition: GenParticle_p2.h:22
GenEvent.h
HepMC::DataPool
Definition: HepMcDataPool.h:81
GenVertex.h
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
McEventCollection
McEventCollection
Definition: GeneratorObjectsTPCnv.cxx:60
TPConverterBase
Definition: TPConverter.h:738
GenParticle.h
McEventCollectionCnv_p2::Base_t
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p2 > Base_t
Definition: McEventCollectionCnv_p2.h:51
McEventCollectionCnv_p2::persToTrans
virtual void persToTrans(const McEventCollection_p2 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
Definition: McEventCollectionCnv_p2.cxx:50
McEventCollectionCnv_p2::operator=
McEventCollectionCnv_p2 & operator=(const McEventCollectionCnv_p2 &rhs)
Assignement operator.
Definition: McEventCollectionCnv_p2.cxx:34
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
McEventCollection.h
McEventCollectionCnv_p2::createGenParticle
static HepMC::GenParticlePtr createGenParticle(const GenParticle_p2 &p, ParticlesMap_t &partToEndVtx, HepMC::DataPool &datapools, const HepMC::GenVertexPtr &parent=nullptr)
Create a transient GenParticle from a persistent one (vers.1) It returns the new GenParticle.
Definition: McEventCollectionCnv_p2.cxx:254
GenVertex_p2
Definition: GenVertex_p2.h:23
T_AthenaPoolTPConverter.h
McEventCollection_p2.h
McEventCollectionCnv_p2::transToPers
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p2 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p2 from its transient representation ...
Definition: McEventCollectionCnv_p2.cxx:176
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
McEventCollection_p2
Definition: McEventCollection_p2.h:27
McEventCollectionCnv_p2::ParticlesMap_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
Definition: McEventCollectionCnv_p2.h:93
McEventCollectionCnv_p2::createGenVertex
static HepMC::GenVertexPtr createGenVertex(const McEventCollection_p2 &persEvts, const GenVertex_p2 &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_p2.cxx:194
McEventCollectionCnv_p2::McEventCollectionCnv_p2
McEventCollectionCnv_p2()
Default constructor:
Definition: McEventCollectionCnv_p2.cxx:25
McEventCollectionCnv_p2::McEventCollectionCnv_p2
McEventCollectionCnv_p2(const McEventCollectionCnv_p2 &rhs)
Copy constructor.
HepMC
Definition: Barcode.h:14
McEventCollectionCnv_p2::~McEventCollectionCnv_p2
virtual ~McEventCollectionCnv_p2()
Destructor.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
McEventCollectionCnv_p2
Definition: McEventCollectionCnv_p2.h:48
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63