]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDigitizer.h
fEntries initialized to 0 in constructor and new TList() for first call of
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
index f05ae2a8f15069818f0a575a38dde534367e3aee..480d41051f9ecb600b3b7fd6084168fd7b71297c 100644 (file)
@@ -17,6 +17,8 @@
 // --- ROOT system ---
 #include "TObjString.h"
 class TArrayI ;
+class TClonesArray ; 
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -28,10 +30,9 @@ class AliPHOSDigitizer: public AliDigitizer {
 
 public:
   AliPHOSDigitizer() ;          // ctor
-  AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ; 
-  AliPHOSDigitizer(AliRunDigitizer * ard) ;
-  AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) 
-                  {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;} 
+  AliPHOSDigitizer(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; 
+  AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
+  AliPHOSDigitizer(AliRunDigitizer * manager) ;
   virtual ~AliPHOSDigitizer() ;       
 
   void    Digitize(const Int_t event) ;            // Make Digits from SDigits 
@@ -62,35 +63,45 @@ public:
   void   SetNEMCchannels(Int_t n)      { fNADCemc = n; }
   void   SetEMCchannel(Float_t width)  { fADCchanelEmc = width; }
   void   SetEMCpedestal(Float_t ped)   { fADCpedestalEmc = ped ; }  
+  void   SetEventFolderName(TString name) { fEventFolderName = name ; }
+  void   SetTimeResolution(Float_t res){ fTimeResolution = res ; }  
 
   //General
   const Int_t   GetDigitsInRun()  const { return fDigitsInRun ;}  
-
-  void    MixWith(const char* HeaderFile) ; // Add another one file to mix
-  void    Print(Option_t* option)const ;
-  void    Reset() ;   //restarts starts event processing from 0 event(s)
-
-  void    SetSDigitsBranch(const char* file) ;
-
+  void    MixWith(const TString alirunFileName, 
+                 const TString eventFolderName = AliConfig::fgkDefaultEventFolderName) ; // Add another one file to mix
+  void    Print()const ;
   AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue)  {
     // assignement operator requested by coding convention but not needed
-    abort() ;
+    Fatal("operator =", "not implemented") ;
     return *this ; 
   }
 
 private:
 
-  Bool_t  Init() ; 
+  virtual Bool_t Init() ; 
+  void    InitParameters() ; 
   void    PrintDigits(Option_t * option) ;
-  void    WriteDigits(Int_t evt) ;            // Writes Digits for particular event
-  Float_t TimeOfNoise(void) ;                 // Calculate time signal generated by noise
+  void    Unload() ; 
+  void    WriteDigits() ;                     // Writes Digits for the current event
+  Float_t TimeOfNoise(void) const;            // Calculate time signal generated by noise
+
   //Calculate the time of crossing of the threshold by front edge
-  Float_t FrontEdgeTime(TClonesArray * ticks) ; 
+  Float_t FrontEdgeTime(TClonesArray * ticks) const 
   //Calculate digitized signal with gived ADC parameters
   Int_t   DigitizeEnergy(Float_t energy, Int_t absId) ;
 
 private:
 
+  Bool_t  fDefaultInit;             //! Says if the task was created by defaut ctor (only parameters are initialized)
+  Int_t   fDigitsInRun ;            //! Total number of digits in one run
+  Bool_t  fInit ;                   //! To avoid overwriting existing files
+
+  Int_t   fInput ;                  // Number of files to merge
+  TString * fInputFileNames ;       //[fInput] List of file names to merge 
+  TString * fEventNames ;           //[fInput] List of event names to merge
+
   Int_t   fEmcCrystals ;            // Number of EMC crystalls in the given geometry
 
   Float_t fPinNoise ;               // Electronics noise in EMC
@@ -99,22 +110,22 @@ private:
   Float_t fCPVNoise ;               // Noise in CPV
   Float_t fCPVDigitThreshold  ;     // Threshold for storing digits in CPV
 
-  Int_t fDigitsInRun ;              //! Total number of digits in one run
 
   Float_t fTimeResolution ;         // Time resolution of FEE electronics
   Float_t fTimeThreshold ;          // Threshold to start timing for given crystall
   Float_t fTimeSignalLength ;       // Length of the timing signal 
 
   Float_t fADCchanelEmc ;           // width of one ADC channel in GeV
-  Float_t fADCpedestalEmc ;         //
+  Float_t fADCpedestalEmc ;         // value of the EMC ADC pedestal
   Int_t   fNADCemc ;                // number of channels in EMC ADC
 
-  Float_t fADCchanelCpv ;           // width of one ADC channel in CPV 'popugais'
-  Float_t fADCpedestalCpv ;         // 
+  Float_t fADCchanelCpv ;           // width of one ADC channel in CPV units
+  Float_t fADCpedestalCpv ;         // value of the CPV ADC pedestal in CPV units
   Int_t   fNADCcpv ;                // number of channels in CPV ADC
 
-
-  ClassDef(AliPHOSDigitizer,1)  // description 
+  TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
+  
+  ClassDef(AliPHOSDigitizer,2)  // description 
 
 };