ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p2.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// 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
17// HepMC / CLHEP includes
18#ifdef __clang__
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wkeyword-macro"
21#endif
22#define private public
23#define protected public
24#include "AtlasHepMC/GenEvent.h"
27#ifdef __clang__
28#pragma clang diagnostic pop
29#endif
30#undef private
31#undef protected
33
34// AthenaPoolCnvSvc includes
36
37// GeneratorObjectsTPCnv includes
39
40// Forward declaration
41class MsgStream;
42namespace HepMC { struct DataPool; }
43
45 McEventCollection,
46 McEventCollection_p2
47 >
48{
49
52
54 // Public methods:
56 public:
57
61
65
69
73
77 virtual void persToTrans( const McEventCollection_p2* persObj,
78 McEventCollection* transObj,
79 MsgStream &log ) ;
80
84 virtual void transToPers( const McEventCollection* transObj,
85 McEventCollection_p2* persObj,
86 MsgStream &log ) ;
87
89 // Protected method:
91 protected:
92
93 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
94
105 createGenVertex( const McEventCollection_p2& persEvts,
106 const GenVertex_p2& vtx,
107 ParticlesMap_t& bcToPart,
108 HepMC::DataPool& datapools,HepMC::GenEvent* parent=nullptr ) ;
109
117 ParticlesMap_t& partToEndVtx,
118 HepMC::DataPool& datapools,const HepMC::GenVertexPtr& parent=nullptr ) ;
119
120};
121#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