ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p2.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// 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#include <sstream>
17
18// HepMC / CLHEP includes
19#ifndef HEPMC3
20# ifdef __clang__
21# pragma clang diagnostic push
22# pragma clang diagnostic ignored "-Wkeyword-macro"
23# endif
24# if __GNUC__ >= 16
25# pragma GCC diagnostic push
26# pragma GCC diagnostic ignored "-Wkeyword-macro"
27# endif
28# define private public
29# define protected public
30#endif
31#include "AtlasHepMC/GenEvent.h"
34#ifndef HEPMC3
35# undef private
36# undef protected
37# ifdef __clang__
38# pragma clang diagnostic pop
39# endif
40# if __GNUC__ >= 16
41# pragma GCC diagnostic pop
42# endif
43#endif
45
46// AthenaPoolCnvSvc includes
48
49// GeneratorObjectsTPCnv includes
51
52// Forward declaration
53class MsgStream;
54namespace HepMC { struct DataPool; }
55
57 McEventCollection,
58 McEventCollection_p2
59 >
60{
61
64
66 // Public methods:
68 public:
69
73
77
81
85
89 virtual void persToTrans( const McEventCollection_p2* persObj,
90 McEventCollection* transObj,
91 MsgStream &log ) ;
92
96 virtual void transToPers( const McEventCollection* transObj,
97 McEventCollection_p2* persObj,
98 MsgStream &log ) ;
99
101 // Protected method:
103 protected:
104
105 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
106
117 createGenVertex( const McEventCollection_p2& persEvts,
118 const GenVertex_p2& vtx,
119 ParticlesMap_t& bcToPart,
120 HepMC::DataPool& datapools,HepMC::GenEvent* parent=nullptr ) ;
121
129 ParticlesMap_t& partToEndVtx,
130 HepMC::DataPool& datapools,const HepMC::GenVertexPtr& parent=nullptr ) ;
131
132};
133#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
a typed memory pool that saves time spent allocation small object.
Definition DataPool.h:63
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.
McEventCollectionCnv_p2(const McEventCollectionCnv_p2 &rhs)
Copy constructor.
McEventCollectionCnv_p2 & operator=(const McEventCollectionCnv_p2 &rhs)
Assignement operator.
virtual void persToTrans(const McEventCollection_p2 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
McEventCollectionCnv_p2()
Default constructor:
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p2 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p2 from its transient representation ...
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p2 > Base_t
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.
virtual ~McEventCollectionCnv_p2()
Destructor.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
HepMC::GenVertex * GenVertexPtr
Definition GenVertex.h:59
GenParticle * GenParticlePtr
Definition GenParticle.h:37