X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenExtFile.h;h=230de91cb53bd229014ba892288c9f833ab7c80c;hb=46ae38d01a1794cff7548598708dac8f35d354ee;hp=5ac75775a8dbf588ff3b636ece1eacc0ea038548;hpb=693caace284013daf6a91738237e229061941235;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenExtFile.h b/EVGEN/AliGenExtFile.h index 5ac75775a8d..230de91cb53 100644 --- a/EVGEN/AliGenExtFile.h +++ b/EVGEN/AliGenExtFile.h @@ -1,48 +1,42 @@ -#ifndef AliGenExtFile_H -#define AliGenExtFile_H -///////////////////////////////////////////////////////// -// Manager and hits classes for set:MUON version 0 // -///////////////////////////////////////////////////////// -#include "AliGenerator.h" -#include "TNamed.h" -#include "TF1.h" -#include "TArrayF.h" -#include "TTree.h" - -// Read background particles from a FLUKA boundary source file - -class AliGenExtFile : public AliGenerator +#ifndef ALIGENEXTFILE_H +#define ALIGENEXTFILE_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + + +// 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 "AliGenMC.h" +class AliGenReader; + + +class TTree; + +class AliGenExtFile : public AliGenMC { - -protected: - const Text_t *fFileName; // Choose the file - Int_t fNcurrent; // points to the next entry - TTree *fTreeNtuple; // pointer to the TTree -//Declaration of variables read from the file -- TTree type - //Declaration of leaves types - Int_t Nihead; - Int_t Ihead[12]; - Int_t Nrhead; - Float_t Rhead[6]; - UInt_t Idpart; - Float_t Theta; - Float_t Phi; - Float_t P; - Float_t E; -public: - AliGenExtFile(); - AliGenExtFile(Int_t npart); - 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;} - // generate event - virtual void Generate(); - - ClassDef(AliGenExtFile,1) //Boundary source + public: + AliGenExtFile(); + AliGenExtFile(Int_t npart); + virtual ~AliGenExtFile(); + // Initialise + virtual void Init(); + // generate event + virtual void Generate(); + void SetReader(AliGenReader* reader) {fReader = reader;} + protected: + void CdEventFile(); + const Text_t *fFileName; //! File to read from + AliGenReader *fReader; //! Reader to read the file + + private: + AliGenExtFile(const AliGenExtFile &ext); + AliGenExtFile & operator=(const AliGenExtFile & rhs); + + ClassDef(AliGenExtFile,1) //Generate particles from external file }; #endif