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#include "AtlasHepMC/GenEvent.h"
25// GeneratorObjectsTPCnv includes
27
28// Forward declaration
29class MsgStream;
30namespace HepMC { struct DataPool; }
31
32class GenEventCnv_p1 : public T_AthenaPoolTPCnvBase<HepMC::GenEvent,
33 GenEvent_p1>
34{
36 // Public methods:
38 public:
39
43
46 //virtual ~GenEventCnv_p1();
47
49 // Const methods:
51
55 virtual void persToTrans( const GenEvent_p1* persObj,
56 HepMC::GenEvent* transObj,
57 MsgStream& msg );
58
62 virtual void transToPers( const HepMC::GenEvent* transObj,
63 GenEvent_p1* persObj,
64 MsgStream& msg );
65
67 // Non-const methods:
69
72
74 // Protected methods:
76 protected:
77
78 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
79
90 createGenVertex( const GenEvent_p1& persEvt,
91 const GenVertex_p1& vtx,
92 ParticlesMap_t& bcToPart,
93 HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr) ;
94
102 ParticlesMap_t& partToEndVtx,
103 HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr) ;
104
106 // Protected data:
108 protected:
109
113};
114
115#endif //> GENERATOROBJECTSTPCNV_GENEVENTCNV_P1_H
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
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:
HepMC3::GenParticlePtr GenParticlePtr
Definition GenParticle.h:19
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39
Framework include files.
Definition libname.h:15
MsgStream & msg
Definition testRead.cxx:32