]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDigitizer.h
Monitoring of process information: updated version (Marian)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
index 9c50f0ef649315ac9899961fff48b299be9b4468..aefc71ffbf640a09b3f5bb1471c306a300d15def 100644 (file)
@@ -5,6 +5,23 @@
 
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.36  2007/09/30 17:08:20  schutz
+ * Introducing the notion of QA data acquisition cycle (needed by online)
+ *
+ * Revision 1.35  2007/08/07 14:12:03  kharlov
+ * Quality assurance added (Yves Schutz)
+ *
+ * Revision 1.34  2006/04/29 20:25:30  hristov
+ * Decalibration is implemented (Yu.Kharlov)
+ *
+ * Revision 1.33  2005/05/28 14:19:04  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 //  Task Class for making SDigits in PHOS      
 // Class performs digitization of Summable digits (in the PHOS case this is just
 
 
 // --- ROOT system ---
-#include "TObjString.h"
+//#include "TObjString.h"
 class TArrayI ;
+class TClonesArray ; 
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
 #include "AliDigitizer.h"
 class AliPHOSSDigitizer ;
+class AliPHOSQADataMaker ; 
 class AliRunDigitizer ;
 
 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(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; 
+  AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
+  AliPHOSDigitizer(AliRunDigitizer * manager) ;
   virtual ~AliPHOSDigitizer() ;       
 
-  void    Digitize(const Int_t event) ;            // Make Digits from SDigits 
+  void    Digitize(Int_t event) ;            // Make Digits from SDigits 
   void    Exec(Option_t *option);                  // Supervising method
 
   //CPV parameters
-  const Float_t GetCPVNoise()     const { return fCPVNoise ;}
-  const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
-  const Float_t GetCPVchannel()   const { return fADCchanelCpv; }
-  const Float_t GetCPVpedestal()  const { return fADCpedestalCpv; }
+  Float_t GetCPVNoise()     const { return fCPVNoise ;}
+  Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
+  Float_t GetCPVchannel()   const { return fADCchanelCpv; }
+  Float_t GetCPVpedestal()  const { return fADCpedestalCpv; }
 
   void    SetCPVNoise(Float_t CPVNoise)          {fCPVNoise = CPVNoise;}
   void    SetCPVThreshold(Float_t CPVThreshold)  {fCPVDigitThreshold= CPVThreshold;}
@@ -51,46 +70,61 @@ public:
 
 
   //EMC parameters
-  const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
-  const Float_t GetEMCchannel()   const { return fADCchanelEmc; }
-  const Float_t GetEMCpedestal()  const { return fADCpedestalEmc; }  
-  const Float_t GetPinNoise()     const { return fPinNoise;}
-  const Float_t GetTimeResolution() const { return fTimeResolution ; }
+  Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
+  Float_t GetEMCchannel()   const { return fADCchanelEmc; }
+  Float_t GetEMCpedestal()  const { return fADCpedestalEmc; }  
+  Float_t GetPinNoise()     const { return fPinNoise;}
+  Float_t GetTimeResolution() const { return fTimeResolution ; }
 
   void   SetEMCThreshold(Float_t EMCThreshold)  {fEMCDigitThreshold = EMCThreshold;}
   void   SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
   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 ; }  
+  void   SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
 
   //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    SetSplitFile(const TString splitFileName = "PHOS.Digits.root") ;
-  void    SetSDigitsBranch(const char* file) ;
+  Int_t   GetDigitsInRun()  const { return fDigitsInRun ;}  
+  void    MixWith(TString alirunFileName, 
+                 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
 
-  AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue)  {
+  void    Print(const Option_t * = "")const ;
+  AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/)  {
     // assignement operator requested by coding convention but not needed
-    abort() ;
+    Fatal("operator =", "not implemented") ;
     return *this ; 
   }
 
+  
 private:
+  AliPHOSQADataMaker * GetQADataMaker() const { return fQADM ; } 
 
-  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) ;
+  void    DecalibrateEMC(AliPHOSDigit * digit);
+  Int_t   DigitizeCPV(Float_t charge, 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,23 +133,29 @@ 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
-  TFile * fSplitFile ;             //! file in which Digits will eventually be stored
 
+  TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
+  Int_t   fFirstEvent;              // first event to process
+  Int_t   fLastEvent;               // last  event to process 
+  AliPHOSQADataMaker * fQADM ; //!Quality Assurance Data Maker
+  Int_t fEventCounter ;             //! counts the events processed
+  
+  //QA stuff
+  static const Int_t fgkCycles = 9999 ; // QA data accumulation cycle 
 
-  ClassDef(AliPHOSDigitizer,1)  // description 
+  ClassDef(AliPHOSDigitizer,4)  // description 
 
 };