]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenReaderTreeK.h
TuneA settings removed from kPyJets
[u/mrichter/AliRoot.git] / EVGEN / AliGenReaderTreeK.h
index f91a7c47a35f27e89080c95cfaa709d72e8ccc1f..5404698789be944392c5a28977cae95fa1c4c1da 100644 (file)
@@ -1,15 +1,21 @@
-#ifndef ALIGENREADERTreeK_H
+#ifndef ALIGENREADERTREEK_H
 #define ALIGENREADERTREEK_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
-
+//
+// Realisation of AliGenReader to be used with AliGenExtFile
+// It reads events from a kinematics TreeK.
+// Author: andreas.morsch@cern.ch
+//
 #include "AliGenReader.h"
+
 class TFile;
+class AliRunLoader;
 class AliStack;
-class AliHeader;
-
+class TString;
+class TObjArray;
 
 class AliGenReaderTreeK : public AliGenReader
 {
@@ -22,19 +28,35 @@ class AliGenReaderTreeK : public AliGenReader
     // Read
     virtual Int_t NextEvent();
     virtual TParticle*  NextParticle();
+    virtual void RewindEvent();
+    virtual void SetFirstEvent(Int_t evt)    {fNcurrent  = evt;};
+    virtual void SetOnlyPrimaries(Bool_t flag) {fOnlyPrimaries = flag;}
     AliGenReaderTreeK & operator=(const AliGenReaderTreeK & rhs);
-    
+    void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
+    void AddDir(const char* dirname);
+    AliRunLoader * GetRunLoader() const {return fInRunLoader;}
+
  protected:
     Int_t             fNcurrent;          // points to the next entry
     Int_t             fNparticle;         // Next particle in list
     Int_t             fNp;                // number of particles
-    TFile            *fFile;              //! pointer to file
+    AliRunLoader     *fInRunLoader;       //!Run Loader of the input event
     TFile            *fBaseFile;          //! pointer to base file
     AliStack         *fStack;             //! Particle stack
-    AliHeader        *fHeader;            //! Pointer to event header
-    TTree            *fTreeE;             //! Pointer to header tree
+    Bool_t            fOnlyPrimaries;     // Flag indicating wether only primaries are read
+    TObjArray        *fDirs;              //arry with directories to read data from
+    Int_t             fCurrentDir;        //Number of current directory
+    static const TString fgkEventFolderName;//!name of folder where event to read is mounted
+    
+    TString&   GetDirName(Int_t entry);
+    TParticle* GetParticle(Int_t i);
+ private:
+    void Copy(TObject&) const;    
     ClassDef(AliGenReaderTreeK,1) // Read particles from TreeK
 };
+
+
+
 #endif