Main Page
Data Structures
Files
File List
src
eventRecordInterfaces
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
{
10
PhotosHepMC3Event::PhotosHepMC3Event
(GenEvent * event)
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
30
GenEvent *
PhotosHepMC3Event::getEvent
()
31
{
32
return
m_event
;
33
}
34
35
void
PhotosHepMC3Event::print
()
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
Photospp::PhotosHepMC3Particle
Definition:
PhotosHepMC3Particle.h:28
Photospp::PhotosHepMC3Event::getParticleList
std::vector< PhotosParticle * > getParticleList()
Definition:
PhotosHepMC3Event.cxx:41
Photospp::PhotosHepMC3Event::PhotosHepMC3Event
PhotosHepMC3Event(GenEvent *event)
Definition:
PhotosHepMC3Event.cxx:10
Photospp::PhotosHepMC3Event::getEvent
GenEvent * getEvent()
Definition:
PhotosHepMC3Event.cxx:30
Photospp::PhotosHepMC3Event::particles
std::vector< PhotosParticle * > particles
Definition:
PhotosHepMC3Event.h:48
Photospp::PhotosHepMC3Event::m_event
GenEvent * m_event
Definition:
PhotosHepMC3Event.h:46
Photospp::PhotosHepMC3Event::print
void print()
Definition:
PhotosHepMC3Event.cxx:35
Photospp::PhotosParticle
Definition:
PhotosParticle.h:25
Generated on Tue Mar 12 2024 23:11:40 for C++InterfacetoPHOTOS by
1.8.7