PhotosHepMC3Event.cxx
1 #include <vector>
2 #include "PhotosHepMC3Particle.h"
3 #include "PhotosHepMC3Event.h"
4 #include "Log.h"
5 
6 #include "HepMC3/Print.h"
7 
8 namespace Photospp
9 {
11 {
12  m_event=event;
13  for(auto p: m_event->particles() )
14  {
15  PhotosParticle *particle = new PhotosHepMC3Particle(p);
16  particles.push_back(particle);
17  }
18 }
19 
20 PhotosHepMC3Event::~PhotosHepMC3Event()
21 {
22  while(particles.size())
23  {
24  PhotosParticle *p = particles.back();
25  particles.pop_back();
26  if(p) delete p;
27  }
28 }
29 
31 {
32  return m_event;
33 }
34 
36 {
37  if(!m_event) return;
38  Print::listing(*m_event);
39 }
40 
41 vector<PhotosParticle*> PhotosHepMC3Event::getParticleList()
42 {
43  return particles;
44 }
45 
46 } // namespace Photospp
std::vector< PhotosParticle * > getParticleList()
std::vector< PhotosParticle * > particles