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