]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Change tp AliLog messages done by Federico
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2005 11:29:54 +0000 (11:29 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Jun 2005 11:29:54 +0000 (11:29 +0000)
TRD/AliTRD.cxx
TRD/AliTRDpidESD.h
TRD/AliTRDv1.cxx

index 6a95d3c063a8762c645b61b8886043f45f2d4cb2..32307ebd4ced5df828df365190f5d2e7555357e9 100644 (file)
@@ -40,6 +40,8 @@
 #include "AliConst.h"
 #include "AliDigit.h"
 #include "AliLoader.h"
+#include "AliLog.h"
+#include "AliMC.h"
 #include "AliMagF.h"
 #include "AliRun.h"
 #include "AliTRD.h"
@@ -51,7 +53,6 @@
 #include "AliTRDpoints.h"
 #include "AliTRDrawData.h"
 #include "AliTrackReference.h"
-#include "AliMC.h"
 
 ClassImp(AliTRD)
  
@@ -165,7 +166,7 @@ void AliTRD::Hits2Digits()
   // Create digits
   //
   AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");
-  digitizer.SetDebug(GetDebug());
+  AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
   
   // Initialization
   digitizer.InitDetector();
@@ -195,7 +196,7 @@ void AliTRD::Hits2SDigits()
   AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");
   // For the summable digits
   digitizer.SetSDigits(kTRUE);
-  digitizer.SetDebug(GetDebug());
+  AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
 
   // Initialization
   digitizer.InitDetector();
@@ -235,7 +236,7 @@ void AliTRD::SDigits2Digits()
 
    // Create the TRD digitizer
   AliTRDdigitizer digitizer("TRDdigitizer","TRD digitizer class");  
-  digitizer.SetDebug(GetDebug());
+  AliLog::SetClassDebugLevel("TRDdigitizer",AliDebugLevel());
 
   // Set the parameter
   digitizer.SetEvent(gAlice->GetEvNumber());
@@ -246,7 +247,7 @@ void AliTRD::SDigits2Digits()
   // Read the s-digits via digits manager
   AliTRDdigitsManager sdigitsManager;
  
-  sdigitsManager.SetDebug(GetDebug());
+  AliLog::SetClassDebugLevel("TRDdigitisManager",AliDebugLevel());
   sdigitsManager.SetSDigits(kTRUE);
   sdigitsManager.CreateArrays();
   
@@ -448,8 +449,7 @@ void AliTRD::CreateGeometry()
   // Check that FRAME is there otherwise we have no place where to put the TRD
   AliModule* frame = gAlice->GetModule("FRAME");
   if (!frame) {
-    printf(" The TRD needs the FRAME to be defined first\n");
-    return;
+    AliFatal("The TRD needs the FRAME to be defined first");
   }
 
   fGeometry->CreateGeometry(fIdtmed->GetArray() - 1299);
@@ -722,25 +722,17 @@ void AliTRD::Init()
   // Initialize the TRD detector after the geometry has been created
   //
 
-  Int_t i;
-
-  if (fDebug) {
-    printf("\n%s: ",ClassName());
-    for (i = 0; i < 35; i++) printf("*");
-    printf(" TRD_INIT ");
-    for (i = 0; i < 35; i++) printf("*");
-    printf("\n");
-  }
+  AliDebug(1,"++++++++++++++++++++++++++++++++++++++++++++++");
 
   if (fGeometry->IsVersion() == 1) {
-    printf("%s: Full geometry version initialized\n",ClassName());
+    AliInfo("Full geometry version initialized");
     if (fGeometry->GetPHOShole())
-      printf("%s: Leave space in front of PHOS free\n",ClassName());
+      AliInfo("Leave space in front of PHOS free");
     if (fGeometry->GetRICHhole())
-      printf("%s: Leave space in front of RICH free\n",ClassName());
+      AliInfo("Leave space in front of RICH free");
   }
   else {
-    printf("%s: Not a valid geometry\n",ClassName());
+    AliError("Not a valid geometry");
   }
   
 }
index 27920459fc110c0a1a746402f4d9d6ea4cfe49ab..5e6e2731752b330e58df32e3d903e3d3dc85fc75 100644 (file)
@@ -15,6 +15,7 @@ class AliESD;
 class AliTRDpidESD {
 public:
   AliTRDpidESD(Double_t *param);
+  virtual ~AliTRDpidESD() {}
   Int_t MakePID(AliESD *event);
   static Double_t Bethe(Double_t bg);
 private:
index 50030843ab8d5380608e44ec130f687f48686e09..eb2b6b0896cb9e7bb89c987f17d782d4971c3ce4 100644 (file)
 #include <TVirtualMC.h>
 
 #include "AliConst.h"
+#include "AliLog.h"
+#include "AliMC.h"
 #include "AliRun.h"
 #include "AliTRDgeometry.h"
 #include "AliTRDhit.h"
 #include "AliTRDsim.h"
 #include "AliTRDv1.h"
-#include "AliMC.h"
 
 ClassImp(AliTRDv1)
  
@@ -216,9 +217,7 @@ void AliTRDv1::CreateTRhit(Int_t det)
     Float_t pTot = mom.Rho();
     fTR->CreatePhotons(iPdg,pTot,nTR,eTR);
     if (nTR > kNTR) {
-      printf("AliTRDv1::CreateTRhit -- ");
-      printf("Boundary error: nTR = %d, kNTR = %d\n",nTR,kNTR);
-      exit(1);
+      AliFatal(Form("Boundary error: nTR = %d, kNTR = %d",nTR,kNTR));
     }
 
     // Loop through the TR photons
@@ -288,25 +287,24 @@ void AliTRDv1::Init()
 
   AliTRD::Init();
 
-  if(fDebug) printf("%s: Slow simulator\n",ClassName());
+  AliDebug(1,"Slow simulator\n");
   if (fSensSelect) {
     if (fSensPlane   >= 0)
-      printf("          Only plane %d is sensitive\n",fSensPlane);
+      AliInfo(Form("Only plane %d is sensitive"));
     if (fSensChamber >= 0)   
-      printf("          Only chamber %d is sensitive\n",fSensChamber);
+      AliInfo(Form("Only chamber %d is sensitive",fSensChamber));
     if (fSensSector  >= 0) {
       Int_t sens1  = fSensSector;
       Int_t sens2  = fSensSector + fSensSectorRange;
             sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect())) 
                    * AliTRDgeometry::Nsect();
-      printf("          Only sectors %d - %d are sensitive\n",sens1,sens2-1);
+           AliInfo(Form("Only sectors %d - %d are sensitive\n",sens1,sens2-1));
     }
   }
   if (fTR) 
-    printf("%s: TR simulation on\n",ClassName());
+    AliInfo("TR simulation on")
   else
-    printf("%s: TR simulation off\n",ClassName());
-  printf("\n");
+    AliInfo("TR simulation off");
 
   // First ionization potential (eV) for the gas mixture (90% Xe + 10% CO2)
   const Float_t kPoti = 12.1;
@@ -322,11 +320,7 @@ void AliTRDv1::Init()
   // Geant3 distribution for the delta-ray spectrum
   fDeltaG = new TF1("deltaeg",IntSpecGeant,poti,eEnd,0);
 
-  if(fDebug) {
-    printf("%s: ",ClassName());
-    for (Int_t i = 0; i < 80; i++) printf("*");
-    printf("\n");
-  }
+  AliDebug(1,"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
 
 }
 
@@ -350,8 +344,8 @@ void AliTRDv1::SetSensPlane(Int_t iplane)
   //
 
   if ((iplane < 0) || (iplane > 5)) {
-    printf("Wrong input value: %d\n",iplane);
-    printf("Use standard setting\n");
+    AliWarning(Form("Wrong input value:%d",iplane));
+    AliWarning("Use standard setting");
     fSensPlane  = -1;
     fSensSelect =  0;
     return;
@@ -370,8 +364,8 @@ void AliTRDv1::SetSensChamber(Int_t ichamber)
   //
 
   if ((ichamber < 0) || (ichamber > 4)) {
-    printf("Wrong input value: %d\n",ichamber);
-    printf("Use standard setting\n");
+    AliWarning(Form("Wrong input value: %d",ichamber));
+    AliWarning("Use standard setting");
     fSensChamber = -1;
     fSensSelect  =  0;
     return;
@@ -403,8 +397,8 @@ void AliTRDv1::SetSensSector(Int_t isector, Int_t nsector)
   //
 
   if ((isector < 0) || (isector > 17)) {
-    printf("Wrong input value <isector>: %d\n",isector);
-    printf("Use standard setting\n");
+    AliWarning(Form("Wrong input value <isector>: %d",isector));
+    AliWarning("Use standard setting");
     fSensSector      = -1;
     fSensSectorRange =  0;
     fSensSelect      =  0;
@@ -412,8 +406,8 @@ void AliTRDv1::SetSensSector(Int_t isector, Int_t nsector)
   }
 
   if ((nsector < 1) || (nsector > 18)) {
-    printf("Wrong input value <nsector>: %d\n",nsector);
-    printf("Use standard setting\n");
+    AliWarning(Form("Wrong input value <nsector>: %d",nsector));
+    AliWarning("Use standard setting");
     fSensSector      = -1;
     fSensSectorRange =  0;
     fSensSelect      =  0;
@@ -438,7 +432,7 @@ void AliTRDv1::StepManager()
     case 0  : StepManagerErmilova();  break;  // 0 is Ermilova
     case 1  : StepManagerGeant();     break;  // 1 is Geant
     case 2  : StepManagerFixedStep(); break;  // 2 is fixed step
-    default : printf("<AliTRDv1::StepManager>: Not a valid Step Manager.\n");
+    default : AliWarning("Not a valid Step Manager.");
   }
 
 }
@@ -454,13 +448,11 @@ void AliTRDv1::SelectStepManager(Int_t t)
   //
 
   if (t == 1) {
-    printf("<AliTRDv1::SelectStepManager>: Sorry, Geant parametrization step"
-          "manager is not implemented yet. Please ask K.Oyama for detail.\n");
+    AliWarning("Sorry, Geant parametrization step manager is not implemented yet. Please ask K.Oyama for detail.");
   }
 
   fTypeOfStepManager = t;
-  printf("<AliTRDv1::SelectStepManager>: Step Manager type %d was selected.\n"
-        , fTypeOfStepManager);
+  AliInfo(Form("Step Manager type %d was selected",fTypeOfStepManager));
 
 }
 
@@ -474,7 +466,7 @@ void AliTRDv1::StepManagerGeant()
   // a spectrum taken from Geant3.
   //
 
-  printf("AliTRDv1::StepManagerGeant: Not implemented yet.\n");
+  AliWarning("Not implemented yet.");
 
 }
 
@@ -1016,8 +1008,7 @@ Double_t IntSpecGeant(Double_t *x, Double_t *)
     if( energy < arr_e[i] ) break;
 
   if( i == 0 )
-    printf("Error in AliTRDv1::IntSpecGeant: "
-          "given energy value is too small or zero.\n");
+    AliErrorGeneral("AliTRDv1","Given energy value is too small or zero");
 
   // Interpolate
   dnde = (arr_dndx[i-1] - arr_dndx[i]) / (arr_e[i] - arr_e[i-1]);