]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenReader.h
Fix the generation status code for d
[u/mrichter/AliRoot.git] / EVGEN / AliGenReader.h
CommitLineData
e20ef457 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
e033748b 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
e20ef457 12#include "TObject.h"
7a005d69 13#include "AliGenEventHeader.h"
e20ef457 14
15class TParticle;
9ad9d6f5 16class AliRunLoader;
e20ef457 17
18class AliGenReader : public TObject
19{
20 public:
88cb7938 21 AliGenReader():fFileName(NULL),fCode(kPDG){;}
198bb1c7 22 AliGenReader(const AliGenReader &reader)
23 :TObject(reader), fFileName(NULL), fCode(kPDG){reader.Copy(*this);}
e20ef457 24 virtual ~AliGenReader(){;}
e20ef457 25 virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
9ad9d6f5 26 virtual AliRunLoader * GetRunLoader() const {return 0x0;}
7a005d69 27 virtual AliGenEventHeader * GetGenEventHeader() const {return 0x0;}
e033748b 28 virtual void Init() = 0;
29 virtual Int_t NextEvent() = 0;
30 virtual TParticle* NextParticle() = 0;
31 virtual void RewindEvent() = 0;
0af12c00 32 typedef enum {kPDG, kGEANT3} Code_t;
e20ef457 33 void SetParticleCode(Code_t code) {fCode = code;}
e20ef457 34 AliGenReader & operator=(const AliGenReader & rhs);
e033748b 35
e20ef457 36 protected:
37 const Text_t *fFileName; // Name of file to read from
38 Code_t fCode; // Particle code type
e033748b 39 private:
dc1d768c 40 void Copy(TObject&) const;
e20ef457 41
42 ClassDef(AliGenReader,1) //Generate particles from external file
43};
44#endif
45
46
47
48
49
50