]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALLoader.h
Obsolete medium 609 commented out (I.Hrivnacova). Sum of G10 fractions normalized...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.h
index bbff9f0755cd43c0feedab6f39b82b18983e49e9..f047bcf55839f5e8566ed303c7b7bbaf5f8b0055 100644 (file)
@@ -25,26 +25,24 @@ class TParticle ;
 class TTask ;
 
 // --- Standard library ---
-#include <stdlib.h>
-#include <Riostream.h>
 
 // --- AliRoot header files ---
 
 #include "AliRun.h"
-#include "AliLoader.h"
 #include "AliRunLoader.h"
-#include "AliEMCAL.h" 
-#include "AliEMCALHit.h" 
 #include "AliEMCALDigit.h"
-#include "AliEMCALTowerRecPoint.h"
+#include "AliEMCALRecPoint.h"
 #include "AliEMCALTrackSegment.h"
-#include "AliEMCALRecParticle.h"
-class AliEMCALGeometry ;
-#include "AliEMCALDigitizer.h"
-#include "AliEMCALSDigitizer.h"
 #include "AliEMCALClusterizer.h"
-#include "AliEMCALTrackSegmentMaker.h"
+#include "AliEMCALTrackSegmentMaker.h" 
 #include "AliEMCALPID.h"
+class AliLoader ;
+class AliEMCAL ; 
+class AliEMCALHit ;
+class AliEMCALRecParticle ; 
+class AliEMCALGeometry ;
+class AliEMCALDigitizer ; 
+class AliEMCALSDigitizer ; 
 class AliEMCALCalibrationDB ;
 
 
@@ -61,7 +59,7 @@ class AliEMCALLoader : public AliLoader {
   virtual ~AliEMCALLoader() ; 
 
   // assignement operator requested by coding convention, but not needed
-  AliEMCALLoader & operator = (const AliEMCALLoader & ) {return *this;}
+  const AliEMCALLoader & operator = (const AliEMCALLoader & ) {return *this;}
 
   Int_t   GetEvent();//extends the method on EMCAL RecPart posting
   Int_t   SetEvent();//extends the method on EMCAL RecPart posting
@@ -98,8 +96,7 @@ class AliEMCALLoader : public AliLoader {
 //   Int_t   WriteRecParticles(Option_t* opt="");//writes the reconstructed particles
 //   Int_t   WritePID(Option_t* opt="");//writes the task for PID to file
 //   Bool_t  PostPID  (AliEMCALPID * pid) const {return kTRUE;}
-//  Bool_t  PostQA   (void) const ; //it was empty anyway
-  
+
 /*******************************************************************/
 /*******************************************************************/
 /*******************************************************************/
@@ -107,12 +104,10 @@ class AliEMCALLoader : public AliLoader {
   TObject** HitsRef(){return GetDetectorDataRef(Hits());}
   TObject** SDigitsRef(){return GetDetectorDataRef(SDigits());}
   TObject** DigitsRef(){return GetDetectorDataRef(Digits());}
-  TObject** PRERecPointsRef(){return GetDetectorDataRef(PRERecPoints());}
   TObject** ECARecPointsRef(){return GetDetectorDataRef(ECARecPoints());}
-  TObject** HCARecPointsRef(){return GetDetectorDataRef(HCARecPoints());}
   TObject** TracksRef(){return GetDetectorDataRef(TrackSegments());}
   TObject** RecParticlesRef(){return GetDetectorDataRef(RecParticles());}
-  TObject** AlarmsRef(){return GetDetectorDataRef(Alarms());}
+
   void   Track(Int_t itrack) ;
 
   static AliEMCALGeometry* GetEMCALGeometry();
@@ -124,9 +119,6 @@ class AliEMCALLoader : public AliLoader {
 
   const AliEMCAL *         EMCAL();
   const AliEMCALGeometry  *EMCALGeometry() ; 
-  // Alarms
-  // TFolder * Alarms() const { return (TFolder*)(ReturnO("Alarms", 0)); }
-  TObjArray *  Alarms();  
 
   /*********************************************/
   /************    TClonesArrays     ***********/
@@ -144,12 +136,8 @@ class AliEMCALLoader : public AliLoader {
   const AliEMCALDigit *  Digit(Int_t index);
   void MakeDigitsArray();
   /****  R e c P o i n t s  ****/
-  TObjArray * PRERecPoints();
   TObjArray * ECARecPoints();
-  TObjArray * HCARecPoints();
-  const AliEMCALRecPoint * PRERecPoint(Int_t index) ;
-  const AliEMCALTowerRecPoint * ECARecPoint(Int_t index) ;
-  const AliEMCALTowerRecPoint * HCARecPoint(Int_t index) ;
+  const AliEMCALRecPoint * ECARecPoint(Int_t index) ;
   void MakeRecPointsArray();
   /****   T r a c k S e g m e n t s ****/
   TClonesArray * TrackSegments();
@@ -164,24 +152,24 @@ class AliEMCALLoader : public AliLoader {
   /************    T A S K S      **************/
   /*********************************************/
   // 
-  //  AliEMCALSDigitizer*  EMCALSDigitizer(TString name = AliConfig::fgkDefaultEventFolderName);
+  //  AliEMCALSDigitizer*  EMCALSDigitizer(TString name = AliConfig::GetDefaultEventFolderName());
   //AliEMCALDigitizer*   EMCALDigitizer()  { return  dynamic_cast<AliEMCALDigitizer*>(Digitizer()) ;}
 
-  AliEMCALClusterizer* Clusterizer ()  {return dynamic_cast<AliEMCALClusterizer*>(Reconstructioner()) ;}
-  Int_t PostClusterizer(TTask* clust){return PostReconstructioner(clust);}
-  Int_t LoadClusterizer(Option_t * opt="") {return LoadReconstructioner(opt);}
-  Int_t WriteClusterizer(Option_t * opt="") {return WriteReconstructioner(opt);}
+  AliEMCALClusterizer* Clusterizer () const {return dynamic_cast<AliEMCALClusterizer*>(Reconstructioner()) ;}
+  Int_t PostClusterizer(TTask* clust) const {return PostReconstructioner(clust);}
+  Int_t LoadClusterizer(Option_t * opt="") const {return LoadReconstructioner(opt);}
+  Int_t WriteClusterizer(Option_t * opt="") const {return WriteReconstructioner(opt);}
 
-  AliEMCALPID * PID (){return dynamic_cast<AliEMCALPID*>(PIDTask()) ;}
-  Int_t PostPID(TTask* pid){return PostPIDTask(pid);}
-  Int_t LoadPID(Option_t * opt="") {return LoadPIDTask(opt);}
-  Int_t WritePID(Option_t * opt="") {return WritePIDTask(opt);}
+  AliEMCALPID * PID() const {return dynamic_cast<AliEMCALPID*>(PIDTask()) ;}
+  Int_t PostPID(TTask* pid) const {return PostPIDTask(pid);}
+  Int_t LoadPID(Option_t * opt="") const {return LoadPIDTask(opt);}
+  Int_t WritePID(Option_t * opt="") const {return WritePIDTask(opt);}
 
 
-  AliEMCALTrackSegmentMaker * TrackSegmentMaker ()  { return dynamic_cast<AliEMCALTrackSegmentMaker *>(Tracker()) ;}
-  Int_t PostTrackSegmentMaker(TTask* segmaker){return PostTracker(segmaker);}
-  Int_t LoadTrackSegmentMaker(Option_t * opt="") {return LoadTracker(opt);}
-  Int_t WriteTrackSegmentMaker(Option_t * opt="") {return WriteTracker(opt);}
+  AliEMCALTrackSegmentMaker * TrackSegmentMaker () const  { return dynamic_cast<AliEMCALTrackSegmentMaker *>(Tracker()) ;}
+  Int_t PostTrackSegmentMaker(TTask* segmaker) const {return PostTracker(segmaker);}
+  Int_t LoadTrackSegmentMaker(Option_t * opt="") const {return LoadTracker(opt);}
+  Int_t WriteTrackSegmentMaker(Option_t * opt="") const  {return WriteTracker(opt);}
 
   
   void   SetDebug(Int_t level) {fDebug = level;} // Set debug level
@@ -190,6 +178,17 @@ class AliEMCALLoader : public AliLoader {
   AliEMCALCalibrationDB * CalibrationDB(){return  fcdb; }
   //void ReadCalibrationDB(const char * name, const char * filename);
   
+
+  static TString HitsName() { return fgkHitsName ; }   //Name for TClonesArray with hits from one event
+  static TString SDigitsName() { return fgkSDigitsName ;} //Name for TClonesArray 
+  static TString DigitsName() { return fgkDigitsName ;} //Name for TClonesArray 
+  static TString ECARecPointsName() { return fgkECARecPointsName ;} //Name for TClonesArray y 
+  static TString TracksName() { return fgkTracksName ;} //Name for TClonesArray 
+  static TString RecParticlesName() { return fgkRecParticlesName ;} //Name for TClonesArray
+  static TString ECARecPointsBranchName() { return fgkECARecPointsBranchName ;} //Name for branch
+  static TString TrackSegmentsBranchName() { return fgkTrackSegmentsBranchName ;} //Name for branch
+  static TString RecParticlesBranchName() { return fgkRecParticlesBranchName ;} //Name for branch
+
 protected:
   TString fBranchTitle;            //Title of the branch
   Bool_t  fRecParticlesLoaded;     //Flag signing if Reconstructed Particles are loaded
@@ -205,28 +204,22 @@ private:
   Int_t ReadRecPoints();
   Int_t ReadTracks();
   Int_t ReadRecParticles();
-  
-  void  ReadTreeQA() ;
-  Int_t  fDebug ;             // Debug level
- public:
 
   static const TString fgkHitsName;//Name for TClonesArray with hits from one event
   static const TString fgkSDigitsName;//Name for TClonesArray 
   static const TString fgkDigitsName;//Name for TClonesArray 
-  static const TString fgkPRERecPointsName;//Name for TClonesArray 
   static const TString fgkECARecPointsName;//Name for TClonesArray 
-  static const TString fgkHCARecPointsName;//Name for TClonesArray 
   static const TString fgkTracksName;//Name for TClonesArray 
   static const TString fgkRecParticlesName;//Name for TClonesArray
 
-  static const TString fgkPRERecPointsBranchName;//Name for branch
   static const TString fgkECARecPointsBranchName;//Name for branch
-  static const TString fgkHCARecPointsBranchName;//Name for branch
   static const TString fgkTrackSegmentsBranchName;//Name for branch
   static const TString fgkRecParticlesBranchName;//Name for branch
+  Int_t  fDebug ;             // Debug level
+
   
-  ClassDef(AliEMCALLoader,3)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
+  ClassDef(AliEMCALLoader,4)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
 
 };
 
@@ -280,22 +273,6 @@ inline const AliEMCALDigit*  AliEMCALLoader::Digit(Int_t index)
 
 /******************************************************************************/
 
-inline TObjArray * AliEMCALLoader::PRERecPoints()
-{
- return dynamic_cast<TObjArray*>(GetDetectorData(fgkPRERecPointsName));
-}
-/******************************************************************************/
-
-inline const AliEMCALRecPoint * AliEMCALLoader::PRERecPoint(Int_t index)
-{
-  TObjArray* tcarr = PRERecPoints();
-  if (tcarr)
-    return dynamic_cast<const AliEMCALRecPoint*>(tcarr->At(index));
-  return 0x0; 
-}
-
-/******************************************************************************/
-
 inline TObjArray * AliEMCALLoader::ECARecPoints()
 {
  return dynamic_cast<TObjArray*>(GetDetectorData(fgkECARecPointsName));
@@ -303,28 +280,11 @@ inline TObjArray * AliEMCALLoader::ECARecPoints()
 
 /******************************************************************************/
 
-inline const AliEMCALTowerRecPoint * AliEMCALLoader::ECARecPoint(Int_t index)
+inline const AliEMCALRecPoint * AliEMCALLoader::ECARecPoint(Int_t index)
 {
   TObjArray* tcarr = ECARecPoints();
   if (tcarr)
-    return dynamic_cast<const AliEMCALTowerRecPoint*>(tcarr->At(index));
-  return 0x0; 
-}
-
-/******************************************************************************/
-
-inline TObjArray * AliEMCALLoader::HCARecPoints()
-{
- return dynamic_cast<TObjArray*>(GetDetectorData(fgkHCARecPointsName));
-}
-
-/******************************************************************************/
-
-inline const AliEMCALTowerRecPoint * AliEMCALLoader::HCARecPoint(Int_t index)
-{
-  TObjArray* tcarr = HCARecPoints();
-  if (tcarr)
-    return dynamic_cast<const AliEMCALTowerRecPoint*>(tcarr->At(index));
+    return dynamic_cast<const AliEMCALRecPoint*>(tcarr->At(index));
   return 0x0; 
 }
 
@@ -358,8 +318,5 @@ inline const AliEMCALRecParticle* AliEMCALLoader::RecParticle(Int_t index)
     return (const AliEMCALRecParticle*) tcarr->At(index);
   return 0x0;  
 }
-/******************************************************************************/
-inline TObjArray *  AliEMCALLoader::Alarms()
-{ return (TObjArray*)(GetQAFolder()->FindObject(fDetectorName));}
 
 #endif // AliEMCALLOADER_H