ATLAS Offline Software
GenEventCnv_p1.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 // GenEventCnv_p1.h
8 // Header file for class GenEventCnv_p1
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef GENERATOROBJECTSTPCNV_GENEVENTCNV_P1_H
12 #define GENERATOROBJECTSTPCNV_GENEVENTCNV_P1_H
13 
14 // STL includes
15 #include <unordered_map>
16 
17 // AthenaPoolCnvSvc includes
19 
20 // HepMC includes
21 #ifdef __clang__
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wkeyword-macro"
24 #endif
25 #define private public
26 #define protected public
28 #include "AtlasHepMC/GenVertex.h"
29 #include "AtlasHepMC/GenParticle.h"
30 #undef private
31 #undef protected
32 #ifdef __clang__
33 #pragma clang diagnostic pop
34 #endif
35 
36 // GeneratorObjectsTPCnv includes
38 
39 // Forward declaration
40 class MsgStream;
41 namespace HepMC { struct DataPool; }
42 
43 class GenEventCnv_p1 : public T_AthenaPoolTPCnvBase<HepMC::GenEvent,
44  GenEvent_p1>
45 {
47  // Public methods:
49  public:
50 
54 
57  //virtual ~GenEventCnv_p1();
58 
60  // Const methods:
62 
66  virtual void persToTrans( const GenEvent_p1* persObj,
67  HepMC::GenEvent* transObj,
68  MsgStream& msg );
69 
73  virtual void transToPers( const HepMC::GenEvent* transObj,
74  GenEvent_p1* persObj,
75  MsgStream& msg );
76 
78  // Non-const methods:
80 
83 
85  // Protected methods:
87  protected:
88 
89  typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
90 
100  static HepMC::GenVertexPtr
101  createGenVertex( const GenEvent_p1& persEvt,
102  const GenVertex_p1& vtx,
103  ParticlesMap_t& bcToPart,
104  HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr) ;
105 
111  static HepMC::GenParticlePtr
113  ParticlesMap_t& partToEndVtx,
114  HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr) ;
115 
117  // Protected data:
119  protected:
120 
124 };
125 
126 #endif //> GENERATOROBJECTSTPCNV_GENEVENTCNV_P1_H
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
GenEventCnv_p1::ParticlesMap_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
Definition: GenEventCnv_p1.h:89
GenEvent.h
HepMC::DataPool
Definition: HepMcDataPool.h:81
GenVertex.h
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
pool
pool namespace
Definition: libname.h:15
TPConverterBase
Definition: TPConverter.h:738
GenEventCnv_p1::createGenParticle
static HepMC::GenParticlePtr createGenParticle(const GenParticle_p1 &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: GenEventCnv_p1.cxx:205
GenParticle.h
GenEventCnv_p1::transToPers
virtual void transToPers(const HepMC::GenEvent *transObj, GenEvent_p1 *persObj, MsgStream &msg)
Method creating the persistent representation GenEvent_p1 from its transient representation HepMC::Ge...
Definition: GenEventCnv_p1.cxx:128
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
GenEventCnv_p1::GenEventCnv_p1
GenEventCnv_p1(HepMC::DataPool *pool=0)
constructor:
Definition: GenEventCnv_p1.cxx:23
T_AthenaPoolTPConverter.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GenEventCnv_p1::m_pool
HepMC::DataPool * m_pool
a PIMPL idiom to hide the DataPools (and their specialized destructors) from the outside world
Definition: GenEventCnv_p1.h:123
GenEventCnv_p1
Definition: GenEventCnv_p1.h:45
GenEventCnv_p1::setDataPool
void setDataPool(HepMC::DataPool *pool)
reset the @ HepMC::DataPool pointer
Definition: GenEventCnv_p1.cxx:31
GenEventCnv_p1::persToTrans
virtual void persToTrans(const GenEvent_p1 *persObj, HepMC::GenEvent *transObj, MsgStream &msg)
Destructor:
Definition: GenEventCnv_p1.cxx:36
GenVertex_p1
Definition: GenVertex_p1.h:25
GenEvent_p1.h
GenEventCnv_p1::createGenVertex
static HepMC::GenVertexPtr createGenVertex(const GenEvent_p1 &persEvt, const GenVertex_p1 &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: GenEventCnv_p1.cxx:149
HepMC
Definition: Barcode.h:14
GenParticle_p1
Definition: GenParticle_p1.h:23
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
GenEvent_p1
Definition: GenEvent_p1.h:27
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7