]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGetter.cxx
Neatening
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGetter.cxx
index 7613c400c68a1f04570509e7b56f10a2d9d60c1f..18cc5775d975c4ce6ede428862e945d6b4d50158 100644 (file)
 
 #include "TSystem.h"
 #include "TFile.h"
-// #include "TTree.h"
 #include "TROOT.h"
-// #include "TObjString.h"
-// #include "TFolder.h"
-// #include "TParticle.h"
+
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
-// #include "AliRun.h"
-// #include "AliConfig.h"
+
 #include "AliEMCALGetter.h"
 #include "AliEMCAL.h"
 #include "AliRunLoader.h"
@@ -114,6 +110,7 @@ AliEMCALGetter::~AliEMCALGetter()
 //____________________________________________________________________________ 
 AliEMCALClusterizer * AliEMCALGetter::Clusterizer()
 { 
+  // return pointer to Clusterizer Tree
   AliEMCALClusterizer * rv ; 
   rv =  dynamic_cast<AliEMCALClusterizer *>(EmcalLoader()->Reconstructioner()) ;
   if (!rv) {
@@ -125,7 +122,7 @@ AliEMCALClusterizer * AliEMCALGetter::Clusterizer()
 
 
 //____________________________________________________________________________ 
-TClonesArray * AliEMCALGetter::Digits() 
+TClonesArray * AliEMCALGetter::Digits() const  
 {
   // asks the Loader to return the Digits container 
 
@@ -142,6 +139,7 @@ TClonesArray * AliEMCALGetter::Digits()
 //____________________________________________________________________________ 
 AliEMCALDigitizer * AliEMCALGetter::Digitizer() 
 { 
+  // return pointer to Digitizer Tree
   AliEMCALDigitizer * rv ; 
   rv =  dynamic_cast<AliEMCALDigitizer *>(EmcalLoader()->Digitizer()) ;
   if (!rv) {
@@ -151,24 +149,8 @@ AliEMCALDigitizer * AliEMCALGetter::Digitizer()
   return rv ; 
 }
 
-
-//____________________________________________________________________________ 
-TObjArray * AliEMCALGetter::PRERecPoints() 
-{
-  // asks the Loader to return the EMC RecPoints container 
-
-  TObjArray * rv = 0 ; 
-  
-  rv = EmcalLoader()->PRERecPoints() ; 
-  if (!rv) {
-    EmcalLoader()->MakeRecPointsArray() ;
-    rv = EmcalLoader()->PRERecPoints() ; 
-  }
-  return rv ; 
-}
-
 //____________________________________________________________________________ 
-TObjArray * AliEMCALGetter::ECARecPoints() 
+TObjArray * AliEMCALGetter::ECARecPoints() const 
 {
   // asks the Loader to return the EMC RecPoints container 
 
@@ -183,22 +165,7 @@ TObjArray * AliEMCALGetter::ECARecPoints()
 }
 
 //____________________________________________________________________________ 
-TObjArray * AliEMCALGetter::HCARecPoints() 
-{
-  // asks the Loader to return the EMC RecPoints container 
-
-  TObjArray * rv = 0 ; 
-  
-  rv = EmcalLoader()->HCARecPoints() ; 
-  if (!rv) {
-    EmcalLoader()->MakeRecPointsArray() ;
-    rv = EmcalLoader()->HCARecPoints() ; 
-  }
-  return rv ; 
-}
-
-//____________________________________________________________________________ 
-TClonesArray * AliEMCALGetter::TrackSegments() 
+TClonesArray * AliEMCALGetter::TrackSegments() const 
 {
   // asks the Loader to return the TrackSegments container 
 
@@ -215,6 +182,7 @@ TClonesArray * AliEMCALGetter::TrackSegments()
 //____________________________________________________________________________ 
 AliEMCALTrackSegmentMaker * AliEMCALGetter::TrackSegmentMaker() 
 { 
+  // return pointer to TrackSegmentMaker Tree
   AliEMCALTrackSegmentMaker * rv ; 
   rv =  dynamic_cast<AliEMCALTrackSegmentMaker *>(EmcalLoader()->TrackSegmentMaker()) ;
   if (!rv) {
@@ -225,7 +193,7 @@ AliEMCALTrackSegmentMaker * AliEMCALGetter::TrackSegmentMaker()
 }
 
 //____________________________________________________________________________ 
-TClonesArray * AliEMCALGetter::RecParticles() 
+TClonesArray * AliEMCALGetter::RecParticles() const  
 {
   // asks the Loader to return the TrackSegments container 
 
@@ -289,9 +257,6 @@ void AliEMCALGetter::Event(const Int_t event, const char* opt)
 
   if( strstr(opt,"P") )
     ReadTreeP() ;
-
-//   if( strstr(opt,"Q") )
-//     ReadTreeQA() ;
  
 }
 
@@ -305,7 +270,7 @@ Int_t AliEMCALGetter::EventNumber() const
 }
 
 //____________________________________________________________________________ 
-  TClonesArray * AliEMCALGetter::Hits()  
+  TClonesArray * AliEMCALGetter::Hits() const   
 {
   // asks the loader to return  the Hits container 
   
@@ -325,8 +290,6 @@ AliEMCALGetter * AliEMCALGetter::Instance(const char* alirunFileName, const char
   // Creates and returns the pointer of the unique instance
   // Must be called only when the environment has changed
   
-  //::Info("Instance","alirunFileName=%s version=%s openingOption=%s",alirunFileName,version,openingOption);
-  
   if(!fgObjGetter){ // first time the getter is called 
     fgObjGetter = new AliEMCALGetter(alirunFileName, version, openingOption) ;
   }
@@ -406,6 +369,7 @@ AliEMCAL * AliEMCALGetter:: EMCAL() const
 //____________________________________________________________________________ 
 AliEMCALPID * AliEMCALGetter::PID() 
 { 
+  // return pointer to PID Tree
   AliEMCALPID * rv ; 
   rv =  dynamic_cast<AliEMCALPID *>(EmcalLoader()->PIDTask()) ;
   if (!rv) {
@@ -432,7 +396,7 @@ TClonesArray * AliEMCALGetter::Primaries()
   // creates the Primaries container if needed
   if ( !fPrimaries ) {
     if (fgDebug) 
-      Info("Primaries", "Creating a new TClonesArray for primaries") ; 
+      printf("Primaries: Creating a new TClonesArray for primaries") ; 
     fPrimaries = new TClonesArray("TParticle", 1000) ;
   } 
   return fPrimaries ; 
@@ -444,7 +408,7 @@ void  AliEMCALGetter::Print()
   // Print usefull information about the getter
     
   AliRunLoader * rl = AliRunLoader::GetRunLoader(fgEmcalLoader->GetTitle());
-  ::Info( "Print", "gAlice file is %s -- version name is %s", (rl->GetFileName()).Data(), rl->GetEventFolder()->GetName() ) ; 
+  printf("Print: gAlice file is %s -- version name is %s", (rl->GetFileName()).Data(), rl->GetEventFolder()->GetName() ) ; 
 }
 
 //____________________________________________________________________________ 
@@ -461,7 +425,7 @@ void AliEMCALGetter::ReadPrimaries()
   fNPrimaries = rl->Stack()->GetNtrack() ; 
 
   if (fgDebug) 
-    Info( "ReadTreeK", "Found %d particles in event # %d", fNPrimaries, EventNumber() ) ; 
+    printf("ReadTreeK: Found %d particles in event # %d", fNPrimaries, EventNumber() ) ; 
 
 
   // first time creates the container
@@ -565,7 +529,7 @@ Int_t AliEMCALGetter::ReadTreeS()
 }
 
 //____________________________________________________________________________ 
-TClonesArray * AliEMCALGetter::SDigits() 
+TClonesArray * AliEMCALGetter::SDigits() const  
 {
   // asks the Loader to return the Digits container 
 
@@ -582,6 +546,7 @@ TClonesArray * AliEMCALGetter::SDigits()
 //____________________________________________________________________________ 
 AliEMCALSDigitizer * AliEMCALGetter::SDigitizer() 
 { 
+  // return pointer to SDigitizer Tree
   AliEMCALSDigitizer * rv ; 
   rv =  dynamic_cast<AliEMCALSDigitizer *>(EmcalLoader()->SDigitizer()) ;
   if (!rv) {
@@ -633,6 +598,7 @@ void AliEMCALGetter::Track(const Int_t itrack)
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeD() const 
 {
+  // return pointer to Digits Tree
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeD() ; 
   if ( !rv ) {
@@ -646,6 +612,7 @@ TTree * AliEMCALGetter::TreeD() const
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeH() const 
 {
+  // return pointer to Hits Tree
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeH() ; 
   if ( !rv ) {
@@ -659,6 +626,8 @@ TTree * AliEMCALGetter::TreeH() const
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeR() const 
 {
+  // return pointer to RecPoints Tree
+
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeR() ; 
   if ( !rv ) {
@@ -671,7 +640,8 @@ TTree * AliEMCALGetter::TreeR() const
 
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeT() const 
-{
+{  
+  // return pointer to TrackSegments Tree
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeT() ; 
   if ( !rv ) {
@@ -684,6 +654,7 @@ TTree * AliEMCALGetter::TreeT() const
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeP() const 
 {
+  // return pointer to RecParticles Tree
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeP() ; 
   if ( !rv ) {
@@ -697,6 +668,7 @@ TTree * AliEMCALGetter::TreeP() const
 //____________________________________________________________________________ 
 TTree * AliEMCALGetter::TreeS() const 
 {
+  // return pointer to SDigits Tree
   TTree * rv = 0 ; 
   rv = EmcalLoader()->TreeS() ; 
   if ( !rv ) {