]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenReaderTreeK.h
Coverty fixes (M.Nicassio)
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderTreeK.h
1 #ifndef ALIGENREADERTreeK_H
2 #define ALIGENREADERTREEK_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 // Realisation of AliGenReader to be used with AliGenExtFile
9 // It reads events from a kinematics TreeK.
10 // Author: andreas.morsch@cern.ch
11 //
12 #include "AliGenReader.h"
13
14 class TFile;
15 class AliRunLoader;
16 class AliStack;
17 class TString;
18 class TObjArray;
19
20 class AliGenReaderTreeK : public AliGenReader
21 {
22  public:
23     AliGenReaderTreeK();
24     AliGenReaderTreeK(const AliGenReaderTreeK &reader);
25     virtual ~AliGenReaderTreeK();
26     // Initialise 
27     virtual void Init();
28     // Read
29     virtual Int_t NextEvent();
30     virtual TParticle*  NextParticle();
31     virtual void RewindEvent();
32     virtual void SetOnlyPrimaries(Bool_t flag){fOnlyPrimaries = flag;}
33     AliGenReaderTreeK & operator=(const AliGenReaderTreeK & rhs);
34     void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
35     void AddDir(const char* dirname);
36     AliRunLoader * GetRunLoader() const {return fInRunLoader;}
37
38  protected:
39     Int_t             fNcurrent;          // points to the next entry
40     Int_t             fNparticle;         // Next particle in list
41     Int_t             fNp;                // number of particles
42     AliRunLoader     *fInRunLoader;       //!Run Loader of the input event
43     TFile            *fBaseFile;          //! pointer to base file
44     AliStack         *fStack;             //! Particle stack
45     Bool_t            fOnlyPrimaries;     // Flag indicating wether only primaries are read
46     TObjArray        *fDirs;              //arry with directories to read data from
47     Int_t             fCurrentDir;        //Number of current directory
48     static const TString fgkEventFolderName;//!name of folder where event to read is mounted
49     
50     TString&   GetDirName(Int_t entry);
51     TParticle* GetParticle(Int_t i);
52  private:
53     void Copy(TObject&) const;    
54     ClassDef(AliGenReaderTreeK,1) // Read particles from TreeK
55 };
56
57
58
59 #endif
60
61
62
63
64
65