]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGetter.h
Corrected posting and cleaning of digitizers (T.Kuhr)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGetter.h
index 5810fafa9a0e906d37078b61f36544bb43aec21e..dddd0ae5eebe6c1b5698401f5bd47a3a36bfe9bc 100644 (file)
@@ -37,7 +37,6 @@ class AliEMCAL ;
 class AliEMCALGeometry ; 
 class AliEMCALClusterizer ; 
 class AliEMCALRecPoint ; 
-class AliEMCALTowerRecPoint ; 
 class AliEMCALTrackSegmentMaker ;
 class AliEMCALTrackSegment ; 
 class AliEMCALPID ; 
@@ -47,7 +46,8 @@ class AliEMCALBeamTestEvent ;
 class AliEMCALGetter : public TObject {
   
  public:  
-  AliEMCALGetter(){    // ctor: this is a singleton, the ctor should never be called but cint needs it as public
+  AliEMCALGetter() {    
+    // ctor: this is a singleton, the ctor should never be called but cint needs it as public
     Fatal("ctor", "AliEMCALGetter is a singleton default ctor not callable") ;
   } 
   AliEMCALGetter(const AliEMCALGetter & obj):TObject(obj) {
@@ -64,9 +64,12 @@ class AliEMCALGetter : public TObject {
   
   //=========== Instantiators ================
   static AliEMCALGetter * Instance(const char* headerFile,
-                                 const char* version = AliConfig::fgkDefaultEventFolderName,
+                                 const char* version = AliConfig::GetDefaultEventFolderName(),
                                  Option_t * openingOption = "READ" ) ; 
   static AliEMCALGetter * Instance() ; 
+  void   OpenFile(const char* headerFile,
+                 const char* version = AliConfig::GetDefaultEventFolderName(),
+                 Option_t * openingOption = "READ" );
 
   static void Print() ; 
   
@@ -94,9 +97,8 @@ class AliEMCALGetter : public TObject {
 
   //=========== Primaries ============
 //   TTree *           TreeK(TString filename="") ; 
-  TClonesArray *    Primaries(void)  ;
   TParticle * Primary(Int_t index) const ;
-  Int_t       NPrimaries()const { return fNPrimaries; }
+  Int_t       NPrimaries() const;
   TParticle * Secondary(const TParticle * p, Int_t index=1) const ;  
   
 //   //=========== Hits =================
@@ -133,7 +135,7 @@ class AliEMCALGetter : public TObject {
   
   //========== RecPoints =============
   TObjArray *             ECARecPoints() const;
-  AliEMCALTowerRecPoint * ECARecPoint(Int_t index) const{ return static_cast<AliEMCALTowerRecPoint *>(ECARecPoints()->At(index)) ;}    
+  AliEMCALRecPoint * ECARecPoint(Int_t index) const{ return static_cast<AliEMCALRecPoint *>(ECARecPoints()->At(index)) ;}    
   TTree *                 TreeR() const ;
   AliEMCALClusterizer *   Clusterizer()  ;
   TString                 GetRecPointsFileName() const { return EmcalLoader()->GetRecPointsFileName() ; } 
@@ -159,7 +161,7 @@ class AliEMCALGetter : public TObject {
   //========== RecParticles ===========
 
   TClonesArray *         RecParticles() const ;
-  AliEMCALRecParticle *   RecPaticles(Int_t index) const { return static_cast<AliEMCALRecParticle *>(RecParticles()->At(index)) ;} 
+  AliEMCALRecParticle *  RecParticle(Int_t index) const { return static_cast<AliEMCALRecParticle *>(RecParticles()->At(index)) ;} 
   TTree *               TreeP() const ;
   AliEMCALPID * PID() ;
   TString               GetRecParticlesFileName() const { return EmcalLoader()->GetRecParticlesFileName() ; } 
@@ -170,6 +172,8 @@ class AliEMCALGetter : public TObject {
   Int_t                 WritePID(Option_t* opt="") const {
     return  EmcalLoader()->WritePID(opt) ; }
 
+  //========== Raw ===========
+  Int_t ReadRaw(Int_t event) ; 
 
   void SetDebug(Int_t level) {fgDebug = level;} // Set debug level 
     void PostClusterizer(AliEMCALClusterizer * clu) 
@@ -184,14 +188,15 @@ class AliEMCALGetter : public TObject {
     const {EmcalLoader()->PostDigitizer(dynamic_cast<AliDigitizer *>(digitizer));}
 
   TString Version() const  { return EmcalLoader()->GetTitle() ; } 
-  AliEMCALLoader * EmcalLoader() const { return  fgEmcalLoader ; }
-  void Reset() {fgEmcalLoader = 0; fgObjGetter = 0; }
+  AliEMCALLoader * EmcalLoader() const { return fgEmcalLoader; }
+  void Reset() ;  
 
 private:
   
   AliEMCALGetter(const char* headerFile,
-               const char* version = AliConfig::fgkDefaultEventFolderName,
-               Option_t * openingOption = "READ") ;
+                const char* version = AliConfig::GetDefaultEventFolderName(),
+                Option_t * openingOption = "READ") ;
+
 
   Int_t ReadTreeD(void) ;
   Int_t ReadTreeH(void) ;
@@ -212,8 +217,7 @@ private:
   static Int_t          fgDebug ;             //! Debug level
 
   TString           fLoadingStatus ;     //! tells which trees are loaded
-  Int_t             fNPrimaries ;        //! # of primaries  
-  TClonesArray *    fPrimaries ;         //! list of lists of primaries
+  static TString           fVersion;            //! stores the current folder name
 
 //  AliEMCALCalibrationDB * fcdb ;       //!
    
@@ -223,7 +227,7 @@ private:
   enum EDataTypes{kHits,kSDigits,kDigits,kRecPoints,kTracks,kNDataTypes};
 
 
-  ClassDef(AliEMCALGetter,2)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
+  ClassDef(AliEMCALGetter,5)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
 
 };