]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenReaderTreeK.h
Add bkg subtraction (optional); change to LCH11h as default input set
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderTreeK.h
CommitLineData
faf00b0d 1#ifndef ALIGENREADERTREEK_H
8020fb14 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
8020fb14 14class TFile;
88cb7938 15class AliRunLoader;
345de409 16class AliStack;
88cb7938 17class TString;
18class TObjArray;
8020fb14 19
20class AliGenReaderTreeK : public AliGenReader
21{
22 public:
23 AliGenReaderTreeK();
add7d558 24 AliGenReaderTreeK(const AliGenReaderTreeK &reader);
ae872676 25 virtual ~AliGenReaderTreeK();
8020fb14 26 // Initialise
27 virtual void Init();
28 // Read
29 virtual Int_t NextEvent();
30 virtual TParticle* NextParticle();
d1d1da57 31 virtual void RewindEvent();
2e647e5a 32 virtual void SetFirstEvent(Int_t evt) {fNcurrent = evt;};
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);
9ad9d6f5 37 AliRunLoader * GetRunLoader() const {return fInRunLoader;}
345de409 38
8020fb14 39 protected:
40 Int_t fNcurrent; // points to the next entry
41 Int_t fNparticle; // Next particle in list
42 Int_t fNp; // number of particles
88cb7938 43 AliRunLoader *fInRunLoader; //!Run Loader of the input event
8020fb14 44 TFile *fBaseFile; //! pointer to base file
45 AliStack *fStack; //! Particle stack
88cb7938 46 Bool_t fOnlyPrimaries; // Flag indicating wether only primaries are read
47 TObjArray *fDirs; //arry with directories to read data from
48 Int_t fCurrentDir; //Number of current directory
49 static const TString fgkEventFolderName;//!name of folder where event to read is mounted
50
51 TString& GetDirName(Int_t entry);
52 TParticle* GetParticle(Int_t i);
345de409 53 private:
dc1d768c 54 void Copy(TObject&) const;
8020fb14 55 ClassDef(AliGenReaderTreeK,1) // Read particles from TreeK
56};
88cb7938 57
92ff9348 58
88cb7938 59
8020fb14 60#endif
61
62
63
64
65
66