]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
removed iostream
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Oct 2002 09:02:52 +0000 (09:02 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Oct 2002 09:02:52 +0000 (09:02 +0000)
49 files changed:
PHOS/AliPHOS.cxx
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSCalibrationDB.cxx
PHOS/AliPHOSClusterizer.cxx
PHOS/AliPHOSClusterizer.h
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv2.cxx
PHOS/AliPHOSConTableDB.cxx
PHOS/AliPHOSCpvRecPoint.cxx
PHOS/AliPHOSDebug.cxx
PHOS/AliPHOSDigit.cxx
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSEvalRecPoint.cxx
PHOS/AliPHOSFastRecParticle.cxx
PHOS/AliPHOSGeometry.cxx
PHOS/AliPHOSGetter.cxx
PHOS/AliPHOSGetter.h
PHOS/AliPHOSHit.cxx
PHOS/AliPHOSHit.h
PHOS/AliPHOSIhepAnalyze.cxx
PHOS/AliPHOSMemoryWatcher.cxx
PHOS/AliPHOSPID.cxx
PHOS/AliPHOSPIDv0.cxx
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSPpsdRecPoint.cxx
PHOS/AliPHOSQAAlarm.cxx
PHOS/AliPHOSQAChecker.cxx
PHOS/AliPHOSQAFloatCheckable.cxx
PHOS/AliPHOSQAIntCheckable.cxx
PHOS/AliPHOSQAMeanChecker.cxx
PHOS/AliPHOSQAObjectCheckable.cxx
PHOS/AliPHOSQAVirtualCheckable.cxx
PHOS/AliPHOSRaw2Digits.cxx
PHOS/AliPHOSRecCpvManager.cxx
PHOS/AliPHOSRecManager.cxx
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSRecPoint.cxx
PHOS/AliPHOSReconstructioner.cxx
PHOS/AliPHOSSDigitizer.cxx
PHOS/AliPHOSTrackSegment.cxx
PHOS/AliPHOSTrackSegmentMaker.cxx
PHOS/AliPHOSTrackSegmentMaker.h
PHOS/AliPHOSTrackSegmentMakerv1.cxx
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv1.cxx
PHOS/AliPHOSv3.cxx
PHOS/AliPHOSvFast.cxx
PHOS/PHOSHistos.cxx

index 2b1230cb2f755081f9fe5aef9d92a19b31c0b266..00178743a2ae91181078cd1d8e6e415fc27590b9 100644 (file)
@@ -32,7 +32,6 @@ class TFile;
 #include "TFolder.h" 
 
 // --- Standard library ---
-#include <strstream.h>
 
 // --- AliRoot header files ---
 #include "AliPHOS.h"
index 853ce1b29c0b0bf74f1111caa3f8142abcc056fe..e87192a6e669ec4a48c819969f2eebec2c26de76 100644 (file)
@@ -28,8 +28,7 @@
 //    Contamination(...) - calculates contamination of the photon spectrum and 
 //                         pobability of reconstruction of several primaries as 
 //                         kGAMMA,kELECTRON etc.
-//
-//    User Case:
+////    User Case:
 //    root [0] AliPHOSAnalyze * a = new AliPHOSAnalyze("galice.root")
 //                    // set the file you want to analyse
 //    root [1] a->DrawRecon(1,3)
@@ -77,8 +76,6 @@
 
 // --- Standard library ---
 
-#include <iomanip.h>
-
 // --- AliRoot header files ---
 
 #include "AliRun.h"
@@ -131,7 +128,7 @@ void AliPHOSAnalyze::DrawRecon(Int_t Nevent,Int_t Nmod,const char * branchName,c
   //========== Create ObjectGetter
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(ffileName.Data(),branchTitle) ;
   if(Nevent >= gAlice->TreeE()->GetEntries() ) {
-    cout << "There is no event " << Nevent << ", only " << gAlice->TreeE()->GetEntries() << "events available " <<endl ;
+    Error("DrawRecon", "There is no event %d only %d events available", Nevent, gAlice->TreeE()->GetEntries() ) ;
     return ;
   }
   const AliPHOSGeometry * phosgeom = gime->PHOSGeometry() ; 
@@ -236,10 +233,10 @@ void AliPHOSAnalyze::DrawRecon(Int_t Nevent,Int_t Nmod,const char * branchName,c
        }
       }
   }
-  cout << "Number of EMC + CPV SDigits per module: " <<endl ;
-  cout << nsdig[0] << " " << nsdig[1] << " " << nsdig[2] << " " << nsdig[3]<< " " << nsdig[4] << endl ;
-  cout << endl ;
-
+  TString message ; 
+  message  = "Number of EMC + CPV SDigits per module: \n" ;
+  message += "%d %d %d %d %d\n"; 
+  Info("DrawRecon", message.Data(), nsdig[0], nsdig[1], nsdig[2], nsdig[3], nsdig[4] ) ;
 
   //Plot digits
   Int_t iDigit ;
@@ -364,36 +361,46 @@ void AliPHOSAnalyze::Ls(){
   
   branches = gAlice->TreeS()->GetListOfBranches() ;
  
-  cout << "TreeS: " << endl ;
+  TString message ; 
+  message  = "TreeS:\n" ;
   for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
     TBranch * branch=(TBranch *) branches->At(ibranch) ;
-    if(strstr(branch->GetName(),"PHOS") )
-      cout << "       " << branch->GetName() << "     " << branch->GetTitle() << endl ;
+    if(strstr(branch->GetName(),"PHOS") ){
+      message += "       " ; 
+      message += branch->GetName() ; 
+      message += "     " ; 
+      message += branch->GetTitle() ;
+      message += "\n" ; 
+    }
   }
-  cout << endl ;
   branches = gAlice->TreeD()->GetListOfBranches() ;
   
-  cout << "TreeD: " << endl ;
+  message += "TreeD:\n" ;
   for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
     TBranch * branch=(TBranch *) branches->At(ibranch) ;
-    if(strstr(branch->GetName(),"PHOS") )
-      cout << "       " << branch->GetName() << "     " << branch->GetTitle() << endl ;
+    if(strstr(branch->GetName(),"PHOS") ) {
+      message += "       "; 
+      message += branch->GetName() ; 
+      message += "     " ; 
+      message += branch->GetTitle() ; 
+      message +="\n" ;
+    }
   }
-  cout << endl ;
   
-
   branches = gAlice->TreeR()->GetListOfBranches() ;
   
-  cout << "TreeR: " << endl ;
+  message += "TreeR: \n" ;
   for(ibranch = 0;ibranch <branches->GetEntries();ibranch++){
     TBranch * branch=(TBranch *) branches->At(ibranch) ;
-    if(strstr(branch->GetName(),"PHOS") )
-      cout << "       " << branch->GetName() << "     " << branch->GetTitle() << endl ;
+    if(strstr(branch->GetName(),"PHOS") ) {
+      message += "       " ; 
+      message += branch->GetName() ; 
+      message += "     " ;
+      message += branch->GetTitle() ; 
+      message += "\n" ;
+    }
   }
-  cout << endl ;
-
-
+  Info("LS", message.Data()) ;  
 }
 //____________________________________________________________________________
  void AliPHOSAnalyze::InvariantMass(const char* branchTitle)    
@@ -448,7 +455,7 @@ void AliPHOSAnalyze::Ls(){
     Int_t iRecParticle ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp){
-      cout << "AliPHOSAnalyze::InvariantMass --> Can't find RecParticles " << endl ;
+      Error("InvariantMass", "Can't find RecParticles") ; 
       return ;
     }
 
@@ -575,20 +582,17 @@ void AliPHOSAnalyze::Ls(){
     Int_t iRecParticle ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent 
-          << ",  Can't find RecParticles " << endl ;
+      Error("EnergyResolution", "Event %d,  Can't find RecParticles ", ievent) ;  
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent 
-          << ",  Can't find TrackSegments " << endl ;
+      Error("EnergyResolution", "Event %d,  Can't find TrackSegments", ievent) ;  
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      cout << "AliPHOSAnalyze::EnergyResolution --> Event " <<ievent 
-          << ",  Can't find EmcRecPoints " << endl ;
+      Error("EnergyResolution", "Event %d,  Can't find EmcRecPoints") ; 
       return ;
     }
       
@@ -710,20 +714,17 @@ void AliPHOSAnalyze::PositionResolution(const char * branchTitle)
     gime->Event(ievent) ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent 
-          << ",  Can't find RecParticles " << endl ;
+      Error("PositionResolution", "Event %d,  Can't find RecParticles", ievent) ;
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent 
-          << ",  Can't find TrackSegments " << endl ;
+      Error("PositionResolution", "Event %d,  Can't find TrackSegments", ievent) ;
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      cout << "AliPHOSAnalyze::PositionResolution --> Event " <<ievent 
-          << ",  Can't find EmcRecPoints " << endl ;
+      Error("PositionResolution", "Event %d,  Can't find EmcRecPoints", ievent) ;
       return ;
     }
     
@@ -921,20 +922,17 @@ void AliPHOSAnalyze::Contamination(const char* RecPointsTitle){
     
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent 
-          << ",  Can't find RecParticles " << endl ;
+      Error("Contamination", "Event %d,  Can't find RecParticles", ievent) ;
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent 
-          << ",  Can't find TrackSegments " << endl ;
+      Error("Contamination", "Event %d,  Can't find TrackSegments", ievent) ;
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      cout << "AliPHOSAnalyze::Contamination --> Event " <<ievent 
-          << ",  Can't find EmcRecPoints " << endl ;
+      Error("Contamination", "Event %d,  Can't find EmcRecPoints", ievent) ;
       return ;
     }
     
@@ -1114,45 +1112,49 @@ void AliPHOSAnalyze::Contamination(const char* RecPointsTitle){
   
   //print Final Table
   maxevent = (Int_t)gAlice->TreeE()->GetEntries() ; 
- //  cout << "Resolutions: Analyzed " << gime->MaxEvent() << " event(s)" << endl ;
 
-  cout << "Resolutions: Analyzed " << maxevent << " event(s)" << endl ;
-  cout << endl ;
-  
-  cout << "        Primary:    Photon  Neutron  Antineutron  Charged hadron   AntiProton" << endl ; 
-  cout << "--------------------------------------------------------------------------------" << endl ;
-  cout << "         kGAMMA: " 
-       << setw(8) << counter[2][0] << setw(9)  << counter[2][1] << setw(13) << counter[2][2] 
-       << setw(15)<< counter[2][3] << setw(13) << counter[2][4] << endl ;
-  cout << "       kGAMMAHA: " 
-       << setw(8) << counter[3][0] << setw(9)  << counter[3][1] << setw(13) << counter[3][2] 
-       << setw(15)<< counter[3][3] << setw(13) << counter[3][4] << endl ;
-  cout << "     kNEUTRALEM: " 
-       << setw(8) << counter[0][0] << setw(9)  << counter[0][1] << setw(13) << counter[0][2] 
-       << setw(15)<< counter[0][3] << setw(13) << counter[0][4] << endl ;
-  cout << "     kNEUTRALHA: " 
-       << setw(8) << counter[1][0] << setw(9)  << counter[1][1] << setw(13) << counter[1][2] 
-       << setw(15)<< counter[1][3] << setw(13) << counter[1][4] << endl ;
-  cout << "      kABSURDEM: " 
-       << setw(8) << counter[4][0] << setw(9)  << counter[4][1] << setw(13) << counter[4][2] 
-       << setw(15)<< counter[4][3] << setw(13) << counter[4][4] << endl ;
-  cout << "      kABSURDHA: " 
-       << setw(8) << counter[5][0] << setw(9)  << counter[5][1] << setw(13) << counter[5][2] 
-       << setw(15)<< counter[5][3] << setw(13) << counter[5][4] << endl ;
-  cout << "      kELECTRON: " 
-       << setw(8) << counter[6][0] << setw(9)  << counter[6][1] << setw(13) << counter[6][2] 
-       << setw(15)<< counter[6][3] << setw(13) << counter[6][4] << endl ; 
-  cout << "     kCHARGEDHA: " 
-       << setw(8) << counter[7][0] << setw(9)  << counter[7][1] << setw(13) << counter[7][2] 
-       << setw(15)<< counter[7][3] << setw(13) << counter[7][4] << endl ;
-  cout << "--------------------------------------------------------------------------------" << endl ;
-      
+  TString message ; 
+  message  = "Resolutions: Analyzed %d event(s)\n" ; 
+  message += "        Primary:    Photon  Neutron  Antineutron  Charged hadron   AntiProton\n" ; 
+  message += "--------------------------------------------------------------------------------\n" ;
+  message += "         kGAMMA: " ; 
+  message += "%d %d %d %d %d\n" ; 
+  message += "       kGAMMAHA: " ;
+  message += "%d %d %d %d %d\n" ; 
+  message += "     kNEUTRALEM: " ; 
+  message += "%d %d %d %d %d\n" ; 
+  message += "     kNEUTRALHA: " ; 
+  message += "%d %d %d %d %d\n" ;
+  message += "      kABSURDEM: ";
+  message += "%d %d %d %d %d\n" ;
+  message += "      kABSURDHA: " ;
+  message += "%d %d %d %d %d\n" ;
+  message += "      kELECTRON: " ;
+  message += "%d %d %d %d %d\n" ;
+  message += "     kCHARGEDHA: " ;  
+  message += "%d %d %d %d %d\n" ;
+   
+  message += "--------------------------------------------------------------------------------" ;
+
   Int_t totalInd = 0 ;
   for(i1 = 0; i1<8; i1++)
     for(i2 = 0; i2<5; i2++)
       totalInd+=counter[i1][i2] ;
-  cout << "Indentified particles: " << totalInd << endl ;
+  message += "Indentified particles: %d" ; 
   
+ Info("Contamination", message.Data(), maxevent, 
+      counter[2][0], counter[2][1], counter[2][2], counter[2][3], counter[2][4], 
+      counter[3][0], counter[3][1], counter[3][2], counter[3][3], counter[3][4], 
+      counter[0][0], counter[0][1], counter[0][2], counter[0][3], counter[0][4], 
+      counter[1][0], counter[1][1], counter[1][2], counter[1][3], counter[1][4], 
+      counter[4][0], counter[4][1], counter[4][2], counter[4][3], counter[4][4], 
+      counter[5][0], counter[5][1], counter[5][2], counter[5][3], counter[5][4], 
+      counter[6][0], counter[6][1], counter[6][2], counter[6][3], counter[6][4], 
+      counter[7][0], counter[7][1], counter[7][2], counter[7][3], counter[7][4], 
+      totalInd ) ;
+
 }
 
 
index 7c766ee4933583d7382502612a96cada7c1900d9..a988b0993f2b26be8f7d58e2398881cc75f815e1 100644 (file)
@@ -24,7 +24,6 @@
 // --- ROOT system ---
 #include "TFile.h"
 // --- Standard library ---
-#include <iostream.h>
 #include <fstream>
 
 // --- AliRoot header files ---
@@ -86,7 +85,7 @@ void  AliPHOSCalibrationDB::SetAll(Float_t pedestal, Float_t slope){
       fSlopes->AddAt(slope,i);
     }
   else
-    cout << "Please, create me with non-default constructor!" << endl;
+    Warning("SetAll", "Please, create me with non-default constructor!") ;
 }
 //____________________________________________________________________________
 void AliPHOSCalibrationDB::ReadCalibrationParameters(const char * filename, Option_t* opt){
@@ -94,7 +93,7 @@ void AliPHOSCalibrationDB::ReadCalibrationParameters(const char * filename, Opti
 
   if(strcmp(opt,"gains")==0){  //read gains
     if(!fctdb){
-      cout << "Specify Connections Table Database first" << endl ;
+      Error("ReadCalibrationParameters", "Specify Connections Table Database first") ;
       return ;
     }
     ifstream gainfile(filename) ; 
@@ -108,7 +107,7 @@ void AliPHOSCalibrationDB::ReadCalibrationParameters(const char * filename, Opti
   else
     if(strstr(opt,"pedest")){  //read pedestals
       if(!fctdb){
-       cout << "Specify Connections Table Database first" << endl ;
+       Error("ReadCalibrationParameters", "Specify Connections Table Database first") ;
        return ;
       }
       ifstream pfile(filename) ; 
@@ -120,9 +119,7 @@ void AliPHOSCalibrationDB::ReadCalibrationParameters(const char * filename, Opti
       pfile.close();
    }
    else{
-     cout << "Available options are " << endl ;
-     cout << " `gains' : to read gains " << endl ;
-     cout << " `pedestals : to read pedestals " << endl ;
+     Warning("ReadCalibrationParameters", "Available options are\n `gains' : to read gains\n `pedestals : to read pedestals ") ;
    }
 }
 //____________________________________________________________________________
index 214f6a787a9ef58acaa0cc6738e1af060fd6076f..4aadfa7a031259bcbf8ff18dea066ff7219ea1aa 100644 (file)
@@ -28,7 +28,6 @@
 #include "TTree.h"
 
 // --- Standard library ---
-#include <iostream.h>
 #include <stdlib.h>   
 
 // --- AliRoot header files ---
index 5cd8953610dc3f2cb3dabe17b85b58132cf09885..5e555d63b393dcae9a9e246f6a33fb78b0c6264a 100644 (file)
@@ -13,7 +13,6 @@
 #include "TTask.h" 
 
 // --- Standard library ---
-#include <iostream.h> 
 
 // --- AliRoot header files ---
 
@@ -27,31 +26,31 @@ public:
   AliPHOSClusterizer(const char * headerFile, const char * name, const Bool_t toSplit) ;
   virtual ~AliPHOSClusterizer() ; // dtor
 
-  virtual Float_t GetEmcClusteringThreshold()const {cout << "Not Defined" << endl ; return 0. ; }  
-  virtual Float_t GetEmcLocalMaxCut()const {cout << "Not Defined" << endl ; return 0. ; } 
-  virtual Float_t GetEmcLogWeight()const {cout << "Not Defined" << endl ; return 0. ; } 
-  virtual Float_t GetEmcTimeGate() const {cout << "Not Defined" << endl ; return 0. ; }  ;
-  virtual Float_t GetCpvClusteringThreshold()const {cout << "Not Defined" << endl ; return 0. ; } 
-  virtual Float_t GetCpvLocalMaxCut()const {cout << "Not Defined" << endl ; return 0. ; } 
-  virtual Float_t GetCpvLogWeight()const {cout << "Not Defined" << endl ; return 0. ; } 
-  virtual const char *  GetRecPointsBranch() const {cout << "Not Defined" << endl ; return 0 ; }  ;
-  virtual const Int_t GetRecPointsInRun()  const {cout << "Not Defined" << endl ; return 0 ; } 
-  virtual const char *  GetDigitsBranch() const{cout << "Not Defined" << endl ; return 0 ; }   ;
-
-  virtual void MakeClusters() {cout << "Not Defined" << endl ; } 
-  virtual void Print(Option_t * option)const {cout << "Not Defined" << endl ; } 
-
-  virtual void SetEmcClusteringThreshold(Float_t cluth) {cout << "Not Defined" << endl ; } 
-  virtual void SetEmcLocalMaxCut(Float_t cut) {cout << "Not Defined" << endl ; } 
-  virtual void SetEmcLogWeight(Float_t w) {cout << "Not Defined" << endl ; } 
-  virtual void SetEmcTimeGate(Float_t gate) {cout << "Not Defined" << endl ; } 
-  virtual void SetCpvClusteringThreshold(Float_t cluth) {cout << "Not Defined" << endl ; } 
-  virtual void SetCpvLocalMaxCut(Float_t cut) {cout << "Not Defined" << endl ; } 
-  virtual void SetCpvLogWeight(Float_t w) {cout << "Not Defined" << endl ;  } 
-  virtual void SetDigitsBranch(const char * title) {cout << "Not Defined" << endl ; }  
-  virtual void SetRecPointsBranch(const char *title) {cout << "Not Defined" << endl ; } 
-  virtual void SetUnfolding(Bool_t toUnfold ){cout << "Not Defined" << endl ;}  
-  virtual const char * Version() const {cout << "Not Defined" << endl ; return 0 ; }  
+  virtual Float_t GetEmcClusteringThreshold()const {Warning("GetEmcClusteringThreshold", "Not Defined" ) ; return 0. ; }  
+  virtual Float_t GetEmcLocalMaxCut()const {Warning("GetEmcLocalMaxCut", "Not Defined" ) ; return 0. ; } 
+  virtual Float_t GetEmcLogWeight()const {Warning("GetEmcLogWeight", "Not Defined" ) ; return 0. ; } 
+  virtual Float_t GetEmcTimeGate() const {Warning("GetEmcTimeGate", "Not Defined" ) ; return 0. ; }  ;
+  virtual Float_t GetCpvClusteringThreshold()const {Warning("GetCpvClusteringThreshold", "Not Defined" ) ; return 0. ; } 
+  virtual Float_t GetCpvLocalMaxCut()const {Warning("GetCpvLocalMaxCut", "Not Defined" ) ; return 0. ; } 
+  virtual Float_t GetCpvLogWeight()const {Warning("GetCpvLogWeight", "Not Defined" ) ; return 0. ; } 
+  virtual const char *  GetRecPointsBranch() const {Warning("GetRecPointsBranch", "Not Defined" ) ; return 0 ; }  ;
+  virtual const Int_t GetRecPointsInRun()  const {Warning("GetRecPointsInRun", "Not Defined" ) ; return 0 ; } 
+  virtual const char *  GetDigitsBranch() const{Warning("GetDigitsBranch", "Not Defined" ) ; return 0 ; }   ;
+
+  virtual void MakeClusters() {Warning("MakeClusters", "Not Defined" ) ; } 
+  virtual void Print(Option_t * option)const {Warning("Print", "Not Defined" ) ; } 
+
+  virtual void SetEmcClusteringThreshold(Float_t cluth) {Warning("SetEmcClusteringThreshold", "Not Defined" ) ; } 
+  virtual void SetEmcLocalMaxCut(Float_t cut) {Warning("SetEmcLocalMaxCut", "Not Defined" ) ; } 
+  virtual void SetEmcLogWeight(Float_t w) {Warning("SetEmcLogWeight", "Not Defined" ) ; } 
+  virtual void SetEmcTimeGate(Float_t gate) {Warning("SetEmcTimeGate", "Not Defined" ) ; } 
+  virtual void SetCpvClusteringThreshold(Float_t cluth) {Warning("SetCpvClusteringThreshold", "Not Defined" ) ; } 
+  virtual void SetCpvLocalMaxCut(Float_t cut) {Warning("SetCpvLocalMaxCut", "Not Defined" ) ; } 
+  virtual void SetCpvLogWeight(Float_t w) {Warning("SetCpvLogWeight", "Not Defined" ) ;  } 
+  virtual void SetDigitsBranch(const char * title) {Warning("SetDigitsBranch", "Not Defined" ) ; }  
+  virtual void SetRecPointsBranch(const char *title) {Warning("SetRecPointsBranch", "Not Defined" ) ; } 
+  virtual void SetUnfolding(Bool_t toUnfold ){Warning("SetUnfolding", "Not Defined" ) ;}  
+  virtual const char * Version() const {Warning("Version", "Not Defined" ) ; return 0 ; }  
 
 protected:
 
index 7b46e720d4af94dafeb4e456accc88204e8f8d27..ec168fd5c6dc9227b4e42b83cdafe339192a4e05 100644 (file)
@@ -68,9 +68,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-#include <iomanip.h>
-
 // --- AliRoot header files ---
 #include "AliPHOSCalibrationDB.h"
 #include "AliPHOSClusterizerv1.h"
@@ -180,12 +177,10 @@ void AliPHOSClusterizerv1::Exec(Option_t * option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSClusterizer");
-    cout << "AliPHOSClusterizer:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSClusterizer") << " seconds for Clusterizing " 
-        <<  gBenchmark->GetCpuTime("PHOSClusterizer")/nevents << " seconds per event " << endl ;
-    cout << endl ;
+    Info("Exec", "  took %f seconds for Clusterizing %f seconds per event \n",
+        gBenchmark->GetCpuTime("PHOSClusterizer"), 
+        gBenchmark->GetCpuTime("PHOSClusterizer")/nevents ) ; 
   }
-  
 }
 
 //____________________________________________________________________________
@@ -236,19 +231,19 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit **
     gMinuit->mnparm(index, "x",  x, 0.1, 0, 0, ierflg) ;
     index++ ;   
     if(ierflg != 0){ 
-      cout << "PHOS Unfolding>  Unable to set initial value for fit procedure : x = " << x << endl ;
+      Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : x = %f\n", x ) ;
       return kFALSE;
     }
     gMinuit->mnparm(index, "z",  z, 0.1, 0, 0, ierflg) ;
     index++ ;   
     if(ierflg != 0){
-      cout << "PHOS Unfolding>  Unable to set initial value for fit procedure : z = " << z << endl ;
+       Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : z =%f\n", z ) ;
       return kFALSE;
     }
     gMinuit->mnparm(index, "Energy",  energy , 0.05*energy, 0., 4.*energy, ierflg) ;
     index++ ;   
     if(ierflg != 0){
-      cout << "PHOS Unfolding>  Unable to set initial value for fit procedure : energy = " << energy << endl ;      
+      Warning("FindFit", "PHOS Unfolding unable to set initial value for fit procedure : energy = %f\n", energy ) ;      
       return kFALSE;
     }
   }
@@ -266,7 +261,7 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit **
   gMinuit->mnexcm("MIGRAD", &p0, 0, ierflg) ;    // minimize 
 
   if(ierflg == 4){  // Minimum not found   
-    cout << "PHOS Unfolding>  Fit not converged, cluster abandoned "<< endl ;      
+    Warning("FindFit", "PHOS Unfolding fit not converged, cluster abandoned\n" );      
     return kFALSE ;
   }            
   for(index = 0; index < nPar; index++){
@@ -315,7 +310,7 @@ void AliPHOSClusterizerv1::Init()
 
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(),branchname.Data(), fToSplit ) ; 
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSClusterizerv1::Init -> Could not obtain the Getter object !" << endl ; 
+    Error("Init", "Could not obtain the Getter object !") ;  
     return ;
   } 
 
@@ -559,8 +554,7 @@ void AliPHOSClusterizerv1::MakeClusters()
   
   TClonesArray * digits = gime->Digits() ; 
    if ( !digits ) {
-    cerr << "ERROR:  AliPHOSClusterizerv1::MakeClusters -> Digits with name " 
-        << GetName() << " not found ! " << endl ; 
+    Error("MakeClusters", "Digits with name %s not found !") ; 
     abort() ; 
   } 
   TClonesArray * digitsC =  (TClonesArray*)digits->Clone() ;
@@ -974,35 +968,45 @@ void AliPHOSClusterizerv1::Print(Option_t * option)const
 {
   // Print clusterizer parameters
 
-  if( strcmp(GetName(), "") !=0 ){
-    
+  TString message ; 
+  TString taskName(GetName()) ; 
+  taskName.ReplaceAll(Version(), "") ;
+  
+  if( strcmp(GetName(), "") !=0 ) {  
     // Print parameters
-    TString taskName(GetName()) ; 
-    taskName.ReplaceAll(Version(), "") ;
-
-    cout << "---------------"<< taskName.Data() << " " << GetTitle()<< "-----------" << endl 
-        << "Clusterizing digits from the file: " << taskName.Data() << endl 
-        << "                           Branch: " << GetName() << endl 
-        << endl 
-        << "                       EMC Clustering threshold = " << fEmcClusteringThreshold << endl
-        << "                       EMC Local Maximum cut    = " << fEmcLocMaxCut << endl
-        << "                       EMC Logarothmic weight   = " << fW0 << endl
-        << endl
-        << "                       CPV Clustering threshold = " << fCpvClusteringThreshold << endl
-        << "                       CPV Local Maximum cut    = " << fCpvLocMaxCut << endl
-       << "                       CPV Logarothmic weight   = " << fW0CPV << endl
-        << endl ;
+    message  = "\n--------------- %s %s -----------\n" ; 
+    message += "Clusterizing digits from the file: %s\n" ;
+    message += "                           Branch: %s\n" ; 
+    message += "                       EMC Clustering threshold = %f\n" ; 
+    message += "                       EMC Local Maximum cut    = %f\n" ; 
+    message += "                       EMC Logarothmic weight   = %f\n" ;
+    message += "                       CPV Clustering threshold = %f\n" ;
+    message += "                       CPV Local Maximum cut    = %f\n" ;
+    message += "                       CPV Logarothmic weight   = %f\n" ;
     if(fToUnfold)
-      cout << " Unfolding on " << endl ;
+      message += " Unfolding on\n" ;
     else
-      cout << " Unfolding off " << endl ;
+      message += " Unfolding off\n" ;
     
-    cout << "------------------------------------------------------------------" <<endl ;
+    message += "------------------------------------------------------------------" ;
   }
-  else
-    cout << " AliPHOSClusterizerv1 not initialized " << endl ;
+  else 
+    message = " AliPHOSClusterizerv1 not initialized " ;
+  
+  Info("Print", message.Data(),  
+       taskName.Data(), 
+       GetTitle(),
+       taskName.Data(), 
+       GetName(), 
+       fEmcClusteringThreshold, 
+       fEmcLocMaxCut, 
+       fW0, 
+       fCpvClusteringThreshold, 
+       fCpvLocMaxCut, 
+       fW0CPV ) ; 
 }
+
+
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
 {
@@ -1011,17 +1015,21 @@ void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
   TObjArray * emcRecPoints = AliPHOSGetter::GetInstance()->EmcRecPoints(BranchName()) ; 
   TObjArray * cpvRecPoints = AliPHOSGetter::GetInstance()->CpvRecPoints(BranchName()) ; 
 
-  cout << "AliPHOSClusterizerv1: : event "<<gAlice->GetEvNumber() << endl ;
-  cout << "       Found "<< emcRecPoints->GetEntriesFast() << " EMC Rec Points and " 
-          << cpvRecPoints->GetEntriesFast() << " CPV RecPoints" << endl ;
-
+  TString message ; 
+  message  = "event %d\n" ;
+  message += "       Found %d EMC RecPoints and %d CPV RecPoints \n" ; 
+  Info("PrintRecPoints", message.Data(),
+       gAlice->GetEvNumber(),
+       emcRecPoints->GetEntriesFast(),
+       cpvRecPoints->GetEntriesFast() ) ; 
+  
   fRecPointsInRun +=  emcRecPoints->GetEntriesFast() ; 
   fRecPointsInRun +=  cpvRecPoints->GetEntriesFast() ; 
-
+  
   if(strstr(option,"all")) {
-    cout << "EMC clusters " << endl ;
-    cout << " Index  Ene(MeV)   Multi  Module     X      Y      Z    Lambda 1   Lambda 2  # of prim  Primaries list "      <<  endl;      
-    
+    message  = "EMC clusters " ;
+    message += " Index  Ene(MeV)   Multi  Module     X      Y      Z    Lambda 1   Lambda 2  # of prim  Primaries list " ; 
+    Info("PrintRecPoints", message.Data() ) ; 
     Int_t index ;
     for (index = 0 ; index < emcRecPoints->GetEntries() ; index++) {
       AliPHOSEmcRecPoint * rp = (AliPHOSEmcRecPoint * )emcRecPoints->At(index) ; 
@@ -1032,57 +1040,52 @@ void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
       Int_t * primaries; 
       Int_t nprimaries;
       primaries = rp->GetPrimaries(nprimaries);
-
-      cout << setw(4) << rp->GetIndexInList() << "   " 
-          << setw(7) << setprecision(3) << rp->GetEnergy() << "           " 
-          << setw(3) <<         rp->GetMultiplicity() << "  " 
-          << setw(1) <<              rp->GetPHOSMod() << "  " 
-          << setw(6) << setprecision(2) << locpos.X() << "  " 
-          << setw(6) << setprecision(2) << locpos.Y() << "  " 
-          << setw(6) << setprecision(2) << locpos.Z() << "  "
-          << setw(4) << setprecision(2) << lambda[0]  << "  "
-          << setw(4) << setprecision(2) << lambda[1]  << "  "
-          << setw(2) << nprimaries << "  " ;
+      message = "    %d       %f  %d      %f      %f      %f     %f    %f  %d\n" ; 
+      Info("PrintRecPoints", message.Data(), 
+          rp->GetIndexInList(),  
+          rp->GetEnergy(), 
+          rp->GetMultiplicity(),  
+          rp->GetPHOSMod(),  
+          locpos.X(),  
+          locpos.Y(),  
+          locpos.Z(), 
+          lambda[0], 
+          lambda[1], 
+          nprimaries ) ;
      
-      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
-       cout << setw(4) <<   primaries[iprimary] << "  "  ;
-      cout << endl ;    
+      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++) {
+       message = "    %d" ; 
+       Info("PrintRecPoints", message.Data(), primaries[iprimary] ) ;
+      }
     }
-
-    //Now plot CPV recPoints
-    cout << "EMC clusters " << endl ;
-    cout << "  Index    " 
-        << "  Multi    "
-        << "  Module   "  
-        << "    X      "
-        << "    Y      "
-        << "    Z      "
-        << " # of prim "
-        << " Primaries list "      <<  endl;      
     
+    //Now plot CPV recPoints
+    message = "EMC clusters   Index      Multi      Module       X          Y          Z       # of prim  Primaries list \n" ;      
+    Info("PrintRecPoints", message.Data() ) ; 
     for (index = 0 ; index < cpvRecPoints->GetEntries() ; index++) {
       AliPHOSRecPoint * rp = (AliPHOSRecPoint * )cpvRecPoints->At(index) ; 
-      cout << setw(6) << rp->GetIndexInList() << "     ";
-      cout << setw(6) << rp->GetPHOSMod()     << "        CPV     ";
-      
       TVector3  locpos;  
       rp->GetLocalPosition(locpos);
-      cout << setw(6) <<  locpos.X()          << "     ";
-      cout << setw(6) <<  locpos.Y()          << "     ";
-      cout << setw(6) <<  locpos.Z()          << "     ";
-      
+  
       Int_t * primaries; 
       Int_t nprimaries ; 
+     
+      message = "      %d      %d    CPV      %f      %f      %f       %d" ; 
+      Info("PrintRecPoints", message.Data(), 
+          rp->GetIndexInList(), 
+          rp->GetPHOSMod(), 
+          locpos.X(), 
+          locpos.Y(), 
+          locpos.Z(), 
+          nprimaries) ; 
       primaries = rp->GetPrimaries(nprimaries);
-      cout << setw(6) <<    nprimaries         << "     ";
-
-      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
-       cout << setw(4)  <<  primaries[iprimary] << " ";
-      cout << endl;     
+      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++) {
+       message = "    %d " ; 
+       Info("PrintRecPoints", message.Data(), primaries[iprimary] ) ;
+      }
     }
-
-
-    cout << "-----------------------------------------------------------------------"<<endl ;
   }
 }
 
index 5f95bd0d54bd98ab34c0b9df0ccfb60fa8fee923..7fa234aebdc580fda8a685c14e0cd7ff070e5a81 100644 (file)
@@ -3,8 +3,6 @@
 #include "TROOT.h"
 
 // --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
 
 // --- AliRoot header files ---
 #include "AliPHOSClusterizerv2.h"
@@ -62,9 +60,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 //      if(!ReadDigits(ievent))  //reads digits for event fEvent
 //        continue;
     
-    cout<<" MakeClusters invoked..";
+    Info("Exec", "MakeClusters invoked..") ;
     MakeClusters() ;
-    cout<<" done."<<endl;
+    Info("Exec", "MakeClusters done.") ;
 
 
     //SmartRecPoints will communicate with wPool.
@@ -102,8 +100,8 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     wPoolF->Remove(recCpv);
     delete recCpv;
 
-    cout<<"       "<<gime->CpvRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+    Info("Exec", "       %d", gime->CpvRecPoints()->GetEntries() ) ;
+    Info("Exec", "       %d cpvRecPoints", cpvRecPoints->GetEntries() ) ;
 
 
     // Now Emc reconstruction
@@ -132,13 +130,20 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     wPoolF->Remove(recEmc);
     delete recEmc;
 
-    cout<<"       "<<nOldCpv<<" OLD cpvRecPoints."<<endl;
-    cout<<"       "<<gime->CpvRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+    TString message ; 
+    message  = "       %d  OLD cpvRecPoints\n" ; 
+    message += "       %d\n" ; 
+    message += "       %d cpvRecPoints\n" ; 
 
-    cout<<"       "<<nOldEmc<<" OLD emcRecPoints."<<endl;
-    cout<<"       "<<gime->EmcRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<emcRecPoints->GetEntries()<<" emcRecPoints."<<endl<<endl;
+    message += "       %d OLD emcRecPoints " ; 
+    message += "       %d\n" ;
+    message += "       %d emcRecPoints\n" ;
+
+    Info("Exec", message.Data(), 
+        nOldCpv, 
+        gime->CpvRecPoints()->GetEntries(),cpvRecPoints->GetEntries(), 
+        nOldEmc, 
+        gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ) ; 
 
     WriteRecPoints(ievent);
 
@@ -147,12 +152,8 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 
   if(strstr(option,"tim")) {
     gBenchmark->Stop("PHOSClusterizer");
-    cout << "AliPHOSClusterizer:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSClusterizer") << " seconds for Clusterizing " << endl;
-    cout << endl ;
-
+    Info("Exec","took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") ) ;
   }
-
 }
 //---------------------------------------------------------------------------------
 Int_t AliPHOSClusterizerv2::AreNeighbours(AliPHOSDigit* d1, AliPHOSDigit* d2) const
index c6dd74e780b619b54ee7656937828a1e1ee62b09..2011f94ce98ab7a83d406cf6f8934e07446f6155 100644 (file)
@@ -26,7 +26,7 @@
 #include "TH2S.h"
 
 // --- Standard library ---
-#include <iostream.h>
+
 // --- AliRoot header files ---
 #include "AliPHOSGeometry.h"
 #include "AliPHOSConTableDB.h"
@@ -73,8 +73,7 @@ void  AliPHOSConTableDB::BuildDB(void)
   //assuming, that prototype is centered in the third module of the PHOS
   fNcrInProto =fProtoRaws*fProtoColumns ;
   if(!fNcrInProto){
-    cout << "configuratio of prototype is not known!!!" << endl ;
-    cout << "specify number of raws and columns in prototype" << endl ;
+    Error("BuildDB", "configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype") ;
     return ;
   }
   fRawOffset = (fGeom->GetNPhi() - fProtoRaws)/2 ;
@@ -148,17 +147,23 @@ Int_t AliPHOSConTableDB::Raw2AbsId(Int_t rawId){
 //____________________________________________________________________________ 
 void AliPHOSConTableDB::Print(Option_t * option)const {
 
-  cout << GetName() <<  " " << GetTitle() << endl ;
-  cout << "PHOS Geometry configured for " ; 
+  TString message ; 
+  message  = " %s %s\n" ;
+  message += "PHOS Geometry configured for " ; 
   if(fGeom)
-    cout << fGeom->GetName() << " " << fGeom->GetTitle() <<  endl ;
+    message += "%s %s \n" ;
   else
-    cout << " null " << endl ;
-  cout << "-------Prototype parameters--------" << endl ;
-  cout << "    number of columns: " << fProtoColumns << endl ;
-  cout << "    number of raws:    " << fProtoRaws << endl ;
-  cout << "    centered in third PHOS module with offsets: " <<endl ;
-  cout << "    raw: " << fRawOffset << " of " << fGeom->GetNPhi() << endl ;
-  cout << "    col: " << fColOffset << " of " << fGeom->GetNZ() << endl ;
-  cout << "------------------------------------" << endl ;
+    message += " null \n"  ;
+
+  Info("Print", message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() ) ; 
+
+  message  = "-------Prototype parameters--------\n" ;
+  message += "    number of columns: %d" ; 
+  message += "    number of raws:    %d" ;
+  message += "    centered in third PHOS module with offsets: " ;
+  message += "    raw: %d of %d\n" ;
+  message += "    col: %d of %d\n" ; 
+  message += "------------------------------------" ;
+
+  Info("Print", message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() );   
 }
index d5acafb9d7c6424fd2b73eff9acade5b76f00695..0aa12cb5cb76ae633e48220f89c6cacf94214512 100644 (file)
@@ -31,8 +31,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h> 
-
 // --- AliRoot header files ---
 
 #include "AliPHOSCpvRecPoint.h"
@@ -285,8 +283,8 @@ void AliPHOSCpvRecPoint::EvalLocalPosition(Float_t logWeight,TClonesArray * digi
   } else {
     x = -1e6 ;
     z = -1e6 ;
-    if (fMulDigit != 0) cout << "AliPHOSCpvRecPoint: too low log weight factor "
-                            << "to evaluate cluster's center\n";
+    if (fMulDigit != 0) 
+      Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
   }
   fLocPos.SetX(x)  ;
   fLocPos.SetY(0.) ;
@@ -349,22 +347,24 @@ void AliPHOSCpvRecPoint::Print(Option_t * option)
 {
   // Print the list of digits belonging to the cluster
   
-  cout << "AliPHOSCpvRecPoint: " << endl ;
-
+  TString message ; 
+  message  =  "AliPHOSCpvRecPoint: " ;
+  message +=  "Digits #   " ;
+  Info("Print", message.Data()) ; 
+  
   Int_t iDigit;
 
-  cout << "Digits #   "  ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    cout << fDigitsList[iDigit] << "  "  ; 
-  cout << endl ;
+    Info("Print", " %d ", fDigitsList[iDigit]) ; 
 
-  cout << "Energies: "  ;
+  Info("Print", "Energies: ")  ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    cout << fEnergyList[iDigit] << "  "  ; 
-  cout << endl ;
+    Info("Print", " %f ", fEnergyList[iDigit]) ; 
   
-  cout << "       Multiplicity    = " << fMulDigit  << endl ;
-  cout << "       Cluster Energy  = " << fAmp << endl ;
-  cout << "       Stored at position " << GetIndexInList() << endl ; 
+  message  = "       Multiplicity    = %d\n" ;
+  message += "       Cluster Energy  = %f\n" ;
+  message += "       Stored at position %d\n" ; 
  
+  Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ; 
+
 }
index 8f7ac77b6b8875b2cfdb34f37946b1b982ddae31..ba2a678079afe9e9fc605746d8c28fa82443b0d5 100644 (file)
@@ -127,9 +127,9 @@ AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *nam
   AliPHOSGeometry::GetInstance(title, "") ; 
 
   if (GetGeometry()->IsInitialized() ) 
-    cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << GetGeometry()->GetName() << endl ;
+    Info("AliPHOSv1", "AliPHOS %d : PHOS geometry intialized for %s", Version(), GetGeometry()->GetName() );
   else
-    cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;   
+    Info("AliPHOSv1", "AliPHOS %d : PHOS geometry initialization failed !", Version() ) ;   
 
   // Defining the PHOS Reconstructioner
  
@@ -289,7 +289,7 @@ void AliPHOSv1::SDigits2Digits()
 
   //we assume, that there is al least one EMC digit...
   if(fSDigits->GetEntries() == 0) {
-    cout << "PHOS::SDigits2Digits>  No SDigits !!! Do not produce Digits " << endl ;
+    Warning("SDigits2Digits", "No SDigits !!! Do not produce Digits ") ;
     return ;
   }
 
@@ -722,8 +722,6 @@ void AliPHOSv1::CPVDigitize (TLorentzVector p, Float_t *zxhit, Int_t moduleNumbe
   Float_t pNorm = p.Py();
   Float_t eloss = kdEdx;
 
-//    cout << "CPVDigitize: YVK : "<<hitX<<" "<<hitZ<<" | "<<pX<<" "<<pZ<<" "<<pNorm<<endl;
-
   Float_t dZY   = pZ/pNorm * GetGeometry()->GetCPVGasThickness();
   Float_t dXY   = pX/pNorm * GetGeometry()->GetCPVGasThickness();
   gRandom->Rannor(rnor1,rnor2);
index dd21e8089840efa78d72a0406c2a059fe925f652..6e69b62886e9c46151bdcea11f204668c1a722ea 100644 (file)
@@ -28,8 +28,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSDigit.h"
@@ -178,7 +176,7 @@ AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
       fPrimary[fNprimary] = (digit.fPrimary)[index] ; 
       fNprimary++ ;
       if(fNprimary>fNMaxPrimary) {
-       cout << "AliPHOSDigit >> Increase NMaxPrimary "<< endl ;
+       Error("Operator +", "Increase NMaxPrimary") ;
        return *this ;
       }
     }
@@ -192,11 +190,12 @@ ostream& operator << ( ostream& out , const AliPHOSDigit & digit)
 {
   // Prints the data of the digit
   
-  out << "ID " << digit.fId << " Energy = " << digit.fAmp << " Time = " << digit.fTime << endl ; 
-  Int_t i ;
-  for(i=0;i<digit.fNprimary;i++)
-    out << "Primary " << i+1 << " = " << digit.fPrimary[i] << endl ;
-  out << "Position in list = " << digit.fIndexInList << endl ; 
+//   out << "ID " << digit.fId << " Energy = " << digit.fAmp << " Time = " << digit.fTime << endl ; 
+//   Int_t i ;
+//   for(i=0;i<digit.fNprimary;i++)
+//     out << "Primary " << i+1 << " = " << digit.fPrimary[i] << endl ;
+//   out << "Position in list = " << digit.fIndexInList << endl ; 
+  digit.Warning("operator <<", "Implement differently") ; 
   return out ;
 }
 
index 43b9a6342aed118c45c471f1aca9e88fd9b11c71..6c31a9665efc50e74682451b256671b020b8d9ee 100644 (file)
@@ -65,7 +65,6 @@
 #include "TBenchmark.h"
 
 // --- Standard library ---
-#include <iomanip.h>
 
 // --- AliRoot header files ---
 #include "AliRun.h"
@@ -166,7 +165,7 @@ void AliPHOSDigitizer::Digitize(const Int_t event)
   // get first the sdigitizer from the tasks list (must have same name as the digitizer)
   const AliPHOSSDigitizer * sDigitizer = gime->SDigitizer(GetName()); 
   if ( !sDigitizer) {
-    cerr << "ERROR: AliPHOSDigitizer::Digitize -> SDigitizer with name " << GetName() << " not found " << endl ; 
+    Error("Digitize", "SDigitizer with name %s not found", GetName() ) ; 
     abort() ; 
   }
     
@@ -181,8 +180,7 @@ void AliPHOSDigitizer::Digitize(const Int_t event)
     if ( (sdigits = (TClonesArray*)folder->FindObject(GetName()) ) ) {
       TString fileName(folder->GetName()) ;
       fileName.ReplaceAll("_","/") ;
-//       cout << "INFO: AliPHOSDigitizer::Digitize -> Adding SDigits " 
-//        << GetName() << " from " << fileName << endl ; 
+//       Info("Digitize", "Adding SDigits %s from %s", GetName(), fileName() ) ;  
       sdigArray->AddAt(sdigits, input) ;
       input++ ;
     }
@@ -416,13 +414,11 @@ void AliPHOSDigitizer::Exec(Option_t *option)
       }
       
       if ( phosfound ) {
-       cerr << "WARNING: AliPHOSDigitizer -> Digits branch with name " << GetName() 
-            << " already exits" << endl ;
+       Error("Exec", "Digits branch with name %s already exists", GetName() ) ;
        return ; 
       }   
       if ( digitizerfound ) {
-       cerr << "WARNING: AliPHOSDigitizer -> Digitizer branch with name " << GetName() 
-            << " already exits" << endl ;
+       Error("Exec", "Digitizer branch with name %s already exists", GetName() );
        return ; 
       }
     }   
@@ -443,7 +439,7 @@ void AliPHOSDigitizer::Exec(Option_t *option)
       for(input = 0 ; input < fManager->GetNinputs(); input ++){
        TTree * treeS = fManager->GetInputTreeS(input) ;
        if(!treeS){
-         cerr << "AliPHOSDigitizer::Exec -> No Input " << endl ;
+         Error("Exec", "No Input") ;  
          return ;
        }
        gime->ReadTreeS(treeS,input) ;
@@ -466,12 +462,12 @@ void AliPHOSDigitizer::Exec(Option_t *option)
    
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSDigitizer");
-    cout << "AliPHOSDigitizer:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSDigitizer") << " seconds for Digitizing " 
-        <<  gBenchmark->GetCpuTime("PHOSDigitizer")/nevents << " seconds per event " << endl ;
-    cout << endl ;
-  }
-  
+    TString message ; 
+    message = "  took %f seconds for Digitizing %f seconds per event\n" ; 
+    Info("Exec", message.Data(), 
+        gBenchmark->GetCpuTime("PHOSDigitizer"), 
+        gBenchmark->GetCpuTime("PHOSDigitizer")/nevents ); 
+  } 
 }
 
 //____________________________________________________________________________ 
@@ -504,7 +500,7 @@ Bool_t AliPHOSDigitizer::Init()
 
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), GetName(), fToSplit) ; 
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSDigitizer::Init -> Could not obtain the Getter object !" << endl ; 
+    Error("Init", "Could not obtain the Getter object !") ; 
     return kFALSE;
   } 
   
@@ -590,7 +586,7 @@ void AliPHOSDigitizer::MixWith(const char* headerFile)
     Init() ;
 
   if(fManager){
-    cout << "Can not use this method under AliRunDigitizer " << endl ;
+    Warning("MixWith", "Can not use this method under AliRunDigitizer\n" ) ;
     return ;
   }
   
@@ -605,10 +601,10 @@ void AliPHOSDigitizer::MixWith(const char* headerFile)
   path += "/" ; 
   path += GetName() ;
   if ( gROOT->FindObjectAny(path.Data()) ) {
-    cerr << "WARNING: AliPHOSDigitizer::MixWith -> Entry already exists, do not add" << endl ;
+    Warning("MixWith", "Entry already exists, do not add\n" ) ;
     return;
   }
-
+  
   gime->PostSDigits(GetName(),headerFile) ;
   
   // check if the requested file is already open or exist and if SDigits Branch exist
@@ -616,114 +612,131 @@ void AliPHOSDigitizer::MixWith(const char* headerFile)
   if ( !file ) { 
     file = new TFile(headerFile, "READ") ; 
     if (!file) { 
-      cerr << "ERROR: AliPHOSDigitizer::MixWith -> File " << headerFile << " does not exist!" << endl 
+      Error("MixWith", "File %s does not exist\n", headerFile )
       return ; 
     }
   }
-  
 }
 
 //__________________________________________________________________
-void AliPHOSDigitizer::Print(Option_t* option)const {
+void AliPHOSDigitizer::Print(Option_t* option)const 
+{
   // Print Digitizer's parameters
   if( strcmp(GetName(), "") != 0 ){
 
-
-    cout << "------------------- "<< GetName() << " -------------" << endl ;
+    TString message("\n-------------------") ; 
+    message += GetName() ; 
+    message += "-------------\n" ;
 
     const Int_t nStreams = GetNInputStreams() ; 
     if (nStreams) {
       Int_t index = 0 ;  
-      for (index = 0 ; index < nStreams ; index++)  
-       cout << "Adding SDigits " << GetName() << " from " <<  fManager->GetInputFileName(index, 0) << endl ; 
-      
-      cout << endl ;
-      cout << "Writing digits to " <<   fManager->GetInputFileName(0, 0) << endl ;   
+      for (index = 0 ; index < nStreams ; index++) {  
+       message += "Adding SDigits " ; 
+       message += GetName() ;
+       message += "from " ; 
+       message += fManager->GetInputFileName(index, 0) ; 
+      }
+      message += "\nWriting digits to " ; 
+      message += fManager->GetInputFileName(0, 0) ;   
     } else { 
-//       AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;  
-//       gime->Folder("sdigits")  ;
-//       cout << "Digitizing sDigits from file(s): " <<endl ;
-//       TCollection * folderslist = gime->Folder("sdigits")->GetListOfFolders() ; 
-//       TIter next(folderslist) ; 
-//       TFolder * folder = 0 ; 
+      //       AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;  
+      //       gime->Folder("sdigits")  ;
+      //       TCollection * folderslist = gime->Folder("sdigits")->GetListOfFolders() ; 
+      //       TIter next(folderslist) ; 
+      //       TFolder * folder = 0 ; 
       
-//       while ( (folder = (TFolder*)next()) ) {
-//     if ( folder->FindObject(GetName())  ) 
-      //    cout << "Adding SDigits " << GetName() << " from " << GetSDigitsFileName() << endl ; 
-//      }
-      cout << endl ;
-      cout << "Writing digits to " << GetTitle() << endl ;
+      //       while ( (folder = (TFolder*)next()) ) {
+      //       if ( folder->FindObject(GetName())  ) 
+      //      }
+      message += "\nWriting digits to " ;
+      message += GetTitle() ;
     }    
-    cout << endl ;
-    cout << "With following parameters: " << endl ;
-    cout << "     Electronics noise in EMC (fPinNoise) = " << fPinNoise << endl ;
-    cout << "  Threshold  in EMC  (fEMCDigitThreshold) = " << fEMCDigitThreshold  << endl ; ;
-    cout << "                 Noise in CPV (fCPVNoise) = " << fCPVNoise << endl ; 
-    cout << "    Threshold in CPV (fCPVDigitThreshold) = " << fCPVDigitThreshold << endl ; 
-    cout << "---------------------------------------------------" << endl ;
+    message += "\nWith following parameters:\n" ;
+    message += "     Electronics noise in EMC (fPinNoise) = %f\n" ; 
+    message += "  Threshold  in EMC  (fEMCDigitThreshold) = %f\n" ; 
+    message += "                 Noise in CPV (fCPVNoise) = %f\n" ;
+    message += "    Threshold in CPV (fCPVDigitThreshold) = %f\n" ;
+    message += "---------------------------------------------------\n" ; 
+    Info("Print", message.Data(),  
+        fPinNoise, 
+        fEMCDigitThreshold, 
+        fCPVNoise, 
+        fCPVDigitThreshold ) ; 
   }
   else
-    cout << "AliPHOSDigitizer not initialized " << endl ;
+    Info("Print", "AliPHOSDigitizer not initialized\n" ) ;
   
 }
-
 //__________________________________________________________________
-void AliPHOSDigitizer::PrintDigits(Option_t * option){
-  // Print a table of digits
-
-  AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; 
-  TClonesArray * digits = gime->Digits() ; 
-
-  cout << "AliPHOSDigitiser: event " << gAlice->GetEvNumber() << endl ;
-  cout << "       Number of entries in Digits list " << digits->GetEntriesFast() << endl ;
-  cout << endl ;
-  if(strstr(option,"all")||strstr(option,"EMC")){
+ void AliPHOSDigitizer::PrintDigits(Option_t * option)
+{
+   // Print a table of digits
+  
+   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; 
+   TClonesArray * digits = gime->Digits() ; 
+   
+   TString message ; 
+   message  = "event %d\n" ; 
+   message += "       Number of entries in Digits list %d\n" ;  
+   Info("Print", message.Data(), gAlice->GetEvNumber(), digits->GetEntriesFast() ) ;  
+   if(strstr(option,"all")||strstr(option,"EMC")){
     
     //loop over digits
     AliPHOSDigit * digit;
-    cout << "EMC digits (with primaries): " << endl ;
-    cout << "Digit Id     Amplitude   Index       Nprim  Primaries list " <<  endl;      
+    message  = "EMC digits (with primaries):\n"  ;
+    message += "Digit Id     Amplitude   Index       Nprim  Primaries list\n" ; 
+    Info("Print", message.Data()) ; 
     Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
     Int_t index ;
     for (index = 0 ; (index < digits->GetEntriesFast()) && 
         (((AliPHOSDigit * )  digits->At(index))->GetId() <= maxEmc) ; index++) {
       digit = (AliPHOSDigit * )  digits->At(index) ;
-      if(digit->GetNprimary() == 0) continue;
-      cout << setw(6)  <<  digit->GetId() << "   "  <<         setw(10)  <<  digit->GetAmp() <<   "    "  
-          << setw(6)  <<  digit->GetIndexInList() << "    "   
-          << setw(5)  <<  digit->GetNprimary() <<"    ";
+      if(digit->GetNprimary() == 0) 
+       continue;
+      message = "      %d          %d      %d     %d\n" ; 
+      Info("Print", message.Data(), 
+          digit->GetId(), 
+          digit->GetAmp(),  
+          digit->GetIndexInList(),     
+          digit->GetNprimary() ) ;
       
       Int_t iprimary;
-      for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
-       cout << setw(5)  <<  digit->GetPrimary(iprimary+1) << "    ";
-      cout << endl;     
-    }    
-    cout << endl;
+      for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+       message = "     %d\n" ; 
+       Info("Print", message.Data(), digit->GetPrimary(iprimary+1) ) ;
+      }    
+    }
   }
 
   if(strstr(option,"all")||strstr(option,"CPV")){
     
     //loop over CPV digits
     AliPHOSDigit * digit;
-    cout << "CPV digits: " << endl ;
-    cout << "Digit Id     Amplitude   Index       Nprim  Primaries list " <<  endl;      
+    message  = "CPV digits:\n" ;
+    message += "Digit Id     Amplitude   Index       Nprim  Primaries list\n" ;
+    Info("Print", message.Data()) ; 
     Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
     Int_t index ;
     for (index = 0 ; index < digits->GetEntriesFast(); index++) {
       digit = (AliPHOSDigit * )  digits->At(index) ;
       if(digit->GetId() > maxEmc){
-       cout << setw(6)  <<  digit->GetId() << "   "  <<        setw(10)  <<  digit->GetAmp() <<   "    "  
-            << setw(6)  <<  digit->GetIndexInList() << "    "   
-            << setw(5)  <<  digit->GetNprimary() <<"    ";
+       message = "      %d          %d      %d     %d\n" ; 
+       Info("Print", message.Data(), 
+            digit->GetId(), 
+            digit->GetAmp(), 
+            digit->GetIndexInList(), 
+            digit->GetNprimary() ) ;
        
        Int_t iprimary;
-       for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
-         cout << setw(5)  <<  digit->GetPrimary(iprimary+1) << "    ";
-       cout << endl;    
-      }    
+       for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+         message = "     %d\n" ; 
+         Info("Print", message.Data(), digit->GetPrimary(iprimary+1) ) ;
+       }    
+      }
     }
   }
-
 }
 
 //__________________________________________________________________
index a74c4e4703c0e925aacc21efafc1b176edc49eea..ef96e42f75091062b7e7661ef01fa18dd318e03f 100644 (file)
@@ -30,8 +30,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h> 
-
 // --- AliRoot header files ---
 
  #include "AliGenerator.h"
@@ -660,28 +658,29 @@ void AliPHOSEmcRecPoint::Print(Option_t * option)
 {
   // Print the list of digits belonging to the cluster
   
-  cout << "AliPHOSEmcRecPoint: " << endl ;
+  TString message ; 
+  message  = "AliPHOSEmcRecPoint:\n" ;
+  message +=  " digits # = " ; 
+  Info("Print", message.Data()) ; 
 
   Int_t iDigit;
-  cout << " digits # = " ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++)
-    cout << fDigitsList[iDigit] << "  " ;  
-  cout << endl ;
+    Info("Print", " %d ", fDigitsList[iDigit] ) ;  
   
-  cout << " Energies = " ;
+  Info("Print", " Energies = ") ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    cout  << fEnergyList[iDigit] << "  ";
-  cout << endl ;
+    Info("Print", " %f ", fEnergyList[iDigit] ) ;
   
-  cout << " Primaries  " ;
+   Info("Print", " Primaries  ") ;
   for(iDigit = 0;iDigit < fMulTrack; iDigit++)
-    cout << fTracksList[iDigit] << " " << endl ;
+    Info("Print", " %d ", fTracksList[iDigit]) ;
        
-  cout << "       Multiplicity    = " << fMulDigit  << endl ;
-  cout << "       Cluster Energy  = " << fAmp << endl ;
-  cout << "       Number of primaries " << fMulTrack << endl ;
-  cout << "       Stored at position " << GetIndexInList() << endl ; 
+  message  = "       Multiplicity    = %d" ;
+  message += "       Cluster Energy  = %f" ; 
+  message += "       Number of primaries %d" ; 
+  message += "       Stored at position %d" ; 
  
+  Info("Print", message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;  
 }
  
   
index e837b84396b78c5c739f8408f86803f5b8ddfc95..ec718630b695842edfc700489cc1163d47e2c8a5 100644 (file)
@@ -14,7 +14,6 @@
 #include "AliPHOSDigitizer.h"
 
 // --- Standard library ---
-#include <iostream.h> 
 
 
 ClassImp(AliPHOSEvalRecPoint)
@@ -36,7 +35,7 @@ AliPHOSEvalRecPoint::AliPHOSEvalRecPoint(Bool_t cpv, AliPHOSEvalRecPoint* parent
 //    fParent=parent;
   TObjArray* wPool = (TObjArray*)GetWorkingPool();
   if(!wPool) {
-    cout<<" Couldn't find working pool. Exit."<<endl;
+    Error("AliPHOSEvalRecPoint", "Couldn't find working pool. Exit.") ; 
     exit(1);
   }
 
@@ -103,7 +102,7 @@ AliPHOSClusterizer* AliPHOSEvalRecPoint::GetClusterizer()
   TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
   AliPHOSClusterizer* clu = (AliPHOSClusterizer*)wPoolF->FindObject("PHOS:clu-v1");
   if(!clu) { 
-    cout<<" Couldn't find Clusterizer. Exit."<<endl
+    Error("GetClusterizer", "Couldn't find Clusterizer. Exit.") 
     exit(1); 
   }
 
@@ -191,7 +190,7 @@ void AliPHOSEvalRecPoint::Init()
 
   AliPHOSClusterizer* clusterizer = GetClusterizer();
   if(!clusterizer) {
-    cout<<" Cannot get clusterizer. Exit."<<endl;
+    Error("Init", "Cannot get clusterizer. Exit.") ;
     exit(1);
   }
 
@@ -249,7 +248,7 @@ void AliPHOSEvalRecPoint::InitTwoGam(Float_t* gamma1, Float_t* gamma2)
   Float_t yy = lpos.X();
   Float_t E = GetEnergy();
 
-  cout<<"  (x,z,E)[old] = ("<<yy<<","<<xx<<","<<E<<")"<<endl;
+  Info("InitTwoGam", "(x,z,E)[old] = (%f, %f, %f)", yy, xx, E) ;
 
 //    xx = XY(xx/E);
 //    yy = XY(yy/E);
@@ -425,13 +424,13 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
          
          Float_t dx1 =  x1c - ix;
          Float_t dy1 =  y1c - iy;
-//       cout<<" Mult "<<nDigits<<" dx1 "<<dx1<<" dy1 "<<dy1<<endl;
+//       Info("TwoGam", "Mult %d dx1 %f dy1 %f", nDigits, dx1, dy1) ;
 //       AG(e1c,dx1,dy1,a1,gx1,gy1);
          GetReconstructionManager()->AG(e1c,dx1,dy1,a1,gx1,gy1);
 
          Float_t dx2 =  x2c - ix;
          Float_t dy2 =  y2c - iy;
-//       cout<<"      "<<" dx2 "<<dx2<<" dy2 "<<dy2<<endl;
+//       Info("TwoGam", "      dx2 %f dy2 %f", dx2, dy2) ;
 //       AG(e2c,dx2,dy2,a2,gx2,gy2);
          GetReconstructionManager()->AG(e2c,dx2,dy2,a2,gx2,gy2);
       
@@ -490,8 +489,8 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
     loop20: ;
       Float_t step = st*gr;
 
-       
-      cout<<" Iteration "<<Iter<<" dof "<<dof<<" chisq/dof "<<ch/dof<<" chstop/dof "<<chstop/dof<<" step " <<step<<" stpmin "<<stpmin<<endl;
+      Info("TwoGam", "Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
+          Iter, dof, ch/dof, chstop/dof, step, stpmin) ;
 
       
       if(step<stpmin) 
@@ -536,8 +535,12 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
   Float_t z2_new = xx2;
   Float_t e2_new = ee2;
 
-  cout<<"     (x,z,E)[1 fit] = ("<<x1_new<<","<<z1_new<<","<<e1_new<<")"<<endl;
-  cout<<"     (x,z,E)[2 fit] = ("<<x2_new<<","<<z2_new<<","<<e2_new<<")"<<endl;
+  TString message ; 
+  message  = "     (x,z,E)[1 fit] = (%f, %f, %f)\n" ;  
+  message  = "     (x,z,E)[2 fit] = (%f, %f, %f)\n" ;  
+  Info("TwoGam", message.Data(), 
+       x1_new, z1_new, e1_new, 
+       x2_new, z2_new, e2_new) ;
 
   fChi2Dof = chisq;
 
@@ -622,18 +625,15 @@ void AliPHOSEvalRecPoint::UnfoldTwoMergedPoints(Float_t* gamma1, Float_t* gamma2
          GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
          Float_t total_gain = eFit[iDigit];
          Float_t ratio = single_shower_gain/total_gain; 
-//       cout<<" ratio -> "<<ratio<<endl;
          eDigit = eDigit*ratio;
          newRP->AddDigit(*digit,eDigit);
        }
-
-      cout<<"======= Split: daughter rec point "<<iMax<<" ================="<<endl;
+      Info("UnfoldTwoMergedPoints", "======= Split: daughter rec point %d =================", iMax) ;
       newRP->Print("");
 
     }
 
   delete[] eFit;
-  cout<<endl;
   
 
 }
@@ -706,7 +706,7 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
          Float_t A;
          GetReconstructionManager()->AG(E,dx,dy,A,gx,gy);
          Float_t dd;
-         cout<<"  (ix iy  xc yc  dx dy)   "<<ix<<" "<<iy<<"   "<<xc<<" "<<yc<<"   "<<dx<<" "<<dy<<endl;
+         Info("EvaluatePosition", "  (ix iy  xc yc  dx dy)   %f %f %f %f %f %f", ix, iy, xc, yc, dx, dy) ;
          Float_t chi2dg = GetReconstructionManager()->OneGamChi2(A,eDigit,E,dd);
 
          // Exclude digit with too large chisquare.
@@ -721,7 +721,7 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
       Float_t grc = TMath::Sqrt(grxc*grxc + gryc*gryc);
       if(grc<1.e-10) grc=1.e-10;
       Float_t sc = 1. + chisqc/chisq;
-      cout<<" chisq: "<<chisq<<endl;
+       Info("EvaluatePosition", " chisq: %f", chisq) ;
       st = st/sc;
       if(chisqc>chisq)
        goto loop20;
@@ -740,8 +740,8 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
     loop20: ;
       Float_t step = st*gr;
 
-              
-      cout<<" Iteration "<<Iter<<" dof "<<dof<<" chisq/dof "<<chisq/dof<<" chstop/dof "<<chstop/dof<<" step " <<step<<" Stpmin "<<Stpmin<<endl;
+      Info("EvaluatePosition", " Iteration %d dof %d chisq/dof %f chstop/dof %f step %d Stpmin %d",
+          Iter, dof, chisq/dof, chisq/dof, chstop/dof, step, Stpmin) ;
        
 
       if(step<Stpmin)
@@ -774,11 +774,8 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
 
 //    TVector3 pos;
 //    RP->GetLocalPosition(pos);
-//    cout<<"        (x,z)[old] = ("<<x_old<<","<<z_old<<")"<<endl;
-//    cout<<"        (x,z)[new] = ("<<pos.X()<<","<<pos.Z()<<")"<<endl;
 
   
-//    cout<<" gamma[1]: "<<gamma1[1]<<"  gamma1[2]: "<<gamma1[2]<<endl;
   
   fChi2Dof = chisq;
 
@@ -793,7 +790,7 @@ Bool_t AliPHOSEvalRecPoint::KillWeakPoint()
   Float_t Thr0 = GetReconstructionManager()->KillGamMinEnergy();
   
   if(GetEnergy()<Thr0) {
-    cout<<"+++++++ Killing this rec point ++++++++++"<<endl;
+    Info("KillWeakPoint", "+++++++ Killing this rec point ++++++++++") ;
     RemoveFromWorkingPool(this);
     return kTRUE;
   }
@@ -837,9 +834,9 @@ void AliPHOSEvalRecPoint::MergeClosePoint()
            {
              if(TooClose(rp))
                {
-                 cout<<"+++++++ Merging point 1: ++++++"<<endl;
+                 Info("MergeClosePoint", "+++++++ Merging point 1: ++++++") ;
                  this->Print("");
-                 cout<<"+++++++ and point 2: ++++++++++"<<endl;
+                 Info("MergeClosePoint", "+++++++ and point 2: ++++++++++") ;
                  ((AliPHOSEvalRecPoint*)rp)->Print("");
 
                  //merge two rec. points
@@ -868,7 +865,7 @@ void AliPHOSEvalRecPoint::MergeClosePoint()
                  RemoveFromWorkingPool(rp);
                  delete rp;
                  
-                 cout<<"++++++ Resulting point: ++++++++"<<endl;
+                 Info("MergeClosePoint", "++++++ Resulting point: ++++++++") ;
                  this->Print("");
 
                  break;
@@ -897,7 +894,7 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima()
 //    AliPHOSClusterizer* clusterizer = fGetter->Clusterizer("PHOSclu-v1");  
   AliPHOSClusterizer* clusterizer = GetClusterizer();
   if(!clusterizer) {
-    cout<<" Cannot get clusterizer. Exit."<<endl;
+    Error("UnfoldLocalMaxima", "Cannot get clusterizer. Exit.") ;
     exit(1);
   }
 
@@ -981,21 +978,20 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima()
              GetReconstructionManager()->AG(eMax,dz,dx,single_shower_gain,gxMax,gyMax);
              Float_t total_gain = eFit[iDigit];
              Float_t ratio = single_shower_gain/total_gain; 
-             cout<<" ratio -> "<<ratio<<endl;
+             Info("UnfoldLocalMaxima", " ratio -> %f", ratio) ;
              eDigit = eDigit*ratio;
              newRP->AddDigit(*digit,eDigit);
            }
        }
 
       newRP->EvalLocalPosition(LogWeight,digits);
-      cout<<"======= Unfold: daughter rec point "<<iMax<<" ================="<<endl;
+      Info("UnfoldLocalMaxima", "======= Unfold: daughter rec point %d =================", iMax) ;
       newRP->Print("");
     }
 
 //    RemoveFromWorkingPool(this);
 
   delete[] eFit;
-  cout<<endl;
 
   return Nmax;
 
@@ -1008,10 +1004,11 @@ void AliPHOSEvalRecPoint::PrintPoint(Option_t* opt)
   TVector3 lpos;
   GetLocalPosition(lpos);
 
-  cout<<"       Chi2/dof = "<<Chi2Dof()<<endl;
-  cout<<"       Local (x,z) = ("<<lpos.X()<<","<<lpos.Z()<<") in module "<<GetPHOSMod()<<endl;
-//    if(GetReconstructionManager())
-//      cout<<"    Distance of merger = "<<GetReconstructionManager()->MergeGammasMinDistanceCut()<<endl;
+  TString message ; 
+  message  = "       Chi2/dof = %f" ;
+  message += "       Local (x,z) = (%f, %f) in module %d" ; 
+  Info("Print", message.Data(), Chi2Dof(), lpos.X(), lpos.Z(), GetPHOSMod()) ;
+
 }
 
 AliPHOSRecManager* AliPHOSEvalRecPoint::GetReconstructionManager() const
@@ -1021,7 +1018,7 @@ AliPHOSRecManager* AliPHOSEvalRecPoint::GetReconstructionManager() const
   TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
   AliPHOSRecManager* recMng = (AliPHOSRecManager*)wPoolF->FindObject("AliPHOSRecManager");
   if(!recMng) { 
-    cout<<" Couldn't find Reconstruction Manager. Exit."<<endl
+    Error("GetReconstructionManager", "Couldn't find Reconstruction Manager. Exit.") 
     exit(1); 
   }
 
@@ -1049,7 +1046,7 @@ const TObject* AliPHOSEvalRecPoint::GetWorkingPool()
   TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
   TObject* wPool = wPoolF->FindObject("SmartPoints");
   if(!wPool) { 
-    cout<<" Couldn't find Working Pool. Exit."<<endl
+    Error("GetWorkingPool", "Couldn't find Working Pool. Exit.") 
     exit(1); 
   }
 
index 14d12133ea864a6f5126c8c80392c269c6f08a3f..9a9cb8d5465869d00236576cdb006d89183938e8 100644 (file)
@@ -25,8 +25,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSFastRecParticle.h"
@@ -245,9 +243,16 @@ void AliPHOSFastRecParticle::Print(const char * opt)
 {
   // Print the type, energy and momentum of the reconstructed particle
   
-  cout << "AliPHOSFastRecParticle > " << "type is  " << Name() << endl 
-       << "                     " << "Energy = " << fE << endl 
-       << "                     " << "Px     = " << fPx << endl 
-       << "                     " << "Py     = " << fPy << endl 
-       << "                     " << "Pz     = " << fPz << endl ; 
+  TString message ; 
+  message  = "AliPHOSFastRecParticle > type is  %s\n" ; 
+  message += "                         Energy = %f\n" ; 
+  message += "                         Px     = %f\n" ; 
+  message += "                         Py     = %f\n" ;
+  message += "                         Pz     = %f\n" ;
+  Info("Print", message.Data(), 
+       Name().Data(), 
+       fE, 
+       fPx, 
+       fPy,
+       fPz ); 
 }
index 3607b05d04f7bd2754f15ad1462147c6e252f97e..7769ab6bb19cf10b15f0659675a91b8620b45b99 100644 (file)
@@ -35,7 +35,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
 #include <stdlib.h>
 
 // --- AliRoot header files ---
@@ -71,8 +70,7 @@ void AliPHOSGeometry::Init(void)
   
   TString test(GetName()) ; 
   if (test != "IHEP" && test != "GPS2" && test != "MIXT") {
-    cerr << "ERROR: " << ClassName() << "::Init -> " << test.Data() 
-        << " is not a known geometry (choose among IHEP, GPS2 and MIXT)" << endl ; 
+    Error("Init", "%s is not a known geometry (choose among IHEP, GPS2 and MIXT)", test.Data() ) ; 
     abort() ;
   }
 
@@ -139,10 +137,8 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t
     }
   }
   else {
-    if ( strcmp(fgGeom->GetName(), name) != 0 ) {
-      cout << "AliPHOSGeometry <E> : current geometry is " << fgGeom->GetName() << endl
-          << "                      you cannot call     " << name << endl ; 
-    }
+    if ( strcmp(fgGeom->GetName(), name) != 0 ) 
+      ::Error("GetInstance", "Current geometry is %s. You cannot call %s", fgGeom->GetName(), name) ; 
     else
       rv = (AliPHOSGeometry *) fgGeom ; 
   } 
@@ -158,8 +154,7 @@ void AliPHOSGeometry::SetPHOSAngles()
   Float_t pphi =  2 * TMath::ATan( GetOuterBoxSize(0)  / ( 2.0 * GetIPtoUpperCPVsurface() ) ) ;
   pphi *= kRADDEG ;
   if (pphi > fAngle){ 
-    cout << "AliPHOSGeometry: PHOS modules overlap!\n";
-    cout <<  "pphi = " << pphi << " fAngle  " << fAngle << endl ;
+    Error("SetPHOSAngles", "PHOS modules overlap!\n pphi = %f fAngle = %f", pphi, fAngle);
 
   }
   pphi = fAngle;
@@ -217,7 +212,7 @@ void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    cout << "<I>  AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ; 
+    Warning("EmcModuleCoverage", "%s unknown option; result in radian", opt) ; 
     conv = 1. ;
       }
 
@@ -252,7 +247,7 @@ void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    cout << "<I>  AliPHOSGeometry::EmcXtalCoverage : " << opt << " unknown option; result in radian " << endl ; 
+    Warning("EmcXtalCoverage", "%s unknown option; result in radian", opt) ;  
     conv = 1. ;
       }
 
index 0f1f8403d2531debe1a9d709a80a6d501e81c3b8..cca93bd13d8dd7ae698e920ceee50e020608ea13 100644 (file)
@@ -57,7 +57,6 @@
 #include "TParticle.h"
 
 // --- Standard library ---
-#include <iostream.h>
 
 // --- AliRoot header files ---
 #include "AliRun.h"
@@ -84,7 +83,7 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, co
   // This is the ctor called by GetInstance and the only one that can be used 
 
   if( fHeaderFile.Contains("_") ) {
-    cerr << "AliPHOSGetter::AliPHOSGetter -> Invalid file name (_ not allowed) " << fHeaderFile.Data() << endl ;
+    Error("AliPHOSGetter", "Invalid file name (_ not allowed) %s", fHeaderFile.Data() ) ;
     abort() ; 
   }
 
@@ -118,7 +117,7 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, co
     if(!fFile) {    //if file was not opened yet, read gAlice
       fFile = TFile::Open(fHeaderFile.Data(),"update") ; 
       if (!fFile->IsOpen()) {
-       cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot open " << fHeaderFile.Data() << endl ; 
+       Error("AliPHOSGetter", "Cannot open %s", fHeaderFile.Data() ) ; 
        fFailed = kTRUE ;
         return ;  
       }
@@ -127,20 +126,20 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, co
   }
   
   if (!gAlice) {
-    cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ; 
+    Error("AliPHOSGetter", "Cannot find gAlice in %s", fHeaderFile.Data() ) ; 
     fFailed = kTRUE ;
     return ; 
   }
   if (!PHOS()) {
     if (fDebug)
-      cout << "INFO: AliPHOSGetter:AliPHOSGetter -> Posting PHOS to Folders" << endl ; 
+      Info("AliPHOSGetter", "-> Posting PHOS to Folders") ; 
     if (gAlice->GetDetector("PHOS")) {
       AliConfig * conf = AliConfig::Instance() ; 
       conf->Add(static_cast<AliDetector*>(gAlice->GetDetector("PHOS"))) ; 
       conf->Add(static_cast<AliModule*>(gAlice->GetDetector("PHOS"))) ; 
     }
     else 
-      cerr << "ERROR: AliPHOSGetter:AliPHOSGetter -> detector PHOS not found" << endl ;  
+      Error("AliPHOSGetter", "detector PHOS not found") ;    
   }
 
   fDebug=0;
@@ -192,7 +191,7 @@ const TFolder * AliPHOSGetter::Folder(const TString what) const {
   else if ( what == "digits" ) 
     return  dynamic_cast<const TFolder *>(fDigitsFolder->FindObject("PHOS")) ; 
   else {
-    cerr << "ERROR: AliPHOSGetter::GetFolder -> " << what.Data() << " illegal option (hits, sdigits, digits) " << endl ; 
+    Error("GetFolder", " %s illegal option (hits, sdigits, digits)", what.Data() ) ; 
     return 0 ; 
   }
 }
@@ -206,7 +205,7 @@ AliPHOSGetter * AliPHOSGetter::GetInstance()
     return fgObjGetter ;
   }
   else {
-    //cout << "WARNING: AliPHOSGetter::GetInstance ERROR: not yet initialized" << endl ;
+    //Warning("GetInstance", "not yet initialized") ;
     return 0 ; 
   }
 }
@@ -336,13 +335,11 @@ const Bool_t AliPHOSGetter::BranchExists(const TString recName) const
     TString branchName(branch->GetName() ) ; 
     TString branchTitle(branch->GetTitle() ) ;  
     if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){  
-      cerr << "WARNING: AliPHOSGetter::BranchExists -> branch " << dataname.Data() << " with title " << fBranchTitle << " already exits in "
-          << name.Data() << endl;
+      Warning("BranchExists", "branch %s with title %s already exists in %s", dataname.Data(), fBranchTitle.Data(), name.Data() ) ;
       return kTRUE ;
     }
     if ( branchName.BeginsWith(zername) &&  branchTitle.BeginsWith(titleName) ){
-      cerr << "WARNING:  AliPHOSGetter::BranchExists -> branch AliPHOS... with title " << branch->GetTitle() << " already exits in "
-          << name.Data() << endl;     
+      Warning("BranchExists", "branch AliPHOS... with title %s already exists in %s", branch->GetTitle(), name.Data() ) ;     
       return kTRUE ; 
     }
   }
@@ -372,45 +369,45 @@ void AliPHOSGetter::ListBranches(Int_t event) const
   
   TTree * t =  gAlice->TreeH() ; 
   if(t){
-    cout << "INFO: AliPHOSGetter::ListBranches -> ****** Hits    : " << endl ; 
+    Info("ListBranches", "-> ****** Hits    : ") ; 
     TObjArray * lob = t->GetListOfBranches() ;
     TIter next(lob) ; 
     while ( (branch = static_cast<TBranch*>(next())) )
-      cout << "             " << branch->GetName() << endl ; 
+      Info("ListBranches", "             %s", branch->GetName()) ; 
   } else
-    cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeH not found for event " << event << endl ;  
+    Warning("ListBranches", "TreeH not found for event %d", event ) ;  
   
   t = gAlice->TreeS() ;
   if(t){
-    cout << "INFO: AliPHOSGetter::ListBranches -> ****** SDigits : " << endl ; 
+    Info("ListBranches", "-> ****** SDigits : ") ; 
     TObjArray * lob = t->GetListOfBranches() ;
     TIter next(lob) ; 
     while ( (branch = static_cast<TBranch*>(next())) )
-      cout << "             " << branch->GetName() << " " << branch->GetTitle() << endl ; 
+      Info("ListBranches", "             %s %s", branch->GetName(), branch->GetTitle()) ; 
   } else 
-    cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeS not found for event " << event << endl ;  
+    Warning("ListBranches", "TreeS not found for event %d", event)  ;  
   
   
   t = gAlice->TreeD() ;
   if(t){
-    cout << "INFO: AliPHOSGetter::ListBranches -> ****** Digits  : " << endl ; 
+    Info("ListBranches", "-> ****** Digits  : ") ; 
     TObjArray * lob = t->GetListOfBranches() ;
     TIter next(lob) ; 
     while ( (branch = static_cast<TBranch*>(next())) )
-      cout << "             " << branch->GetName() << " " << branch->GetTitle() << endl ; 
+      Info("ListBranches", "             %s %s", branch->GetName(), branch->GetTitle()) ; 
   } else 
-    cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeD not found for event " << event << endl ;  
+    Warning("ListBranches", "TreeD not found for event %d", event) ;  
   
 
   t = gAlice->TreeR() ;
   if(t){
-    cout << "INFO: AliPHOSGetter::ListBranches -> ****** Recon   : " << endl ; 
+    Info("ListBranches", "-> ****** Recon   : ") ; 
     TObjArray * lob = t->GetListOfBranches() ;
     TIter next(lob) ; 
     while ( (branch = static_cast<TBranch*>(next())) )
-      cout << "             " << branch->GetName() << " " << branch->GetTitle() << endl ; 
+     Info("ListBranches", "             %s %s", branch->GetName(), branch->GetTitle()) ; 
   } else 
-    cerr << "WARNING::AliPHOSGetter::ListBranches -> TreeR not found for event " << event << endl ;  
+    Warning("ListBranches", "TreeR not found for event %d", event) ;  
   
 }
 
@@ -432,7 +429,7 @@ Bool_t AliPHOSGetter::NewFile(TString name)
   if(!fFile) {    //if file was not opened yet, read gAlice
     fFile = TFile::Open(fHeaderFile.Data(),"update") ;
     if (!fFile->IsOpen()) {
-      cerr << "ERROR : AliPHOSGetter::NewFile -> Cannot open " << fHeaderFile.Data() << endl ; 
+      Error("NewFile", "Cannot open %s", fHeaderFile.Data() ) ; 
       fFailed = kTRUE ;
       return fFailed ;  
     }
@@ -440,7 +437,7 @@ Bool_t AliPHOSGetter::NewFile(TString name)
   } 
   
   if (!gAlice) {
-    cerr << "ERROR : AliPHOSGetter::AliPHOSGetter -> Cannot find gAlice in " << fHeaderFile.Data() << endl ; 
+    Error("AliPHOSGetter", "Cannot find gAlice in %s", fHeaderFile.Data() ) ; 
     fFailed = kTRUE ;
     return fFailed ; 
   }
@@ -454,7 +451,7 @@ const AliPHOS * AliPHOSGetter::PHOS()
   AliPHOS * phos = dynamic_cast<AliPHOS*>(fModuleFolder->FindObject("PHOS")) ;  
   if (!phos) 
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::PHOS -> PHOS module not found in Folders" << endl ; 
+      Warning("PHOS", "-> PHOS module not found in Folders") ; 
   return phos ; 
 }  
 
@@ -476,8 +473,8 @@ const Bool_t AliPHOSGetter::PostPrimaries(void) const
   TFolder * primariesFolder = dynamic_cast<TFolder*>(fPrimariesFolder->FindObject("Primaries")) ; 
   if ( !primariesFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post Primaries -> Folder //" << fPrimariesFolder->GetName() << "/Primaries/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Primaries -> Adding Folder //" << fPrimariesFolder->GetName() << "/Primaries/"  << endl;
+      Warning("PostPrimaries", "-> Folder //%s/Primaries/ not found!", fPrimariesFolder->GetName()) ;
+      Info("PostPrimaries", "-> Adding Folder //%s/Primaries", fPrimariesFolder->GetName()) ;
     }
     primariesFolder = fPrimariesFolder->AddFolder("Primaries", "Primaries particles from TreeK") ; 
   }    
@@ -495,19 +492,19 @@ TObject** AliPHOSGetter::PrimariesRef(void) const
   
   // the hierarchy is //Folders/RunMC/Event/Data/Primaries
   if ( !fPrimariesFolder ) {
-    cerr << "ERROR: AliPHOSGetter::PrimariesRef -> Folder //" << fPrimariesFolder << " not found!" << endl;
+    Error("PrimariesRef", "Folder //%s not found", fPrimariesFolder) ;
     abort() ;
   }    
  
   TFolder * primariesFolder = dynamic_cast<TFolder *>(fPrimariesFolder->FindObject("Primaries")) ;
   if ( !primariesFolder ) {
-    cerr << "ERROR: AliPHOSGetter::PrimariesRef -> Folder //" << fPrimariesFolder << "/Primaries/ not found!" << endl;  
+    Error("PrimariesRef", "Folder //%s/Primaries/ not found", fPrimariesFolder) ;  
     abort() ;
   }
  
   TObject * p = primariesFolder->FindObject("Primaries") ;
   if(!p) {
-    cerr << "ERROR: AliPHOSGetter::PrimariesRef -> " << primariesFolder->GetName() << "/Primaries not found !" << endl ; 
+    Error("PrimariesRef","%s /Primaries not found !", primariesFolder->GetName() ) ; 
     abort() ;
   }
   else
@@ -523,8 +520,8 @@ const Bool_t AliPHOSGetter::PostHits(void) const
   TFolder * phosFolder = dynamic_cast<TFolder*>(fHitsFolder->FindObject("PHOS")) ; 
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post H -> Folder //" << fHitsFolder << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post H -> Adding Folder //" << fHitsFolder << "/PHOS/"  << endl;
+      Warning("PostHits", "-> Folder //%s/PHOS/ not found!", fHitsFolder) ;
+      Info("PostHits", "-> Adding Folder //%s/PHOS/", fHitsFolder) ;
     }
     phosFolder = fHitsFolder->AddFolder("PHOS", "Hits from PHOS") ; 
   }    
@@ -542,19 +539,19 @@ TObject** AliPHOSGetter::HitsRef(void) const
   
   // the hierarchy is //Folders/RunMC/Event/Data/PHOS/Hits
   if ( !fHitsFolder ) {
-    cerr << "ERROR: AliPHOSGetter::HitsRef -> Folder //" << fHitsFolder << " not found!" << endl;
+    Error("HitsRef", "Folder //%s not found !", fHitsFolder) ;
     abort() ;
   }    
  
   TFolder * phosFolder = dynamic_cast<TFolder *>(fHitsFolder->FindObject("PHOS")) ;
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::HitsRef -> Folder //" << fHitsFolder << "/PHOS/ not found!" << endl;  
+    Error("HitsRef", "Folder //%s/PHOS/ not found !", fHitsFolder) ;  
     abort() ;
   }
  
   TObject * h = phosFolder->FindObject("Hits") ;
   if(!h) {
-    cerr << "ERROR: AliPHOSGetter::HitsRef -> " << phosFolder->GetName() << "/Hits not found !" << endl ; 
+    Error("HitsRef", "%s/Hits not fount !", phosFolder->GetName() ) ; 
     abort() ;
   }
   else
@@ -572,8 +569,8 @@ const Bool_t AliPHOSGetter::PostSDigits(const char * name, const char * headerFi
   TFolder * phosFolder = dynamic_cast<TFolder*>(fSDigitsFolder->FindObject("PHOS")) ;
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post S -> Folder //" << fSDigitsFolder << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post S -> Adding Folder //" << fHitsFolder << "/PHOS/" << endl;
+      Warning("PostSDigits", "-> Folder //%s/PHOS/ not found!", fSDigitsFolder) ;
+      Info("PostSDigits", "-> Adding Folder //%s/PHOS/", fHitsFolder) ;
     }
     phosFolder = fSDigitsFolder->AddFolder("PHOS", "SDigits from PHOS") ; 
   }    
@@ -601,13 +598,13 @@ TObject** AliPHOSGetter::SDigitsRef(const char * name, const char * file) const
   // the hierarchy is //Folders/RunMC/Event/Data/PHOS/SDigits/filename/SDigits
 
   if ( !fSDigitsFolder ) {
-    cerr << "ERROR: AliPHOSGetter::SDigitsRef -> Folder //" << fSDigitsFolder << " not found!" << endl;
+    Error("SDigitsRef", "Folder //%s not found !", fSDigitsFolder) ;
     abort() ;
   }    
  
   TFolder * phosFolder = dynamic_cast<TFolder *>(fSDigitsFolder->FindObject("PHOS")) ;
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::SDigitsRef -> Folder //" << fSDigitsFolder << "/PHOS/ not found!" << endl;
+    Error("SDigitsRef", "Folder //%s/PHOS not found !", fSDigitsFolder) ;
     abort() ;
   }
 
@@ -618,13 +615,13 @@ TObject** AliPHOSGetter::SDigitsRef(const char * name, const char * file) const
     phosSubFolder = dynamic_cast<TFolder *>(phosFolder->FindObject(fHeaderFile)) ;
   
   if(!phosSubFolder) {
-    cerr << "ERROR: AliPHOSGetter::DigitesSRef -> Folder //Folders/RunMC/Event/Data/PHOS/" << file << "not found!" << endl;
+    Error("SDigitsRef", "Folder //Folders/RunMC/Event/Data/PHOS/%s not found !", file) ;
     abort() ;
   }
 
   TObject * dis = phosSubFolder->FindObject(name) ;
   if(!dis){
-    cerr << "ERROR: AliPHOSGetter::DigitesSRef -> object " << name << " not found! " << endl ; 
+    Error("SDigitsRef", "object %s not found !", name) ; 
     abort()  ;
   }
   else
@@ -642,14 +639,14 @@ const Bool_t AliPHOSGetter::PostSDigitizer(AliPHOSSDigitizer * sdigitizer) const
   TTask * sd  = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ; 
 
   if ( !sd ) {
-    cerr << "ERROR: AliPHOSGetter::Post Ser -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+    Error("PostDigitizer", "Task //%s/SDigitizer not found !", fTasksFolder) ;
     return kFALSE ;
   }        
   TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Ser ->//" << fTasksFolder << "/SDigitizer/PHOS/ not found!" << endl;  
-      cout <<"INFO: AliPHOSGetter::Post Ser -> Adding //" << fTasksFolder << "/SDigitizer/PHOS/" << endl;
+      Warning("PostSDigitizer", "->//%s/SDigitizer/PHOS/ not found!", fTasksFolder) ;  
+      Info("PostSDigitizer", "-> Adding //%s/SDigitizer/PHOS/", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     sd->Add(phos) ; 
@@ -657,7 +654,7 @@ const Bool_t AliPHOSGetter::PostSDigitizer(AliPHOSSDigitizer * sdigitizer) const
   AliPHOSSDigitizer * phossd  = dynamic_cast<AliPHOSSDigitizer *>(phos->GetListOfTasks()->FindObject( sdigitizer->GetName() )); 
   if (phossd) { 
     if (fDebug)
-      cout << "INFO: AliPHOSGetter::Post Ser -> Task " << sdigitizer->GetName() << " already exists" << endl ; 
+      Info("PostSDigitizer", "-> Task %s already exists", sdigitizer->GetName()) ; 
     phos->GetListOfTasks()->Remove(phossd) ;
   }
   phos->Add(sdigitizer) ;      
@@ -671,13 +668,13 @@ TObject** AliPHOSGetter::SDigitizerRef(const char * name) const
 
   TTask * sd  = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ; 
   if ( !sd ) {
-    cerr << "ERROR: AliPHOSGetter::Post SerRef -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+    Error("SDigitizerRef", "Task //%s/SDigitizer not found !", fTasksFolder) ;
     abort();
   }        
 
   TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
-    cerr <<"ERROR: AliPHOSGetter::Post SerRef ->  //" << fTasksFolder << "/SDigitizer/PHOS not found!" << endl;
+    Error("SDigitizerRef", "//%s/SDigitizer/PHOS not found !", fTasksFolder) ;
     abort();
   }        
 
@@ -695,15 +692,15 @@ const Bool_t AliPHOSGetter::PostSDigitizer(const char * name, const char * file)
 
   TTask * sd  = dynamic_cast<TTask*>(fTasksFolder->FindObject("SDigitizer")) ; 
   if ( !sd ) {
-    cerr << "ERROR: AliPHOSGetter::Post Ser -> Task //" << fTasksFolder << "/SDigitizer not found!" << endl;
+    Error("PostSDigitizer", "Task //%s/SDigitizer not found !", fTasksFolder) ;
     return kFALSE ;
   }        
 
   TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Ser ->  //" << fTasksFolder << "/SDigitizer/PHOS/ not found!" << endl;
-      cout <<"INFO: AliPHOSGetter::Post Ser -> Adding  //" << fTasksFolder << "/SDigitizer/PHOS" << endl;
+      Error("PostSDigitizer", "->  //%s/SDigitizer/PHOS/ not found!", fTasksFolder) ;
+      Info("PostSDigitizer", "-> Adding  //%s/SDigitizer/PHOS", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     sd->Add(phos) ; 
@@ -735,8 +732,8 @@ const Bool_t AliPHOSGetter::PostDigits(const char * name) const
 
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post D -> Folder //" << fDigitsFolder << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post D -> Adding Folder //" << fDigitsFolder << "/PHOS/" << endl;
+      Warning("PostDigitizer", "-> Folder //%s/PHOS/ not found!", fDigitsFolder) ;
+      Info("PostDigitizer", "-> Adding Folder //%s/PHOS/", fDigitsFolder) ;
     }
     phosFolder = fDigitsFolder->AddFolder("PHOS", "Digits from PHOS") ;  
   }    
@@ -757,19 +754,19 @@ TObject** AliPHOSGetter::DigitsRef(const char * name) const
   // the hierarchy is //Folders/Run/Event/Data/PHOS/Digits/name
 
   if ( !fDigitsFolder ) {
-    cerr << "ERROR: AliPHOSGetter::DigitsRef -> Folder //" << fDigitsFolder << " not found!" << endl;
+    Error("DigitsRef", "Folder //%s not found !", fDigitsFolder) ;
     abort() ;
   }    
   
   TFolder * phosFolder  = dynamic_cast<TFolder*>(fDigitsFolder->FindObject("PHOS")) ; 
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::DigitsRef -> Folder //" << fDigitsFolder << "/PHOS/ not found!" << endl;
+    Error("DigitsRef", "Folder //%s/PHOS/ not found !", fDigitsFolder) ;
     abort() ;
   }    
 
   TObject * d = phosFolder->FindObject(name) ;
   if(!d) {
-    cerr << "ERROR: AliPHOSGetter::DigitsRef -> object " << name << " not found! " << endl ; 
+    Error("DigitsRef", "object %s not found !", name) ; 
     abort() ;
   }
   else
@@ -784,14 +781,14 @@ const Bool_t AliPHOSGetter::PostDigitizer(AliPHOSDigitizer * digitizer) const
   TTask * sd  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ; 
 
   if ( !sd ) {
-    cerr << "ERROR: AliPHOSGetter::Post Der -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+    Error("PostDigitizer", "Task //%s/Digitizer not found !", fTasksFolder) ;
     return kFALSE ;
   }        
   TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Der ->  //" << fTasksFolder << "/Digitizer/PHOS not found!" << endl;
-      cout <<"INFO: AliPHOSGetter::Post Der -> Adding //" << fTasksFolder << "/Digitizer/PHOS" << endl
+      Error("PostDigitizer", "//%s/Digitizer/PHOS not found!", fTasksFolder) ;
+      Info("PostDigitizer", "Adding //%s/Digitizer/PHOS", fTasksFolder) 
     }
     phos = new TTask("PHOS", "") ; 
     sd->Add(phos) ; 
@@ -814,15 +811,15 @@ const Bool_t AliPHOSGetter::PostDigitizer(const char * name) const
 
   TTask * d  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ; 
   if ( !d ) {
-    cerr << "ERROR: AliPHOSGetter::Post Der -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+    Error("PostDigitizer", "Task //%s/Digitizer not found !", fTasksFolder) ;
     return kFALSE ;
   }        
 
   TTask * phos = dynamic_cast<TTask*>(d->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Der -> //" << fTasksFolder << "/Digitizer/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Der -> Adding //" << fTasksFolder << "/Digitizer/PHOS" << endl;
+      Warning("PostDigitizer", "//%s/Digitizer/PHOS not found!", fTasksFolder) 
+      Info("PostDigitizer", "Adding //%s/Digitizer/PHOS", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     d->Add(phos) ; 
@@ -851,13 +848,13 @@ TObject** AliPHOSGetter::DigitizerRef(const char * name) const
 {  
   TTask * sd  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ; 
   if ( !sd ) {
-    cerr << "ERROR: AliPHOSGetter::Post DerRef -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+    Error("DigitizerRef", "Task //%s/Digitizer not found !", fTasksFolder) ;
     abort();
   }        
 
   TTask * phos = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
-    cerr <<"ERROR: AliPHOSGetter::Post DerRef ->  //" << fTasksFolder << "/Digitizer/PHOS" << endl;
+    Error("DigitizerRef", "//%s/Digitizer/PHOS", fTasksFolder) ;
     abort();
   }        
 
@@ -878,8 +875,8 @@ const Bool_t AliPHOSGetter::PostRecPoints(const char * name) const
   
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/" << endl;
+      Warning("PostRecPoints", "-> Folder //%s/PHOS/ not found!", fRecoFolder->GetName()) ;
+      Info("PostRecPoints", "-> Adding Folder //%s/PHOS/", fRecoFolder->GetName()) ;
     }
     phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;  
   }    
@@ -888,8 +885,8 @@ const Bool_t AliPHOSGetter::PostRecPoints(const char * name) const
   TFolder * phosRPoEMCAFolder  = dynamic_cast<TFolder*>(phosFolder->FindObject("EMCARecPoints")) ;
   if ( !phosRPoEMCAFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints" << endl;
+      Warning("PostRecPoints", "-> Folder //%s/PHOS/EMCARecPoints/ not found!", fRecoFolder->GetName()) ;
+      Info("PostRecPoints", "-> Adding Folder //%s/PHOS/EMCARecPoints", fRecoFolder->GetName()) ;
     }
     phosRPoEMCAFolder = phosFolder->AddFolder("EMCARecPoints", "EMCA RecPoints from PHOS") ;  
   }    
@@ -905,8 +902,8 @@ const Bool_t AliPHOSGetter::PostRecPoints(const char * name) const
   TFolder * phosRPoCPVFolder  = dynamic_cast<TFolder*>(phosFolder->FindObject("CPVRecPoints")) ;
   if ( !phosRPoCPVFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post RPo -> Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Rpo -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/" << endl;
+      Warning("PostRecPoints", "-> Folder //%s/PHOS/CPVRecPoints/ not found!", fRecoFolder->GetName()) ;
+      Info("PostRecPoints", "-> Adding Folder //%s/PHOS/CPVRecPoints/", fRecoFolder->GetName()) ;
     }
     phosRPoCPVFolder = phosFolder->AddFolder("CPVRecPoints", "CPV RecPoints from PHOS") ;  
   }    
@@ -927,20 +924,20 @@ TObject** AliPHOSGetter::EmcRecPointsRef(const char * name) const
   // the hierarchy is //Folders/Run/Event/RecData/PHOS/EMCARecPoints/name
    
   if ( !fRecoFolder ) {
-    cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> Folder //" << fRecoFolder->GetName() << " not found!" << endl;
+    Error("EmcRecPointsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
     abort() ; 
   }    
 
   TFolder * phosFolder  = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/EMCARecPoints")) ; 
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/EMCARecPoints/ not found!" << endl;
+     Error("EmcRecPointsRef", "Folder //%s/PHOS/EMCARecPoints/ not found !", fRecoFolder->GetName() ) ;
     abort() ;
   }    
 
 
   TObject * erp = phosFolder->FindObject(name ) ;
   if ( !erp )   {
-    cerr << "ERROR: AliPHOSGetter::EmcRecPointsRef -> object " << name << " not found! " << endl ; 
+    Error("EmcRecPointsRef", "object %s not found !", name) ; 
     abort() ;
   }
   return phosFolder->GetListOfFolders()->GetObjectRef(erp) ;
@@ -954,19 +951,19 @@ TObject** AliPHOSGetter::CpvRecPointsRef(const char * name) const
   // the hierarchy is //Folders/Run/Event/RecData/PHOS/CPVRecPoints/name
    
   if ( !fRecoFolder ) {
-    cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> Folder //" << fRecoFolder->GetName() << " not found!" << endl;
+    Error("CpvRecPointsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
     abort() ; 
   }    
 
   TFolder * phosFolder  = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/CPVRecPoints")) ; 
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/CPVRecPoints/" << endl;
+    Error("CpvRecPointsRef", "Folder //%s/PHOS/CPVRecPoints/ not found !", fRecoFolder->GetName() ) ;
     abort() ;
   }    
 
   TObject * crp = phosFolder->FindObject(name ) ;
   if ( !crp )   {
-    cerr << "ERROR: AliPHOSGetter::CpvRecPointsRef -> object " << name << " not found " << endl ; 
+    Error("CpvRecPointsRef", "object %s nott found", name ) ; 
     abort() ;
   }
   return phosFolder->GetListOfFolders()->GetObjectRef(crp) ;
@@ -982,15 +979,15 @@ const Bool_t AliPHOSGetter::PostClusterizer(AliPHOSClusterizer * clu) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Rer -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+    Error("PostClusterizer", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
     return kFALSE ;
   }        
         
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl
+      Warning("PostClusterizer", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) 
+      Info("PostClusterizer", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) 
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -999,7 +996,7 @@ const Bool_t AliPHOSGetter::PostClusterizer(AliPHOSClusterizer * clu) const
   AliPHOSClusterizer * phoscl = dynamic_cast<AliPHOSClusterizer*>(phos->GetListOfTasks()->FindObject(clu->GetName())) ; 
   if (phoscl) { 
     if (fDebug)
-      cout << "INFO: AliPHOSGetter::Post Rer -> Task " << clu->GetName() << " already exists" << endl ; 
+      Info("PostClusterizer", "Task %s already exists", clu->GetName()) ; 
     phoscl->Delete() ; 
     phos->GetListOfTasks()->Remove(phoscl) ;
   }
@@ -1014,13 +1011,13 @@ TObject** AliPHOSGetter::ClusterizerRef(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::ClusterizerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+    Error("ClusterizerRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
     abort() ;
   }        
         
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
-    cerr <<"WARNING: AliPHOSGetter::ClusterizerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl
+    Error("ClusterizerRef", " //%s/Reconstructioner/PHOS not founf !", fTasksFolder->GetName() ) 
     abort() ; 
   }   
 
@@ -1041,7 +1038,7 @@ TObject** AliPHOSGetter::ClusterizerRef(const char * name) const
   if(clu) 
     return l->GetObjectRef(clu) ;
   else{
-    cerr << "ERROR: AliPHOSGetter::ClusterizerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/clusterizer " <<  name << " not found!" << endl;
+    Error("ClusterizerRef", "Task //%s/Reconstructioner/clusterizer/%s not found", fTasksFolder->GetName(), name) ;
     abort() ;
   }
 }
@@ -1055,15 +1052,15 @@ const Bool_t AliPHOSGetter::PostClusterizer(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Rer -> Task//" << fTasksFolder << "/Reconstructioner not found!" << endl
+    Error("PostClusterizer", "Task//%s/Reconstructioner not found !", fTasksFolder) 
     return kFALSE ;
   }        
   
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
-      cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+      Warning("PostClusterizer", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) ;
+      Info("PostClusterizer", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -1099,8 +1096,8 @@ const Bool_t AliPHOSGetter::PostTrackSegments(const char * name) const
   
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS" << endl;
+      Warning("PostTrackSegments", "-> Folder //%s/PHOS/ not found", fRecoFolder->GetName()) ;
+      Info("PostTrackSegments", "-> Adding Folder //%s/PHOS", fRecoFolder->GetName()) ;
     }
     phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;  
   }    
@@ -1108,8 +1105,8 @@ const Bool_t AliPHOSGetter::PostTrackSegments(const char * name) const
   TFolder * phosTSFolder  = dynamic_cast<TFolder*>(phosFolder->FindObject("TrackSegments")) ;
   if ( !phosTSFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl
-      cout << "INFO:    AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/" << endl
+      Warning("PostTrackSegments", "-> Folder //%s/PHOS/TrackSegments/ not found!", fRecoFolder->GetName() ) 
+      Info("PostTrackSegments", "-> Adding Folder //%s/PHOS/TrackSegments/", fRecoFolder->GetName()) 
     }
     phosTSFolder = phosFolder->AddFolder("TrackSegments", "TrackSegments from PHOS") ;  
   }    
@@ -1130,19 +1127,19 @@ TObject** AliPHOSGetter::TrackSegmentsRef(const char * name) const
   // the hierarchy is //Folders/Run/Event/RecData/PHOS/TrackSegments/name
 
  if ( !fRecoFolder ) {
-    cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> Folder //" << fRecoFolder->GetName() << "not found!" << endl;
+    Error("TrackSegmentsRef", "Folder //%s not found !", fRecoFolder->GetName() ) ;
     abort() ; 
   }    
 
   TFolder * phosFolder  = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/TrackSegments")) ; 
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl;
+    Error("TrackSegmentsRef", "Folder //%s/PHOS/TrackSegments/ not found !", fRecoFolder->GetName() ) ;
     abort() ;
   }    
   
   TObject * tss =  phosFolder->FindObject(name) ;
   if (!tss) {
-    cerr << "ERROR: AliPHOSGetter::TrackSegmentsRef -> object " << name << " not found! " << endl ;  
+    Error("TrackSegmentsRef", "object %s not found !", name) ;  
     abort() ;  
   }
   return phosFolder->GetListOfFolders()->GetObjectRef(tss) ;
@@ -1157,15 +1154,15 @@ const Bool_t AliPHOSGetter::PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tsm
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+    Error("PostTrackSegmentMaker", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
     return kFALSE ;
   }        
         
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+      Warning("PostTrackSegmentMaker", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) 
+      Info("PostTrackSegmentMaker", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -1190,15 +1187,15 @@ const Bool_t AliPHOSGetter::PostTrackSegmentMaker(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
   
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+    Error("PostTrackSegmentMaker", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
     return kFALSE ;
   }        
   
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Ter -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Ter -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
+      Warning("PostTrackSegmentMaker", "//%s/Reconstructioner/PHOS not found!", fTasksFolder->GetName() ) 
+      Info("PostTrackSegmentMaker", "Adding //%s/Reconstructioner/PHOS", fTasksFolder->GetName()) ;
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -1231,13 +1228,13 @@ TObject** AliPHOSGetter::TSMakerRef(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+    Error("TSMakerRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
     abort() ;
   }        
         
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
-    cerr <<"WARNING: AliPHOSGetter::TSMakerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl
+    Error("TSMakerRef", "//%s/Reconstructioner/PHOS not found !", fTasksFolder->GetName() ) 
     abort()  ; 
   }   
 
@@ -1258,7 +1255,7 @@ TObject** AliPHOSGetter::TSMakerRef(const char * name) const
   if(tsm) 
     return l->GetObjectRef(tsm) ;
   else {
-    cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/TrackSegmentMarker/" << name << " not found!" << endl;
+   Error("TSMakerRef", "Task //%s/Reconstructioner/PHOS/TrackSegmentMarker/%s not found !", fTasksFolder->GetName(),  name) ;
     abort() ;
   } 
 } 
@@ -1273,8 +1270,8 @@ const Bool_t AliPHOSGetter::PostRecParticles(const char * name) const
   
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post RPa -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Rpa -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/" << endl;
+      Warning("PostRecParticles", "-> Folder //%s/PHOS/ not found!", fRecoFolder->GetName()) ;
+      Info("PostRecParticles", "-> Adding Folder //%s/PHOS/", fRecoFolder->GetName()) ;
     }
     phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;  
   }    
@@ -1282,8 +1279,8 @@ const Bool_t AliPHOSGetter::PostRecParticles(const char * name) const
  TFolder * phosRPaFolder  = dynamic_cast<TFolder*>(phosFolder->FindObject("RecParticles")) ;
   if ( !phosRPaFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post RPa -> Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post RPa -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/" << endl;
+      Warning("PostRecParticles", "-> Folder //%s/PHOS/RecParticles/ not found!", fRecoFolder->GetName()) ;
+      Info("PostRecParticles", "-> Adding Folder //%s/PHOS/RecParticles/", fRecoFolder->GetName()) ;
     }
     phosRPaFolder = phosFolder->AddFolder("RecParticles", "RecParticles from PHOS") ;  
   } 
@@ -1304,19 +1301,19 @@ TObject** AliPHOSGetter::RecParticlesRef(const char * name) const
   // the hierarchy is //Folders/Run/Event/RecData/PHOS/TrackSegments/name
 
  if ( !fRecoFolder ) {
-    cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> Folder//" << fRecoFolder->GetName() << " not found!" << endl
+    Error("RecParticlesRef", "Folder//%s not found !", fRecoFolder->GetName() ) 
     abort() ; 
   }    
 
   TFolder * phosFolder  = dynamic_cast<TFolder*>(fRecoFolder->FindObject("PHOS/RecParticles")) ; 
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> Folder //" << fRecoFolder->GetName() << "/PHOS/RecParticles/ not found!" << endl;
+    Error("RecParticlesRef", "Folder //%s/PHOS/RecParticles/ not found !", fRecoFolder->GetName() ) ;
     abort() ;
   }    
 
   TObject * tss =  phosFolder->FindObject(name  ) ;
   if (!tss) {
-    cerr << "ERROR: AliPHOSGetter::RecParticlesRef -> object " << name << " not found! " << endl ; 
+    Error("RecParticlesRef", "object %s not found !", name) ; 
     abort() ;  
   }
   return phosFolder->GetListOfFolders()->GetObjectRef(tss) ;
@@ -1329,15 +1326,15 @@ const Bool_t AliPHOSGetter::PostPID(AliPHOSPID * pid) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+    Error("PostPID", "Task //%s/Reconstructioner not found !", fTasksFolder) ;
     return kFALSE ;
   }        
   
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+      Warning("PostPID", "//%s/Reconstructioner/PHOS not found!", fTasksFolder) 
+      Info("PostPID", "Adding //%s/Reconstructioner/PHOS", fTasksFolder) ;
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -1346,8 +1343,7 @@ const Bool_t AliPHOSGetter::PostPID(AliPHOSPID * pid) const
   AliPHOSPID * phospid = dynamic_cast<AliPHOSPID*>(phos->GetListOfTasks()->FindObject(pid->GetName())) ; 
   if (phospid) { 
     if (fDebug)
-      cout << "INFO: AliPHOSGetter::Post Per -> Task " << pid->GetName()
-          << " already exists" << endl ; 
+      Info("PostPID", "-> Task %s qlready exists", pid->GetName()) ; 
     phos->GetListOfTasks()->Remove(phospid) ;
   }
   
@@ -1363,15 +1359,15 @@ const Bool_t AliPHOSGetter::PostPID(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
+    Error("PostPID", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
     return kFALSE ;
   }        
   
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
     if (fDebug) {
-      cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl
-      cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
+      Warning("PostPID", "//%s/Reconstructioner/PHOS not found!", fTasksFolder->GetName()) 
+      Info("PostPID", "Adding //%s/Reconstructioner/PHOS", fTasksFolder->GetName()) ;
     }
     phos = new TTask("PHOS", "") ; 
     tasks->Add(phos) ; 
@@ -1404,13 +1400,13 @@ TObject** AliPHOSGetter::PIDRef(const char * name) const
   TTask * tasks  = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ; 
 
   if ( !tasks ) {
-    cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
-    abort() ;
+    Error("PIDRef", "Task //%s/Reconstructioner not found !", fTasksFolder->GetName() ) ;
+    abort() ; 
   }        
         
   TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if ( !phos )  {
-    cerr << "ERROR: AliPHOSGetter::PIDRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl
+    Error("PIDRef", "//%s/Reconstructioner/PHOS not found !", fTasksFolder->GetName() ) 
     abort()  ; 
   }   
   
@@ -1431,7 +1427,7 @@ TObject** AliPHOSGetter::PIDRef(const char * name) const
   if(pid) 
     return l->GetObjectRef(pid) ;
   else {
-    cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/PID/" <<  name << " not found!" << endl;
+    Error("PIDRef", "Task //%s/Reconstructioner/PHOS/PID/%s not found !", fTasksFolder->GetName(), name) ;
     abort() ;
   }
   
@@ -1446,8 +1442,8 @@ const Bool_t AliPHOSGetter::PostQA(void) const
   TFolder * phosFolder = dynamic_cast<TFolder*>(fQAFolder->FindObject("PHOS")) ; 
   if ( !phosFolder ) {
     if (fDebug) {
-      cout << "WARNING: AliPHOSGetter::Post Q -> Folder //" << fQAFolder << "/PHOS/ not found!" << endl;
-      cout << "INFO:    AliPHOSGetter::Post Q -> Adding Folder //" << fQAFolder << "/PHOS/" << endl;
+      Warning("PostQA", "-> Folder //%s/PHOS/ not found!", fQAFolder) ;
+      Info("PostQA", "-> Adding Folder //%s/PHOS", fQAFolder) ;
     }
     phosFolder = fQAFolder->AddFolder("PHOS", "QA from PHOS") ; 
   }      
@@ -1462,13 +1458,13 @@ TObject** AliPHOSGetter::AlarmsRef(void) const
   
   // the hierarchy is //Folders/Run/Conditions/QA/PHOS
   if ( !fQAFolder ) {
-    cerr << "ERROR: AliPHOSGetter::AlarmsRef -> Folder //" << fQAFolder << " not found!" << endl;
+    Error("AlarmsRef", "Folder //%s not found !", fQAFolder) ;
     abort() ;
   }    
  
   TFolder * phosFolder = dynamic_cast<TFolder *>(fQAFolder->FindObject("PHOS")) ;
   if ( !phosFolder ) {
-    cerr << "ERROR: AliPHOSGetter::AlarmsRef -> Folder //" << fQAFolder << "/PHOS/ not found!" << endl;
+    Error("AlarmsRef", "Folder //%s/PHOS/ not found !", fQAFolder) ;
     abort() ;
   }
    
@@ -1498,7 +1494,7 @@ TTree * AliPHOSGetter::TreeK(TString filename)
   treeName += EventNumber()  ; 
   TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
   if (!tree && fDebug)  
-    cout << "WARNING: AliPHOSGetter::TreeK -> " << treeName.Data() << " not found in " << filename.Data() << endl ; 
+    Warning("TreeK", "-> %s not found in %s", treeName.Data(), filename.Data()) ; 
   
   return tree ;                      
 }
@@ -1522,7 +1518,7 @@ TTree * AliPHOSGetter::TreeH(TString filename)
   treeName += EventNumber()  ; 
   TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
   if (!tree && fDebug)  
-    cout << "WARNING: AliPHOSGetter::TreeH -> " << treeName.Data() << " not found in " << filename.Data() << endl ; 
+    Warning("TreeH", "-> %s not found in %s", treeName.Data(), filename.Data()) ; 
   
   return tree ;                      
 }
@@ -1546,7 +1542,7 @@ TTree * AliPHOSGetter::TreeS(TString filename)
   treeName += EventNumber()  ; 
   TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
   if (!tree && fDebug)  
-    cout << "WARNING: AliPHOSGetter::TreeS -> " << treeName.Data() << " not found in " << filename.Data() << endl 
+    Warning("TreeS", "-> %s not found in %s", treeName.Data(), filename.Data() )
   
   return tree ;                      
 }
@@ -1570,7 +1566,7 @@ TTree * AliPHOSGetter::TreeD(TString filename)
   treeName += EventNumber()  ; 
   TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
   if (!tree && fDebug)  
-    cout << "WARNING: AliPHOSGetter::TreeD -> " << treeName.Data() << " not found in " << filename.Data() << endl ; 
+    Warning("TreeD", "-> %s not found in %s", treeName.Data(), filename.Data()) ; 
   
   return tree ;                      
 }
@@ -1626,7 +1622,7 @@ Int_t AliPHOSGetter::ReadTreeD(const Int_t event)
     treeD = dynamic_cast<TTree*>(file->Get(treeName.Data()));
     if(!treeD){ // TreeD not found in header file
       if (fDebug)
-       cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find TreeD in " << fDigitsFileName.Data() << endl;
+       Warning("ReadTreeD", "-> Cannot find TreeD in %s", fDigitsFileName.Data()) ;
       return 1;
     }
   }
@@ -1655,8 +1651,7 @@ Int_t AliPHOSGetter::ReadTreeD(const Int_t event)
   
   if ( !phosfound || !digitizerfound ) {
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find Digits and/or Digitizer with name " 
-          << fDigitsTitle << endl ;
+      Warning("ReadTreeD", "-> Cannot find Digits and/or Digitizer with name %s", fDigitsTitle.Data()) ;
     return 2; 
   }   
   
@@ -1707,14 +1702,14 @@ void AliPHOSGetter::ReadCalibrationDB(const char * database,const char * filenam
   if(!file)
     file = TFile::Open(filename);
   if(!file){
-    cout << "Can not open file " << filename << endl ;
+    Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
     return ;
   }
   if(fcdb)
     fcdb->Delete() ;
   fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
   if(!fcdb)
-    cout << "No database " << database << " in file " << filename << endl ;
+    Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
 }
 
 //____________________________________________________________________________ 
@@ -1727,7 +1722,7 @@ Int_t AliPHOSGetter::ReadTreeH()
   if(!treeH) {// TreeH not found in header file
  
     if (fDebug) 
-      cout <<   "WARNING: AliPHOSGetter::ReadTreeH -> Cannot find TreeH in " << fHeaderFile << endl ;
+      Warning("ReadTreeH", "-> Cannot find TreeH in %s", fHeaderFile.Data() ) ;
     
     TString searchFileName("PHOS.Hits") ; 
     if((strcmp(fBranchTitle.Data(),"Default")!=0)&&(strcmp(fBranchTitle.Data(),"")!=0)){
@@ -1738,10 +1733,10 @@ Int_t AliPHOSGetter::ReadTreeH()
     
     if ( (treeH = TreeH(searchFileName)) ) { //found TreeH in the file which contains the hits
       if (fDebug) 
-       cout << "INFO: AliPHOSGetter::ReadTreeH -> TreeH found in " << searchFileName.Data() << endl ; 
+       Info("ReadTreeH", "-> TreeH found in %s", searchFileName.Data()) ; 
       
     } else {
-      cerr << "ERROR: AliPHOSGetter::ReadTreeH -> TreeH not found " << endl ; 
+      Error("ReadTreeH", "TreeH not found") ; 
       return 1;
     }  
   }
@@ -1749,7 +1744,7 @@ Int_t AliPHOSGetter::ReadTreeH()
   TBranch * hitsbranch = static_cast<TBranch*>(treeH->GetBranch("PHOS")) ;
   if ( !hitsbranch ) {
     if (fDebug)
-      cout << "WARNING:  AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ; 
+      Warning("ReadTreeH", "-> Cannot find branch PHOS") ; 
     return 2;
   }
   if(!Hits())
@@ -1782,19 +1777,19 @@ Int_t AliPHOSGetter::ReadTreeH()
 }
 
 //____________________________________________________________________________ 
-void AliPHOSGetter::Track(Int_t itrack) 
+void AliPHOSGetter::Track(const Int_t itrack) 
 {
   // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
 
   if(gAlice->TreeH()== 0){
-    cerr <<   "ERROR: AliPHOSGetter::ReadTreeH: -> Cannot read TreeH " << endl ;
+    Error("Track", "Cannot read TreeH") ;
     return ;
   }
   
   TBranch * hitsbranch = dynamic_cast<TBranch*>(gAlice->TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
   if ( !hitsbranch ) {
     if (fDebug)
-      cout << "WARNING:  AliPHOSGetter::ReadTreeH -> Cannot find branch PHOS" << endl ; 
+      Warning("Track", "Cannot find branch PHOS") ; 
     return ;
   }  
   if(!Hits())
@@ -1813,14 +1808,14 @@ void AliPHOSGetter::ReadTreeQA()
   // so far only PHOS knows about this Tree  
 
   if(PHOS()->TreeQA()== 0){
-    cerr <<   "ERROR: AliPHOSGetter::ReadTreeQA: can not read TreeQA " << endl ;
+    Error("ReadTreeQA", "Cannot read TreeQA") ;
     return ;
   }
   
   TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS") ; 
   if (!qabranch) { 
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
+      Warning("ReadTreeQA", "Cannot find QA Alarms for PHOS");
     return ; 
   }   
   
@@ -1864,7 +1859,7 @@ Int_t AliPHOSGetter::ReadTreeR(const Int_t event)
     treeR = dynamic_cast<TTree*>(file->Get(treeName.Data()));
     if(!treeR){ // TreeR not found in header file
       if (fDebug)
-       cout << "WARNING: AliPHOSGetter::ReadTreeD -> Cannot find TreeR in " << fRecPointsFileName.Data() << endl;
+       Warning("ReadTreeD", "-> Cannot find TreeR in %s", fRecPointsFileName.Data()) ;
       return 1;
     }
   }
@@ -1900,8 +1895,7 @@ Int_t AliPHOSGetter::ReadTreeR(const Int_t event)
 
   if ( !phosemcrpfound || !phoscpvrpfound || !clusterizerfound) {
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecPoints and/or Clusterizer with name " 
-          << fRecPointsTitle << endl ;
+      Warning("ReadTreeR", "-> Cannot find RecPoints and/or Clusterizer with name %s", fRecPointsTitle.Data() ) ;
  
   } else { 
     if(!EmcRecPoints(fRecPointsTitle) ) 
@@ -1940,8 +1934,7 @@ Int_t AliPHOSGetter::ReadTreeR(const Int_t event)
 
   if ( !phostsfound || !tsmakerfound ) {
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find TrackSegments and/or TrackSegmentMaker with name "
-          << fTrackSegmentsTitle << endl ;
+      Warning("ReadTreeR", "-> Cannot find TrackSegments and/or TrackSegmentMaker with name %s", fTrackSegmentsTitle.Data() ) ;
   } else { 
     // Read and Post the TrackSegments
     if(!TrackSegments(fTrackSegmentsTitle))
@@ -1977,8 +1970,7 @@ Int_t AliPHOSGetter::ReadTreeR(const Int_t event)
   
   if ( !phosrpafound || !pidfound ) {
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeR -> Cannot find RecParticles and/or PID with name " 
-          << fRecParticlesTitle << endl ; 
+      Warning("ReadTreeR", "-> Cannot find RecParticles and/or PID with name %s", fRecParticlesTitle.Data() ) ; 
   } else { 
     // Read and Post the RecParticles
     if(!RecParticles(fRecParticlesTitle)) 
@@ -2030,7 +2022,7 @@ Int_t AliPHOSGetter::ReadTreeS(const Int_t event)
 
     if(!treeS){ // TreeS not found in header file
       if (fDebug)
-       cout << "WARNING: AliPHOSGetter::ReadTreeS -> Cannot find TreeS in " << fileName.Data() << endl;
+       Warning("ReadTreeS", "-> Cannot find TreeS in %s", fileName.Data()) ;
       return 1;
     }
     
@@ -2056,8 +2048,7 @@ Int_t AliPHOSGetter::ReadTreeS(const Int_t event)
     }
     if ( !phosfound || !sdigitizerfound ) {
       if (fDebug)
-       cout << "WARNING: AliPHOSDigitizer::ReadSDigits -> Digits and/or Digitizer branch with name " << GetName() 
-            << " not found" << endl ;
+       Warning("ReadSDigits", "-> Digits and/or Digitizer branch with name %s not found", GetName()) ;
       return 2; 
     }   
     
@@ -2116,7 +2107,7 @@ void AliPHOSGetter::ReadTreeS(TTree * treeS, Int_t input)
   }
   if ( !phosfound || !sdigitizerfound ) {
     if (fDebug)
-      cout << "WARNING: AliPHOSGetter::ReadTreeS -> Digits and/or Digitizer branch not found" << endl ;
+      Warning("ReadTreeS", "-> Digits and/or Digitizer branch not found") ;
     return ; 
   }   
   
@@ -2153,13 +2144,13 @@ void AliPHOSGetter::ReadPrimaries()
   
   if (TreeK(fHeaderFile)) { // treeK found in header file
     if (fDebug) 
-      cout << "INFO: AliPHOSGetter::ReadPrimaries -> TreeK found in " << fHeaderFile.Data() << endl 
+      Info("ReadPrimaries", "-> TreeK found in %s", fHeaderFile.Data() )
     fNPrimaries = gAlice->GetNtrack() ; 
     fAlice = 0 ; 
   
   } else { // treeK not found in header file
     
-    cerr << "ERROR: AliPHOSGetter::ReadPrimaries -> TreeK not  found " << endl ; 
+    Error("ReadPrimaries", "TreeK not found") ; 
     return ;
     
   }
@@ -2175,7 +2166,7 @@ void AliPHOSGetter::Event(const Int_t event, const char* opt)
   // Reads the content of all Tree's S, D and R
 
   if (event >= gAlice->TreeE()->GetEntries() ) {
-    cerr << "ERROR: AliPHOSGetter::Event -> " << event << " not found in TreeE!" << endl ; 
+    Error("Event", "%d not found in TreeE !", event) ; 
     return ; 
   }
 
@@ -2292,7 +2283,7 @@ TObject * AliPHOSGetter::ReturnO(TString what, TString name, TString file) const
   }
   if (!phosO) {
     if(fDebug)
-      cerr << "WARNING : AliPHOSGetter::ReturnO -> Object " << what << " not found in PHOS" << endl ; 
+      Warning("ReturnO", "Object %s not found in PHOS", what.Data() ) ; 
     return 0 ;
   }
 
@@ -2318,13 +2309,13 @@ const TTask * AliPHOSGetter::ReturnT(TString what, TString name) const
   TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject(search)) ; 
 
   if (!tasks) {
-    cerr << "ERROR: AliPHOSGetter::ReturnT -> Task " << what << " not found!" << endl ;  
+    Error("ReturnT", "Task %s not found !", what.Data() ) ;  
     return 0 ; 
   }
 
   TTask * phosT = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ; 
   if (!phosT) { 
-    cerr << "ERROR: AliPHOSGetter::ReturnT -> Task " << what << "/PHOS not found!" << endl ;  
+     Error("ReturnT", "Task %s/PHOS not found !", what.Data() ) ;  
     return 0 ; 
   }
   
@@ -2365,7 +2356,7 @@ const TTask * AliPHOSGetter::ReturnT(TString what, TString name) const
   }
   
   if(fDebug)
-    cout << "WARNING: AliPHOSGetter::ReturnT -> Task " << search << "/PHOS/" << name << " not found!" << endl ; 
+    Warning("ReturnT", "-> Task %s/PHOS/%s not found", search.Data(), name.Data() ) ; 
   return 0 ;
 }
 
@@ -2395,7 +2386,7 @@ void AliPHOSGetter::RemoveTask(TString opt, TString name) const
       return ; 
   }
   else {
-    cerr << "WARNING: AliPHOSGetter::RemoveTask -> Unknown option " << opt.Data() << endl 
+    Warning("RemoveTask", "Unknown option %s", opt.Data() )
     return ; 
   }
   phos =  dynamic_cast<TTask*>(task->GetListOfTasks()->FindObject("PHOS")) ;
@@ -2466,7 +2457,7 @@ void AliPHOSGetter::RemoveObjects(TString opt, TString name) const
   }
   
   else {
-    cerr << "WARNING: AliPHOSGetter::RemoveObjects -> Unknown option " << opt.Data() << endl ; 
+    Warning("RemoveObjects", "Unknown option %s", opt.Data() ) ; 
     return ; 
   }
   
index e15f6d6aca628a384f1842c80de00a7ad5fd125e..a62c49151883c2f107acbe60d0cfce678b98a04e 100644 (file)
@@ -27,7 +27,6 @@ class TTask ;
 
 // --- Standard library ---
 #include <stdlib.h>
-#include <iostream.h>
 
 // --- AliRoot header files ---
 
@@ -52,7 +51,7 @@ class AliPHOSGetter : public TObject {
  public:
   
   AliPHOSGetter(){    // ctor: this is a singleton, the ctor should never be called but cint needs it as public
-    cerr << "ERROR: AliPHOSGetter is a singleton default ctor not callable" << endl ;
+    Error("ctor", "AliPHOSGetter is a singleton default ctor not callable") ;
     abort() ; 
   } 
   AliPHOSGetter(const AliPHOSGetter & obj) {
index 03c803cc624f76238657e842cb436d82c1a69e09..4185f61cff6716051d496c4c0c562045bb6ef2d3 100644 (file)
@@ -26,7 +26,6 @@
 // --- Standard library ---
 #include <string.h>
 #include <stdlib.h>
-#include <strstream.h>
 
 // --- AliRoot header files ---
 #include "AliPHOSHit.h"
@@ -142,7 +141,8 @@ ostream& operator << (ostream& out, const AliPHOSHit& hit)
 {
   // Print out Id and energy 
   
-  out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << "  " << hit.GetTime() << endl ;
+  //out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << "  " << hit.GetTime() << endl ;
+  Warning("operator <<", "Implement differently") ; 
   return out ;
 }
 
index e278613cfe6d50b7286bf2f14cb934bf9734ac74..c8dd1e3f31ff6b64bd38c862c89117b60121ca33 100644 (file)
@@ -19,8 +19,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 
 class AliPHOSHit : public AliHit {
 
index ff75b0666dd02f2a3c41149d7c0f23012c785503..09d7bb31b39721e00ad31f2754d54f38586dda18 100644 (file)
@@ -37,8 +37,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSIhepAnalyze.h"
@@ -92,19 +90,19 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
   AliPHOSGetter * please = AliPHOSGetter::GetInstance(GetFileName().Data(),"PHOS");
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
 
-  cout << "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths"<<endl;
+  Info("AnalyzeCPV1", "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths") ;
   for ( Int_t ievent=0; ievent<Nevents; ievent++) {  
     
     Int_t nTotalGen = 0;
     Int_t nChargedGen = 0;
 
     Int_t ntracks = gAlice->GetEvent(ievent);
-    cout<<" >>>>>>>Event "<<ievent<<".<<<<<<<"<<endl;
+    Info("AnalyzeCPV1", ">>>>>>>Event %d .<<<<<<<", ievent) ;
     
     // Get branch of CPV impacts
     if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) {
-      cout<<" Couldn't find branch PHOSCpvImpacts. Exit."<<endl;
-      return;
+      Info("AnalyzeCPV1", "Couldn't find branch PHOSCpvImpacts. Exit.") ;
+      return; 
     }
  
     // Create and fill arrays of hits for each CPV module
@@ -210,10 +208,10 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      cout<<" Impact global (X,Z,Y) = "<<gImpX<<" "<<gImpZ<<" "<<gImpY<<endl;
-      cout<<" Impact local (X,Z) = "<<locImpX<<" "<<locImpZ<<endl;
-      cout<<" Reconstructed (X,Z) = "<<xrec<<" "<<zrec<<endl;
-      cout<<" dxmin "<<dxmin<<" dzmin "<<dzmin<<endl<<endl;
+      Info("AnalyzeCPV1", "Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
+      Info("AnalyzeCPV1", "Impact local (X,Z) = %f %f", locImpX, locImpZ);
+      Info("AnalyzeCPV1", "Reconstructed (X,Z) = %f %f", xrec, zrec);
+      Info("AnalyzeCPV1", "dxmin %f dzmin %f", dxmin, dzmin);
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -223,9 +221,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    cout<<"++++ Event "<<ievent<<": total "<<nTotalGen<<" impacts, "
-       <<nChargedGen<<" charged impacts and "<<please->CpvRecPoints()->GetEntries()
-       <<" rec. points."<<endl<<endl;
+    Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d charged impacts and %d  rec. points.", 
+          ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries()) ;
   }
   // Save histograms
 
@@ -312,17 +309,17 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
   AliPHOSGetter * please = AliPHOSGetter::GetInstance(GetFileName().Data(),"PHOS");
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
 
-  cout << "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths"<<endl;
+  Info("AnalyzeCPV1", "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths");
   for ( Int_t ievent=0; ievent<Nevents; ievent++) {  
     
     Int_t nTotalGen = 0;
 
     Int_t ntracks = gAlice->GetEvent(ievent);
-    cout<<" >>>>>>>Event "<<ievent<<".<<<<<<<"<<endl;
+    Info("AnalyzeCPV1", " >>>>>>>Event %d .<<<<<<<", ievent) ;
     
     // Get branch of EMC impacts
     if (! (branchEMCimpacts =gAlice->TreeH()->GetBranch("PHOSEmcImpacts")) ) {
-      cout<<" Couldn't find branch PHOSEmcImpacts. Exit."<<endl;
+      Info("AnalyzeCPV1", " Couldn't find branch PHOSEmcImpacts. Exit.");
       return;
     }
  
@@ -423,10 +420,10 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      cout<<" Impact global (X,Z,Y) = "<<gImpX<<" "<<gImpZ<<" "<<gImpY<<endl;
-      cout<<" Impact local (X,Z) = "<<locImpX<<" "<<locImpZ<<endl;
-      cout<<" Reconstructed (X,Z) = "<<xrec<<" "<<zrec<<endl;
-      cout<<" dxmin "<<dxmin<<" dzmin "<<dzmin<<endl<<endl;
+      Info("AnalyzeCPV1", " Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY);
+      Info("AnalyzeCPV1", " Impact local (X,Z) = %f %f", locImpX, locImpZ);
+      Info("AnalyzeCPV1", " Reconstructed (X,Z) = %f %f", xrec, zrec);
+      Info("AnalyzeCPV1", " dxmin %f dzmin %f", dxmin, dzmin) ;
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -436,8 +433,8 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    cout<<"++++ Event "<<ievent<<": total "<<nTotalGen<<" impacts, "
-       <<please->EmcRecPoints()->GetEntriesFast()<<" Emc rec. points."<<endl<<endl;
+    Info("AnalyzeCPV1", "++++ Event %d : total  %d impacts,  %d Emc rec. points.", 
+        ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast()) ; 
 
   }
   // Save histograms
@@ -540,7 +537,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
           
       for (Int_t itrack=0; itrack<ntracks; itrack++) {
        branchCPVimpacts ->SetAddress(&fCpvImpacts);
-       cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+       Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
        branchCPVimpacts ->GetEntry(itrack,0);
 
        for (Int_t iModule=0; iModule < nOfModules; iModule++) {
@@ -573,7 +570,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
                Float_t dz = GenHit1->Z() - GenHit2->Z();
                Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
                hDrij_cpv_g->Fill(dr);
-//                     cout<<"(dx dz dr): "<<dx<<" "<<dz<<" "<<endl;
+//                     Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz);
              }
          }
       }
@@ -612,7 +609,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
            }   
        }
       
-      cout<<" Event "<<nev<<". Total of "<<ngen_cpv<<" hits, "<<nrec_cpv<<" rec.points."<<endl;
+      Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.", 
+          nev, ngen_cpv, nrec_cpv) ; 
     
       delete [] hitsPerModule;
 
@@ -663,7 +661,8 @@ void AliPHOSIhepAnalyze::CpvSingle(Int_t nevents)
        hNrpX->Fill(rpMultX);
        hNrpZ->Fill(rpMultZ);
        hChi2->Fill(((AliPHOSEvalRecPoint*)pt)->Chi2Dof());
-       cout<<"+++++ Event "<<ievent<<". (Mult,MultX,MultZ) = "<<rpMult<<" "<<rpMultX<<" "<<rpMultZ<<"+++++"<<endl;
+       Info("AnalyzeCPV1", "+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++", 
+            ievent, rpMult, rpMultX, rpMultZ) ;
 
       }
 
@@ -748,7 +747,7 @@ void AliPHOSIhepAnalyze::HitsCPV(TClonesArray& hits, Int_t nev)
           
   for (Int_t itrack=0; itrack<ntracks; itrack++) {
     branchCPVimpacts ->SetAddress(&fCpvImpacts);
-    cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+    Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
     branchCPVimpacts ->GetEntry(itrack,0);
 
     for (Int_t iModule=0; iModule < nOfModules; iModule++) {
@@ -778,35 +777,35 @@ void AliPHOSIhepAnalyze::HitsCPV(TClonesArray& hits, Int_t nev)
 
 //    Int_t ntracks = gAlice->GetEvent(ievent);
 //    Int_t nOfModules = fGeom->GetNModules();
-//    cout<<" Tracks: "<<ntracks<<"  Modules: "<<nOfModules<<endl;
+//    Info("AnalyzeCPV1", " Tracks: "<<ntracks<<"  Modules: "<<nOfModules);
 
 //    if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) )  return;
 
 //    for (Int_t itrack=0; itrack<ntracks; itrack++) {
 //      branchCPVimpacts ->SetAddress(&fCpvImpacts);
-//      cout<<" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."<<endl;
+//      Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
 //      branchCPVimpacts ->GetEntry(itrack,0);
-//      cout<<" branchCPVimpacts ->GetEntry(itrack,0) OK."<<endl;
+//      Info("AnalyzeCPV1", " branchCPVimpacts ->GetEntry(itrack,0) OK.");
     
 //      for (Int_t iModule=0; iModule < nOfModules; iModule++) {
 //        impacts = (TClonesArray *)fCpvImpacts->At(iModule);
-//        cout<<" fCpvImpacts->At(iModule) OK."<<endl;
+//        Info("AnalyzeCPV1", " fCpvImpacts->At(iModule) OK.");
 //        // Do loop over impacts in the module
 //        for (Int_t iImpact=0; iImpact<impacts->GetEntries(); iImpact++) {
 //     impact=(AliPHOSImpact*)impacts->At(iImpact);
 //     impact->Print();
 //     if(IsCharged(impact->GetPid()))
 //       {
-//         cout<<" Add charged hit..";
+//         Info("AnalyzeCPV1", " Add charged hit..";
 //         new(hits[hits.GetEntriesFast()]) AliPHOSImpact(*impact);
-//         cout<<"done."<<endl;
+//         Info("AnalyzeCPV1", "done.");
 //       }
 //        }
 //      }
 //      fCpvImpacts->Clear();
 //    }
 
-//    cout<<" PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits."<<endl;
+//    Info("AnalyzeCPV1", " PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits.");
 
 }
 
@@ -829,13 +828,13 @@ void AliPHOSIhepAnalyze::HitsCPV(TClonesArray& hits, Int_t nev)
 //     }
 //      }
 
-//    cout<<" PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits."<<endl;
+//    Info("AnalyzeCPV1", " PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits.");
 //  }
 
 Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdg_code)
 {
   // For HIJING
-  cout<<" pdg_code "<<pdg_code<<endl;
+  Info("AnalyzeCPV1", "pdg_code %d", pdg_code);
   if(pdg_code==211 || pdg_code==-211 || pdg_code==321 || pdg_code==-321 || pdg_code==11 || pdg_code==-11 || pdg_code==2212 || pdg_code==-2212) return kTRUE;
   else
     return kFALSE;
index 5f351ab728f8b41241f222b2387ed347d7d0a027..1423a75ce9d8e9193ca96d6aaa77400435b2485c 100644 (file)
@@ -108,7 +108,7 @@ void AliPHOSMemoryWatcher::watch(int x)
   }
   else {
     fDisabled=true;
-    cerr << "AliPHOSMemoryWatcher::watch : I'm full !" << endl;
+    Error("watch", "I'm full !" ) ;
   }
 }
 //_____________________________________________________________________________
index 7a9f60cf7e3a5106845335a67b2c12d5998696d6..eb6811212fdc9b9c3364c69b1dc1dece706aa013 100644 (file)
@@ -33,7 +33,6 @@
 #include "TTree.h"
  
 // --- Standard library ---
-#include <iostream.h>
 #include <stdlib.h>
 
 
@@ -69,40 +68,3 @@ AliPHOSPID::~AliPHOSPID()
         
   fSplitFile = 0 ;
 }
-
-// //____________________________________________________________________________
-// void AliPHOSPID::SetSplitFile(const TString splitFileName) const
-// {
-//   // Diverts the Digits in a file separate from the hits file
-  
-
-//   TDirectory * cwd = gDirectory ;
-//   TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data());
-//   splitFile->cd() ; 
-//   gAlice->Write(0, TObject::kOverwrite);
-  
-//   TTree *treeE  = gAlice->TreeE();
-//   if (!treeE) {
-//     cerr << "ERROR: AliPHOSPID::SetSplitFile -> No TreeE found "<<endl;
-//     abort() ;
-//   }      
-  
-//   // copy TreeE
-//   AliHeader *header = new AliHeader();
-//   treeE->SetBranchAddress("Header", &header);
-//   treeE->SetBranchStatus("*",1);
-//   TTree *treeENew =  treeE->CloneTree();
-//   treeENew->Write(0, TObject::kOverwrite);
-  
-//   // copy AliceGeom
-//   TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
-//   if (!AliceGeom) {
-//     cerr << "ERROR: AliPHOSPID::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
-//     abort() ;
-//     }
-//   AliceGeom->Write(0, TObject::kOverwrite) ;
-  
-//   gAlice->MakeTree("R",splitFile);
-//   cwd->cd() ; 
-//   cout << "INFO: AliPHOSPID::SetSPlitMode -> RecParticles will be stored in " << splitFileName.Data() << endl ;   
-// }
index 4f601c2073e8c95d2718e22377fd7322968d7cfb..ac6adde79b6f16e6b159c94100282f1d31800d44 100644 (file)
@@ -68,9 +68,6 @@
 #include "TBenchmark.h"
 // --- Standard library ---
 
-#include <iostream.h>
-#include <iomanip.h>
-
 // --- AliRoot header files ---
 
 #include "AliRun.h"
@@ -202,8 +199,7 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
 //   }
 
 //   if ( phospidfound || pidfound ) {
-//     cerr << "WARNING: AliPHOSPIDv0::Exec -> RecParticles and/or PIDtMaker branch with name " 
-//      << taskName.Data() << " already exits" << endl ;
+//     Error("Exec", "RecParticles and/or PIDtMaker branch with name %s already exists", taskName.Data() ) ; 
 //     return ; 
 //   }       
   
@@ -212,7 +208,7 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
   
   for(ievent = 0; ievent < nevents; ievent++){
     gime->Event(ievent,"R") ;
-    cout << "event " << ievent << " " << gime->EmcRecPoints() << " " << gime->TrackSegments() << endl ;
+    Info("Exec", "event %d %d %d", ievent, gime->EmcRecPoints(), gime->TrackSegments()) ;
     MakeRecParticles() ;
     
     WriteRecParticles(ievent);
@@ -227,10 +223,8 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSPID");
-    cout << "AliPHOSPID:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSPID") << " seconds for PID " 
-        <<  gBenchmark->GetCpuTime("PHOSPID")/nevents << " seconds per event " << endl ;
-    cout << endl ;
+    Info("Exec", "took %f seconds for PID %f seconds per event", 
+        gBenchmark->GetCpuTime("PHOSPID"), gBenchmark->GetCpuTime("PHOSPID")/nevents) ; 
   }
   
 }
@@ -248,7 +242,7 @@ void AliPHOSPIDv0::Init()
   
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), taskName.Data(),fToSplit) ; 
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSPIDv0::Init -> Could not obtain the Getter object !" << endl ; 
+    Error("Init", "Could not obtain the Getter object !") ; 
     return ;
   } 
    
@@ -367,23 +361,28 @@ void  AliPHOSPIDv0::MakeRecParticles(){
 void  AliPHOSPIDv0:: Print(Option_t * option) const
 {
   // Print the parameters used for the particle type identification
-    cout <<  "=============== AliPHOSPID1 ================" << endl ;
-    cout <<  "Making PID "<< endl ;
-    cout <<  "    Headers file:               " << fHeaderFileName.Data() << endl ;
-    cout <<  "    RecPoints branch title:     " << fRecPointsTitle.Data() << endl ;
-    cout <<  "    TrackSegments Branch title: " << fTrackSegmentsTitle.Data() << endl ;
-    cout <<  "    RecParticles Branch title   " << fRecParticlesTitle.Data() << endl;
-    cout <<  "with parameters: " << endl ;
-    cout <<  "    Maximal EMC - CPV  distance (cm) " << fCpvEmcDistance << endl ;
-    if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
-      cout <<  "                    dispersion cut " << fDispersion << endl ;
-    if(fIDOptions.Contains("ell",TString::kIgnoreCase )){
-      cout << "             Eliptic cuts function: " << endl ;
-      cout << fFormula->GetTitle() << endl ;
-    }
-    if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
-      cout << "             Time Gate uzed: " << fTimeGate <<  endl ;
-    cout <<  "============================================" << endl ;
+  TString message ; 
+  message  = "=============== AliPHOSPID1 ================\n" ;
+  message += "Making PID\n" ;
+  message += "    Headers file:               %s\n" ; 
+  message += "    RecPoints branch title:     %s\n" ;
+  message += "    TrackSegments Branch title: %s\n" ; 
+  message += "    RecParticles Branch title   %s\n" ;  
+  message += "with parameters:\n"  ;
+  message += "    Maximal EMC - CPV  distance (cm) %f\n" ;
+  Info("Print", message.Data(),  
+       fHeaderFileName.Data(), 
+       fRecPointsTitle.Data(), 
+       fTrackSegmentsTitle.Data(), 
+       fRecParticlesTitle.Data(), 
+       fCpvEmcDistance );
+
+  if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
+    Info("Print", "                    dispersion cut %f",  fDispersion ) ;
+  if(fIDOptions.Contains("ell",TString::kIgnoreCase ))
+    Info("Print", "             Eliptic cuts function: %s",  fFormula->GetTitle() ) ;
+  if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
+    Info("Print",  "             Time Gate used: %f",  fTimeGate) ;
 }
 
 //____________________________________________________________________________
@@ -558,18 +557,13 @@ void AliPHOSPIDv0::PrintRecParticles(Option_t * option)
   taskName.Remove(taskName.Index(Version())-1) ;
   TClonesArray * recParticles = gime->RecParticles(taskName) ; 
   
-  cout << "AliPHOSPIDv0: event "<<gAlice->GetEvNumber()  << endl ;
-  cout << "       found " << recParticles->GetEntriesFast() << " RecParticles " << endl ;
-  
+  TString message ; 
+  message  = "event %d\n" ; 
+  message += "       found %d RecParticles\n" ; 
+  Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ;   
+
   if(strstr(option,"all")) {  // printing found TS
-    
-    cout << "  PARTICLE "   
-        << "  Index    "  << endl ;
-      //        << "  X        "     
-      //        << "  Y        " 
-      //        << "  Z        "    
-      //        << " # of primaries "          
-      //        << " Primaries list "    <<  endl;      
+    Info("PrintRecParticles","  PARTICLE   Index    \n"  ) ; 
     
     Int_t index ;
     for (index = 0 ; index < recParticles->GetEntries() ; index++) {
@@ -607,16 +601,9 @@ void AliPHOSPIDv0::PrintRecParticles(Option_t * option)
       //    Int_t nprimaries;
       //    primaries = rp->GetPrimaries(nprimaries);
       
-      cout << setw(10) << particle << "  "
-          << setw(5) <<  rp->GetIndexInList() << " "  ;
-       //         << setw(4) <<  nprimaries << "  ";
-       //      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
-       //      cout << setw(4)  <<  primaries[iprimary] << " ";
-      cout << endl;     
+      Info("PrintRecParticles", "          %s     %d\n",  particle, rp->GetIndexInList()) ;
     }
-    cout << "-------------------------------------------" << endl ;
-  }
-  
+  }  
 }
 
 
index 2e4704bfed7988aad47d35b154561af6cae9cb27..6dc869aa3bfaeb3e01a283a3c42f020d3ad95f74 100644 (file)
@@ -194,7 +194,7 @@ void AliPHOSPIDv1::Init()
 
   //  gime->SetRecParticlesTitle(BranchName()) ;
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSPIDv1::Init -> Could not obtain the Getter object !" << endl ; 
+    Error("Init", "Could not obtain the Getter object !" ) ;  
     return ;
   } 
 
@@ -349,7 +349,8 @@ const Int_t  AliPHOSPIDv1::GetPrincipalSign(const Double_t* P,const Int_t eff_pu
   if((eff_pur==1)&&(R <2.   )) prinsign= 1;
   if((eff_pur==0)&&(R <9./2.)) prinsign= 1;
 
-  if(R<0)cout<<"Error: Negative square?"<<endl;
+  if(R<0)
+    Error("GetPrincipalSign", "Negative square?") ;
   return prinsign;
 
 }
@@ -454,10 +455,11 @@ const Int_t  AliPHOSPIDv1::GetEffPurOption(const TString Eff_Pur) const
     eff_pur = 2 ;
   else{
     eff_pur = -1;
-    cout<<"Invalid Efficiency-Purity option"<<endl;
-    cout<<"Possible options: HIGH EFFICIENCY =    LOW PURITY"<<endl;
-    cout<<"                MEDIUM EFFICIENCY = MEDIUM PURITY"<<endl;
-    cout<<"                   LOW EFFICIENCY =   HIGH PURITY"<<endl;
+    TString message ; 
+    message  = "Invalid Efficiency-Purity option\n";
+    message += "Possible options: HIGH EFFICIENCY =    LOW PURITY\n" ;
+    message += "                MEDIUM EFFICIENCY = MEDIUM PURITY\n" ;
+    message += "                   LOW EFFICIENCY =   HIGH PURITY\n" ;
   }
 
   return eff_pur;
@@ -476,9 +478,9 @@ void  AliPHOSPIDv1::SetEllipseParameter(TString Param, Int_t i, Double_t par)
   if(Param.Contains("x0"))p=15; 
   if(Param.Contains("y0"))p=16;
   if((i>4)||(i<0))
-    cout<<"Error:: No parameter with index "<<i<<endl
+    Error("SetEllipseParameter", "No parameter with index %d", i) 
   else if(p==-1)
-    cout<<"Error:: No parameter with name "<<Param<<endl
+     Error("SetEllipseParameter", "No parameter with name %s", Param.Data() ) 
   else
     (*fParameters)(p,i) = par ;
 } 
@@ -498,9 +500,9 @@ const Double_t  AliPHOSPIDv1::GetParameterToCalculateEllipse(const TString Param
   if(Param.Contains("y0"))p=16;
 
   if((i>4)||(i<0))
-    cout<<"Error:: No parameter with index "<<i<<endl
+    Error("GetParameterToCalculateEllipse", "No parameter with index", i) 
   else if(p==-1)
-    cout<<"Error:: No parameter with name "<<Param<<endl
+    Error("GetParameterToCalculateEllipse", "No parameter with name %s", Param.Data() ) 
   else
     par = (*fParameters)(p,i) ;
   
@@ -587,8 +589,7 @@ void  AliPHOSPIDv1::Exec(Option_t * option)
 //     }
     
 //     if ( phospidfound || pidfound ) {
-//       cerr << "WARNING: AliPHOSPIDv1::Exec -> RecParticles and/or PIDtMaker branch with name " 
-//        << taskName.Data() << " already exits" << endl ;
+//       Error("Exec", "RecParticles and/or PIDtMaker branch with name %s already exists", taskName.Data() ) ; 
 //       return ; 
 //     }       
 //   }
@@ -621,12 +622,10 @@ void  AliPHOSPIDv1::Exec(Option_t * option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSPID");
-    cout << "AliPHOSPID:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSPID") << " seconds for PID " 
-        <<  gBenchmark->GetCpuTime("PHOSPID")/nevents << " seconds per event " << endl ;
-    cout << endl ;
-  }
-  
+    Info("Exec", "took %f seconds for PID %f seconds per event", 
+        gBenchmark->GetCpuTime("PHOSPID"),  
+        gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
+  } 
 }
 
 //____________________________________________________________________________
@@ -639,7 +638,7 @@ void  AliPHOSPIDv1::MakeRecParticles(){
   TObjArray * cpvRecPoints = gime->CpvRecPoints() ; 
   TClonesArray * trackSegments = gime->TrackSegments() ; 
   if ( !emcRecPoints || !cpvRecPoints || !trackSegments ) {
-    cerr << "ERROR:  AliPHOSPIDv1::MakeRecParticles -> RecPoints or TrackSegments not found ! " << endl ; 
+    Error("MakeRecParticles", "RecPoints or TrackSegments not found !") ;  
     abort() ; 
   }
   TClonesArray * recParticles  = gime->RecParticles() ; 
@@ -671,8 +670,7 @@ void  AliPHOSPIDv1::MakeRecParticles(){
     
     // YK: check if (emc != 0) !!!
     if (!emc) {
-      cerr << "ERROR:  AliPHOSPIDv1::MakeRecParticles -> emc("
-          <<ts->GetEmcIndex()<<") = "         <<emc<< endl;
+      Error("MakeRecParticles", "-> emc(%d) = %d", ts->GetEmcIndex(), emc ) ;
       abort();
     }
     Float_t    e = emc->GetEnergy() ;   
@@ -754,21 +752,18 @@ void  AliPHOSPIDv1::MakeRecParticles(){
 void  AliPHOSPIDv1:: Print()
 {
   // Print the parameters used for the particle type identification
-    cout <<  "=============== AliPHOSPID1 ================" << endl ;
-    cout <<  "Making PID "<< endl ;
-//     cout <<  "    Headers file:               " << fHeaderFileName.Data() << endl ;
-//     cout <<  "    RecPoints branch title:     " << fRecPointsTitle.Data() << endl ;
-//     cout <<  "    TrackSegments Branch title: " << fTrackSegmentsTitle.Data() << endl ;
-//     cout <<  "    RecParticles Branch title   " << fRecParticlesTitle.Data() << endl;
-    cout <<  "    Pricipal analysis file from 0.5 to 100 " << fFileName.Data() << endl;
-    cout <<  "    Name of parameters file     "<<fFileNamePar.Data() << endl ;
-    cout <<  "    Matrix of Parameters: 18x4"<<endl;
-    cout <<  "        RCPV 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]"<<endl;
-    cout <<  "        TOF  6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]"<<endl;
-    cout <<  "        PCA  5x4 [5 ellipse parametres and 4 parametres to calculate them: A/Sqrt(E) + B* E + C * E^2 + D]"<<endl;
-    cout <<  "        Energy Calibration  1x3 [3 parametres to calibrate energy: A + B* E + C * E^2]"<<endl;
+  TString message ; 
+    message  = "\n=============== AliPHOSPID1 ================\n" ;
+    message += "Making PID\n";
+    message += "    Pricipal analysis file from 0.5 to 100 %s\n" ; 
+    message += "    Name of parameters file     %s\n" ;
+    message += "    Matrix of Parameters: 18x4\n" ;
+    message += "        RCPV 6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]\n" ;
+    message += "        TOF  6x3 [High Eff-Low Pur,Medium Eff-Pur, Low Eff-High Pur]\n" ;
+    message += "        PCA  5x4 [5 ellipse parametres and 4 parametres to calculate them: A/Sqrt(E) + B* E + C * E^2 + D]\n" ;
+    message += "        Energy Calibration  1x3 [3 parametres to calibrate energy: A + B* E + C * E^2]\n" ;
+    Info("Print", message.Data(), fFileName.Data(), fFileNamePar.Data() ) ; 
     fParameters->Print() ;
-    cout <<  "============================================" << endl ;
 }
 
 //____________________________________________________________________________
@@ -856,26 +851,25 @@ void AliPHOSPIDv1::PrintRecParticles(Option_t * option)
   AliPHOSGetter *gime = AliPHOSGetter::GetInstance() ; 
 
   TClonesArray * recParticles = gime->RecParticles(BranchName()) ; 
-  
-  cout << "AliPHOSPIDv1: event "<<gAlice->GetEvNumber()  << endl ;
-  cout << "       found " << recParticles->GetEntriesFast() << " RecParticles " << endl ;
-  
+
+  TString message ; 
+  message  = "event %d\n" ; 
+  message += "       found %d RecParticles\n" ; 
+  Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ; 
   if(strstr(option,"all")) {  // printing found TS
-    
-    cout << "  PARTICLE       "   
-        << "  Index    "  << endl ;
+    message = "  PARTICLE         Index    \n" ;
+    Info("PrintRecParticles", message.Data() ) ; 
     
     Int_t index ;
     for (index = 0 ; index < recParticles->GetEntries() ; index++) {
-       AliPHOSRecParticle * rp = (AliPHOSRecParticle * ) recParticles->At(index) ;       
-
-       cout << setw(10) << rp->Name() << "  "
-           << setw(5) <<  rp->GetIndexInList() << " " <<endl;
-       cout << "Type "<<  rp->GetType() << endl;
+      AliPHOSRecParticle * rp = (AliPHOSRecParticle * ) recParticles->At(index) ;       
+      message = "          %s     %d     Type %d\n" ; 
+      Info("PrintRecParticles", message.Data(), 
+          rp->Name().Data(), 
+          rp->GetIndexInList(), 
+          rp->GetType() );
     }
-    cout << "-------------------------------------------" << endl ;
-  }
-  
+  }  
 }
 
 
index 609bcc5d1eb08519c3ab3a1f3864666dce4d3167..d16d22e141c4f7c9b6ccb727ef4b97a3cb1b1712 100644 (file)
@@ -267,16 +267,14 @@ void AliPHOSPpsdRecPoint::Print(Option_t * option)
 {
   // Print the digits information 
   
-  cout << "AliPHOSPpsdRecPoint: " << endl ;
+  Info("Print","AliPHOSPpsdRecPoint: " ) ;
   
   Int_t iDigit; 
-  cout << " Digit{s} # " ; 
+  Info("Print"," Digit{s} # ") ; 
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    cout  << fDigitsList[iDigit] << "  " ;  
-  cout << endl   ;  
-
-  cout << "       Multiplicity    = " << fMulDigit  << endl ;
-  cout << "       Stored at position " << fIndexInList << endl ; 
+    Info("Print", "%d", fDigitsList[iDigit]) ;  
+  Info("Print","       Multiplicity    = %d", fMulDigit  ) ;
+  Info("Print","       Stored at position %d", fIndexInList ) ; 
 }
 
 
index 02b6035a3b339cd90ae74b24483aa39c1e729010..bfc3e2234497894d76daa83587d17e6057d963ca 100644 (file)
@@ -25,7 +25,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
 // --- AliRoot header files ---
 
 #include "AliPHOSQAAlarm.h"
@@ -55,5 +54,5 @@ ClassImp(AliPHOSQAAlarm)
 {
   // print the message 
 
-  cout << "Event# " << fEvent << " " << fMessage << endl;  
+  Info("Print", "Event# %d %s", fEvent, fMessage.Data()) ;  
 }
index 4723bf4e24572c37ebdb2a10bd0bcadac78019b4..87893921bbfc826462976c1f114958b297f3f292 100644 (file)
@@ -27,7 +27,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
 // --- AliRoot header files ---
 
 #include "AliPHOSQAChecker.h"
@@ -159,7 +158,7 @@ ClassImp(AliPHOSQAChecker)
 {
   // print the checker and sub-checkers, if any, name.  
 
-  cout << "Checker : " << GetName() << endl ;  
+  Info("Print", "Checker : %s", GetName()) ;  
 
 }
 
@@ -167,7 +166,7 @@ ClassImp(AliPHOSQAChecker)
   void AliPHOSQAChecker::PrintAlarms()
 {
   // Prints the alarms of all attached checkables
-  cout << "Checker name : " << GetName() << endl ; 
+  Info("PrintAlarms", "Checker name : %s", GetName()) ; 
   if ( !(fCheckablesList->IsEmpty() ) ) {
     TIter next( fCheckablesList ) ; 
     AliPHOSQAVirtualCheckable * checkable ; 
@@ -181,9 +180,9 @@ ClassImp(AliPHOSQAChecker)
 {
   // Prints the checkables attached to this checker
   if ( fCheckablesList->IsEmpty() ) 
-    cout << "No checkables are checked by " << GetName() << endl ; 
+    Info("Status", "No checkables are checked by %s", GetName()) ; 
   else {
-    cout << "The following checkables are checked by " << GetName() << endl ; 
+    Info("Status", "The following checkables are checked by %s", GetName()) ; 
     TIter next(fCheckablesList) ; 
     AliPHOSQAVirtualCheckable * checkable ; 
     while ( (checkable = (AliPHOSQAVirtualCheckable*)next() ) ) 
index 178cb4f553651e6db2a4eec8df289ea33fde0d51..9ad160d8b67be33d4c07241975ce4dfa9e81925a 100644 (file)
@@ -27,8 +27,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAFloatCheckable.h"
@@ -56,7 +54,7 @@ ClassImp(AliPHOSQAFloatCheckable)
 void AliPHOSQAFloatCheckable::Print() const
 {
   // Print the chekable name and its value
-  cout << " Checkable-> " << GetName() << " : value = " << fValue << endl ; 
+  Info("Print", "Checkable-> %s : value = %f", GetName(), fValue) ; 
 }
 
 //____________________________________________________________________________ 
index cc49b77822e6a9ff4594b264dfb887b8102e48cc..2421fe608181f19ee6d1e000b369a0cf8f67cb69 100644 (file)
@@ -27,8 +27,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAIntCheckable.h"
@@ -55,7 +53,7 @@ ClassImp(AliPHOSQAIntCheckable)
 void AliPHOSQAIntCheckable::Print() const 
 {
   // Print the chekable name and its value
-  cout << " Checkable-> " << GetName() << " : value = " << fValue << endl ; 
+  Info("Print", "Checkable-> %s : value = %d", GetName(), fValue) ; 
 }
 
 //____________________________________________________________________________ 
index b4ec8e0afe6f54c9e85c90c3f7b89debf72390d7..216fffd4dc519b7cc69dd2e9e577cef7dbc3f9fa 100644 (file)
@@ -69,9 +69,8 @@ TString AliPHOSQAMeanChecker::CheckingOperation()
 
   Float_t checked = 0. ;  
   if ( (fCheckable->HasA() == "I") &&  (fCheckable->HasA() == "F") ) {
-    cout << " ERROR : checker " << GetName() << " says you got the wrong checkable " 
-        << fCheckable->GetName() << endl ; 
-    cout << "         or the checkable has no value !" << endl ; 
+    Error("CheckingOperation", "checker %s says you got the wrong checkable %s \n 
+          or the checkable has no value !", GetName(), fCheckable->GetName()) ;  
   } else {
     checked = fCheckable->GetValue(); 
     if (checked < fMean-fRms || checked > fMean+fRms) {
@@ -90,5 +89,5 @@ TString AliPHOSQAMeanChecker::CheckingOperation()
 {
   // print the name 
   
-  cout << "Checker : " << GetName() << " : " << GetTitle() << " : Mean = " <<  fMean << " Rms = " << fRms << endl ;  
+  Info("Print", "Checker : %s : %s : Mean = %f Rms = %f", GetName(), GetTitle(), fMean, fRms) ;  
 }
index 15d8c976f622eda5019709b17ec5a6ebae98e2de..5fc9aca635ac1436fcff70e0a630b9e76d9cb480 100644 (file)
@@ -27,8 +27,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAObjectCheckable.h"
@@ -52,10 +50,10 @@ ClassImp(AliPHOSQAObjectCheckable)
 //____________________________________________________________________________ 
 void AliPHOSQAObjectCheckable::Print() const
 {
-  cout << " Checkable-> " << GetName() << " : value = "  << endl ; 
+  Info("Print", "Checkable-> %s : value = ", GetName()) ; 
   if( fObject ) 
     fObject->Print() ;
   else
-    cerr << "ERROR : no object specified yet " << endl ; 
+    Info("Print", "no object specified yet" ) ; 
 }
 
index 006b3be409e4e295f40cdc53f8e4e9e75c808e97..f1813550ef61cdd240cf3cf95fa07632abd8fd2b 100644 (file)
@@ -31,8 +31,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSQAVirtualCheckable.h"
@@ -88,7 +86,7 @@ ClassImp(AliPHOSQAVirtualCheckable)
   // Prints all the alarms 
   TObjArray * alarms = GetAlarms() ; 
   if (alarms->IsEmpty() )
-    cout << " No alarms raised for checkable " << GetName() << endl ; 
+    Info("Alarms", "No alarms raised for checkable %s", GetName()) ; 
   else {
     TIter next(alarms);
     AliPHOSQAAlarm * alarm ; 
@@ -109,7 +107,7 @@ void AliPHOSQAVirtualCheckable::CheckMe()
 void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * checked, const char * checker, const char * message)
 {
   // Raise an alarm and store it in the appropriate folder : //Folders/Run/Conditions/QA/PHOS..
-  // cout << message ; 
+  // Info("RaiseAlarm", "%s", message) ; 
   AliPHOSQAAlarm * alarm = new AliPHOSQAAlarm(time, checked, checker, message)  ;   
   GetAlarms()->Add(alarm) ; 
 }
@@ -131,10 +129,10 @@ void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * check
   // resets the list of alarms (delete the alarms from the list)
   TObjArray * alarms = GetAlarms() ; 
   if (alarms->IsEmpty() )
-    cout << " No alarms raised for checkable " << GetName() << endl ; 
+    Info("ResetAlarms", "No alarms raised for checkable %s", GetName()) ; 
   else {
     alarms->Delete() ; 
-    cout << " Reset alarms for checkable " << GetName() << endl ; 
+    Info("ResetAlarms", " Reset alarms for checkable %s", GetName()) ; 
   }
 }
 
@@ -144,9 +142,9 @@ void AliPHOSQAVirtualCheckable::RaiseAlarm(const char * time, const char * check
   // Tells which checkers are attached to this checkable
   TList * list = fChecker->GetListOfTasks(); 
   if (list->IsEmpty() )
-    cout << "No checkers are in use for " << GetName() << endl ;
+    Info("Status", "No checkers are in use for %s", GetName()) ;
   else {    
-    cout << "The following checkers are in use for " << GetName() << endl ;
+    Info("Status", "The following checkers are in use for %s", GetName()) ;
     TIter next(list) ; 
     AliPHOSQAChecker * checker ; 
     while ( (checker = (AliPHOSQAChecker*)next() ) ) 
index 675c2ec6e5eac798f01f7e7cebafd4807d4b0db0..541223d59fbfd1e5406e50282a30fbcb134ebfb9 100644 (file)
@@ -30,7 +30,6 @@
 #include "TTree.h"
 
 // --- Standard library ---
-#include <iostream.h>
 //#include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -190,7 +189,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
   sprintf(command,"zcat %s",fInName.Data());
   FILE *dataFile = popen(command, "r");
   if (dataFile == NULL) {
-    cout << " Can not open file " << fInName.Data() << endl ;
+    Warning("ProcessRawFile", " Cannot open file %s\n", fInName.Data() ) ;
     perror(fInName.Data()) ;
     fStatus = -1 ;
     return kFALSE ;
@@ -201,7 +200,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
   UInt_t w = 0x12345678;
   Int_t swapo = memcmp(&w, "\x78\x56\x34\x12", sizeof(UInt_t)) == 0;
   if(fDebug)
-    cout << "swapo=" << swapo << endl;
+    Info("ProcessRawFile", "swapo=%f\n", swapo ) ;
   
   
   UInt_t recBuf[300] ;
@@ -213,20 +212,20 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
     if (n < 0 )
       perror(fInName.Data());
     else
-      cout << "Could not read physical record control words" << endl;
+      Error("ProcessRawFile", "Could not read physical record control words" ) ;
     fStatus = -2 ;
     return kFALSE;
   }
   
   if(fDebug)
-    cout << "recbuf[0] = " << recBuf[0] << endl ;
+    Info("ProcessRawFile", "recbuf[0] = %d\n", recBuf[0] );
   
   // Check if it is a ZEBRA file and if the words are swapped 
   UInt_t swapi = 0 ;
   if (recBuf[0] != fMK1) {
     Swab4(recBuf, &w, 1);
     if (w != fMK1) {
-      cout << "Does not look like a ZEBRA file\n";
+      Error("ProcessRawFile", "Does not look like a ZEBRA file\n" ) ;
       pclose(dataFile) ;
       fStatus = -2 ;
       return kFALSE;
@@ -235,8 +234,10 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
   }
   
   if(fDebug){
-    cout << "        w = " << w << endl ;;
-    cout << "    swapi = " << swapi << endl ;;
+    TString message ; 
+    message  = "        w = %f\n" ; 
+    message += "    swapi = %f\n" ; 
+    Info("ProcessRawFile", message.Data(), w, swapi ) ; 
   }
   
   // Get number of words in physical record 
@@ -300,7 +301,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
     UInt_t * recptr = recBuf;  //Pointer to current position
 
     if(recptr[7] != 1) {
-      cout << "Can not handle fast blocks" << endl;
+      Error("ProcessRawFile", "Cannot handle fast blocks" ) ; 
       fStatus = -2 ;
       return kFALSE;
     }    
@@ -309,14 +310,14 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
     // Logical record control words   
     UInt_t lrtyp = recptr[1];
     if (lrtyp != 3) {
-      cout << "Can not handle logical record type " <<  lrtyp << endl ;
+      Error("ProcessRawFile", "Can not handle logical record type %d", lrtyp ) ;
       fStatus = -2 ;
       return kFALSE;
     }
     
     recptr += 2;
     if (recptr[0] != fCKW) {
-      cout <<  "Bad check word" << endl;
+      Error("ProcessRawFile", "Bad check word" ) ;
       fStatus = -2 ;
       return kFALSE;
     }
@@ -332,7 +333,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
     UInt_t evtno = recptr[2];                  /* Event number */
     
     if(fDebug)
-      cout << "evtno=" << evtno << endl;
+       Info("ProcessRawFile", "evtno= %d", evtno);
     
     UInt_t nh = recptr[4];                  /* Number of header words in data bank */
     recptr += nh;
@@ -370,7 +371,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
        new((*fDigits)[i])AliPHOSDigit(-1,absID,peak,0.,i) ;
       if(fDebug){
        if(peak>(UShort_t)1000)
-         cout << "event=" << fEvent << " peak[" << i << "] = "<<peak << endl;
+         Info("ProcessRawFile", "event= %d peak[%d] = %f", fEvent, i, peak);
       }
       byteptr+=sizeof(UShort_t);
     }
@@ -405,7 +406,7 @@ Bool_t AliPHOSRaw2Digits::ProcessRawFile(){
 
     WriteDigits() ;
     if(fDebug)
-      cout << "event=" << fEvent << " written " << endl;
+      Info("ProcessRawFile", "event= %d written", fEvent) ;
  
     // Read next record 
     UInt_t nb = nwphr *sizeof(UInt_t);
@@ -509,28 +510,34 @@ void AliPHOSRaw2Digits::WriteDigits(void){
 //____________________________________________________________________________ 
 void AliPHOSRaw2Digits::Print(Option_t * option)const{
   
-  cout << "----------AliPHOSRaw2Digits----------" << endl ;
-  cout << "Input stream " << endl ;
-  cout << "Current input  File: " << fInName.Data() << endl ;
-  cout << "Current output File: " << GetTitle() << endl ;
-  cout << "Events processes in the last file " << fEvent << endl ;
-  cout << "Input file status " ;
+  TString message ;
+  message  = "----------AliPHOSRaw2Digits---------- \n" ;
+  message += "Input stream \n" ;
+  message += "Current input  File: %s\n" ; 
+  message += "Current output File: %s\n" ; 
+  message += "Events processes in the last file %d\n" ; 
+  message += "Input file status\n" ;
   switch (fStatus){
-  case 0: cout << "`Have not processed yet' " << endl ;
+  case 0: message += "`Have not processed yet'\n" ;
     break ;
-  case 1: cout << "`Processed normally' " << endl ;
+  case 1: message += "`Processed normally'\n" ;
     break ;
-  case -1: cout << "`File not found'" << endl ;
+  case -1: message += "`File not found'\n" ;
     break ;
-  case -2: cout << "`Error in reading' " << endl ;
+  case -2: message += "`Error in reading'\n" ;
     break ;
-  case -3: cout << "'Interupted'" << endl ;
+  case -3: message += "'Interupted'\n" ;
   default: ;
   }
-  cout << "Connection table: " ;
+  message += "Connection table: " ;
   if(fctdb)
-    cout << fctdb->GetName() << "  " << fctdb->GetTitle() << endl ;
+    message += "%s %s \n" ; 
   else
-    cout << " no DB " << endl ;
-  
+    message += " no DB \n" ;
+
+  Info("Print", message.Data(),  
+       fInName.Data(), 
+       GetTitle(), 
+       fEvent, 
+       fctdb->GetName(), fctdb->GetTitle() ) ; 
 }
index 8a59b994f2a55fba8ab2071e539388f2cec5ae45..276a5da119097c1556aa3ee061eb8c6fb72bd338 100644 (file)
@@ -89,7 +89,7 @@ Float_t AliPHOSRecCpvManager::OneGamChi2(Float_t Ai, Float_t Ei, Float_t Etot, F
   Float_t dd = da/D;
   Gi = dd*(2.- dd*Const*(1.-2.*Ai/Etot));
 
-  cout<<" OneGamChi2 (Ai,Ei,Etot,&Gi,chi2) "<<Ai<<" "<<Ei<<" "<<Etot<<" "<<Gi<<" "<<da*da/D<<endl<<endl;
+  Info("OneGamChi2", " OneGamChi2 (Ai,Ei,Etot,&Gi,chi2) %f %f %f %f %f", Ai, Ei, Etot, Gi, da*da/D );
 
   return da*da/D;
 
@@ -122,7 +122,7 @@ void AliPHOSRecCpvManager::AG(Float_t Ei, Float_t Xi, Float_t Yi, Float_t& Ai, F
   Float_t CelZ = geom->GetPadSizeZ();
   Float_t CelY = geom->GetPadSizePhi();
 
-//  //    cout<<"CelZ: "<<CelZ<<" CelY: "<<CelY<<endl;
+//  //    Info("AG", "CelZ: %f CelY: %f", CelZ, CelY) ;
 
   Float_t dx = CelZ/2.;
   Float_t dy = CelY/2.;
@@ -161,7 +161,7 @@ Float_t AliPHOSRecCpvManager::Fcml(Float_t x, Float_t y)
     + TMath::ATan(x*y/(9*b*TMath::Sqrt((9*b)*(9*b) + x*x+y*y))); 
   
   Float_t Fcml = A*Fff/6.2831853071796;
-//    cout<<" Fcml: "<<Fcml<<endl;
+//    Info("Fcml", "Fcml: %f", Fcml) ;
   return Fcml;
 
 }
index 34b4ec4fb11c21153af5335673f89a37b3a27864..44f262817b0e3eddac629202d23602173d2d790a 100644 (file)
@@ -23,8 +23,6 @@
 
 // --- Standard library ---
 
-#include <iostream.h>
-
 // --- AliRoot header files ---
 
 #include "AliPHOSRecManager.h"
index 763502ef2b702a3c48591644d491796ce6d6968c..f37206c0ef8eb61ba89c7f84184ff66b872549a8 100644 (file)
@@ -93,8 +93,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const
 {
   if ( index > GetNPrimariesToRecParticles() ) { 
     if (fDebug) 
-      cout << "WARNING : AliPHOSRecParticle::GetPrimary -> " << index << " is larger that the number of primaries " 
-          <<  GetNPrimaries() << endl ;
+      Warning("GetPrimary", "%d is larger that the number of primaries %d", index, GetNPrimaries()) ;
     return 0 ; 
   } else { 
     Int_t dummy ; 
@@ -103,7 +102,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const
     Int_t primaryindex = ((AliPHOSEmcRecPoint*)gime->EmcRecPoints()->At(emcRPindex))->GetPrimaries(dummy)[index] ; 
 //     if (primaryindex >= 10000000) { // it comes from backgroundfile 
 //       if (fDebug) 
-//     cout << "WARNING : AliPHOSRecParticle::GetPrimary -> not a signal primary" << endl ;
+//     Warning("GetPrimary","-> not a signal primary") ;
 //       return 0 ; 
 //     } else 
       return gime->Primary(primaryindex) ; 
index 3490d20095a364da77baf21bff5e8255b2654ad3..8749900f07dd63269cfea9e112ff231b11b5460d 100644 (file)
@@ -25,7 +25,6 @@
 #include "TClonesArray.h"
 
 // --- Standard library ---
-#include <iostream.h>
 
 // --- AliRoot header files ---
 
@@ -210,7 +209,7 @@ void  AliPHOSRecPoint::EvalPrimaries(TClonesArray * digits)
       for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
        if ( fMulTrack > fMaxTrack ) {
          fMulTrack = - 1 ;
-         cout << "AliPHOSRecPoint::GetNprimaries ERROR > increase fMaxTrack " << endl ;
+         Error("EvalPrimaries", "GetNprimaries ERROR > increase fMaxTrack" ) ;
          break ;
        }
        Int_t newprimary = newprimaryarray[jndex] ;
index 7345f885badef93b7330a74cd9c8bf57dabfd89d..3a3fec8665176a1de6a13ff7db1d8eaf54cb46d7 100644 (file)
@@ -28,8 +28,7 @@
 //  Thanks to getters, one can set 
 //  parameters to reconstruction briks. The full set of parameters is saved in the 
 //  corresponding branch: e.g. parameters of clusterizer are stored in branch 
-//  TreeR::AliPHOSClusterizer with the same title as the branch containing the RecPoints. 
-//  TTree does not support overwriting, therefore one can not produce several 
+//  TreeR::AliPHOSClusterizer with the same title as the branch containing the RecPoints. //  TTree does not support overwriting, therefore one can not produce several 
 //  branches with the same names and titles - use different titles.
 //
 //  Use case: 
@@ -66,7 +65,6 @@
 #include "TFile.h"
 
 // --- Standard library ---
-#include <iostream.h>   
 
 // --- AliRoot header files ---
 #include "AliRun.h"
@@ -139,6 +137,7 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
   if(!fIsInitialized)
     Init() ;
 
+  TString message(" ") ; 
 //   gAlice->GetEvent(0) ;
 
 //   if(fSDigitizer->IsActive()&& gAlice->TreeS()){ //Will produce SDigits
@@ -166,11 +165,10 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
 //     }
     
 //     if(!(sdigitizerNotFound && phosNotFound)){
-//       cout << "AliPHOSReconstructioner error: "<< endl ;
-//       cout << "       Branches ''PHOS'' or ''AliPHOSSDigitizer'' with title ``" << fSDigitsBranch.Data() << "''" << endl ;
-//       cout << "       already exist in TreeS. ROOT does not allow updating/overwriting." << endl ;
-//       cout << "       Specify another title for branches or use ''StartFrom()'' method" << endl ;
-      
+//       message  = "       Branches PHOS or AliPHOSSDigitizer with title %s\n" ;
+//       message += "       already exist in TreeS. ROOT does not allow updating/overwriting.\n" ;
+//       message += "       Specify another title for branches or use StartFrom() method\n" ;
+//       Error("Exec", message.Data(), fSDigitsBranch.Data() ) ;       
 //       //mark all tasks as inactive
 //       TIter next(fTasks);
 //       TTask *task;
@@ -206,11 +204,10 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
 //     }
     
 //     if(!(digitizerNotFound && phosNotFound)){
-//       cout << "AliPHOSReconstructioner error: "<< endl ;
-//       cout << "       Branches ''PHOS'' or ''AliPHOSDigitizer'' with title ``" << fDigitsBranch.Data() << "''" << endl ;
-//       cout << "       already exist in TreeD. ROOT does not allow updating/overwriting." << endl ;
-//       cout << "       Specify another title for branches or use ''StartFrom()'' method" << endl ;
-      
+//       message  = "       Branches PHOS or AliPHOSDigitizer with title %s\n" ; 
+//       message += "       already exist in TreeD. ROOT does not allow updating/overwriting.\n" ; 
+//       message += "       Specify another title for branches or use StartFrom() method" ;
+//       Error("Exec", message>Data(), fDigitsBranch.Data() ) ;       
 //       //mark all tasks as inactive
 //       TIter next(fTasks);
 //       TTask *task;
@@ -255,12 +252,10 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
 //     }
 
 //     if(!(clusterizerNotFound && emcNotFound && cpvNotFound)){
-//       cout << "AliPHOSReconstructioner error: "<< endl ;
-//       cout << "       Branches ''PHOSEmcRP'', ''PHOSCpvRP'' or ''AliPHOSClusterizer'' with title ``" 
-//        << fRecPointBranch.Data() << "''" << endl ;
-//       cout << "       already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-//       cout << "       Specify another title for branches or use ''StartFrom()'' method" << endl ;
-      
+//       message  = "       Branches PHOSEmcRP, PHOSCpvRP or AliPHOSClusterizer with title %s\n" ; 
+//       message += "       already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+//       message += "       Specify another title for branches or use StartFrom() method\n" ;
+//       Error("Exec", message.Data(),fRecPointBranch.Data() ) ;        
 //       //mark all tasks as inactive
 //       TIter next(fTasks);
 //       TTask *task;
@@ -295,12 +290,10 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
 //     }
     
 //     if(!(tsMakerNotFound &&tsNotFound) ){
-//       cout << "AliPHOSReconstructioner error: "<< endl ;
-//       cout << "       Branches ''PHOSTS'' or ''AliPHOSTrackSegmentMaker'' with title ``" 
-//        << fTSBranch.Data() << "''" << endl ;
-//       cout << "       already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-//       cout << "       Specify another title for branches or use ''StartFrom()'' method" << endl ;
-      
+//       message  = "       Branches PHOSTS or AliPHOSTrackSegmentMaker with title %s\n" ;  
+//       message += "       already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+//       message += "       Specify another title for branches or use StartFrom() method\n" ;
+//       Error("Exec", message.Data(),fTSBranch.Data() ) ;        
 //       //mark all tasks as inactive
 //       TIter next(fTasks);
 //       TTask *task;
@@ -337,12 +330,10 @@ void AliPHOSReconstructioner::Exec(Option_t *option)
 //     }
     
 //     if(!pidNotFound  || !rpNotFound ){
-//       cout << "AliPHOSReconstructioner error: "<< endl ;
-//       cout << "       Branches ''PHOSRP'' or ''AliPHOSPID'' with title ``" 
-//        << fRecPartBranch.Data() << "''" << endl ;
-//       cout << "       already exist in TreeR. ROOT does not allow updating/overwriting." << endl ;
-//       cout << "       Specify another title for branches." << endl ;
-      
+//       message  = "       Branches PHOSRP or AliPHOSPID with title %s\n" ;  
+//       message += "       already exist in TreeR. ROOT does not allow updating/overwriting.\n" ;
+//       message += "       Specify another title for branches.\n" ;
+//       Error("Exec", message.Data(), fRecPartBranch.Data() ) ;        
 //       //mark all tasks as inactive
 //       TIter next(fTasks);
 //       TTask *task;
@@ -453,9 +444,11 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner()
 //     return ;
 //   }
 
-//   cout << "There is no branch " << branch << "!"<< endl ;
-//   cout << "Available branches `SDigits', `Digits', `RecPoints', `TrackSegments' and `RecParticles' " << endl ;
-  
+//   
+//   TString message ;    
+//   message  = "There is no branch %s !\n" ;
+//   message += "Available branches `SDigits', `Digits', `RecPoints', `TrackSegments' and `RecParticles'\n" ;
+//   Warning("SetBranchTitle", message.Data(), branch ) ;   
 // }
 // //____________________________________________________________________________
 // void AliPHOSReconstructioner::StartFrom(char * module,char* title)
@@ -488,7 +481,7 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner()
 //       if(strstr(module,"PID") || strstr(module,"Particle") || strstr(module,"RP") )
 //         sprintf(moduleName,"AliPHOSPID") ;
 //       else{
-//         cout << "Do not know such a module / Rec Object " << endl;
+//         Warning("StartFrom", "Do not know such a module / Rec Object ") ;
 //         return ;
 //       }
   
@@ -537,34 +530,34 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner()
 void AliPHOSReconstructioner::Print(Option_t * option)const {
   // Print reconstructioner data  
 
-  cout << "-----------------AliPHOSReconstructioner---------------" << endl ;
-  cout << " Reconstruction of the header file " <<fHeaderFileName.Data() << endl ;
-  cout << " with the following modules: " << endl ;
+  TString message ; 
+  message  = "-----------------AliPHOSReconstructioner---------------\n" ;
+  message += " Reconstruction of the header file %s\n" ;
+  message += " with the following modules:\n" ;
 
   if(fSDigitizer->IsActive()){
-    cout << "   (+)   " << fSDigitizer->GetName() << " to branch : " << fSDigitsBranch.Data() << endl ; 
-    cout << endl ;
+    message += "   (+)   %s to branch %s\n" ; 
   }
   if(fDigitizer->IsActive()){
-    cout << "   (+)   " << fDigitizer->GetName() << " to branch : " << fDigitsBranch.Data() << endl ;  
-    cout <<  endl ;
+    message += "   (+)   %s to branch %s\n" ; 
   }
   
   if(fClusterizer->IsActive()){
-    cout << "   (+)   " <<fClusterizer->GetName() << " to branch : " <<fRecPointBranch.Data()  << endl ;  
-    cout <<  endl ;
+    message += "   (+)   %s to branch %s\n" ;
   }
 
   if(fTSMaker->IsActive()){
-    cout << "   (+)   " << fTSMaker->GetName() << " to branch : " << fTSBranch.Data() << endl ;  
-    cout <<  endl ;
+    message += "   (+)   %s to branch %s\n" ; 
   }
 
-
   if(fPID->IsActive()){
-    cout << "   (+)   " << fPID->GetName() << " to branch : " <<fRecPartBranch.Data()  << endl ;  
-    cout <<  endl ;
+    message += "   (+)   %s to branch %s\n" ;  
   }
-
-
+  Info("Print", message.Data(), 
+       fHeaderFileName.Data(), 
+       fSDigitizer->GetName(), fSDigitsBranch.Data(), 
+       fDigitizer->GetName(), fDigitsBranch.Data() , 
+       fClusterizer->GetName(), fRecPointBranch.Data(), 
+       fTSMaker->GetName(), fTSBranch.Data() , 
+       fPID->GetName(), fRecPartBranch.Data() ) ; 
 }
index 704809538b63338202ace406c418d51e4ef18f91..89e5dab9eb430af8af345f326fc295d506c7a286 100644 (file)
@@ -61,7 +61,6 @@
 #include "TGeometry.h"
 
 // --- Standard library ---
-#include <iomanip.h>
 
 // --- AliRoot header files ---
 #include "AliRun.h"
@@ -117,8 +116,7 @@ void AliPHOSSDigitizer::Init()
 
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(), GetName(),fToSplit) ;  
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSSDigitizer::Init -> Could not obtain the Getter object !" 
-        << endl ; 
+    Error("Init" ,"Could not obtain the Getter object !") ;  
     return ;
   } 
   
@@ -266,10 +264,8 @@ void AliPHOSSDigitizer::Exec(Option_t *option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSSDigitizer");
-    cout << "AliPHOSSDigitizer:" << endl ;
-    cout << "   took " << gBenchmark->GetCpuTime("PHOSSDigitizer") << " seconds for SDigitizing " 
-        <<  gBenchmark->GetCpuTime("PHOSSDigitizer")/nevents << " seconds per event " << endl ;
-    cout << endl ;
+    Info("Exec","   took %f seconds for SDigitizing  %f seconds per event",
+        gBenchmark->GetCpuTime("PHOSSDigitizer"), gBenchmark->GetCpuTime("PHOSSDigitizer")/nevents) ;
   }
 }
 
@@ -288,11 +284,11 @@ void AliPHOSSDigitizer::SetSDigitsBranch(const char * title )
   const char * sdigitsTitle    = sdigitsBranch ->GetTitle() ;  
   const char * sdigitizerTitle = sdigitizerBranch ->GetTitle() ;
   if ( stitle.CompareTo(sdigitsTitle)==0 || stitle.CompareTo(sdigitizerTitle)==0 ){
-    cerr << "ERROR: AliPHOSSdigitizer::SetSDigitsBranch -> Cannot overwrite existing branch with title " << title << endl ;
+    Error("SetSDigitsBranch", "Cannot overwrite existing branch with title %s", title) ;
     return ;
   }
   
-  cout << "AliPHOSSdigitizer::SetSDigitsBranch -> Changing SDigits file from " << GetName() << " to " << title << endl ;
+  Info("SetSDigitsBranch", "-> Changing SDigits file from %s to %s", GetName(), title) ;
 
   SetName(title) ; 
     
@@ -306,12 +302,14 @@ void AliPHOSSDigitizer::SetSDigitsBranch(const char * title )
 void AliPHOSSDigitizer::Print(Option_t* option)const
 {
   // Prints parameters of SDigitizer
-  cout << "------------------- "<< GetName() << " -------------" << endl ;
-  cout << "   Writing SDigits to branch with title  " << GetName() << endl ;
-  cout << "   with digitization parameters  A = " << fA << endl ;
-  cout << "                                 B = " << fB << endl ;
-  cout << "   Threshold for Primary assignment= " << fPrimThreshold << endl ; 
-  cout << "---------------------------------------------------"<<endl ;
+  TString message ; 
+  message  = "\n------------------- %s -------------\n" ;  
+  message += "   Writing SDigits to branch with title  %s\n" ;
+  message += "   with digitization parameters  A = %f\n" ; 
+  message += "                                 B = %f\n" ;
+  message += "   Threshold for Primary assignment= %f\n" ; 
+  message += "---------------------------------------------------\n" ;
+  Info("Print", message.Data(),  GetName(),  GetName(), fA, fB, fPrimThreshold ) ;
   
 }
 
@@ -336,58 +334,67 @@ void AliPHOSSDigitizer::PrintSDigits(Option_t * option)
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; 
   TString sdname(GetName()) ;
   sdname.Remove(sdname.Index(GetTitle())-1) ;
-  const TClonesArray * sdigits = gime->SDigits(sdname.Data()) ; 
+  const TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
 
-  cout << "AliPHOSSDigitiser: event " << gAlice->GetEvNumber() << endl ;
-  cout << "      Number of entries in SDigits list " << sdigits->GetEntriesFast() << endl ;
-  cout << endl ;
+  TString message ; 
+  message  = "\nAliPHOSSDigitiser: event " ;
+  message += gAlice->GetEvNumber(); 
+  message += "\n      Number of entries in SDigits list " ;  
+  message += sdigits->GetEntriesFast() ; 
+  
   if(strstr(option,"all")||strstr(option,"EMC")){
     
     //loop over digits
     AliPHOSDigit * digit;
-    cout << "EMC sdigits " << endl ;
-    cout << "Digit Id    Amplitude     Index     Nprim  Primaries list " <<  endl;      
+    message += "\nEMC sdigits\n" ;
+    message += "Digit Id    Amplitude     Index     Nprim  Primaries list\n" ;       
     Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
     Int_t index ;
     for (index = 0 ; (index < sdigits->GetEntriesFast()) && 
         ((dynamic_cast<AliPHOSDigit *> (sdigits->At(index)))->GetId() <= maxEmc) ; index++) {
       digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
-      if(digit->GetNprimary() == 0) continue;
-      cout << setw(6)  <<  digit->GetId() << "   "  <<         setw(10)  <<  digit->GetAmp() <<   "    "  
-          << setw(6)  <<  digit->GetIndexInList() << "    "   
-          << setw(5)  <<  digit->GetNprimary() <<"    ";
-      
+      if(digit->GetNprimary() == 0) 
+       continue;
+      message += digit->GetId() ; 
+      message += digit->GetAmp() ;
+      message += digit->GetIndexInList() ;
+      message += digit->GetNprimary() ;
       Int_t iprimary;
       for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
-       cout << setw(5)  <<  digit->GetPrimary(iprimary+1) << "    ";
-      cout << endl;     
+       message += digit->GetPrimary(iprimary+1) ;
     }    
-    cout << endl;
   }
 
   if(strstr(option,"all")||strstr(option,"CPV")){
     
     //loop over CPV digits
     AliPHOSDigit * digit;
-    cout << "CPV sdigits " << endl ;
-    cout << "Digit Id    Amplitude     Index     Nprim  Primaries list " <<  endl;      
+    
+    message += "CPV sdigits\n" ;
+    message += "Digit Id Amplitude Index Nprim  Primaries list\n" ;
     Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
     Int_t index ;
     for (index = 0 ; index < sdigits->GetEntriesFast(); index++) {
       digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
       if(digit->GetId() > maxEmc){
-       cout << setw(6)  <<  digit->GetId() << "   "  <<        setw(10)  <<  digit->GetAmp() <<   "    "  
-            << setw(6)  <<  digit->GetIndexInList() << "    "   
-            << setw(5)  <<  digit->GetNprimary() <<"    ";
-       
+       message += "\n" ; 
+       message += digit->GetId() ; 
+       message += "   " ; 
+       message += digit->GetAmp() ;
+       message += "   " ; 
+       message += digit->GetIndexInList() ;
+       message += "   " ; 
+       message += digit->GetNprimary() ;
+       message += "   " ; 
        Int_t iprimary;
-       for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
-         cout << setw(5)  <<  digit->GetPrimary(iprimary+1) << "    ";
-       cout << endl;    
+       for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {
+         message += digit->GetPrimary(iprimary+1) ;
+         message += "," ; 
+       }
       }    
     }
   }
-
+  Info("PrintSDigits", message.Data() ) ;
 }
 
 //____________________________________________________________________________ 
index 2f8aa09033d71850272ac816c224a154fe9666c6..86c13b17a9075250bfabc99dd2929f05ec85d287 100644 (file)
@@ -80,16 +80,16 @@ void AliPHOSTrackSegment::Print(Option_t * opt) const
   // Print all information on this track Segment
   
 
-  cout << "--------AliPHOSTrackSegment-------- "<<endl ;
-  cout << "Stored at position " << fIndexInList << endl ;
-  cout << "Emc RecPoint #     " << fEmcRecPoint << endl ;
+  Info("Print", "--------AliPHOSTrackSegment-------- ");
+  Info("Print", "Stored at position %d", fIndexInList) ;
+  Info("Print", "Emc RecPoint #     %d", fEmcRecPoint) ;
   if(fPpsdUpRecPoint >= 0)
-    cout << "CPV RecPoint #     " << fPpsdUpRecPoint << endl ;
+    Info("Print", "CPV RecPoint #     %d", fPpsdUpRecPoint) ;
   else
-    cout << "No CPV RecPoint " << endl ;
+    Info("Print", "No CPV RecPoint ");
 
   
-  cout << "------------------------------------ " << endl ; 
+  Info("Print", "------------------------------------ ") ; 
   
 }
 //____________________________________________________________________________
index ba25ac94caf6852731d2f8968bd92a28c42bea71..d855bbd8f43e08464aafb2172d44da178a958737 100644 (file)
@@ -61,39 +61,3 @@ AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
       fSplitFile = 0 ;
 }
 
-// //____________________________________________________________________________
-// void AliPHOSTrackSegmentMaker::SetSplitFile(const TString splitFileName) const
-// {
-//   // Diverts the TrackSegments in a file separate from the Digits file
-  
-
-//   TDirectory * cwd = gDirectory ;
-//   TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data());
-//   splitFile->cd() ; 
-//   gAlice->Write(0, TObject::kOverwrite);
-
-//   TTree *treeE  = gAlice->TreeE();
-//   if (!treeE) {
-//     cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> No TreeE found "<<endl;
-//     abort() ;
-//   }      
-  
-//   // copy TreeE
-//   AliHeader *header = new AliHeader();
-//   treeE->SetBranchAddress("Header", &header);
-//   treeE->SetBranchStatus("*",1);
-//   TTree *treeENew =  treeE->CloneTree();
-//   treeENew->Write(0, TObject::kOverwrite);
-  
-//   // copy AliceGeom
-//   TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
-//   if (!AliceGeom) {
-//     cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
-//     abort() ;
-//   }
-//   AliceGeom->Write(0, TObject::kOverwrite);
-  
-//   gAlice->MakeTree("R",splitFile);
-//   cwd->cd() ; 
-//   cout << "INFO: AliPHOSTrackSegmentMaker::SetSPlitMode -> TrackSegments will be stored in " << splitFileName.Data() << endl ;   
-// }
index 8bbbc178ce3372b4b721011b92d5de09cb111749..893020273c881a4909d03b4e2e5f9fe5e21ddc29 100644 (file)
 
 // --- ROOT system ---
 #include "TTask.h"
-class TFile ; 
+class TFile ;
 
 // --- Standard library ---
-#include <iostream.h>
 
 // --- AliRoot header files ---
 
@@ -34,20 +33,20 @@ public:
   
   virtual ~ AliPHOSTrackSegmentMaker() ;
 
-  virtual void    Exec(Option_t * option){cout << "Not Defined" << endl ; } 
-  //  virtual char*   GetRecPointsBranch ()const{cout << "Not Defined" << endl ; return 0 ; } 
-  //  virtual char*   GetTrackSegmentsBranch ()const{cout << "Not Defined" << endl ; return 0 ; } 
-  virtual const Int_t GetTrackSegmentsInRun()  const {cout << "Not Defined" << endl ; return 0 ; } 
+  virtual void    Exec(Option_t * option){Warning("Exec", "Not Defined" ) ; } 
+  //  virtual char*   GetRecPointsBranch ()const{Warning("GetRecPointsBranch", "Not Defined" ) ; return 0 ; } 
+  //  virtual char*   GetTrackSegmentsBranch ()const{Warning(" GetTrackSegmentsBranch", "Not Defined" ) ; return 0 ; } 
+  virtual const Int_t GetTrackSegmentsInRun()  const {Warning("GetTrackSegmentsInRun", "Not Defined" ) ; return 0 ; } 
 
-  virtual void    Print(Option_t * option)const {cout << "Not Defined" << endl ; }  
+  virtual void    Print(Option_t * option)const {Warning("Print", "Not Defined" ) ; }  
   //  virtual void Set...   // method to choose recPoints: along z only, along x ...???
-  //  virtual void SetChoosingAlgirithm(){cout << "Not Defined" << endl ; return 0 ; } 
-  //  virtual void SetMaxEmcCpvDistance(Float_t r) {cout << "Not Defined" << endl ; return 0 ; } 
-  //  virtual void SetRecPointsBranch(const char * title){cout << "Not Defined" << endl ; } 
-  //  virtual void SetTrackSegmentsBranch(const char * title){cout << "Not Defined" << endl ; } 
+  //  virtual void SetChoosingAlgirithm(){Warning("SetChoosingAlgirithm", "Not Defined" ) ; return 0 ; } 
+  //  virtual void SetMaxEmcCpvDistance(Float_t r) {Warning("SetMaxEmcCpvDistance", "Not Defined" ) ; return 0 ; } 
+  //  virtual void SetRecPointsBranch(const char * title){Warning("SetRecPointsBranch", "Not Defined" ) ; } 
+  //  virtual void SetTrackSegmentsBranch(const char * title){Warning("SetTrackSegmentsBranch", "Not Defined" ) ; } 
   //  virtual void SetSplitFile(const TString splitFileName = "PHOS.RecData.root") const ; 
-  virtual const char * Version() const {cout << "Not Defined" << endl ; return 0 ; }   
-  virtual void WriteTrackSegments(Int_t event){cout << "Not Defined" << endl ; } 
+  virtual const char * Version() const {Warning("Version", "Not Defined" ) ; return 0 ; }   
+  virtual void WriteTrackSegments(Int_t event){Warning("WriteTrackSegments", "Not Defined" ) ; } 
   
 protected:
   
index 6a46232893dccf348e0d903c89238fbce1130f34..742a26ea347239f47ac9e12e2dd01f72bab63140 100644 (file)
@@ -28,8 +28,7 @@
 //   new TrackSegment. 
 // If there is no CPV/PPSD RecPoint we make TrackSegment 
 // consisting from EMC alone. There is no TrackSegments without EMC RecPoint.
-//
-// In principle this class should be called from AliPHOSReconstructioner, but 
+//// In principle this class should be called from AliPHOSReconstructioner, but 
 // one can use it as well in standalone mode.
 // Use  case:
 //  root [0] AliPHOSTrackSegmentMakerv1 * t = new AliPHOSTrackSegmentMaker("galice.root", "tracksegmentsname", "recpointsname")
 #include "TTree.h"
 #include "TSystem.h"
 #include "TBenchmark.h"
-// --- Standard library ---
 
-#include <iostream.h>
-#include <iomanip.h>
+// --- Standard library ---
 
 // --- AliRoot header files ---
 
@@ -220,7 +217,7 @@ void  AliPHOSTrackSegmentMakerv1::Init()
   branchname.Remove(branchname.Index(Version())-1) ;
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance(GetTitle(),branchname.Data(), fToSplit ) ; 
   if ( gime == 0 ) {
-    cerr << "ERROR: AliPHOSTrackSegmentMakerv1::Init -> Could not obtain the Getter object !" << endl ; 
+    Error("Init", "Could not obtain the Getter object !") ; 
     return ;
   } 
   
@@ -418,8 +415,7 @@ void  AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
 //     }
     
 //     if ( phostsfound || tracksegmentmakerfound ) {
-//       cerr << "WARNING: AliPHOSTrackSegmentMakerv1::Exec -> TrackSegments and/or TrackSegmentMaker branch with name " 
-//        << branchname.Data() << " already exits" << endl ;
+//       Warning("Exec", "TrackSegments and/or TrackSegmentMaker branch with name %s already exists", branchname.Data() ) ;
 //       return ; 
 //     }       
 //   }
@@ -466,10 +462,8 @@ void  AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
 
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSTSMaker");
-    cout << "AliPHOSTSMaker:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSTSMaker") << " seconds for making TS " 
-        <<  gBenchmark->GetCpuTime("PHOSTSMaker")/nevents << " seconds per event " << endl ;
-    cout << endl ;
+    Info("Exec", "took %f seconds for making TS %f seconds per event", 
+        gBenchmark->GetCpuTime("PHOSTSMaker"), gBenchmark->GetCpuTime("PHOSTSMaker")/nevents) ;
   }
     
 }
@@ -479,18 +473,17 @@ void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const
 {
   //  Print TrackSegmentMaker parameters
 
+  TString message("") ;
   if( strcmp(GetName(), "") != 0 ) {
-    cout <<  "======== AliPHOSTrackSegmentMakerv1 ========" << endl ;
-    cout <<  "Making Track segments "<< endl ;
-    //    cout <<  "    Headers file:                   " << fHeaderFileName.Data() << endl ;
-    //    cout <<  "    RecPoints branch file name:     " << fRecPointsBranchTitle.Data() << endl ;
-    //    cout <<  "    TrackSegments Branch file name: " << fTrackSegmentsBranchTitle.Data() << endl ;
-    cout <<  "with parameters: " << endl ;
-    cout <<  "    Maximal EMC - CPV (PPSD) distance (cm)" << fRcpv << endl ;
-    cout <<  "============================================" << endl ;
+    message = "\n======== AliPHOSTrackSegmentMakerv1 ========\n" ; 
+    message += "Making Track segments\n" ;
+    message += "with parameters:\n" ; 
+    message += "     Maximal EMC - CPV (PPSD) distance (cm) %f\n" ;
+    message += "============================================\n" ;
+    Info("Print", message.Data(),fRcpv) ;
   }
   else
-    cout << "AliPHOSTrackSegmentMakerv1 not initialized " << endl ;
+    Info("Print", "AliPHOSTrackSegmentMakerv1 not initialized ") ;
 }
 
 //____________________________________________________________________________
@@ -558,21 +551,20 @@ void AliPHOSTrackSegmentMakerv1::PrintTrackSegments(Option_t * option)
   
   TClonesArray * trackSegments = AliPHOSGetter::GetInstance()->TrackSegments(taskName) ; 
 
-  
-  cout << "AliPHOSTrackSegmentMakerv1: event "<<gAlice->GetEvNumber()  << endl ;
-  cout << "       Found " << trackSegments->GetEntriesFast() << "  trackSegments " << endl ;
-  
+  TString message ; 
+  message  = "AliPHOSTrackSegmentMakerv1: event %d\n" ; 
+  message += "      Found %d TrackSegments\n" ; 
+
   if(strstr(option,"all")) {  // printing found TS
-    cout << "TrackSegment # " << "    EMC RP#    " << "    CPV RP#    " << endl ; 
-    
+    message += "TrackSegment #     EMC RP#        CPV RP#    \n" ; 
+    Info("PrintTrackSegments", message.Data(), 
+        gAlice->GetEvNumber(), 
+        trackSegments->GetEntriesFast() ) ;  
     Int_t index;
     for (index = 0 ; index <trackSegments->GetEntriesFast() ; index++) {
       AliPHOSTrackSegment * ts = (AliPHOSTrackSegment * )trackSegments->At(index) ; 
-      cout<<"   "<< setw(4) << ts->GetIndexInList() << "            " 
-         <<setw(4) << ts->GetEmcIndex()<< "            " 
-         <<setw(4) << ts->GetCpvIndex()<< "            " << endl ;
+      message = "       %d    %d    %d\n" ; 
+      Info("PrintTrackSegments", message.Data(), ts->GetIndexInList(), ts->GetEmcIndex(), ts->GetCpvIndex() ) ;
     }  
-    
-    cout << "-------------------------------------------------------"<< endl ;
   }
 }
index e0293ea59359495151cdb8cab50d2e9ff1471205..51c8906be2e3cecf8ab123d1edadeb5048a04481 100644 (file)
@@ -39,7 +39,6 @@
 
 #include <string.h>
 #include <stdlib.h>
-#include <strstream.h>
 
 // --- AliRoot header files ---
 
@@ -876,25 +875,19 @@ void AliPHOSv0::Init(void)
   Int_t i;
 
   if(fDebug) {
-    cout << endl ;  
+    TString st ; 
     for(i=0;i<35;i++) 
-      cout <<"*";
-    cout << "INFO: " << ClassName() << "::Init ";
-    for(i=0;i<35;i++) 
-      cout << "*";
-    cout << endl;
-   
+      st += "*";
+    Info("Init", "%s", st.Data()) ;  
     // Here the PHOS initialisation code (if any!)
     
     AliPHOSGeometry * geom = GetGeometry() ; 
 
     if (geom!=0)  
-      cout << "AliPHOS" << Version() << " : PHOS geometry intialized for " << geom->GetName() << endl ;
+      Info("Init", "AliPHOS%s: PHOS geometry intialized for %s", Version().Data(), geom->GetName()) ;
     else
-      cout << "AliPHOS" << Version() << " : PHOS geometry initialization failed !" << endl ;       
-    for(i=0;i<80;i++) 
-      cout << "*" ;
-    cout << endl;
-    
+      Info("Init", "AliPHOS%s: PHOS geometry initialization failed !", Version().Data()) ;       
+
+    Info("Init", "%s", st.Data()) ;  
   }
 }
index 47c0ebebc26de2f99e52946bc56378a91d340af4..898cca230189c55c07654024af22a8258e58acee 100644 (file)
@@ -443,7 +443,7 @@ void AliPHOSv1::StepManager(void)
       xyzte[4] = fAPDFactor * lightYield  ;
       
       // add current hit to the hit list
-      //cout << "AliPHOSv1::StepManager " << primary << " " << tracknumber << endl ; 
+      // Info("StepManager","%d %d", primary, tracknumber) ; 
       AddHit(fIshunt, primary,tracknumber, absid, xyzte);
       
       // fill the relevant QA Checkables
@@ -489,7 +489,7 @@ void AliPHOSv1::CPVDigitize (TLorentzVector p, Float_t *zxhit, Int_t moduleNumbe
   Float_t pNorm = p.Py();
   Float_t eloss = kdEdx;
 
-//    cout << "CPVDigitize: YVK : "<<hitX<<" "<<hitZ<<" | "<<pX<<" "<<pZ<<" "<<pNorm<<endl;
+//Info("CPVDigitize", "YVK : %f %f | %f %f %d", hitX, hitZ, pX, pZ, pNorm) ;
 
   Float_t dZY   = pZ/pNorm * GetGeometry()->GetCPVGasThickness();
   Float_t dXY   = pX/pNorm * GetGeometry()->GetCPVGasThickness();
index e38f950b7d6bba9f994258c280f83c833338b334..369783bfb1798ec1a8cd3f4b14a014f3a5fb680b 100644 (file)
@@ -116,9 +116,9 @@ void AliPHOSv3::StepManager(void)
   // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
 
 //    if (gMC->IsTrackEntering())
-//      cout << "Track enters the volume " << gMC->CurrentVolName() << endl;
+//      Info("StepManager", "Track enters the volume %d", gMC->CurrentVolName()) ;
 //    if (gMC->IsTrackExiting())
-//      cout << "Track leaves the volume " << gMC->CurrentVolName() << endl;
+//      Info("StepManager", "Track leaves the volume %d", gMC->CurrentVolName()) ;
 
   Int_t          relid[4] ;        // (box, layer, row, column) indices
   Int_t          absid    ;        // absolute cell ID number
@@ -309,8 +309,8 @@ if(gMC->CurrentVolID(copy)==gMC->VolId("PXTL")){// We are inside a PBWO4 crystal
    xyze[3] = (fRecalibrationFactor/100.) * fAPDGain * fLightYield  ;
   
     
-   // cout<<"xyze[3]:    "<<xyze[3]<<   endl;
-   //cout<<"lostenergy: "<<lostenergy<<endl
+   // Info("StepManager", "xyze[3]: %f", xyze[3]) ;
+   // Info("StepManager", "lostenergy: %f", lostenergy) 
 
 
         
@@ -326,7 +326,7 @@ if(gMC->CurrentVolID(copy)==gMC->VolId("PXTL")){// We are inside a PBWO4 crystal
 
 //  if(gMC->CurrentVolID(copy) == gMC->VolId("PPIN"))//We are inside the PIN diode 
 //     {
-//       cout<<" Inside PIN "<<endl;
+//       Info("StepManager", "Inside PIN";
 //       gMC->TrackPosition(pos) ;
 //       global[0] = pos[0] ;
 //       global[1] = pos[1] ;
index 20575eb9a82da8799170c975fc4b6dd8fc5c6e05..75b2cea76f9c7c3fad95bb8caefd87b5083fe859 100644 (file)
@@ -355,8 +355,8 @@ Int_t AliPHOSvFast::MakeType(AliPHOSFastRecParticle & rp )
   else
     test = rp.GetPdgCode() ; 
 
-  cout << " SHOULD NOT BE USED until values of probabilities are properly set " << endl ;
-  assert(1==0) ;    // NB: ALL VALUES SHOLD BE CHECKED !!!!
+  Info("MakeType", "SHOULD NOT BE USED until values of probabilities are properly set ") ;
+  assert(1==0) ;    // NB: ALL VALUES SHOULD BE CHECKED !!!!
   switch (test) { 
 
   case 22:    // it's a photon              // NB: ALL VALUES SHOLD BE CHECKED !!!!
index b746f08f472a98e212dcd323e3cd3c7c54b13157..68756a9229034c6a8efb711f0a5ff464be78d1a7 100644 (file)
@@ -60,7 +60,7 @@ void PHOSHistos (Text_t* infile, Int_t nevent, Int_t Module)
   AliPHOSTrackSegmentMakerv1 * tracksegmentmaker = new AliPHOSTrackSegmentMakerv1() ;
   //========== Creates the particle identifier
   AliPHOSPIDv1 * particleidentifier = new AliPHOSPIDv1 ;
-  cout <<  "AnalyzeOneEvent > using particle identifier " << particleidentifier->GetName() << endl ; 
+  Info("PHOSHistos", "AnalyzeOneEvent > using particle identifier %s\n", particleidentifier->GetName() ) ; 
     
   TH1F * hEmcDigit       = new TH1F("hEmcDigit","hEmcDigit",1000,0.,5.);
   TH1F * hVetoDigit      = new TH1F("hVetoDigit","hVetoDigit",1000,0.,3.e-5);
@@ -88,7 +88,7 @@ void PHOSHistos (Text_t* infile, Int_t nevent, Int_t Module)
   //========== Creates the Reconstructioner  
     AliPHOSReconstructioner * Reconstructioner = new AliPHOSReconstructioner(clusterizer, tracksegmentmaker, particleidentifier) ;
      
-    cout << "Event " << ievent <<endl;
+    Info("PHOSHistos", "Event %d\n", ievent);
 
     Int_t RelId[4] ;
     //=========== Connects the various Tree's for evt