ATLAS Offline Software
Loading...
Searching...
No Matches
GenEventCnv_p1.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 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#include <sstream>
20
21// HepMC includes
22#ifndef HEPMC3
23# ifdef __clang__
24# pragma clang diagnostic push
25# pragma clang diagnostic ignored "-Wkeyword-macro"
26# endif
27# if __GNUC__ >= 16
28# pragma GCC diagnostic push
29# pragma GCC diagnostic ignored "-Wkeyword-macro"
30# endif
31# define private public
32# define protected public
33#endif
34#include "AtlasHepMC/GenEvent.h"
37#ifndef HEPMC3
38# undef private
39# undef protected
40# ifdef __clang__
41# pragma clang diagnostic pop
42# endif
43# if __GNUC__ >= 16
44# pragma GCC diagnostic pop
45# endif
46#endif
47
48// GeneratorObjectsTPCnv includes
50
51// Forward declaration
52class MsgStream;
53namespace HepMC { struct DataPool; }
54
55class GenEventCnv_p1 : public T_AthenaPoolTPCnvBase<HepMC::GenEvent,
56 GenEvent_p1>
57{
59 // Public methods:
61 public:
62
66
69 //virtual ~GenEventCnv_p1();
70
72 // Const methods:
74
78 virtual void persToTrans( const GenEvent_p1* persObj,
79 HepMC::GenEvent* transObj,
80 MsgStream& msg );
81
85 virtual void transToPers( const HepMC::GenEvent* transObj,
86 GenEvent_p1* persObj,
87 MsgStream& msg );
88
90 // Non-const methods:
92
95
97 // Protected methods:
99 protected:
100
101 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
102
112 static HepMC::GenVertexPtr
113 createGenVertex( const GenEvent_p1& persEvt,
114 const GenVertex_p1& vtx,
115 ParticlesMap_t& bcToPart,
116 HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr) ;
117
125 ParticlesMap_t& partToEndVtx,
126 HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr) ;
127
129 // Protected data:
131 protected:
132
136};
137
138#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