source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/generators/meteorites/src/MeteoriteGenerator.cc @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 815 bytes
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: MeteoriteGenerator.cc 756 2004-06-15 18:01:25Z thea $
3// Alessandro Thea created Nov, 23 2003
4
5#include "MeteoriteGenerator.hh"
6#include "MeteoriteTrack.hh"
7#include "MCTruth.hh"
8 
9ClassImp(MeteoriteGenerator)
10
11// ctor
12MeteoriteGenerator::MeteoriteGenerator(): EventGenerator("meteorite"), fTrack(0), fTruth(0) {
13}
14
15// dtor
16MeteoriteGenerator::~MeteoriteGenerator() {
17    if(fTrack) delete fTrack;
18    if(fTruth) delete fTruth;
19    fTrack = 0;
20    fTruth = 0;
21}
22
23// get a new event
24PhysicsData *MeteoriteGenerator::Get() {
25    if ( !fTrack )
26        fTrack = new MeteoriteTrack;
27    return fTrack;
28}
29
30// get pointer to MonteCarlo Truth
31MCTruth *MeteoriteGenerator::GetTruth() {
32    if ( !fTruth  ) {
33        fTruth = new MCTruth;
34    }
35    return fTruth;
36}
Note: See TracBrowser for help on using the repository browser.