Coding Rule violations corrected.
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderTreeK.h
CommitLineData
8020fb14 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$ */
345de409 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//
8020fb14 12#include "AliGenReader.h"
88cb7938 13#include "AliStack.h"
14
8020fb14 15class TFile;
88cb7938 16class AliRunLoader;
345de409 17class AliStack;
88cb7938 18class TString;
19class TObjArray;
8020fb14 20
21class AliGenReaderTreeK : public AliGenReader
22{
23 public:
24 AliGenReaderTreeK();
add7d558 25 AliGenReaderTreeK(const AliGenReaderTreeK &reader);
ae872676 26 virtual ~AliGenReaderTreeK();
8020fb14 27 // Initialise
28 virtual void Init();
29 // Read
30 virtual Int_t NextEvent();
31 virtual TParticle* NextParticle();
d1d1da57 32 virtual void RewindEvent();
88cb7938 33 virtual void SetOnlyPrimaries(Bool_t flag){fOnlyPrimaries = flag;}
de905919 34 AliGenReaderTreeK & operator=(const AliGenReaderTreeK & rhs);
88cb7938 35 void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
36 void AddDir(const char* dirname);
345de409 37
8020fb14 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
88cb7938 42 AliRunLoader *fInRunLoader; //!Run Loader of the input event
8020fb14 43 TFile *fBaseFile; //! pointer to base file
44 AliStack *fStack; //! Particle stack
88cb7938 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);
345de409 52 private:
53 void Copy(AliGenReaderTreeK&) const;
8020fb14 54 ClassDef(AliGenReaderTreeK,1) // Read particles from TreeK
55};
88cb7938 56
57inline
58TParticle* AliGenReaderTreeK::GetParticle(Int_t i)
59 {
60 if (fStack && i<fNp) return fStack->Particle(i);
61 return 0x0;
62 }
63
8020fb14 64#endif
65
66
67
68
69
70