]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALSDigitizer.h
Introduced option for the first and last event to process
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.h
index 2b4a34e7163fc7f79fed24511a2831a3ec03d00b..6245983f16747153b6699b833ebceabcabb4bb0b 100644 (file)
@@ -2,67 +2,67 @@
 #define ALIEMCALSDigitizer_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
-
 /* $Id$ */
-
 //_________________________________________________________________________
 //  Task Class for making SDigits in EMCAL      
 //                  
 //*-- Author: Sahal Yacoob (LBL)
 // based on : AliPHOSSDigitizer
 //_________________________________________________________________________
-
-
+//
+// Modif: 
+//  August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
+//  July   2003 Yves Schutz: new  IO (à la PHOS)
 // --- ROOT system ---
 #include "TTask.h"
-#include "TString.h"
+class TFile ;
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliConfig.h"
 
 class AliEMCALSDigitizer: public TTask {
 
 public:
   AliEMCALSDigitizer() ;          // ctor
-  AliEMCALSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ; 
-  virtual ~AliEMCALSDigitizer() ; // dtor
-
-  Float_t  Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
-  Int_t    Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
+  AliEMCALSDigitizer(const char * alirunFileName, const char * eventFolderName = AliConfig::fgkDefaultEventFolderName) ; 
+  AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) ;
+  virtual ~AliEMCALSDigitizer(); // dtor
 
+  Float_t       Calibrate(Int_t amp)const {return (amp - fA)/fB ; }
+  Int_t         Digitize(Float_t Energy)const { return (Int_t ) ( fA + Energy*fB); }
   virtual void  Exec(Option_t *option); 
-  
-  Float_t  GetPedestalParameter()const {return fA;}
-  Float_t  GetCalibrationParameter()const{return fB;}
-  char *   GetSDigitsBranch()const{return (char*) fSDigitsTitle.Data();}  
+  Int_t         GetSDigitsInRun() const {return fSDigitsInRun ;}  
+  virtual void  Print() const ;
+  void          SetEventFolderName(TString name) { fEventFolderName = name ; }
+  void          SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
 
-  virtual void Print(Option_t* option) const ;
+  Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
+  const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
 
-  void     SetPedestalParameter(Float_t A){fA = A ;}
-  void     SetSlopeParameter(Float_t B){fB = B ;}
-  void     SetSDigitsBranch(const char * title ) ;
-
-  Bool_t   operator == (const AliEMCALSDigitizer & sd) const ;
 
 private:
   void     Init() ;
+  void     InitParameters() ; 
   void     PrintSDigits(Option_t * option) ;
-  Int_t    Layer2TowerID(Int_t,Bool_t) ;
-private:
-  Float_t fA ;              //Pedestal parameter
-  Float_t fB ;              //Slope Digitizition parameters
-  Float_t fLayerRatio ;     //Factor that takes into account difference in light collection between 2 first layers and rest of layers
-
-  Int_t   fNevents ;        // Number of events to digitize
-  Float_t fPrimThreshold ;  // To store primary if Elos > threshold
-  TString fSDigitsTitle ;   // title of SDigits branch
-  TString fHeadersFile ;    //input file
-  Bool_t         fIsInitialized ; 
-  TClonesArray * fSDigits ; //! list of SDigits
-  TClonesArray * fHits ;    //! 
+  void     Unload() const ;
 
-  ClassDef(AliEMCALSDigitizer,1)  // description 
+private:
+  Float_t fA ;                     // Pedestal parameter
+  Float_t fB ;                     // Slope Digitizition parameters
+  Float_t fECPrimThreshold ;       // To store primary if EC Shower Elos > threshold
+  Bool_t  fDefaultInit;            //! Says if the task was created by defaut ctor (only parameters are initialized)
+  TString fEventFolderName;        // event folder name
+  Bool_t  fInit ;                  //! tells if initialisation wennt OK, will revent exec if not
+  Int_t   fSDigitsInRun ;          //! Total number of sdigits in one run
+  Int_t   fFirstEvent;             // first event to process
+  Int_t   fLastEvent;              // last  event to process
+
+  ClassDef(AliEMCALSDigitizer,5)  // description 
 
 };
 
 #endif // AliEMCALSDigitizer_H
+