FairRoot/PandaRoot
PhotosHepMCEvent.cxx
Go to the documentation of this file.
1 #include <vector>
2 #include "PhotosHepMCParticle.h"
3 #include "PhotosHepMCEvent.h"
4 #include "Log.h"
5 using namespace std;
6 
7 namespace Photospp
8 {
9 
10 PhotosHepMCEvent::PhotosHepMCEvent(HepMC::GenEvent * event)
11 {
12  m_event=event;
13  HepMC::GenEvent::particle_const_iterator part_itr = m_event->particles_begin();
14  for( ; part_itr!=m_event->particles_end(); part_itr++)
15  {
17  particles.push_back(particle);
18  }
19 }
20 
21 PhotosHepMCEvent::~PhotosHepMCEvent()
22 {
23  while(particles.size())
24  {
25  PhotosParticle *p = particles.back();
26  particles.pop_back();
27  if(p) delete p;
28  }
29 }
30 
31 HepMC::GenEvent * PhotosHepMCEvent::getEvent()
32 {
33  return m_event;
34 }
35 
37 {
38  if(!m_event) return;
39  m_event->print();
40 }
41 
42 vector<PhotosParticle*> PhotosHepMCEvent::getParticleList()
43 {
44  return particles;
45 }
46 
47 } // namespace Photospp
Double_t p
Definition: anasim.C:58
const int particle
Definition: Log.h:30
geoFace print()