ATLAS Offline Software
Loading...
Searching...
No Matches
GenEventCnv_p1.h
Go to the documentation of this file.
1
2
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
27#include "AtlasHepMC/GenEvent.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
40class MsgStream;
41namespace HepMC { struct DataPool; }
42
43class 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
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
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
a typed memory pool that saves time spent allocation small object.
Definition DataPool.h:63
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...
HepMC::DataPool * m_pool
a PIMPL idiom to hide the DataPools (and their specialized destructors) from the outside world
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.
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.
virtual void persToTrans(const GenEvent_p1 *persObj, HepMC::GenEvent *transObj, MsgStream &msg)
Destructor:
void setDataPool(HepMC::DataPool *pool)
reset the @ HepMC::DataPool pointer
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
GenEventCnv_p1(HepMC::DataPool *pool=0)
constructor:
HepMC::GenVertex * GenVertexPtr
Definition GenVertex.h:59
GenParticle * GenParticlePtr
Definition GenParticle.h:37
pool namespace
Definition libname.h:15
MsgStream & msg
Definition testRead.cxx:32