FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
Photospp::PhotosHepMCEvent Class Reference

#include <PhotosHepMCEvent.h>

Inheritance diagram for Photospp::PhotosHepMCEvent:
Photospp::PhotosEvent Photospp::PhotosEvent

Public Member Functions

 ~PhotosHepMCEvent ()
 
 PhotosHepMCEvent (HepMC::GenEvent *event)
 
HepMC::GenEvent * getEvent ()
 
std::vector< PhotosParticle * > getParticleList ()
 
void print ()
 
 ~PhotosHepMCEvent ()
 
 PhotosHepMCEvent (HepMC::GenEvent *event)
 
HepMC::GenEvent * getEvent ()
 
std::vector< PhotosParticle * > getParticleList ()
 
void print ()
 
void process ()
 
void process ()
 

Private Attributes

HepMC::GenEvent * m_event
 
std::vector< PhotosParticle * > particles
 

Detailed Description

Definition at line 29 of file PhotosHepMCEvent.h.

Constructor & Destructor Documentation

PhotosHepMCEvent::~PhotosHepMCEvent ( )

Definition at line 21 of file PhotosHepMCEvent.cxx.

References p.

22 {
23  while(particles.size())
24  {
25  PhotosParticle *p = particles.back();
26  particles.pop_back();
27  if(p) delete p;
28  }
29 }
Double_t p
Definition: anasim.C:58
Abstract base class for particle in the event. This class also handles boosting.
std::vector< PhotosParticle * > particles
PhotosHepMCEvent::PhotosHepMCEvent ( HepMC::GenEvent *  event)

Constructor which keeps a pointer to the HepMC::GenEvent

Definition at line 10 of file PhotosHepMCEvent.cxx.

References particle.

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 }
const int particle
Abstract base class for particle in the event. This class also handles boosting.
std::vector< PhotosParticle * > particles
Interface to HepMC::GenParticle objects.
Photospp::PhotosHepMCEvent::~PhotosHepMCEvent ( )
Photospp::PhotosHepMCEvent::PhotosHepMCEvent ( HepMC::GenEvent *  event)

Constructor which keeps a pointer to the HepMC::GenEvent

Member Function Documentation

HepMC::GenEvent * PhotosHepMCEvent::getEvent ( )

Returns the HepMC::GenEvent

Definition at line 31 of file PhotosHepMCEvent.cxx.

32 {
33  return m_event;
34 }
HepMC::GenEvent* Photospp::PhotosHepMCEvent::getEvent ( )

Returns the HepMC::GenEvent

vector< PhotosParticle * > PhotosHepMCEvent::getParticleList ( )
virtual

Returns the list of particles

Implements Photospp::PhotosEvent.

Definition at line 42 of file PhotosHepMCEvent.cxx.

43 {
44  return particles;
45 }
std::vector< PhotosParticle * > particles
std::vector<PhotosParticle*> Photospp::PhotosHepMCEvent::getParticleList ( )
virtual

Returns the list of particles

Implements Photospp::PhotosEvent.

void Photospp::PhotosHepMCEvent::print ( )
virtual

Prints event summary

Implements Photospp::PhotosEvent.

void PhotosHepMCEvent::print ( )
virtual

Prints event summary

Implements Photospp::PhotosEvent.

Definition at line 36 of file PhotosHepMCEvent.cxx.

37 {
38  if(!m_event) return;
39  m_event->print();
40 }
void Photospp::PhotosEvent::process ( )
inherited

Process event

void PhotosEvent::process ( )
inherited

Process event

Definition at line 21 of file PhotosEvent.cxx.

References Photospp::PhotosBranch::createBranches(), Photospp::PhotosEvent::filterParticles(), Photospp::PhotosEvent::getParticleList(), i, and Photospp::PhotosEvent::m_branch_points.

Referenced by main().

22 {
23  //print();
24  vector<PhotosParticle*> particles = filterParticles( getParticleList() );
26 
27  for(int i=0;i<(int)m_branch_points.size();i++)
28  m_branch_points.at(i)->process();
29  //print();
30 }
static vector< PhotosBranch * > createBranches(vector< PhotosParticle * > particles)
Int_t i
Definition: run_full.C:25
vector< PhotosBranch * > m_branch_points
Definition: PhotosEvent.h:44
vector< PhotosParticle * > filterParticles(vector< PhotosParticle * > particles)
Definition: PhotosEvent.cxx:32
virtual vector< PhotosParticle * > getParticleList()=0

Member Data Documentation

HepMC::GenEvent * PhotosHepMCEvent::m_event
private

The event

Definition at line 47 of file PhotosHepMCEvent.h.

std::vector< PhotosParticle * > PhotosHepMCEvent::particles
private

Particle list

Definition at line 49 of file PhotosHepMCEvent.h.


The documentation for this class was generated from the following files: