]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSSDigitizer.h
Elaborating split mode to write data only to the split files
[u/mrichter/AliRoot.git] / PHOS / AliPHOSSDigitizer.h
index 77ab00fbfaff8e9f7f5f0478edf8b788245a9e0b..7b7343b319988a956ffbadb4e109e785b5c3c6a0 100644 (file)
@@ -16,6 +16,8 @@
 // --- ROOT system ---
 #include "TTask.h"
 #include "TString.h"
+class TFile ; 
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -24,36 +26,33 @@ class AliPHOSSDigitizer: public TTask {
 
 public:
   AliPHOSSDigitizer() ;          // ctor
-  AliPHOSSDigitizer(const char* HeaderFile,const char *SdigitsTitle = "Default") ; 
-  virtual ~AliPHOSSDigitizer(){} // dtor
+  AliPHOSSDigitizer(const char* headerFile, const char *sdigitsTitle = "Default", const Bool_t toSplit = kFALSE) ; 
+  virtual ~AliPHOSSDigitizer() ; // 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); 
-  
+  virtual void   Exec(Option_t *option); 
   const char *   GetSDigitsBranch()const{return GetName();}  
   const Int_t    GetSDigitsInRun() const {return fSDigitsInRun ;}  
-
   virtual void Print(Option_t* option) const ;
-
-  void     SetSDigitsBranch(const char * title ) ;
-
-  void  UseHitsFrom(const char * filename) ;      
-
-  Bool_t   operator == (const AliPHOSSDigitizer & sd) const ;
+  void SetSDigitsBranch(const char * title ) ;
+  //  void SetSplitFile(const TString splitFileName = "PHOS.SDigits.root") ;
+  void UseHitsFrom(const char * filename) ;      
+  Bool_t operator == (const AliPHOSSDigitizer & sd) const ;
 
 private:
   void     Init() ;
+  void     InitParameters() ;
   void     PrintSDigits(Option_t * option) ;
 
 private:
-
   Float_t fA ;              // Pedestal parameter
   Float_t fB ;              // Slope Digitizition parameters
   Float_t fPrimThreshold ;  // To store primari if Elos > threshold
-  Int_t fSDigitsInRun ;     //! Total number of sdigits in one run
-
+  Bool_t  fDefaultInit;     //! Says if the task was created by defaut ctor (only parameters are initialized)
+  Int_t   fSDigitsInRun ;   //! Total number of sdigits in one run
+  TFile * fSplitFile ;      //! file in which SDigits will eventually be stored
+  Bool_t  fToSplit ;        //! Says that sigits should be written into splip file
 
   ClassDef(AliPHOSSDigitizer,1)  // description