ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p3.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_p3.h
8// Header file for class McEventCollectionCnv_p3
9// Author: S.Binet<binet@cern.ch>
11#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
12#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
13
14// STL includes
15#include <unordered_map>
16#include <sstream>
17
18#ifndef HEPMC3
19# ifdef __clang__
20# pragma clang diagnostic push
21# pragma clang diagnostic ignored "-Wkeyword-macro"
22# endif
23# if __GNUC__ >= 16
24# pragma GCC diagnostic push
25# pragma GCC diagnostic ignored "-Wkeyword-macro"
26# endif
27# define private public
28# define protected public
29#endif
30#include "AtlasHepMC/GenEvent.h"
33#ifndef HEPMC3
34# undef private
35# undef protected
36# ifdef __clang__
37# pragma clang diagnostic pop
38# endif
39# if __GNUC__ >= 16
40# pragma GCC diagnostic pop
41# endif
42#endif
44
45// AthenaPoolCnvSvc includes
47
48// GeneratorObjectsTPCnv includes
50
51// Forward declaration
52class MsgStream;
53namespace HepMC { struct DataPool; }
54
56 McEventCollection,
57 McEventCollection_p3
58 >
59{
60
63
65 // Public methods:
67 public:
68
72
76
80
84
88 virtual void persToTrans( const McEventCollection_p3* persObj,
89 McEventCollection* transObj,
90 MsgStream &log ) ;
91
95 virtual void transToPers( const McEventCollection* transObj,
96 McEventCollection_p3* persObj,
97 MsgStream &log ) ;
98
100 // Protected method:
102 protected:
103
104 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
105
116 createGenVertex( const McEventCollection_p3& persEvts,
117 const GenVertex_p3& vtx,
118 ParticlesMap_t& bcToPart,
119 HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr ) ;
120
128 ParticlesMap_t& partToEndVtx,
129 HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr , bool add_to_output = true ) ;
130
131};
132#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_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 McEventCollection *transObj, McEventCollection_p3 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p3 from its transient representation ...
McEventCollectionCnv_p3 & operator=(const McEventCollectionCnv_p3 &rhs)
Assignement operator.
static HepMC::GenVertexPtr createGenVertex(const McEventCollection_p3 &persEvts, const GenVertex_p3 &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_p3()
Default constructor:
McEventCollectionCnv_p3(const McEventCollectionCnv_p3 &rhs)
Copy constructor.
static HepMC::GenParticlePtr createGenParticle(const GenParticle_p3 &p, ParticlesMap_t &partToEndVtx, HepMC::DataPool &datapools, const HepMC::GenVertexPtr &parent=nullptr, bool add_to_output=true)
Create a transient GenParticle from a persistent one (vers.1) It returns the new GenParticle.
virtual void persToTrans(const McEventCollection_p3 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p3 > Base_t
virtual ~McEventCollectionCnv_p3()
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