]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenExtFile.h
Add a protection for the case of not used dictionary and a setter for the recoParam
[u/mrichter/AliRoot.git] / EVGEN / AliGenExtFile.h
index 5ac75775a8dbf588ff3b636ece1eacc0ea038548..b39a8d824e1e9a801c06054ce523e04c988b05e4 100644 (file)
@@ -1,48 +1,41 @@
-#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"
+#include "AliGenReader.h"
+
+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