Line data Source code
1 : #ifndef ALIGENREADER_H
2 : #define ALIGENREADER_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id$ */
7 :
8 : // Interface for reading events from files.
9 : // Realisations of this interface have to be used with AliGenExFile.
10 : // Author: andreas.morsch@cern.ch
11 :
12 : #include "TObject.h"
13 : #include "AliGenEventHeader.h"
14 :
15 : class TParticle;
16 : class AliRunLoader;
17 :
18 : class AliGenReader : public TObject
19 : {
20 : public:
21 0 : AliGenReader():fFileName(NULL),fCode(kPDG){;}
22 : AliGenReader(const AliGenReader &reader)
23 0 : :TObject(reader), fFileName(NULL), fCode(kPDG){reader.Copy(*this);}
24 0 : virtual ~AliGenReader(){;}
25 0 : virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
26 0 : virtual AliRunLoader * GetRunLoader() const {return 0x0;}
27 0 : virtual AliGenEventHeader * GetGenEventHeader() const {return 0x0;}
28 : virtual void Init() = 0;
29 : virtual Int_t NextEvent() = 0;
30 : virtual TParticle* NextParticle() = 0;
31 : virtual void RewindEvent() = 0;
32 : typedef enum {kPDG, kGEANT3} Code_t;
33 0 : void SetParticleCode(Code_t code) {fCode = code;}
34 : AliGenReader & operator=(const AliGenReader & rhs);
35 :
36 : protected:
37 : const Text_t *fFileName; // Name of file to read from
38 : Code_t fCode; // Particle code type
39 : private:
40 : void Copy(TObject&) const;
41 :
42 6 : ClassDef(AliGenReader,1) //Generate particles from external file
43 : };
44 : #endif
45 :
46 :
47 :
48 :
49 :
50 :
|