Update timestamps for new AMANDA simulation (17/02/2015)
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderHepMC.h
CommitLineData
b897d37f 1#ifndef ALIGENREADERHEPMC_H
2#define ALIGENREADERHEPMC_H
3// Realisations of the AliGenReader interface to be used with AliGenExFile.
4// NextEvent() loops over events
5// and NextParticle() loops over particles.
6// This implementation reads HepMC output formats
7// Author: brian.peter.thorsbro@cern.ch, brian@thorsbro.dk
8// Based on AliGenReaderSL by andreas.morsch@cern.ch
9
10#include <TClonesArray.h>
11
12#include "AliGenReader.h"
13#include "AliGenEventHeader.h"
14#include "THepMCParser.h"
71c3b2be 15
16namespace HepMC {
17 class IO_BaseClass;
18 class GenEvent;
19}
b897d37f 20
21class TParticle;
22
23class AliGenReaderHepMC : public AliGenReader
24{
25public:
71c3b2be 26 AliGenReaderHepMC();
27 AliGenReaderHepMC(const AliGenReaderHepMC &reader);
28 virtual ~AliGenReaderHepMC();
b897d37f 29 AliGenEventHeader * GetGenEventHeader() const {return fGenEventHeader;};
30 virtual void Init();
31 virtual Int_t NextEvent();
32 virtual TParticle* NextParticle();
33 virtual void RewindEvent();
34 AliGenReaderHepMC & operator=(const AliGenReaderHepMC & rhs);
35
36protected:
37 HepMC::IO_BaseClass * fEventsHandle; // pointer to the HepMC file handler
38 HepMC::GenEvent * fGenEvent; // pointer to a generated event
39 TClonesArray * fParticleArray; // pointer to array containing particles of current event
40 TIter * fParticleIterator; // iterator coupled to the array
41 AliGenEventHeader * fGenEventHeader; // AliGenEventHeader
42
43private:
44 void Copy(TObject&) const;
45
46 ClassDef(AliGenReaderHepMC, 1) //Generate particles from external file
47};
48#endif
49
50
51