X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=EVGEN%2FAliGenExtFile.h;h=648a183cea772206b8e2f30b6512a35d9c949c8b;hp=22561b9acf2f091464223a7a33f52692dfc8370f;hb=6e38a462ff638482fa7839670ddb694e524610bc;hpb=f177bfed18b3c4a8c429b8e3e980d907a02d57ee diff --git a/EVGEN/AliGenExtFile.h b/EVGEN/AliGenExtFile.h index 22561b9acf2..648a183cea7 100644 --- a/EVGEN/AliGenExtFile.h +++ b/EVGEN/AliGenExtFile.h @@ -6,48 +6,37 @@ /* $Id$ */ -// Event generator that can read the old ALICE event format based on CW-ntuples -// http://consult.cern.ch/alice/Internal_Notes/1995/32/abstract +// Event generator that can read events from a files. +// The reading is performed by a realisation of AliGenReader specific to the file format. // Author: andreas.morsch@cern.ch -#include "AliGenerator.h" +#include "AliGenMC.h" +class AliGenReader; + + class TTree; -class AliGenExtFile : public AliGenerator +class AliGenExtFile : public AliGenMC { public: AliGenExtFile(); AliGenExtFile(Int_t npart); - AliGenExtFile(const AliGenExtFile &cocktail); - - virtual ~AliGenExtFile(); + virtual ~AliGenExtFile(); // Initialise - virtual void Init() {} - // Initialise fluka data - virtual void NtupleInit(); - // set file name of data file - virtual void SetFileName(const Text_t *filname) {fFileName=filname;} + virtual void Init(); // generate event virtual void Generate(); + void SetReader(AliGenReader* reader) {fReader = reader;} + void SetStartEvent(Int_t startEvent) {fStartEvent = startEvent;} + protected: + void CdEventFile(); + const Text_t *fFileName; //! File to read from + AliGenReader *fReader; //! Reader to read the file + Int_t fStartEvent; //! Start event number + + private: + AliGenExtFile(const AliGenExtFile &ext); AliGenExtFile & operator=(const AliGenExtFile & rhs); - enum Code_t {kPDG, kGEANT3}; - void SetParticleCode(Code_t code) {fCode = code;} - -protected: - const Text_t *fFileName; //! Choose the file - Int_t fNcurrent; // points to the next entry - TTree *fTreeNtuple; // pointer to the TTree - //Declaration of leaves types - Code_t fCode; // Particle code type - Int_t fNihead; // Number of entries in integer header - Int_t fIhead[12]; // Integer header - Int_t fNrhead; // Number of entries in float header - Float_t fRhead[6]; // Float header - UInt_t fIdpart; // Particle type - Float_t fTheta; // Theta - Float_t fPhi; // Phi - Float_t fP; // Total momentum - Float_t fE; // Total energy ClassDef(AliGenExtFile,1) //Generate particles from external file };