Line data Source code
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"
15 :
16 : namespace HepMC {
17 : class IO_BaseClass;
18 : class GenEvent;
19 : }
20 :
21 : class TParticle;
22 :
23 : class AliGenReaderHepMC : public AliGenReader
24 : {
25 : public:
26 : AliGenReaderHepMC();
27 : AliGenReaderHepMC(const AliGenReaderHepMC &reader);
28 : virtual ~AliGenReaderHepMC();
29 0 : 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 :
36 : protected:
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 :
43 : private:
44 : void Copy(TObject&) const;
45 :
46 6 : ClassDef(AliGenReaderHepMC, 1) //Generate particles from external file
47 : };
48 : #endif
49 :
50 :
51 :
|