]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Implement the new logging system (AliLog)
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Oct 2004 08:03:51 +0000 (08:03 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Oct 2004 08:03:51 +0000 (08:03 +0000)
21 files changed:
PHOS/AliPHOS.cxx
PHOS/AliPHOS.h
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv2.cxx
PHOS/AliPHOSConTableDB.cxx
PHOS/AliPHOSCpvRecPoint.cxx
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSEvalRecPoint.cxx
PHOS/AliPHOSFastRecParticle.cxx
PHOS/AliPHOSGeometry.cxx
PHOS/AliPHOSGetter.cxx
PHOS/AliPHOSGridFile.cxx
PHOS/AliPHOSHit.cxx
PHOS/AliPHOSIhepAnalyze.cxx
PHOS/AliPHOSJet.cxx
PHOS/AliPHOSJetFinder.cxx
PHOS/AliPHOSLoader.cxx
PHOS/AliPHOSPIDv0.cxx
PHOS/AliPHOSPIDv1.cxx

index 93879f5db3e96c82daced185d27a52354b7cf595..e56af39cc1539836d35f5df0c90c61bd41404119 100644 (file)
@@ -54,7 +54,6 @@ Int_t    AliPHOS::fgOrder       = 2 ;
 Double_t AliPHOS::fgTimeMax     = 2.56E-5 ;  // each sample is over 100 ns fTimeMax/fTimeBins
 Double_t AliPHOS::fgTimePeak    = 4.1E-6 ;   // 4 micro seconds
 Double_t AliPHOS::fgTimeTrigger = 100E-9 ;      // 100ns, just for a reference
 
 //____________________________________________________________________________
   AliPHOS:: AliPHOS() : AliDetector()
@@ -94,6 +93,10 @@ void AliPHOS::Copy(AliPHOS & phos)
   TObject::Copy(phos) ; 
   //  fQATask = AliPHOSQAChecker::Copy(*(phos.fQATask)) ; 
   phos.fTreeQA = fTreeQA->CloneTree() ; 
+  phos.fHighCharge        = fHighCharge ;
+  phos.fHighGain          = fHighGain ; 
+  phos.fHighLowGainFactor = fHighLowGainFactor ;  
+  phos.fLowGainOffset     = fLowGainOffset;   
 }
 
 //____________________________________________________________________________
@@ -408,7 +411,7 @@ void AliPHOS::Digits2Raw()
   TClonesArray* digits = loader->Digits() ;
 
   if (!digits) {
-    Error("Digits2Raw", "no digits found !");
+    AliError(Form("No digits found !"));
     return;
   }
 
@@ -419,7 +422,7 @@ void AliPHOS::Digits2Raw()
   // get the geometry
   AliPHOSGeometry* geom = GetGeometry();
   if (!geom) {
-    Error("Digits2Raw", "no geometry found !");
+    AliError(Form("No geometry found !"));
     return;
   }
 
@@ -599,15 +602,14 @@ void AliPHOS::SetTreeAddress()
   TBranch *branch;
   char branchname[20];
   sprintf(branchname,"%s",GetName());
-  
   // Branch address for hit tree
-  TTree *treeH = TreeH();
+    TTree *treeH = TreeH();
   if (treeH) {
     branch = treeH->GetBranch(branchname);
     if (branch) 
      { 
        if (fHits == 0x0) fHits= new TClonesArray("AliPHOSHit",1000);
-       //Info("SetTreeAddress","<%s> Setting Hits Address",GetName());
+       //AliInfo(Form("<%s> Setting Hits Address",GetName()));
        branch->SetAddress(&fHits);
      }
   }
@@ -632,7 +634,7 @@ void AliPHOS::WriteQA()
  
   if (alarmsF == 0x0)
    {
-     Error("WriteQA","Can not find folder with qa alarms");
+     AliError(Form("Can not find folder with qa alarms"));
      return;
    }
   TString branchName(alarmsF->GetName());
index acb66fb2566e93a15f1acac92e6b8e07cc4d8ae8..ca4da579f2e7926aa46ea209d9d3a677f633b879 100644 (file)
@@ -19,6 +19,7 @@ class TRandom ;
 
 // --- AliRoot header files ---
 #include "AliDetector.h" 
+#include "AliLog.h"
 #include "AliPHOSGeometry.h" 
 class AliPHOSQAChecker ;
 
@@ -34,7 +35,7 @@ public:
   virtual ~AliPHOS() ; 
   virtual void   AddHit(Int_t, Int_t*, Float_t *) {
     // do not use this definition but the one below
-    Fatal("AddHit(Int_t, Int_t*, Float_t *)", "do not use") ;
+    AliFatal(Form("do not use")) ;
     
   }
   virtual void   AddHit( Int_t shunt, Int_t primary, Int_t track, 
index 0a0ec831e11e709f4802e67542a2ee81073fee07..2f8da5d4a73540f9e11c0a8d7a4afa92369ede9d 100644 (file)
@@ -76,7 +76,7 @@
 
 // --- AliRoot header files ---
 
-//#include "AliRun.h"
+#include "AliLog.h"
 #include "AliStack.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSAnalyze.h"
@@ -108,7 +108,7 @@ AliPHOSAnalyze::AliPHOSAnalyze(Text_t * fileName)
   fRunLoader = AliRunLoader::Open(fileName,"AliPHOSAnalyze");
   if (fRunLoader == 0x0)
    {
-     Error("AliPHOSAnalyze","Error Loading session");
+     AliError(Form("Error Loading session"));
    }
 }
 
@@ -135,20 +135,20 @@ void AliPHOSAnalyze::DrawRecon(Int_t Nevent,Int_t Nmod){
   //========== Create ObjectLoader
   if (fRunLoader == 0x0)
    {
-     Error("DrawRecon","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("DrawRecon","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
   
   
   if(Nevent >= fRunLoader->GetNumberOfEvents() ) {
-    Error("DrawRecon", "There is no event %d only %d events available", Nevent, fRunLoader->GetNumberOfEvents() ) ;
+    AliError(Form("There is no event %d only %d events available", Nevent, fRunLoader->GetNumberOfEvents() )) ;
     return ;
   }
   const AliPHOSGeometry * phosgeom = gime->PHOSGeometry() ; 
@@ -262,7 +262,7 @@ void AliPHOSAnalyze::DrawRecon(Int_t Nevent,Int_t Nmod){
   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] ) ;
+  AliInfo(Form(message.Data(), nsdig[0], nsdig[1], nsdig[2], nsdig[3], nsdig[4] )) ;
 
   //Plot digits
   Int_t iDigit ;
@@ -383,14 +383,14 @@ void AliPHOSAnalyze::Ls(){
   
   if (fRunLoader == 0x0)
    {
-     Error("Ls","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("Ls","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
 
@@ -402,7 +402,7 @@ void AliPHOSAnalyze::Ls(){
    {
      if (gime->LoadSDigits("READ"))
       {
-        Error("Ls","Problems with loading summable digits");
+        AliError(Form("Problems with loading summable digits"));
         return;
       }
    }
@@ -424,7 +424,7 @@ void AliPHOSAnalyze::Ls(){
    {
      if (gime->LoadDigits("READ"))
       {
-        Error("Ls","Problems with loading digits");
+        AliError(Form("Problems with loading digits"));
         return;
       }
    }
@@ -447,7 +447,7 @@ void AliPHOSAnalyze::Ls(){
    {
      if (gime->LoadRecPoints("READ"))
       {
-        Error("Ls","Problems with loading rec points");
+        AliError(Form("Problems with loading rec points"));
         return;
       }
    }
@@ -465,7 +465,7 @@ void AliPHOSAnalyze::Ls(){
       message += "\n" ;
     }
   }
-  Info("LS", message.Data()) ;  
+  AliInfo(Form(message.Data())) ;  
 }
 //____________________________________________________________________________
  void AliPHOSAnalyze::InvariantMass()
@@ -473,14 +473,14 @@ void AliPHOSAnalyze::Ls(){
   // Calculates Real and Mixed invariant mass distributions
   if (fRunLoader == 0x0)
    {
-     Error("DrawRecon","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("DrawRecon","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
   
@@ -542,7 +542,7 @@ void AliPHOSAnalyze::Ls(){
     Int_t iRecParticle ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp){
-      Error("InvariantMass", "Can't find RecParticles") ; 
+      AliError(Form("Can't find RecParticles")) ; 
       return ;
     }
 
@@ -657,14 +657,14 @@ void AliPHOSAnalyze::Ls(){
 
   if (fRunLoader == 0x0)
    {
-     Error("DrawRecon","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("DrawRecon","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
 
@@ -686,17 +686,17 @@ void AliPHOSAnalyze::Ls(){
     Int_t iRecParticle ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      Error("EnergyResolution", "Event %d,  Can't find RecParticles ", ievent) ;  
+      AliError(Form("Event %d,  Can't find RecParticles ", ievent)) ;  
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      Error("EnergyResolution", "Event %d,  Can't find TrackSegments", ievent) ;  
+      AliError(Form("Event %d,  Can't find TrackSegments", ievent)) ;  
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      Error("EnergyResolution", "Event %d,  Can't find EmcRecPoints") ; 
+      AliError(Form("Event %d,  Can't find EmcRecPoints")) ; 
       return ;
     }
       
@@ -810,14 +810,14 @@ void AliPHOSAnalyze::PositionResolution()
 
   if (fRunLoader == 0x0)
    {
-     Error("DrawRecon","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("DrawRecon","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
   
@@ -833,17 +833,17 @@ void AliPHOSAnalyze::PositionResolution()
     fRunLoader->GetEvent(ievent) ;
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      Error("PositionResolution", "Event %d,  Can't find RecParticles", ievent) ;
+      AliError(Form("Event %d,  Can't find RecParticles", ievent)) ;
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      Error("PositionResolution", "Event %d,  Can't find TrackSegments", ievent) ;
+      AliError(Form("Event %d,  Can't find TrackSegments", ievent)) ;
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      Error("PositionResolution", "Event %d,  Can't find EmcRecPoints", ievent) ;
+      AliError(Form("Event %d,  Can't find EmcRecPoints", ievent)) ;
       return ;
     }
     
@@ -1032,14 +1032,14 @@ void AliPHOSAnalyze::Contamination(){
 
   if (fRunLoader == 0x0)
    {
-     Error("DrawRecon","Error Loading session");
+     AliError(Form("Error Loading session"));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("DrawRecon","Could not obtain the Loader object !"); 
+     AliError(Form("Could not obtain the Loader object !")); 
      return ;
    } 
   
@@ -1054,17 +1054,17 @@ void AliPHOSAnalyze::Contamination(){
     
     TClonesArray * rp = gime->RecParticles() ;
     if(!rp) {
-      Error("Contamination", "Event %d,  Can't find RecParticles", ievent) ;
+      AliError(Form("Event %d,  Can't find RecParticles", ievent)) ;
       return ;
     }
     TClonesArray * ts = gime->TrackSegments() ;
     if(!ts) {
-      Error("Contamination", "Event %d,  Can't find TrackSegments", ievent) ;
+      AliError(Form("Event %d,  Can't find TrackSegments", ievent)) ;
       return ;
     }
     TObjArray * emcrp = gime->EmcRecPoints() ;
     if(!emcrp){
-      Error("Contamination", "Event %d,  Can't find EmcRecPoints", ievent) ;
+      AliError(Form("Event %d,  Can't find EmcRecPoints", ievent)) ;
       return ;
     }
     
@@ -1276,7 +1276,7 @@ void AliPHOSAnalyze::Contamination(){
       totalInd+=counter[i1][i2] ;
   message += "Indentified particles: %d" ; 
   
Info("Contamination", message.Data(), maxevent, 
AliInfo(Form(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], 
@@ -1285,6 +1285,6 @@ void AliPHOSAnalyze::Contamination(){
       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 ) ;
+      totalInd )) ;
 
 }
index 68de26b620456d08d868db13b95548fd74af5cc0..677633a55eebae604106543de48ab827f3999841 100644 (file)
@@ -53,6 +53,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSGetter.h"
 #include "AliPHOSGeometry.h" 
 #include "AliPHOSClusterizerv1.h"
@@ -162,9 +163,9 @@ void AliPHOSClusterizerv1::Exec(Option_t *option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSClusterizer");
-    Info("Exec", "  took %f seconds for Clusterizing %f seconds per event \n",
+    AliInfo(Form("took %f seconds for Clusterizing %f seconds per event \n",
         gBenchmark->GetCpuTime("PHOSClusterizer"), 
-        gBenchmark->GetCpuTime("PHOSClusterizer")/nEvents ) ; 
+        gBenchmark->GetCpuTime("PHOSClusterizer")/nEvents )) ; 
   } 
 }
 
@@ -961,7 +962,7 @@ void AliPHOSClusterizerv1::Print()const
   else 
     message = " AliPHOSClusterizerv1 not initialized " ;
   
-  Info("Print", message.Data(),  
+  AliInfo(Form("%s, %s %s %s %s %s %s %s %s %s %s", message.Data(),  
        taskName.Data(), 
        GetTitle(),
        taskName.Data(), 
@@ -971,7 +972,7 @@ void AliPHOSClusterizerv1::Print()const
        fW0, 
        fCpvClusteringThreshold, 
        fCpvLocMaxCut, 
-       fW0CPV ) ; 
+       fW0CPV )) ; 
 }
 
 
@@ -985,9 +986,10 @@ void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
   TObjArray * emcRecPoints = gime->EmcRecPoints() ; 
   TObjArray * cpvRecPoints = gime->CpvRecPoints() ; 
 
-  printf("\nevent %d \n", gAlice->GetEvNumber())  ;
-  printf("       Found %d EMC RecPoints and %d CPV RecPoints \n",
-         emcRecPoints->GetEntriesFast(),cpvRecPoints->GetEntriesFast())  ; 
+  AliInfo(Form("\nevent %d \n    Found %d EMC RecPoints and %d CPV RecPoints", 
+              gAlice->GetEvNumber(),
+              emcRecPoints->GetEntriesFast(),
+              cpvRecPoints->GetEntriesFast() ))  ;
  
   fRecPointsInRun +=  emcRecPoints->GetEntriesFast() ; 
   fRecPointsInRun +=  cpvRecPoints->GetEntriesFast() ; 
index 4eab56e020f8b3f368138b0cd18041f308546bba..7fcab2f27b60011eef1a552b6bba4e918000c044 100644 (file)
@@ -27,6 +27,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSClusterizerv2.h"
 #include "AliPHOSGetter.h"
 #include "TFolder.h"
@@ -88,9 +89,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     
     gime->Event(ievent,"D") ;
     
-    Info("Exec", "MakeClusters invoked..") ;
+    AliInfo(Form("MakeClusters invoked..")) ;
     MakeClusters() ;
-    Info("Exec", "MakeClusters done.") ;
+    AliInfo(Form("MakeClusters done.")) ;
 
 
     //SmartRecPoints will communicate with wPool.
@@ -128,8 +129,8 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     wPoolF->Remove(recCpv);
     delete recCpv;
 
-    Info("Exec", "       %d", gime->CpvRecPoints()->GetEntries() ) ;
-    Info("Exec", "       %d cpvRecPoints", cpvRecPoints->GetEntries() ) ;
+    AliInfo(Form("       %d", gime->CpvRecPoints()->GetEntries() )) ;
+    AliInfo(Form("       %d cpvRecPoints", cpvRecPoints->GetEntries() )) ;
 
 
     // Now Emc reconstruction
@@ -167,11 +168,11 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     message += "       %d\n" ;
     message += "       %d emcRecPoints\n" ;
 
-    Info("Exec", message.Data(), 
+    AliInfo(Form("%s", message.Data(), 
         nOldCpv, 
         gime->CpvRecPoints()->GetEntries(),cpvRecPoints->GetEntries(), 
         nOldEmc, 
-        gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ) 
+        gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ))
 
     WriteRecPoints();
 
@@ -180,7 +181,7 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 
   if(strstr(option,"tim")) {
     gBenchmark->Stop("PHOSClusterizer");
-    Info("Exec","took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") ) ;
+    AliInfo(Form("took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") )) ;
   }
 }
 
index f6da09ce297708aa2cac21a5c3cd3b31cb18e13a..933a293423b1949a2953398bc16113008ef051a5 100644 (file)
@@ -33,6 +33,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSConTableDB.h"
 
@@ -101,7 +102,7 @@ void  AliPHOSConTableDB::BuildDB(void)
   //assuming, that prototype is centered in the third module of the PHOS
   fNcrInProto =fProtoRaws*fProtoColumns ;
   if(!fNcrInProto){
-    Error("BuildDB", "configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype") ;
+    AliError(Form("configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype"));
     return ;
   }
   fRawOffset = (fGeom->GetNPhi() - fProtoRaws)/2 ;
@@ -201,7 +202,7 @@ void AliPHOSConTableDB::Print()const {
   else
     message += " null \n"  ;
 
-  Info("Print", message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() ) ; 
+  AliInfo(Form(message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() )) ; 
 
   message  = "\n-------Prototype parameters--------\n" ;
   message += "    number of columns: %d \n" ; 
@@ -211,7 +212,7 @@ void AliPHOSConTableDB::Print()const {
   message += "    col: %d of %d\n" ; 
   message += "------------------------------------ \n" ;
 
-  Info("Print", message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() );   
+  AliInfo(Form(message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() ));   
 }
 //____________________________________________________________________________
 AliPHOSConTableDB& AliPHOSConTableDB::operator=(const AliPHOSConTableDB& cdb){
index ff04696f8b75cb5a25a6481e025880ec46f31340..bd8aadb0b8369eedb43187bbfaeaa256cb635c15 100644 (file)
@@ -30,6 +30,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSGeometry.h" 
 #include "AliPHOSDigit.h"
 #include "AliPHOSCpvRecPoint.h"
@@ -282,7 +283,7 @@ void AliPHOSCpvRecPoint::EvalLocalPosition(Float_t logWeight,TClonesArray * digi
     x = -1e6 ;
     z = -1e6 ;
     if (fMulDigit != 0) 
-      Warning(":EvalLocalPosition", "Too low log weight factor to evaluate cluster's center" ) ;
+      AliWarning(Form("Too low log weight factor to evaluate cluster's center" )) ;
   }
   fLocPos.SetX(x)  ;
   fLocPos.SetY(0.) ;
@@ -347,21 +348,21 @@ void AliPHOSCpvRecPoint::Print()
   TString message ; 
   message  =  "AliPHOSCpvRecPoint: " ;
   message +=  "Digits #   " ;
-  Info("Print", message.Data()) ; 
+  AliInfo(Form(message.Data())) ; 
   
   Int_t iDigit;
 
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    Info("Print", " %d ", fDigitsList[iDigit]) ; 
+    printf(" %d \n", fDigitsList[iDigit]) ; 
 
-  Info("Print", "Energies: ")  ;
+  printf("Energies: \n")  ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
-    Info("Print", " %f ", fEnergyList[iDigit]) ; 
+    printf(" %f ", fEnergyList[iDigit]) ; 
   
   message  = "       Multiplicity    = %d\n" ;
   message += "       Cluster Energy  = %f\n" ;
   message += "       Stored at position %d\n" ; 
  
-  Info("Print", message.Data(), fMulDigit, fAmp, GetIndexInList() ) ; 
+  printf(message.Data(), fMulDigit, fAmp, GetIndexInList() ) ; 
 
 }
index 352afdc136f84989a89d8b611049db80dc7fb3a8..e5f6cc9c6f319c4718c7e09bfe319d51fce63b39 100644 (file)
@@ -64,7 +64,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliRunDigitizer.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSGetter.h"
@@ -164,7 +164,8 @@ void AliPHOSDigitizer::Digitize(Int_t event)
   Int_t ReadEvent = event ; 
   if (fManager) 
     ReadEvent = dynamic_cast<AliStream*>(fManager->GetInputStream(0))->GetCurrentEventNumber() ; 
-  Info("Digitize", "Adding event %d from input stream 0 %s %s", ReadEvent, GetTitle(), fEventFolderName.Data()) ; 
+  AliInfo(Form("Adding event %d from input stream 0 %s %s", 
+              ReadEvent, GetTitle(), fEventFolderName.Data())) ; 
   gime->Event(ReadEvent, "S") ;
   TClonesArray * digits = gime->Digits() ; 
   digits->Clear() ;
@@ -186,7 +187,8 @@ void AliPHOSDigitizer::Digitize(Int_t event)
   AliPHOSSDigitizer * sDigitizer = gime->SDigitizer(); 
 
   if ( !sDigitizer )
-    Fatal("Digitize", "SDigitizer with name %s %s not found", GetTitle(), fEventFolderName.Data() ) ; 
+    AliFatal(Form("SDigitizer with name %s %s not found", 
+                 GetTitle(), fEventFolderName.Data() )) ; 
 
   //take all the inputs to add together and load the SDigits
   TObjArray * sdigArray = new TObjArray(fInput) ;
@@ -198,7 +200,8 @@ void AliPHOSDigitizer::Digitize(Int_t event)
     AliPHOSGetter * gime = AliPHOSGetter::Instance(fInputFileNames[i], tempo) ;
     if (fManager) 
       ReadEvent = dynamic_cast<AliStream*>(fManager->GetInputStream(i))->GetCurrentEventNumber() ; 
-    Info("Digitize", "Adding event %d from input stream %d %s %s", ReadEvent, i, fInputFileNames[i].Data(), tempo.Data()) ; 
+    AliInfo(Form("Adding event %d from input stream %d %s %s", 
+                ReadEvent, i, fInputFileNames[i].Data(), tempo.Data())) ; 
     gime->Event(ReadEvent,"S");
     sdigArray->AddAt(gime->SDigits(), i) ;
   }
@@ -396,7 +399,8 @@ void AliPHOSDigitizer::Exec(Option_t *option)
   // by default fLastEvent = fFirstEvent (process only one event)
 
   if (!fInit) { // to prevent overwrite existing file
-    Error( "Exec", "Give a version name different from %s", fEventFolderName.Data() ) ;
+    AliError(Form("Give a version name different from %s", 
+                 fEventFolderName.Data() )) ;
     return ;
   }   
 
@@ -443,9 +447,9 @@ void AliPHOSDigitizer::Exec(Option_t *option)
     gBenchmark->Stop("PHOSDigitizer");
     TString message ; 
     message = "  took %f seconds for Digitizing %f seconds per event\n" ; 
-    Info("Exec", message.Data(), 
+    AliInfo(Form( message.Data(), 
         gBenchmark->GetCpuTime("PHOSDigitizer"), 
-        gBenchmark->GetCpuTime("PHOSDigitizer")/nEvents ); 
+        gBenchmark->GetCpuTime("PHOSDigitizer")/nEvents ))
   } 
 }
 
@@ -478,7 +482,8 @@ Bool_t AliPHOSDigitizer::Init()
   fInit = kTRUE ; 
   AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName) ; 
   if ( gime == 0 ) {
-    Fatal("Init" ,"Could not obtain the Getter object for file %s and event %s !", GetTitle(), fEventFolderName.Data()) ;  
+    AliFatal(Form("Could not obtain the Getter object for file %s and event %s !", 
+                 GetTitle(), fEventFolderName.Data()));  
     return kFALSE;
   } 
   
@@ -488,7 +493,8 @@ Bool_t AliPHOSDigitizer::Init()
   
   TString opt("Digits") ; 
   if(gime->VersionExists(opt) ) { 
-    Error( "Init", "Give a version name different from %s", fEventFolderName.Data() ) ;
+    AliError(Form("Give a version name different from %s", 
+                 fEventFolderName.Data() )) ;
     fInit = kFALSE ; 
   }
 
@@ -565,7 +571,7 @@ void AliPHOSDigitizer::MixWith(TString alirunFileName, TString eventFolderName)
   }
   // looking for file which contains AliRun
   if (gSystem->AccessPathName(alirunFileName)) {// file does not exist
-    Error("MixWith", "File %s does not exist!", alirunFileName.Data()) ;
+    AliError(Form("File %s does not exist!", alirunFileName.Data())) ;
     return ; 
   }
   // looking for the file which contains SDigits
@@ -574,7 +580,7 @@ void AliPHOSDigitizer::MixWith(TString alirunFileName, TString eventFolderName)
     if ( eventFolderName != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name 
       fileName = fileName.ReplaceAll(".root", "") + "_" + eventFolderName + ".root" ;
     if ( (gSystem->AccessPathName(fileName)) ) { 
-      Error("MixWith", "The file %s does not exist!", fileName.Data()) ;
+      AliError(Form("The file %s does not exist!", fileName.Data())) ;
       return ;
     }
     // need to increase the arrays
@@ -597,7 +603,7 @@ void AliPHOSDigitizer::MixWith(TString alirunFileName, TString eventFolderName)
 void AliPHOSDigitizer::Print()const 
 {
   // Print Digitizer's parameters
-  Info("Print", "\n------------------- %s -------------", GetName() ) ; 
+  AliInfo(Form("\n------------------- %s -------------", GetName() )) ; 
   if( strcmp(fEventFolderName.Data(), "") != 0 ){
     printf(" Writing Digits to branch with title  %s\n", fEventFolderName.Data()) ;
     
@@ -628,7 +634,7 @@ void AliPHOSDigitizer::Print()const
     printf(" ---------------------------------------------------\n") ;   
   }
   else
-    Info("Print", "AliPHOSDigitizer not initialized" ) ;
+    AliInfo(Form("AliPHOSDigitizer not initialized" )) ;
   
 }
 
@@ -640,7 +646,7 @@ void AliPHOSDigitizer::Print()const
   AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName) ; 
   TClonesArray * digits = gime->Digits() ; 
   
-  Info("PrintDigits", "%d", digits->GetEntriesFast()) ; 
+  AliInfo(Form("%d", digits->GetEntriesFast())) ; 
   printf("\nevent %d", gAlice->GetEvNumber()) ;
   printf("\n       Number of entries in Digits list %d", digits->GetEntriesFast() )  ;  
 
index d89039d288691ec57b55bc92d77407e747dbbbb5..40ec5a9806410ff074d290d67447f7df02c2047b 100644 (file)
@@ -31,6 +31,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSLoader.h"
 #include "AliGenerator.h"
 #include "AliPHOSGeometry.h"
@@ -230,13 +231,13 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t, Int_t) const
   AliRunLoader* rn = AliRunLoader::GetRunLoader(AliConfig::GetDefaultEventFolderName());
   if (rn == 0x0) 
     {
-      Error("ExecuteEvent","Can not find Run Loader in Default Event Folder");
+      AliError(Form("Cannot find Run Loader in Default Event Folder"));
       return;
     }
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
   if (gime == 0x0) 
     {
-      Error("ExecuteEvent","Can not find PHOS Loader from Run Loader");
+      AliError(Form("Cannot find PHOS Loader from Run Loader"));
       return;
     }
   
@@ -855,17 +856,17 @@ void AliPHOSEmcRecPoint::Print(Option_t *) const
   TString message ; 
   message  = "AliPHOSEmcRecPoint:\n" ;
   message +=  " digits # = " ; 
-  Info("Print", message.Data()) ; 
+  AliInfo(Form(message.Data())) ; 
 
   Int_t iDigit;
   for(iDigit=0; iDigit<fMulDigit; iDigit++)
     printf(" %d ", fDigitsList[iDigit] ) ;  
   
-  Info("Print", " Energies = ") ;
+  printf(" Energies = ") ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) 
     printf(" %f ", fEnergyList[iDigit] ) ;
   printf("\n") ; 
-   Info("Print", " Primaries  ") ;
+   printf(" Primaries  ") ;
   for(iDigit = 0;iDigit < fMulTrack; iDigit++)
     printf(" %d ", fTracksList[iDigit]) ;
   printf("\n") ;       
@@ -874,7 +875,7 @@ void AliPHOSEmcRecPoint::Print(Option_t *) const
   message += "       Number of primaries %d" ; 
   message += "       Stored at position %d" ; 
  
-  Info("Print", message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;  
+  printf(message.Data(), fMulDigit, fAmp, fMulTrack,GetIndexInList() ) ;  
 }
  
   
index 0984cbd415b236b7e35d9d6797a0b05e6fb5c31a..82ee8180f472971ced42d6bbb711334c33a41be8 100644 (file)
@@ -30,6 +30,7 @@
 #include "TFolder.h"
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliConfig.h"
 #include "AliPHOSDigit.h" 
 #include "AliPHOSClusterizer.h"
@@ -279,7 +280,7 @@ void AliPHOSEvalRecPoint::InitTwoGam(Float_t* gamma1, Float_t* gamma2)
   Float_t yy = lpos.X();
   Float_t e = GetEnergy();
 
-  Info("InitTwoGam", "(x,z,e)[old] = (%f, %f, %f)", yy, xx, e) ;
+  AliInfo(Form("(x,z,e)[old] = (%f, %f, %f)", yy, xx, e)) ;
 
 //    xx = XY(xx/e);
 //    yy = XY(yy/e);
@@ -455,14 +456,12 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
          
          Float_t dx1 =  x1c - ix;
          Float_t dy1 =  y1c - iy;
-//       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;
-//       Info("TwoGam", "      dx2 %f dy2 %f", dx2, dy2) ;
-//       AG(e2c,dx2,dy2,a2,gx2,gy2);
+
          GetReconstructionManager()->AG(e2c,dx2,dy2,a2,gx2,gy2);
       
          Float_t a = a1+a2;
@@ -520,8 +519,8 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
     loop20: ;
       Float_t step = st*gr;
 
-      Info("TwoGam", "Iteration %d dof %d chisq/dof %f chstop/dof %f step %d stpmin %d",
-          iter, dof, ch/dof, chstop/dof, step, stpmin) ;
+      AliInfo(Form("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) 
@@ -569,9 +568,9 @@ void AliPHOSEvalRecPoint::TwoGam(Float_t* gamma1, Float_t* gamma2)
   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(), 
+  AliInfo(Form(message.Data(), 
        x1New, z1New, e1New, 
-       x2New, z2New, e2New) ;
+       x2New, z2New, e2New)) ;
 
   fChi2Dof = chisq;
 
@@ -659,7 +658,8 @@ void AliPHOSEvalRecPoint::UnfoldTwoMergedPoints(Float_t* gamma1, Float_t* gamma2
          eDigit = eDigit*ratio;
          newRP->AddDigit(*digit,eDigit);
        }
-      Info("UnfoldTwoMergedPoints", "======= Split: daughter rec point %d =================", iMax) ;
+      AliInfo(Form("======= Split: daughter rec point %d =================", 
+                  iMax)) ;
       newRP->Print();
 
     }
@@ -737,7 +737,8 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
          Float_t a;
          GetReconstructionManager()->AG(e,dx,dy,a,gx,gy);
          Float_t dd;
-         Info("EvaluatePosition", "  (ix iy  xc yc  dx dy)   %f %f %f %f %f %f", ix, iy, xc, yc, dx, dy) ;
+         AliInfo(Form("  (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.
@@ -752,7 +753,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;
-       Info("EvaluatePosition", " chisq: %f", chisq) ;
+       AliInfo(Form(" chisq: %f", chisq)) ;
       st = st/sc;
       if(chisqc>chisq)
        goto loop20;
@@ -771,8 +772,8 @@ void AliPHOSEvalRecPoint::EvaluatePosition()
     loop20: ;
       Float_t step = st*gr;
 
-      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) ;
+      AliInfo(Form(" 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)
@@ -821,7 +822,7 @@ Bool_t AliPHOSEvalRecPoint::KillWeakPoint()
   Float_t thr0 = GetReconstructionManager()->KillGamMinEnergy();
   
   if(GetEnergy()<thr0) {
-    Info("KillWeakPoint", "+++++++ Killing this rec point ++++++++++") ;
+    AliInfo(Form("+++++++ Killing this rec point ++++++++++")) ;
     RemoveFromWorkingPool(this);
     return kTRUE;
   }
@@ -865,9 +866,9 @@ void AliPHOSEvalRecPoint::MergeClosePoint()
            {
              if(TooClose(rp))
                {
-                 Info("MergeClosePoint", "+++++++ Merging point 1: ++++++") ;
+                 AliInfo(Form("+++++++ Merging point 1: ++++++")) ;
                  this->Print();
-                 Info("MergeClosePoint", "+++++++ and point 2: ++++++++++") ;
+                 AliInfo(Form("+++++++ and point 2: ++++++++++")) ;
                  ((AliPHOSEvalRecPoint*)rp)->Print();
 
                  //merge two rec. points
@@ -896,7 +897,7 @@ void AliPHOSEvalRecPoint::MergeClosePoint()
                  RemoveFromWorkingPool(rp);
                  delete rp;
                  
-                 Info("MergeClosePoint", "++++++ Resulting point: ++++++++") ;
+                 AliInfo(Form("++++++ Resulting point: ++++++++")) ;
                  this->Print();
 
                  break;
@@ -924,7 +925,7 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima()
 
   AliPHOSClusterizer* clusterizer = GetClusterizer();
   if(!clusterizer) {
-    Fatal("UnfoldLocalMaxima", "Cannot get clusterizer") ;
+    AliFatal(Form("Cannot get clusterizer")) ;
   }
 
   if(this->IsEmc()) {
@@ -1007,14 +1008,15 @@ Int_t AliPHOSEvalRecPoint::UnfoldLocalMaxima()
              GetReconstructionManager()->AG(eMax,dz,dx,singleShowerGain,gxMax,gyMax);
              Float_t totalGain = eFit[iDigit];
              Float_t ratio = singleShowerGain/totalGain; 
-             Info("UnfoldLocalMaxima", " ratio -> %f", ratio) ;
+             AliInfo(Form(" ratio -> %f", ratio)) ;
              eDigit = eDigit*ratio;
              newRP->AddDigit(*digit,eDigit);
            }
        }
 
       newRP->EvalLocalPosition(logWeight,digits);
-      Info("UnfoldLocalMaxima", "======= Unfold: daughter rec point %d =================", iMax) ;
+      AliInfo(Form("======= Unfold: daughter rec point %d =================", 
+                  iMax)) ;
       newRP->Print();
     }
 
@@ -1037,7 +1039,7 @@ void AliPHOSEvalRecPoint::PrintPoint()
   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()) ;
+  AliInfo(Form(message.Data(), Chi2Dof(), lpos.X(), lpos.Z(), GetPHOSMod())) ;
 
 }
 
@@ -1048,7 +1050,7 @@ AliPHOSRecManager* AliPHOSEvalRecPoint::GetReconstructionManager() const
   TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
   AliPHOSRecManager* recMng = (AliPHOSRecManager*)wPoolF->FindObject("AliPHOSRecManager");
   if(!recMng) { 
-    Fatal("GetReconstructionManager", "Couldn't find Reconstruction Manager") ;  
+    AliFatal(Form("Couldn't find Reconstruction Manager")) ;  
   }
 
   return recMng;
@@ -1077,7 +1079,7 @@ const TObject* AliPHOSEvalRecPoint::GetWorkingPool()
   TFolder* wPoolF = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS/SmP");
   TObject* wPool = wPoolF->FindObject("SmartPoints");
   if(!wPool) { 
-    Fatal("GetWorkingPool", "Couldn't find Working Pool") ;  
+    AliFatal(Form("Couldn't find Working Pool")) ;  
   }
 
   return wPool;
index f179d7fff4219fc5fd5d070840725c9d9fc47341..b1031372815b723c9757e85f96a0e32f98cff194 100644 (file)
@@ -29,7 +29,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliPHOSFastRecParticle.h"
 #include "TPad.h"
 #include "TPaveText.h"
@@ -198,7 +198,8 @@ Bool_t AliPHOSFastRecParticle::IsPi0(TString purity) const
   if      (purity == "low"   ) pi0Like = TestPIDBit(9);
   else if (purity == "medium") pi0Like = TestPIDBit(10);
   else if (purity == "high"  ) pi0Like = TestPIDBit(11);
-  else Error("IsPi0","Wrong purity type: %s",purity.Data());
+  else 
+    AliError(Form("Wrong purity type: %s",purity.Data()));
   if (pi0Like                                      && //  pi0 by PCA
       (TestPIDBit(5)||TestPIDBit(4)||TestPIDBit(3))&& //  fast by TOF
       (TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0))&& //  neutral by CPV
@@ -219,7 +220,8 @@ Bool_t AliPHOSFastRecParticle::IsElectron(TString purity) const
   if      (purity == "low"   ) photonLike = TestPIDBit(6);
   else if (purity == "medium") photonLike = TestPIDBit(7);
   else if (purity == "high"  ) photonLike = TestPIDBit(8);
-  else Error("IsElectron","Wrong purity type: %s",purity.Data());
+  else 
+    AliError(Form("Wrong purity type: %s",purity.Data()));
   
   if (photonLike                                   && //  photon by PCA
       (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& //  fast by TOF
@@ -241,7 +243,8 @@ Bool_t AliPHOSFastRecParticle::IsEleCon(TString purity) const
   if      (purity == "low"   ) photonLike = TestPIDBit(6);
   else if (purity == "medium") photonLike = TestPIDBit(7);
   else if (purity == "high"  ) photonLike = TestPIDBit(8);
-  else Error("IsElectron","Wrong purity type: %s",purity.Data());
+  else 
+    AliError(Form("Wrong purity type: %s",purity.Data()));
   
   if (photonLike                                   && //  photon by PCA
       (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& //  fast by TOF
@@ -490,7 +493,7 @@ void AliPHOSFastRecParticle::Print()const
 {
   // Print the type, energy and momentum of the reconstructed particle
 
-  Info("Print", "-----------------------------") ;  
+  AliInfo(Form("Print", "-----------------------------")) ;  
   printf("PID bits are %d%d%d %d%d%d %d%d%d %d%d%d",  
         TestPIDBit(0),TestPIDBit(1),
         TestPIDBit(2),TestPIDBit(3),
index c1bf473819ffc2ae8e926dcbe6748d21f1357d0e..0495424d25766991985e0eb4b902428e1174946a 100644 (file)
@@ -35,7 +35,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSEMCAGeometry.h" 
 #include "AliPHOSRecPoint.h"
@@ -76,7 +76,8 @@ void AliPHOSGeometry::Init(void)
   
   TString test(GetName()) ; 
   if (test != "IHEP" ) {
-    Fatal("Init", "%s is not a known geometry (choose among IHEP)", test.Data() ) ; 
+    AliFatal(Form("%s is not a known geometry (choose among IHEP)", 
+                 test.Data() )) ; 
   }
 
   fgInit     = kTRUE ; 
@@ -143,7 +144,8 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t
   }
   else {
     if ( strcmp(fgGeom->GetName(), name) != 0 ) 
-      ::Error("GetInstance", "Current geometry is %s. You cannot call %s", fgGeom->GetName(), name) ; 
+      ::Error("GetInstance", "Current geometry is %s. You cannot call %s", 
+                     fgGeom->GetName(), name) ; 
     else
       rv = (AliPHOSGeometry *) fgGeom ; 
   } 
@@ -159,7 +161,8 @@ void AliPHOSGeometry::SetPHOSAngles()
   Float_t pphi =  2 * TMath::ATan( GetOuterBoxSize(0)  / ( 2.0 * GetIPtoUpperCPVsurface() ) ) ;
   pphi *= kRADDEG ;
   if (pphi > fAngle){ 
-    Error("SetPHOSAngles", "PHOS modules overlap!\n pphi = %f fAngle = %f", pphi, fAngle);
+    AliError(Form("PHOS modules overlap!\n pphi = %f fAngle = %f", 
+                 pphi, fAngle));
 
   }
   pphi = fAngle;
@@ -217,7 +220,7 @@ void AliPHOSGeometry::EmcModuleCoverage(Int_t mod, Double_t & tm, Double_t & tM,
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    Warning("EmcModuleCoverage", "%s unknown option; result in radian", opt) ; 
+    AliWarning(Form("%s unknown option; result in radian", opt)) ; 
     conv = 1. ;
       }
 
@@ -252,7 +255,7 @@ void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t
   else if ( opt == Degre() )
     conv = 180. / TMath::Pi() ; 
   else {
-    Warning("EmcXtalCoverage", "%s unknown option; result in radian", opt) ;  
+    AliWarning(Form("%s unknown option; result in radian", opt)) ;  
     conv = 1. ;
       }
 
@@ -499,7 +502,8 @@ TVector3 AliPHOSGeometry::GetModuleCenter(char *det, Int_t module) const
   Float_t rDet = 0.;
   if      (strcmp(det,"CPV") == 0) rDet  = GetIPtoCPVDistance   ();
   else if (strcmp(det,"EMC") == 0) rDet  = GetIPtoCrystalSurface();
-  else Fatal("GetModuleCenter","Wrong detector name %s",det);
+  else 
+    AliFatal(Form("Wrong detector name %s",det));
 
   Float_t angle = GetPHOSAngle(module); // (40,20,0,-20,-40) degrees
   angle *= TMath::Pi()/180;
index 7dda8915e971e7572dc823d1ebffe0083858f939..85efc1e1b1ff5f46d656f48dedc48a4021f3da2c 100644 (file)
 #include <TROOT.h>
 #include <TSystem.h>
 #include <TParticle.h>
-#include <TH1D.h>
 #include <TF1.h>
 #include <TGraph.h>
 //#include <TCanvas.h>
-#include <TFrame.h>
+//#include <TFrame.h>
 
 // --- Standard library ---
 
index b677dcca1175baab053221e90bc75cb3f5f0fae4..1a30b528733b060850f4916e506d1e89b45f5b05 100644 (file)
@@ -26,7 +26,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliPHOSGridFile.h" 
 
 ClassImp(AliPHOSGridFile) ;
@@ -69,7 +69,7 @@ TString AliPHOSGridFile::GetLFN() const
   TString fileName(Pwd()) ;
   fileName += "galice.root" ; 
   if ( !fGrid->GetAccessPath(fileName) ) { 
-    Warning("GetLFN", "file %s does not exist", fileName.Data()) ; 
+    AliWarning(Form("file %s does not exist", fileName.Data())) ; 
     fileName = "" ; 
   }
   else 
@@ -96,7 +96,7 @@ void AliPHOSGridFile::Help()
 {
   // Prints information on available lfn's
   
-  Info("Info", "  ") ; 
+  AliInfo(Form("")) ; 
 
 }
 
@@ -107,7 +107,7 @@ void AliPHOSGridFile::ListEvents() const
 
   char path[80] ; 
   sprintf(path, "%s/%s-%s/%s/%s/%s", fRoot.Data(), fYear.Data(), fProd.Data(), fVers.Data(), fType.Data(), fRun.Data()) ; 
-  Info("ListEvents", "Searching %s", path) ; 
+  AliInfo(Form("Searching %s", path)) ; 
   Grid_ResultHandle_t gr = fGrid->Find(path, "galice.root") ; 
   TGridResult ar(gr) ;
   ar.Print() ; 
@@ -120,7 +120,7 @@ void AliPHOSGridFile::ListRuns() const
 
   char path[80] ; 
   sprintf(path, "%s/%s-%s/%s/%s", fRoot.Data(), fYear.Data(), fProd.Data(), fVers.Data(), fType.Data()) ; 
-  Info("ListEvents", "Searching %s", path) ; 
+  AliInfo(Form("Searching %s", path)) ; 
   Grid_ResultHandle_t gr = fGrid->OpenDir(path) ; 
   TGridResult ar(gr) ;
   ar.Print() ; 
@@ -133,12 +133,12 @@ Bool_t AliPHOSGridFile::SetYearProd(TString year, TString prod)
   Bool_t rv = kFALSE ;
   char tempo[80] ; 
   sprintf(tempo, "/%s-%s", year.Data(), prod.Data()) ; 
-
+  
   TString path(fRoot) ; 
   path += tempo ; 
-  if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) )  
+    AliError(Form("Cannot find directory %s", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fYear = year ;  
     fProd = prod ; 
@@ -158,9 +158,9 @@ Bool_t AliPHOSGridFile::SetVers(TString vers)
 
   TString path(fRoot) ; 
   path += tempo ; 
- if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) ) {  
+    AliError(Form("Cannot find directory %s ", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fVers = vers ; 
     fPath = path ;
@@ -178,9 +178,9 @@ Bool_t AliPHOSGridFile::SetType(TString type)
  
   TString path(fRoot) ;
   path += tempo ; 
-  if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) )  
+    AliError(Form("Cannot find directory %s ", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fType = type ;  
     fPath = path ; 
@@ -198,9 +198,9 @@ Bool_t AliPHOSGridFile::SetPath(TString year, TString prod, TString vers, TStrin
     
   TString path(fRoot) ; 
   path += tempo ; 
-  if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) )  
+    AliError(Form("Cannot find directory %s ", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fPath = path ; 
     fYear += year ; 
@@ -230,9 +230,9 @@ Bool_t AliPHOSGridFile::SetRun(Int_t run)
 
   TString path(fRoot) ; 
   path += tempo ;
-  if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) )  
+    AliError(Form("Cannot find directory %s ", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fRun = srun ; 
     fPath = path ; 
@@ -258,9 +258,9 @@ Bool_t AliPHOSGridFile::SetEvt(Int_t evt)
   sprintf(tempo, "/%s-%s/%s/%s/%s/%s/", fYear.Data(), fProd.Data(), fVers.Data(), fType.Data(), fRun.Data(), sevt.Data()) ; 
   TString path(fRoot) ; 
   path += tempo ;
-  if ( !fGrid->OpenDir(path) )  
-    Error("ctor", "Cannot find directory %s ", path.Data() ) ; 
-  else {
+  if ( !fGrid->OpenDir(path) )  
+    AliError(Form("Cannot find directory %s ", path.Data() )) ; 
+  else {
     rv = kTRUE ; 
     fEvt = sevt ; 
     fPath = path ; 
index d0d817105e27c9b39abf9a1c687c5a57fdbba516..c771f733766fea9d84aa1d1bbb7a361698759d59 100644 (file)
@@ -140,7 +140,7 @@ AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue)
 //   // Print out Id and energy 
   
 //   //out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << "  " << hit.GetTime() << endl ;
-//   Warning("operator <<", "Implement differently") ; 
+//   AliWarning("operator <<", "Implement differently") ; 
 //   return out ;
 // }
 
index f2d0cf5a626a3520fc9604b115c561f86067b1a1..77fa2c424588ce59cc50c4448109a2cd7f46d171 100644 (file)
@@ -43,6 +43,7 @@
 #include "AliHeader.h"
 
 // --- PHOS header files ---
+#include "AliLog.h"
 #include "AliPHOSIhepAnalyze.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSRecParticle.h"
@@ -71,7 +72,7 @@ AliPHOSIhepAnalyze::AliPHOSIhepAnalyze(Text_t * name) : fFileName(name) {
   fRunLoader = AliRunLoader::Open(fFileName);
   if (fRunLoader == 0x0)
    {
-     Fatal("AliPHOSIhepAnalyze","Can not load event from file %s",name);
+     AliFatal(Form("Can not load event from file %s",name));
    }
  }
 
@@ -106,33 +107,33 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeCPV1","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
 
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
 
-  Info("AnalyzeCPV1", "Start CPV Analysis-1. Resolutions, cluster multiplicity and lengths") ;
+  AliInfo(Form("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);
-    Info("AnalyzeCPV1", ">>>>>>>Event %d .<<<<<<<", ievent) ;
+    AliInfo(Form(">>>>>>>Event %d .<<<<<<<", ievent)) ;
     
   /******************************************************************/
       TTree* treeH = please->TreeH();
       if (treeH == 0x0)
        {
-         Error("AnalyzeCPV1","Can not get TreeH");
+        AliError(Form("Can not get TreeH"));
          return;
        }
 /******************************************************************/     
 
     // Get branch of CPV impacts
     if (! (branchCPVimpacts =treeH->GetBranch("PHOSCpvImpacts")) ) {
-      Info("AnalyzeCPV1", "Couldn't find branch PHOSCpvImpacts. Exit.") ;
+      AliWarning(Form("Couldn't find branch PHOSCpvImpacts. Exit.")) ;
       return;
     }
  
@@ -239,10 +240,10 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      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);
+      AliInfo(Form("Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+      AliInfo(Form("Impact local (X,Z) = %f %f", locImpX, locImpZ));
+      AliInfo(Form("Reconstructed (X,Z) = %f %f", xrec, zrec));
+      AliInfo(Form("dxmin %f dzmin %f", dxmin, dzmin));
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -252,8 +253,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    Info("AnalyzeCPV1", "++++ Event %d : total %d impacts, %d charged impacts and %d  rec. points.", 
-          ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries()) ;
+    AliInfo(Form("++++ Event %d : total %d impacts, %d charged impacts and %d  rec. points.", 
+          ievent, nTotalGen, nChargedGen, please->CpvRecPoints()->GetEntries())) ;
   }
   // Save histograms
 
@@ -340,32 +341,32 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeEMC1","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
 
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
 
-  Info("AnalyzeCPV1", "Start EMC Analysis-1. Resolutions, cluster multiplicity and lengths");
+  AliInfo(Form("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);
 
-    Info("AnalyzeCPV1", " >>>>>>>Event %d .<<<<<<<", ievent) ;
+    AliInfo(Form(" >>>>>>>Event %d .<<<<<<<", ievent)) ;
 
     TTree* treeH = please->TreeH();
     if (treeH == 0x0)
      {
-       Error("AnalyzeEMC1","Can not get TreeH");
+      AliError(Form("Can not get TreeH"));
        return;
      }
 
     
     // Get branch of EMC impacts
     if (! (branchEMCimpacts =treeH->GetBranch("PHOSEmcImpacts")) ) {
-      Info("AnalyzeCPV1", " Couldn't find branch PHOSEmcImpacts. Exit.");
+      AliWarning(Form(" Couldn't find branch PHOSEmcImpacts. Exit."));
       return;
     }
  
@@ -466,10 +467,10 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
          gImpY = ygen;
        }
       }
-      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) ;
+      AliInfo(Form(" Impact global (X,Z,Y) = %f %f %f", gImpX, gImpZ, gImpY));
+      AliInfo(Form(" Impact local (X,Z) = %f %f", locImpX, locImpZ));
+      AliInfo(Form(" Reconstructed (X,Z) = %f %f", xrec, zrec));
+      AliInfo(Form(" dxmin %f dzmin %f", dxmin, dzmin)) ;
       hDx  ->Fill(dxmin);
       hDz  ->Fill(dzmin);
 //        hDr  ->Fill(TMath::Sqrt(r2min));
@@ -479,8 +480,8 @@ void AliPHOSIhepAnalyze::AnalyzeEMC1(Int_t Nevents)
     }
     delete [] hitsPerModule;
 
-    Info("AnalyzeCPV1", "++++ Event %d : total  %d impacts,  %d Emc rec. points.", 
-        ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast()) ; 
+    AliInfo(Form("++++ Event %d : total  %d impacts,  %d Emc rec. points.", 
+        ievent, nTotalGen, please->EmcRecPoints()->GetEntriesFast())) ; 
 
   }
   // Save histograms
@@ -559,7 +560,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("AnalyzeCPV2","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
@@ -578,7 +579,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
       TTree* treeH = please->TreeH();
       if (treeH == 0x0)
        {
-        Error("AnalyzeCPV2","Can not get TreeH");
+        AliError(Form("Can not get TreeH"));
         return;
        }
 
@@ -596,7 +597,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
           
       for (Int_t itrack=0; itrack<ntracks; itrack++) {
        branchCPVimpacts ->SetAddress(&fCpvImpacts);
-       Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+       AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
        branchCPVimpacts ->GetEntry(itrack,0);
 
        for (Int_t iModule=0; iModule < nOfModules; iModule++) {
@@ -629,7 +630,7 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
                Float_t dz = genHit1->Z() - genHit2->Z();
                Float_t dr = TMath::Sqrt(dx*dx + dz*dz);
                hDrijCPVg->Fill(dr);
-//                     Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz);
+//                     AliInfo(Form("(dx dz dr): %f %f", dx, dz));
              }
          }
       }
@@ -668,8 +669,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents)
            }   
        }
       
-      Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.", 
-          nev, nGenCPV, nRecCPV) ; 
+      AliInfo(Form(" Event %d . Total of %d hits, %d rec.points.", 
+          nev, nGenCPV, nRecCPV)) ; 
     
       delete [] hitsPerModule;
 
@@ -702,7 +703,7 @@ void AliPHOSIhepAnalyze::CpvSingle(Int_t nevents)
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( gime == 0 )
    {
-     Error("CpvSingle","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
   
@@ -725,8 +726,8 @@ void AliPHOSIhepAnalyze::CpvSingle(Int_t nevents)
        hNrpX->Fill(rpMultX);
        hNrpZ->Fill(rpMultZ);
        hChi2->Fill(((AliPHOSEvalRecPoint*)pt)->Chi2Dof());
-       Info("AnalyzeCPV1", "+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++", 
-            ievent, rpMult, rpMultX, rpMultZ) ;
+       AliInfo(Form("+++++ Event %d . (Mult,MultX,MultZ) = %d %d %d +++++", 
+            ievent, rpMult, rpMultX, rpMultZ)) ;
 
       }
 
@@ -788,7 +789,7 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
   AliPHOSLoader* please = dynamic_cast<AliPHOSLoader*>(fRunLoader->GetLoader("PHOSLoader"));
   if ( please == 0 )
    {
-     Error("HitsCPV","Could not obtain the Loader object !");
+     AliError(Form("Could not obtain the Loader object !"));
      return ;
    }
   const AliPHOSGeometry *  fGeom  = please->PHOSGeometry();
@@ -805,7 +806,7 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
    TTree* treeH = please->TreeH();
    if (treeH == 0x0)
     {
-      Error("CPVSingle","Can not get TreeH");
+      AliError(Form("Can not get TreeH"));
       return;
     }
 
@@ -823,7 +824,7 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
           
   for (Int_t itrack=0; itrack<ntracks; itrack++) {
     branchCPVimpacts ->SetAddress(&fCpvImpacts);
-    Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
+    AliInfo(Form(" branchCPVimpacts ->SetAddress(&fCpvImpacts) OK."));
     branchCPVimpacts ->GetEntry(itrack,0);
 
     for (Int_t iModule=0; iModule < nOfModules; iModule++) {
@@ -853,7 +854,7 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 
 //    Int_t ntracks = gAlice->GetEvent(ievent);
 //    Int_t nOfModules = fGeom->GetNModules();
-//    Info("AnalyzeCPV1", " Tracks: "<<ntracks<<"  Modules: "<<nOfModules);
+//    AliInfo(Form(" Tracks: "<<ntracks<<"  Modules: "<<nOfModules));
 
 //    if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) )  return;
 
@@ -861,27 +862,27 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 //      branchCPVimpacts ->SetAddress(&fCpvImpacts);
 //      Info("AnalyzeCPV1", " branchCPVimpacts ->SetAddress(&fCpvImpacts) OK.");
 //      branchCPVimpacts ->GetEntry(itrack,0);
-//      Info("AnalyzeCPV1", " branchCPVimpacts ->GetEntry(itrack,0) OK.");
+//      Info(Form(" branchCPVimpacts ->GetEntry(itrack,0) OK."));
     
 //      for (Int_t iModule=0; iModule < nOfModules; iModule++) {
 //        impacts = (TClonesArray *)fCpvImpacts->At(iModule);
-//        Info("AnalyzeCPV1", " fCpvImpacts->At(iModule) OK.");
+//        Info(Form(" 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()))
 //       {
-//         Info("AnalyzeCPV1", " Add charged hit..";
+//         Info(Form(" Add charged hit.."));
 //         new(hits[hits.GetEntriesFast()]) AliPHOSImpact(*impact);
-//         Info("AnalyzeCPV1", "done.");
+//         Info(Form("done."));
 //       }
 //        }
 //      }
 //      fCpvImpacts->Clear();
 //    }
 
-//    Info("AnalyzeCPV1", " PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits.");
+//    Info(Form(" PHOS event "<<ievent<<": "<<hits.GetEntries()<<" charged CPV hits."));
 
 }
 
@@ -904,13 +905,13 @@ void AliPHOSIhepAnalyze::HitsCPV(Int_t nev)
 //     }
 //      }
 
-//    Info("AnalyzeCPV1", " PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits.");
+//    Info(Form(" PHOS module "<<iModule<<": "<<hits->GetEntries()<<" charged CPV hits."));
 //  }
 
 Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdgCode)
 {
   // For HIJING
-  Info("AnalyzeCPV1", "pdgCode %d", pdgCode);
+  AliInfo(Form("pdgCode %d", pdgCode));
   if(pdgCode==211 || pdgCode==-211 || pdgCode==321 || pdgCode==-321 || pdgCode==11 || pdgCode==-11 || pdgCode==2212 || pdgCode==-2212) return kTRUE;
   else
     return kFALSE;
index 22b85eaf75eba3f5873678984c45f3efc1fe25d2..a1b2b3dd93779a49b0c8f52566e57191172321c2 100644 (file)
@@ -37,7 +37,7 @@ ClassImp(AliPHOSJet)
   
 //____________________________________________________________________________ 
 AliPHOSJet::AliPHOSJet():TObject() {
-  //Inicilize members
+  //Initialize members
   fNpart = 0 ;
   fList = 0 ;
   //  fMode = 0 ;
@@ -155,7 +155,7 @@ void AliPHOSJet::AddDigit(Double_t e, Double_t eta, Double_t phi, Int_t index){
 //   case 1: 
 //     return AcceptConeDeviation(dEta,dPhi,p->Energy() );
 //   default:
-//     Error("IsInCone","Unknown mode of cone calculation %d \n",mode );
+//     AliError(Form("Unknown mode of cone calculation %d \n",mode ));
 //   }
 //   return kFALSE ;
 //}
index a8996ff19577cc0423a83029e8fb1531bf7e3e84..ed4933aaceeb1c9ce8bd68fea89cec1e3aaf9210 100644 (file)
@@ -29,6 +29,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliLog.h"
 #include "AliPHOSJet.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSDigit.h"
@@ -166,7 +167,7 @@ void  AliPHOSJetFinder::FindJetsFromParticles(const TClonesArray * plist,TObjArr
 void AliPHOSJetFinder::FindJetsFromDigits(const TClonesArray * digits, TObjArray * jets){
   //Find jets in the case witht detector at the level of digits.
   if(digits->GetEntries()==0){
-    Error("JetsFromDigits","No entries in digits list \n") ;
+    AliError(Form("No entries in digits list \n")) ;
     return ;
   }
 
@@ -288,7 +289,7 @@ void AliPHOSJetFinder::FindJetsFromDigits(const TClonesArray * digits, TObjArray
 Double_t AliPHOSJetFinder::Calibrate(const AliPHOSDigit * digit){ 
 //   if(fPedestals || fGains ){  //use calibration data
 //     if(!fPedestals || !fGains ){
-//       Error("Calibrate","Either Pedestals of Gains not set!") ;
+//       AliError(Form("Either Pedestals of Gains not set!")) ;
 //       return 0 ;
 //     }
 //     Float_t en=(digit->GetAmp() - fPedestals->Data(digit->GetId)()))*fGains->Data(digit->GetId()) ;
@@ -301,7 +302,7 @@ Double_t AliPHOSJetFinder::Calibrate(const AliPHOSDigit * digit){
   if(fSimGain==0){ //read simulation parameters
     AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
     if(!gime){
-      Error("Calibrate","Can not read Calibration parameters") ;
+      AliError(Form("Can not read Calibration parameters")) ;
       return 0 ;
     }
     const TTask * task = gime->Digitizer() ;
index d162cd9d75275bf7657fa577458b01f0bd1ef676..c77d01a5c2c7ddb170f7b4f71cd3c626f8dd1260 100644 (file)
@@ -47,7 +47,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliPHOSLoader.h"
 #include "AliPHOS.h"
 #include "AliPHOSHit.h"
@@ -116,7 +116,7 @@ Int_t AliPHOSLoader::SetEvent()
  Int_t retval = AliLoader::SetEvent();
   if (retval)
    {
-     Error("SetEvent","AliLoader::SetEvent returned error");
+     AliError("returned error");
      return retval;
    }
 
@@ -144,7 +144,7 @@ Int_t AliPHOSLoader::GetEvent()
   retval = AliLoader::GetEvent();
   if (retval)
    {
-     Error("GetEvent","AliLoader::GetEvent returned error");
+     AliError("returned error");
      return retval;
    }
   
@@ -195,7 +195,7 @@ Int_t AliPHOSLoader::LoadHits(Option_t* opt)
   
   if (res)
    {//oops, error
-     Error("LoadHits","AliLoader::LoadHits returned error");
+     AliError("returned error");
      return res;
    }
 
@@ -214,7 +214,7 @@ Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
   res = AliLoader::LoadSDigits(opt);
   if (res)
    {//oops, error
-     Error("PostSDigits","AliLoader::LoadSDigits returned error");
+     AliError("returned error");
      return res;
    }
   return ReadSDigits();
@@ -229,7 +229,7 @@ Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
   res = AliLoader::LoadDigits(opt);
   if (res)
    {//oops, error
-     Error("LoadDigits","AliLoader::LoadDigits returned error");
+     AliError("returned error");
      return res;
    }
   return ReadDigits();
@@ -243,14 +243,14 @@ Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
   res = AliLoader::LoadRecPoints(opt);
   if (res)
    {//oops, error
-     Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
+     AliError("returned error");
      return res;
    }
 
   TFolder * phosFolder = GetDetectorDataFolder();
   if ( phosFolder  == 0x0 ) 
    {
-     Error("PostDigits","Can not get detector data folder");
+     AliError("Can not get detector data folder");
      return 1;
    }
   return ReadRecPoints();
@@ -260,12 +260,12 @@ Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
 Int_t  AliPHOSLoader::LoadTracks(Option_t* opt)
 {
  //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
if (GetDebug()) Info("LoadTracks","opt = %s",opt);
 AliDebug(1, Form("opt = %s",opt));
  Int_t res;
  res = AliLoader::LoadTracks(opt);
  if (res)
    {//oops, error
-      Error("LoadTracks","AliLoader::LoadTracks returned error");
+      AliError("returned error");
       return res;
    }  
  return ReadTracks();
@@ -280,7 +280,7 @@ Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
   res = AliLoader::LoadRecParticles(opt);
   if (res)
    {//oops, error
-     Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
+     AliError("returned error");
      return res;
    }
   return ReadRecParticles();
@@ -294,7 +294,7 @@ Int_t AliPHOSLoader::PostHits()
   Int_t reval = AliLoader::PostHits();
   if (reval)
    {
-     Error("PostHits","AliLoader::  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadHits();
@@ -307,7 +307,7 @@ Int_t AliPHOSLoader::PostSDigits()
   Int_t reval = AliLoader::PostSDigits();
   if (reval)
    {
-     Error("PostSDigits","AliLoader::PostSDigits  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadSDigits();
@@ -320,7 +320,7 @@ Int_t AliPHOSLoader::PostDigits()
   Int_t reval = AliLoader::PostDigits();
   if (reval)
    {
-     Error("PostDigits","AliLoader::PostDigits  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadDigits();
@@ -333,7 +333,7 @@ Int_t AliPHOSLoader::PostRecPoints()
   Int_t reval = AliLoader::PostRecPoints();
   if (reval)
    {
-     Error("PostRecPoints","AliLoader::PostRecPoints  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadRecPoints();
@@ -347,7 +347,7 @@ Int_t AliPHOSLoader::PostRecParticles()
   Int_t reval = AliLoader::PostRecParticles();
   if (reval)
    {
-     Error("PostRecParticles","AliLoader::PostRecParticles  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadRecParticles();
@@ -360,7 +360,7 @@ Int_t AliPHOSLoader::PostTracks()
   Int_t reval = AliLoader::PostTracks();
   if (reval)
    {
-     Error("PostTracks","AliLoader::PostTracks  returned error");
+     AliError("returned error");
      return reval;
    }
   return ReadTracks();
@@ -390,18 +390,18 @@ Int_t AliPHOSLoader::ReadHits()
   
   if(treeh == 0)
    {
-    Error("ReadHits"," Cannot read TreeH from folder");
+    AliError("Cannot read TreeH from folder");
     return 1;
   }
   
   TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
   if (hitsbranch == 0) 
    {
-    Error("ReadHits"," Cannot find branch PHOS"); 
+    AliError("Cannot find branch PHOS"); 
     return 1;
   }
-  
-  if (GetDebug()) Info("ReadHits","Reading Hits");
+
+  AliDebug(1, "Reading Hits");
   
   if (hitsbranch->GetEntries() > 1)
    {
@@ -451,14 +451,14 @@ Int_t AliPHOSLoader::ReadSDigits()
   if(treeS==0)
    {
      //May happen if file is truncated or new in LoadSDigits
-     //Error("ReadSDigits","There is no SDigit Tree");
+     //AliError("There is no SDigit Tree");
      return 0;
    }
   
   TBranch * branch = treeS->GetBranch(fDetectorName);
   if (branch == 0) 
    {//easy, maybe just a new tree
-    //Error("ReadSDigits"," Cannot find branch PHOS"); 
+    //AliError("Cannot find branch PHOS"); 
     return 0;
   }
     
@@ -487,14 +487,14 @@ Int_t AliPHOSLoader::ReadDigits()
   if(treeD==0)
    {
      //May happen if file is truncated or new in LoadSDigits
-     //Error("ReadDigits","There is no Digit Tree");
+     //AliError("There is no Digit Tree");
      return 0;
    }
 
   TBranch * branch = treeD->GetBranch(fDetectorName);
   if (branch == 0) 
    {//easy, maybe just a new tree
-    //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data()); 
+    //AliError("Cannot find branch ",fDetectorName.Data()); 
     return 0;
    }
   
@@ -513,7 +513,7 @@ void AliPHOSLoader::Track(Int_t itrack)
    {
      if (LoadHits())
       {
-        Error("Track","Can not load hits.");
+        AliError("Can not load hits.");
         return;
       } 
    }
@@ -581,7 +581,8 @@ Int_t AliPHOSLoader::ReadRecPoints()
 
   if (emcbranch == 0x0)
    {
-     Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
+     AliError(Form("Can not get branch with EMC Rec. Points named %s",
+                  fgkEmcRecPointsBranchName.Data()));
      retval = 1;
    }
   else
@@ -592,7 +593,8 @@ Int_t AliPHOSLoader::ReadRecPoints()
   TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
   if (cpvbranch == 0x0)
    {
-     Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
+     AliError(Form("Can not get branch with CPV Rec. Points named %s",
+                  fgkCpvRecPointsBranchName.Data()));
      retval = 2;
    }
   else
@@ -631,14 +633,15 @@ Int_t AliPHOSLoader::ReadTracks()
    {
      //May happen if file is truncated or new in LoadSDigits, or the file is in update mode, 
      //but tracking was not performed yet for a current event
-     //Error("ReadTracks","There is no Tree with Tracks");
+     //AliError("There is no Tree with Tracks");
      return 0;
    }
   
   TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
   if (branch == 0) 
    {//easy, maybe just a new tree
-    Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
+    AliError(Form("Cannot find branch named %s",
+                 fgkTrackSegmentsBranchName.Data()));
     return 0;
   }
 
@@ -669,14 +672,15 @@ Int_t AliPHOSLoader::ReadRecParticles()
      //May happen if file is truncated or new in LoadSDigits, 
      //or the file is in update mode, 
      //but tracking was not performed yet for a current event
-     //     Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
+     //     AliError("There is no Tree with Tracks and Reconstructed Particles");
      return 0;
    }
   
   TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
   if (branch == 0) 
    {//easy, maybe just a new tree
-    Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data()); 
+    AliError(Form("Cannot find branch %s",
+                 fgkRecParticlesBranchName.Data())); 
     return 0;
   }
 
@@ -704,12 +708,10 @@ AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const  char* eventfoldername)
 {
   // Return PHOS loader
   AliRunLoader* rn  = AliRunLoader::GetRunLoader(eventfoldername);
-  if (rn == 0x0)
-   {
-     cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
-         << "Can not find Run Loader in folder "<<eventfoldername<<endl;
-     return 0x0;
-   }
+  if (rn == 0x0) {
+    printf("Can not find Run Loader in folder %s", eventfoldername);
+    return 0x0 ; 
+  }
   return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
 }
 /***************************************************************************************/
@@ -767,11 +769,13 @@ Bool_t AliPHOSLoader::BranchExists(const TString& recName)
     TString branchName(branch->GetName() ) ; 
     TString branchTitle(branch->GetTitle() ) ;  
     if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){  
-      Warning("BranchExists","branch %s  with title  %s ",dataname.Data(),fBranchTitle.Data());
+      AliWarning(Form("branch %s  with title  %s ",
+                     dataname.Data(),fBranchTitle.Data()));
       return kTRUE ;
     }
     if ( branchName.BeginsWith(zername) &&  branchTitle.BeginsWith(titleName) ){
-      Warning("BranchExists","branch AliPHOS... with title  %s ",branch->GetTitle());
+      AliWarning(Form("branch AliPHOS... with title  %s ",
+                     branch->GetTitle()));
       return kTRUE ; 
     }
   }
@@ -860,14 +864,14 @@ void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filenam
   if(!file)
     file = TFile::Open(filename);
   if(!file){
-    Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
+    AliError(Form("Cannot open file %s", filename)) ;
     return ;
   }
   if(fcdb)
     fcdb->Delete() ;
   fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
   if(!fcdb)
-    Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
+    AliError(Form("No database %s in file %s", database, filename)) ;
 }
 //____________________________________________________________________________ 
 
@@ -914,18 +918,18 @@ void AliPHOSLoader::MakeRecPointsArray()
   // Add RecPoints array to the data folder
   if ( EmcRecPoints() == 0x0)
    {
-    if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
+     AliDebug(9, "Making array for EMC");
     TObjArray* emc = new TObjArray(100) ;
     emc->SetName(fgkEmcRecPointsName) ;
     GetDetectorDataFolder()->Add(emc);
    }
 
   if ( CpvRecPoints() == 0x0)
-   {
-    if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
-    TObjArray* cpv = new TObjArray(100) ;
-    cpv->SetName(fgkCpvRecPointsName);
-    GetDetectorDataFolder()->Add(cpv);
+   { 
+     AliDebug(9, "Making array for CPV");
+     TObjArray* cpv = new TObjArray(100) ;
+     cpv->SetName(fgkCpvRecPointsName);
+     GetDetectorDataFolder()->Add(cpv);
    }
 }
 
index 17c026562fdcfa52c7220affd9b57eb8b444e4df..d7e7958de7f5fe3520cd4a9a0b728908cd3fb072 100644 (file)
@@ -66,7 +66,7 @@
 // --- Standard library ---
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliRun.h"
 #include "AliGenerator.h"
 #include "AliPHOSPIDv0.h"
@@ -170,14 +170,15 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
   AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
   if(runget == 0x0) 
    {
-     Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+     AliError(Form("Can not find run getter in event folder \"%s\"",
+                  GetTitle()));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("Exec","Could not obtain the Loader object !"); 
+     AliError("Could not obtain the Loader object !"); 
      return ;
    } 
 
@@ -191,7 +192,9 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
   
   for(ievent = 0; ievent < nevents; ievent++){
     runget->GetEvent(ievent);
-    Info("Exec", "event %d %d %d", ievent, gime->EmcRecPoints(), gime->TrackSegments()) ;
+    AliInfo(Form("event %d %d %d", 
+                ievent, gime->EmcRecPoints(), 
+                gime->TrackSegments())) ;
     MakeRecParticles() ;
     
     WriteRecParticles();
@@ -206,8 +209,9 @@ void  AliPHOSPIDv0::Exec(Option_t * option)
   
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSPID");
-    Info("Exec", "took %f seconds for PID %f seconds per event", 
-        gBenchmark->GetCpuTime("PHOSPID"), gBenchmark->GetCpuTime("PHOSPID")/nevents) ; 
+    AliInfo(Form("took %f seconds for PID %f seconds per event", 
+                gBenchmark->GetCpuTime("PHOSPID"), 
+                gBenchmark->GetCpuTime("PHOSPID")/nevents)) ; 
   }
   
 }
@@ -220,14 +224,15 @@ void AliPHOSPIDv0::Init()
   AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
   if(runget == 0x0) 
    {
-     Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+     AliError(Form("Can not find run getter in event folder \"%s\"",
+                  GetTitle()));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("Exec","Could not obtain the Loader object !"); 
+     AliError("Could not obtain the Loader object !"); 
      return ;
    } 
    
@@ -247,14 +252,15 @@ void  AliPHOSPIDv0::MakeRecParticles()
   AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
   if(runget == 0x0) 
    {
-     Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+     AliError(Form("Can not find run getter in event folder \"%s\"",
+                  GetTitle()));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("Exec","Could not obtain the Loader object !"); 
+     AliError("Could not obtain the Loader object !"); 
      return ;
    } 
 
@@ -348,19 +354,20 @@ void  AliPHOSPIDv0:: Print() const
   message += "    RecParticles Branch title   %s\n" ;  
   message += "with parameters:\n"  ;
   message += "    Maximal EMC - CPV  distance (cm) %f\n" ;
-  Info("Print", message.Data(),  
+  AliInfo(Form( message.Data(),  
        GetTitle(), 
        fRecPointsTitle.Data(), 
        fTrackSegmentsTitle.Data(), 
        fRecParticlesTitle.Data(), 
-       fCpvEmcDistance );
+       fCpvEmcDistance ));
 
   if(fIDOptions.Contains("dis",TString::kIgnoreCase ))
-    Info("Print", "                    dispersion cut %f",  fDispersion ) ;
+    AliInfo(Form("                    dispersion cut %f",  fDispersion )) ;
   if(fIDOptions.Contains("ell",TString::kIgnoreCase ))
-    Info("Print", "             Eliptic cuts function: %s",  fFormula->GetTitle() ) ;
+    AliInfo(Form("             Eliptic cuts function: %s",  
+                fFormula->GetTitle() )) ;
   if(fIDOptions.Contains("tim",TString::kIgnoreCase ))
-    Info("Print",  "             Time Gate used: %f",  fTimeGate) ;
+    AliInfo(Form("             Time Gate used: %f",  fTimeGate)) ;
 }
 
 //____________________________________________________________________________
@@ -380,14 +387,15 @@ void  AliPHOSPIDv0::WriteRecParticles()
   AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
   if(runget == 0x0) 
    {
-     Error("Exec","Can not find run getter in event folder \"%s\"",GetTitle());
+     AliError(Form("Can not find run getter in event folder \"%s\"",
+                  GetTitle()));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("Exec","Could not obtain the Loader object !"); 
+     AliError("Could not obtain the Loader object !"); 
      return ;
    } 
 
@@ -506,14 +514,15 @@ void AliPHOSPIDv0::PrintRecParticles(Option_t * option)
   AliRunLoader* runget = AliRunLoader::GetRunLoader(GetTitle());
   if(runget == 0x0) 
    {
-     Error("WriteRecParticles","Can not find run getter in event folder \"%s\"",GetTitle());
+     AliError(Form("Can not find run getter in event folder \"%s\"",
+                  GetTitle()));
      return;
    }
   
   AliPHOSLoader* gime = dynamic_cast<AliPHOSLoader*>(runget->GetLoader("PHOSLoader"));
   if ( gime == 0 ) 
    {
-     Error("WriteRecParticles","Could not obtain the Loader object !"); 
+     AliError("Could not obtain the Loader object !"); 
      return ;
    } 
 
@@ -524,10 +533,11 @@ void AliPHOSPIDv0::PrintRecParticles(Option_t * option)
   TString message ; 
   message  = "event %d\n" ; 
   message += "       found %d RecParticles\n" ; 
-  Info("PrintRecParticles", message.Data(), gAlice->GetEvNumber(), recParticles->GetEntriesFast() ) ;   
+  AliInfo(Form(message.Data(), 
+              gAlice->GetEvNumber(), recParticles->GetEntriesFast() )) ;   
 
   if(strstr(option,"all")) {  // printing found TS
-    Info("PrintRecParticles","  PARTICLE   Index    \n"  ) ; 
+    AliInfo("  PARTICLE   Index"  ) ; 
    
     Int_t index ;
     for (index = 0 ; index < recParticles->GetEntries() ; index++) {
@@ -565,7 +575,8 @@ void AliPHOSPIDv0::PrintRecParticles(Option_t * option)
       //    Int_t nprimaries;
       //    primaries = rp->GetPrimaries(nprimaries);
       
-      Info("PrintRecParticles", "          %s     %d\n",  particle, rp->GetIndexInList()) ;
+      AliInfo(Form("          %s     %d",  
+                  particle, rp->GetIndexInList())) ;
     }
   }  
 }
index 0b8d387a3a4b1f728601e82e84e203a6cf48bb30..ceb83e5ca10f696bce953205a8a72b869cb32a62 100644 (file)
@@ -96,7 +96,7 @@
 
 
 // --- AliRoot header files ---
-
+#include "AliLog.h"
 #include "AliGenerator.h"
 #include "AliPHOS.h"
 #include "AliPHOSPIDv1.h"
@@ -374,9 +374,9 @@ void  AliPHOSPIDv1::Exec(Option_t *option)
       PrintRecParticles(option);
   if(strstr(option,"tim")){
     gBenchmark->Stop("PHOSPID");
-    Info("Exec", "took %f seconds for PID %f seconds per event", 
+    AliInfo(Form("took %f seconds for PID %f seconds per event", 
         gBenchmark->GetCpuTime("PHOSPID"),  
-        gBenchmark->GetCpuTime("PHOSPID")/nEvents) ;
+        gBenchmark->GetCpuTime("PHOSPID")/nEvents)) ;
   }
   if(fWrite)
     Unload();
@@ -425,9 +425,13 @@ const TString AliPHOSPIDv1::GetFileNamePrincipal(TString particle) const
   //Get file name that contains the PCA for a particle ("photon or pi0")
   particle.ToLower();
   TString name;
-  if      (particle=="photon") name = fFileNamePrincipalPhoton ;
-  else if (particle=="pi0"   ) name = fFileNamePrincipalPi0    ;
-  else    Error("GetFileNamePrincipal","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+  if      (particle=="photon") 
+    name = fFileNamePrincipalPhoton ;
+  else if (particle=="pi0"   ) 
+    name = fFileNamePrincipalPi0    ;
+  else    
+    AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+                 particle.Data()));
   return name;
 }
 
@@ -436,9 +440,9 @@ Float_t  AliPHOSPIDv1::GetParameterCalibration(Int_t i) const
 {
   // Get the i-th parameter "Calibration"
   Float_t param = 0.;
-  if (i>2 || i<0)
-    Error("GetParameterCalibration","Invalid parameter number: %d",i);
-  else
+  if (i>2 || i<0) { 
+    AliError(Form("Invalid parameter number: %d",i));
+  else
     param = (*fParameters)(0,i);
   return param;
 }
@@ -464,13 +468,17 @@ Float_t  AliPHOSPIDv1::GetParameterCpv2Emc(Int_t i, TString axis) const
 {
   // Get the i-th parameter "CPV-EMC distance" for the specified axis
   Float_t param = 0.;
-  if(i>2 || i<0)
-    Error("GetParameterCpv2Emc","Invalid parameter number: %d",i);
-  else {
+  if(i>2 || i<0) {
+    AliError(Form("Invalid parameter number: %d",i));
+  else {
     axis.ToLower();
-    if      (axis == "x") param = (*fParameters)(1,i);
-    else if (axis == "z") param = (*fParameters)(2,i);
-    else Error("GetParameterCpv2Emc","Invalid axis name: %s",axis.Data());
+    if      (axis == "x") 
+      param = (*fParameters)(1,i);
+    else if (axis == "z") 
+      param = (*fParameters)(2,i);
+    else { 
+      AliError(Form("Invalid axis name: %s",axis.Data()));
+    }
   }
   return  param;
 }
@@ -518,9 +526,9 @@ Float_t  AliPHOSPIDv1::GetParameterPhotonBoundary (Int_t i) const
   // Get the parameter "i" to calculate the boundary on the moment M2x
   // for photons at high p_T
   Float_t param = 0;
-  if (i>3 || i<0)
-    Error("GetParameterPhotonBoundary","Wrong parameter number: %d\n",i);
-  else
+  if (i>3 || i<0) {
+    AliError(Form("Wrong parameter number: %d\n",i));
+  else
     param = (*fParameters)(14,i) ;
   return param;
 }
@@ -531,9 +539,9 @@ Float_t  AliPHOSPIDv1::GetParameterPi0Boundary (Int_t i) const
   // Get the parameter "i" to calculate the boundary on the moment M2x
   // for pi0 at high p_T
   Float_t param = 0;
-  if (i>2 || i<0)
-    Error("GetParameterPi0Boundary","Wrong parameter number: %d\n",i);
-  else
+  if (i>2 || i<0) {
+    AliError(Form("Wrong parameter number: %d\n",i));
+  else
     param = (*fParameters)(15,i) ;
   return param;
 }
@@ -544,9 +552,9 @@ Float_t  AliPHOSPIDv1::GetParameterTimeGate(Int_t i) const
   // Get TimeGate parameter depending on Purity-Efficiency i:
   // i=0 - Low purity, i=1 - Medium purity, i=2 - High purity
   Float_t param = 0.;
-  if(i>2 || i<0)
-    Error("GetParameterTimeGate","Invalid Efficiency-Purity choice %d",i);
-  else
+  if(i>2 || i<0) {
+    AliError(Form("Invalid Efficiency-Purity choice %d",i));
+  else
     param = (*fParameters)(3,i) ; 
   return param;
 }
@@ -560,10 +568,13 @@ Float_t  AliPHOSPIDv1::GetParameterToCalculateEllipse(TString particle, TString
   particle.ToLower();
   param.   ToLower();
   Int_t offset = -1;
-  if      (particle == "photon") offset=0;
-  else if (particle == "pi0")    offset=5;
+  if      (particle == "photon") 
+    offset=0;
+  else if (particle == "pi0")    
+    offset=5;
   else
-    Error("GetParameterToCalculateEllipse","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+    AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+                 particle.Data()));
 
   Int_t p= -1;
   Float_t par = 0;
@@ -574,11 +585,11 @@ Float_t  AliPHOSPIDv1::GetParameterToCalculateEllipse(TString particle, TString
   else if(param.Contains("x0"))p=7+offset; 
   else if(param.Contains("y0"))p=8+offset;
 
-  if      (i>4 || i<0)
-    Error("GetParameterToCalculateEllipse", "No parameter with index", i) ; 
-  else if (p==-1)
-    Error("GetParameterToCalculateEllipse", "No parameter with name %s", param.Data() ) ; 
-  else
+  if      (i>4 || i<0) {
+    AliError(Form("No parameter with index %d", i)) ; 
+  } else if (p==-1) {
+    AliError(Form("No parameter with name %s", param.Data() )) ; 
+  else
     par = (*fParameters)(p,i) ;
   
   return par;
@@ -617,7 +628,7 @@ Float_t  AliPHOSPIDv1::GetDistance(AliPHOSEmcRecPoint * emc,AliPHOSCpvRecPoint *
 Int_t  AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSCpvRecPoint * cpv, Int_t effPur, Float_t e) const
 {
   if(effPur>2 || effPur<0)
-    Error("GetCPVBit","Invalid Efficiency-Purity choice %d",effPur);
+    AliError(Form("Invalid Efficiency-Purity choice %d",effPur));
   
   Float_t sigX = GetCpv2EmcDistanceCut("X",e);
   Float_t sigZ = GetCpv2EmcDistanceCut("Z",e);
@@ -653,7 +664,7 @@ Int_t  AliPHOSPIDv1::GetPrincipalBit(TString particle, const Double_t* p, Int_t
   if((effPur==0) && (r<9./2.)) prinbit= 1;
 
   if(r<0)
-    Error("GetPrincipalBit", "Negative square?") ;
+    AliError("Negative square?") ;
 
   return prinbit;
 
@@ -671,7 +682,8 @@ Int_t  AliPHOSPIDv1::GetHardPhotonBit(AliPHOSEmcRecPoint * emc) const
     TMath::Exp(-TMath::Power(e-GetParameterPhotonBoundary(1),2)/2.0/
                TMath::Power(GetParameterPhotonBoundary(2),2)) +
     GetParameterPhotonBoundary(3);
-  //Info("GetHardPhotonBit","E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary);
+  AliDebug(1, Form("GetHardPhotonBit","E=%f, m2x=%f, boundary=%f",
+                      e,m2x,m2xBoundary));
   if (m2x < m2xBoundary)
     return 1;// A hard photon
   else
@@ -689,7 +701,7 @@ Int_t  AliPHOSPIDv1::GetHardPi0Bit(AliPHOSEmcRecPoint * emc) const
   Float_t m2x = emc->GetM2x();
   Float_t m2xBoundary = GetParameterPi0Boundary(0) +
                     e * GetParameterPi0Boundary(1);
-  //Info("GetHardPi0Bit","E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary);
+  AliDebug(1,Form("E=%f, m2x=%f, boundary=%f",e,m2x,m2xBoundary));
   if (m2x > m2xBoundary)
     return 1;// A hard pi0
   else
@@ -809,7 +821,7 @@ void  AliPHOSPIDv1::MakePID()
 
 //   const Int_t kMAXPARTICLES = 2000 ; 
 //   if (nparticles >= kMAXPARTICLES) 
-//     Error("MakePID", "Change size of MAXPARTICLES") ; 
+//     AliError("Change size of MAXPARTICLES") ; 
 //   Double_t stof[kSPECIES][kMAXPARTICLES] ;
 
 
@@ -1064,7 +1076,7 @@ void  AliPHOSPIDv1::MakeRecParticles()
   TObjArray * cpvRecPoints = gime->CpvRecPoints() ; 
   TClonesArray * trackSegments = gime->TrackSegments() ; 
   if ( !emcRecPoints || !cpvRecPoints || !trackSegments ) {
-    Fatal("MakeRecParticles", "RecPoints or TrackSegments not found !") ;  
+    AliFatal("RecPoints or TrackSegments not found !") ;  
   }
   TClonesArray * recParticles  = gime->RecParticles() ; 
   recParticles->Clear();
@@ -1096,7 +1108,7 @@ void  AliPHOSPIDv1::MakeRecParticles()
     // Choose the cluster energy range
     
     if (!emc) {
-      Fatal("MakeRecParticles", "-> emc(%d) = %d", ts->GetEmcIndex(), emc ) ;
+      AliFatal(Form("-> emc(%d) = %d", ts->GetEmcIndex(), emc )) ;
     }
 
     Float_t e = emc->GetEnergy() ;   
@@ -1203,7 +1215,7 @@ void  AliPHOSPIDv1::Print() const
 {
   // Print the parameters used for the particle type identification
 
-    Info("Print", "=============== AliPHOSPIDv1 ================") ;
+    AliInfo("=============== AliPHOSPIDv1 ================") ;
     printf("Making PID\n") ;
     printf("    Pricipal analysis file from 0.5 to 100 %s\n", fFileNamePrincipalPhoton.Data() )   ; 
     printf("    Name of parameters file     %s\n", fFileNameParameters.Data() )  ;
@@ -1248,7 +1260,7 @@ void AliPHOSPIDv1::PrintRecParticles(Option_t * option)
       message += rp->GetType()  ;
     }
   }
-  Info("Print", message.Data() ) ; 
+  AliInfo(message.Data() ) ; 
 }
 
 //____________________________________________________________________________
@@ -1294,8 +1306,8 @@ void  AliPHOSPIDv1::SetParameters()
   // Open a text file with PID parameters
   FILE *fd = fopen(fFileNameParameters.Data(),"r");
   if (!fd)
-    Fatal("SetParameter","File %s with a PID parameters cannot be opened\n",
-         fFileNameParameters.Data());
+    AliFatal(Form("File %s with a PID parameters cannot be opened\n",
+         fFileNameParameters.Data()));
 
   Int_t i=0;
   // Read parameter file line-by-line and skip empty line and comments
@@ -1306,7 +1318,7 @@ void  AliPHOSPIDv1::SetParameters()
           &(*fParameters)(i,0), &(*fParameters)(i,1), 
           &(*fParameters)(i,2), &(*fParameters)(i,3));
     i++;
-    //Info("SetParameters", "line %d: %s",i,string);
+    AliDebug(1, Form("SetParameters", "line %d: %s",i,string));
   }
   fclose(fd);
 }
@@ -1315,9 +1327,9 @@ void  AliPHOSPIDv1::SetParameters()
 void  AliPHOSPIDv1::SetParameterCalibration(Int_t i,Float_t param) 
 {
   // Set parameter "Calibration" i to a value param
-  if(i>2 || i<0)
-    Error("SetParameterCalibration","Invalid parameter number: %d",i);
-  else
+  if(i>2 || i<0) {
+    AliError(Form("Invalid parameter number: %d",i));
+  else
     (*fParameters)(0,i) = param ;
 }
 
@@ -1327,13 +1339,15 @@ void  AliPHOSPIDv1::SetParameterCpv2Emc(Int_t i, TString axis, Float_t cut)
   // Set the parameters to calculate Cpv-to-Emc Distance Cut depending on 
   // Purity-Efficiency point i
 
-  if(i>2 || i<0)
-    Error("SetParameterCpv2Emc","Invalid parameter number: %d",i);
-  else {
+  if(i>2 || i<0) {
+    AliError(Form("Invalid parameter number: %d",i));
+  else {
     axis.ToLower();
     if      (axis == "x") (*fParameters)(1,i) = cut;
     else if (axis == "z") (*fParameters)(2,i) = cut;
-    else Error("SetParameterCpv2Emc","Invalid axis name: %s",axis.Data());
+    else { 
+      AliError(Form("Invalid axis name: %s",axis.Data()));
+    }
   }
 }
 
@@ -1341,9 +1355,9 @@ void  AliPHOSPIDv1::SetParameterCpv2Emc(Int_t i, TString axis, Float_t cut)
 void  AliPHOSPIDv1::SetParameterPhotonBoundary(Int_t i,Float_t param) 
 {
   // Set parameter "Hard photon boundary" i to a value param
-  if(i>4 || i<0)
-    Error("SetParameterPhotonBoundary","Invalid parameter number: %d",i);
-  else
+  if(i>4 || i<0) {
+    AliError(Form("Invalid parameter number: %d",i));
+  else
     (*fParameters)(14,i) = param ;
 }
 
@@ -1351,9 +1365,9 @@ void  AliPHOSPIDv1::SetParameterPhotonBoundary(Int_t i,Float_t param)
 void  AliPHOSPIDv1::SetParameterPi0Boundary(Int_t i,Float_t param) 
 {
   // Set parameter "Hard pi0 boundary" i to a value param
-  if(i>1 || i<0)
-    Error("SetParameterPi0Boundary","Invalid parameter number: %d",i);
-  else
+  if(i>1 || i<0) {
+    AliError(Form("Invalid parameter number: %d",i));
+  else
     (*fParameters)(15,i) = param ;
 }
 
@@ -1361,9 +1375,9 @@ void  AliPHOSPIDv1::SetParameterPi0Boundary(Int_t i,Float_t param)
 void  AliPHOSPIDv1::SetParameterTimeGate(Int_t i, Float_t gate) 
 {
   // Set the parameter TimeGate depending on Purity-Efficiency point i 
-  if (i>2 || i<0)
-    Error("SetParameterTimeGate","Invalid Efficiency-Purity choice %d",i);
-  else
+  if (i>2 || i<0) {
+    AliError(Form("Invalid Efficiency-Purity choice %d",i));
+  else
     (*fParameters)(3,i)= gate ; 
 } 
 
@@ -1381,18 +1395,19 @@ void  AliPHOSPIDv1::SetParameterToCalculateEllipse(TString particle, TString par
   if      (particle == "photon") offset=0;
   else if (particle == "pi0")    offset=5;
   else
-    Error("SetParameterToCalculateEllipse","Wrong particle name: %s (choose from pi0/photon)\n",particle.Data());
+    AliError(Form("Wrong particle name: %s (choose from pi0/photon)\n",
+                 particle.Data()));
 
   if     (param.Contains("a")) p=4+offset; 
   else if(param.Contains("b")) p=5+offset; 
   else if(param.Contains("c")) p=6+offset; 
   else if(param.Contains("x0"))p=7+offset; 
   else if(param.Contains("y0"))p=8+offset;
-  if((i>4)||(i<0))
-    Error("SetEllipseParameter", "No parameter with index %d", i) ; 
-  else if(p==-1)
-    Error("SetEllipseParameter", "No parameter with name %s", param.Data() ) ; 
-  else
+  if((i>4)||(i<0)) {
+    AliError(Form("No parameter with index %d", i)) ; 
+  } else if(p==-1) {
+    AliError(Form("No parameter with name %s", param.Data() )) ; 
+  else
     (*fParameters)(p,i) = par ;
 }