3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 // Interface for reading events from files.
9 // Realisations of this interface have to be used with AliGenExFile.
10 // Author: andreas.morsch@cern.ch
17 class AliGenReader : public TObject
20 AliGenReader():fFileName(NULL),fCode(kPDG){;}
21 AliGenReader(const AliGenReader &reader)
22 :TObject(reader), fFileName(NULL), fCode(kPDG){reader.Copy(*this);}
23 virtual ~AliGenReader(){;}
24 virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
25 virtual AliRunLoader * GetRunLoader() const {return 0x0;}
26 virtual void Init() = 0;
27 virtual Int_t NextEvent() = 0;
28 virtual TParticle* NextParticle() = 0;
29 virtual void RewindEvent() = 0;
30 typedef enum {kPDG, kGEANT3} Code_t;
31 void SetParticleCode(Code_t code) {fCode = code;}
32 AliGenReader & operator=(const AliGenReader & rhs);
35 const Text_t *fFileName; // Name of file to read from
36 Code_t fCode; // Particle code type
38 void Copy(TObject&) const;
40 ClassDef(AliGenReader,1) //Generate particles from external file