]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSReconstructioner.h
Elaborating split mode to write data only to the split files
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructioner.h
index 6f467d053e51784d0c49a637befd9ab272fa0bf5..40c311893c123e28e86c90fbeca91118a6e0c3fb 100644 (file)
@@ -6,66 +6,85 @@
 /* $Id$ */
 
 //_________________________________________________________________________
-//  Algorithm class for the reconstruction: clusterizer
-//                                          track segment maker
-//                                          particle identifier   
+//  Wrapping class for reconstruction
 //*--
-//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
+//*-- Author: Gines Martinez & Yves Schutz (SUBATECH) 
+//*--         Dmitri Peressounko (SUBATECH & Kurchatov Institute)
+
+#include <stdlib.h>
 
 // --- ROOT system ---
 
-#include "TObject.h"
-#include "AliPHOSClusterizer.h"
-#include "AliPHOSTrackSegmentMaker.h"
-#include "AliPHOSPID.h"
-#include "TClonesArray.h" 
+#include "TTask.h"
+class AliPHOSDigitizer ;
+class AliPHOSClusterizer ;
+class AliPHOSTrackSegmentMaker ;
+class AliPHOSPID ;
+class AliPHOSSDigitizer ;
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
-class AliPHOSReconstructioner : public TObject {
+class AliPHOSReconstructioner : public TTask {
 
 public:
 
-  AliPHOSReconstructioner(){} //ctor            
-  AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
-                         AliPHOSPID * Identifier); //ctor         
-  AliPHOSReconstructioner(const AliPHOSReconstructioner & phos) {
-    // cpy ctor: no implementation yet
+  AliPHOSReconstructioner() ; //ctor            
+  AliPHOSReconstructioner(const char * headreFile, const char * branchName = "Default",Bool_t toSplit = kFALSE) ;
+  AliPHOSReconstructioner(const AliPHOSReconstructioner & rec) {
+    // cpy ctor: 
     // requested by the Coding Convention
-    assert(0==1) ; 
+    abort() ; 
   }
    
-  ~AliPHOSReconstructioner(){} // dtor
-
-  AliPHOSClusterizer * GetClusterizer() { return fClusterizer ; }
-  void Init(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
-                         AliPHOSPID * Identifier) ;  
-  void MakePPSD(TClonesArray * DL, 
-               AliPHOSRecPoint::RecPointsList * emccl, 
-               AliPHOSRecPoint::RecPointsList * ppsdl, 
-               AliPHOSTrackSegment::TrackSegmentsList * trsl, 
-               AliPHOSRecParticle::RecParticlesList * rpl)    ; // does the job for EMC+PPSD
-  void MakeCPV (TClonesArray * DL, 
-               AliPHOSRecPoint::RecPointsList * emccl, 
-               AliPHOSRecPoint::RecPointsList * ppsdl) ;        // does the job for EMC+CPV
-
-  void SetDebugReconstruction(Bool_t deb) { fDebugReconstruction = deb; }
+  virtual ~AliPHOSReconstructioner() ;
+
+  virtual void Exec(Option_t * option) ;
+
+  AliPHOSDigitizer         * GetDigitizer()  const { return fDigitizer   ; }
+  AliPHOSClusterizer       * GetClusterizer()const { return fClusterizer ; }
+  AliPHOSPID               * GetPID()        const { return fPID;          }
+  AliPHOSTrackSegmentMaker * GetTSMaker()    const { return fTSMaker ;     }
+  AliPHOSSDigitizer        * GetSDigitizer() const { return fSDigitizer  ; }
+
+  void Print(Option_t * option)const ;
+  
+  //  void SetBranchTitle(const char* branch,const char * title) ;
+  //            // Sets the branch titles to separate different reconstruction flows 
+  //
+  //  void StartFrom(char * module = "SDigitizer",char * title = "Default") ;
+  //            // From wich step reconstruction begins, 
+  //            // title to be set to all reconstructed branches
 
   AliPHOSReconstructioner & operator = (const AliPHOSReconstructioner & rvalue)  {
     // assignement operator requested by coding convention but not needed
-    assert(0==1) ;
+    abort() ;
     return *this ; 
   }
   
 
+private:
+  void Init() ;  
+
 private:
   
-  Bool_t               fDebugReconstruction;      // For debuging of the Reconstruction procedure
-  AliPHOSClusterizer * fClusterizer ;             // Method for clusterization 
-  AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Method for track segments finding
-  AliPHOSPID * fPID ;                             // Method for identifying the type of particle
+  Bool_t   fToSplit ; 
+  TString  fHeaderFileName ;    // File with headers and gAlice
+  TString  fDigitsBranch ;      // Title of digits branch
+  TString  fRecPointBranch ;    // Title of RecPoints branch   
+  TString  fTSBranch  ;         // Title of TrackSegments branch
+  TString  fRecPartBranch ;     // Title of RecParticles branch 
+  TString  fSDigitsBranch ;     // Title of SDigits branch      
+
+
+  AliPHOSDigitizer         * fDigitizer ;   //! Pointer to AliPHOSDigitizer
+  AliPHOSClusterizer       * fClusterizer ; //! Pointer to AliPHOSClusterizer
+  AliPHOSPID               * fPID ;         //! Pointer to AliPHOSPID
+  AliPHOSTrackSegmentMaker * fTSMaker ;     //! Pointer to AliPHOSTrackSegmentMaker
+  AliPHOSSDigitizer        * fSDigitizer ;  //! Pointer to AliPHOSSDigitizer
+
+  Bool_t   fIsInitialized ; // kTRUE if reconstructioner is initialized
  
   ClassDef(AliPHOSReconstructioner,1)  // Reconstruction algorithm class (Base Class)