]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
use AliLog message scheme
authortkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 2004 14:35:32 +0000 (14:35 +0000)
committertkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 2004 14:35:32 +0000 (14:35 +0000)
19 files changed:
STEER/AliDetector.cxx
STEER/AliDigitizer.cxx
STEER/AliDisplay.cxx
STEER/AliGenerator.cxx
STEER/AliHeader.cxx
STEER/AliMagF.cxx
STEER/AliMagF.h
STEER/AliMagFC.cxx
STEER/AliMagFCM.cxx
STEER/AliMagFDM.cxx
STEER/AliMagFMaps.cxx
STEER/AliModule.cxx
STEER/AliModule.h
STEER/AliReconstruction.cxx
STEER/AliRunDigitizer.cxx
STEER/AliRunDigitizer.h
STEER/AliStream.cxx
STEER/AliVertexer.cxx
STEER/AliVertexer.h

index 3acb9b0955933155c73d50cac033140d4e21278b..71e5f6d41d0abbf6d6fcedf27510c20a67b2e71c 100644 (file)
@@ -36,6 +36,7 @@
 #include <TBrowser.h>
 #include <TTree.h>
 
+#include "AliLog.h"
 #include "AliConfig.h"
 #include "AliDetector.h"
 #include "AliHit.h"
@@ -160,16 +161,16 @@ TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name,
 //
 //
 // if (GetDebug()>1)
if(GetDebug()) Info("MakeBranch","Making Branch %s",name);
AliDebug(2,Form("Making Branch %s",name));
  if (tree == 0x0) 
   {
-   Error("MakeBranch","Making Branch %s Tree is NULL",name);
+   AliError(Form("Making Branch %s Tree is NULL",name));
    return 0x0;
   }
  TBranch *branch = tree->GetBranch(name);
  if (branch) 
   {  
-    if(GetDebug()) Info("MakeBranch","Branch %s is already in tree.",name);
+    AliDebug(2,Form("Branch %s is already in tree.",name));
     return branch;
   }
     
@@ -181,7 +182,7 @@ TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name,
   {
     branch = tree->Branch(name,address,size);
   }
if(GetDebug()) Info("MakeBranch","Branch %s returning branch %#x",name,branch);
AliDebug(2,Form("Branch %s returning branch %#x",name,branch));
  return branch;
 }
 
@@ -210,7 +211,7 @@ void AliDetector::Copy(TObject &) const
   //
   // Copy *this onto det -- not implemented
   //
-  Fatal("Copy","Not implemented\n");
+  AliFatal("Not implemented");
 }
 
 //_______________________________________________________________________
@@ -254,7 +255,7 @@ AliHit* AliDetector::NextHit()
     else        
       return 0;
   } else {
-    printf("* AliDetector::NextHit * Hit Iterator called without calling FistHit before\n");
+    AliWarning("Hit Iterator called without calling FistHit before");
     return 0;
   }
 }
@@ -267,7 +268,7 @@ void AliDetector::LoadPoints(Int_t)
   //
   if (fHits == 0) 
    {
-    Error("LoadPoints","fHits == 0. Name is %s",GetName());
+    AliError(Form("fHits == 0. Name is %s",GetName()));
     return;
    }
   //
@@ -299,7 +300,7 @@ void AliDetector::LoadPoints(Int_t)
   for (Int_t hit=0;hit<nhits;hit++) {
     ahit = dynamic_cast<AliHit*>(fHits->UncheckedAt(hit));
     trk=ahit->GetTrack();
-    if(trk>tracks) Fatal("LoadPoints","Found track number %d, max track %d\n",trk, tracks);
+    if(trk>tracks) AliFatal(Form("Found track number %d, max track %d",trk, tracks));
     if(ntrk[trk]==limi[trk])
      {
       //
@@ -348,7 +349,7 @@ void AliDetector::MakeBranch(Option_t *option)
   // Create a new branch for this detector in its treeH
   //
 
-  if(GetDebug()) Info("MakeBranch"," for %s",GetName());
+  AliDebug(2,Form(" for %s",GetName()));
   const char *cH = strstr(option,"H");
 
   if (fHits && TreeH() && cH) 
@@ -405,12 +406,12 @@ void AliDetector::SetTreeAddress()
     branch = tree->GetBranch(GetName());
     if (branch) 
      {
-       if(GetDebug()) Info("SetTreeAddress","(%s) Setting for Hits",GetName());
+       AliDebug(2,Form("(%s) Setting for Hits",GetName()));
        branch->SetAddress(&fHits);
      }
     else
      { //can be invoked before branch creation
-       if(GetDebug()) Warning("SetTreeAddress","(%s) Failed for Hits. Can not find branch in tree.",GetName());
+       AliDebug(2,Form("(%s) Failed for Hits. Can not find branch in tree.",GetName()));
      }
   }
   
@@ -437,7 +438,7 @@ void AliDetector::MakeTree(Option_t *option)
     AliLoader* loader = GetLoader();
     if (loader == 0x0)
      {
-       Error("MakeTree","Can not get loader for %s",GetName());
+       AliError(Form("Can not get loader for %s",GetName()));
        return;
      }
     loader->MakeTree(option); //delegate this job to getter
@@ -449,10 +450,8 @@ AliLoader* AliDetector::MakeLoader(const char* topfoldername)
 //builds standard getter (AliLoader type)
 //if detector wants to use castomized getter, it must overload this method
 
- if (GetDebug())
-   Info("MakeLoader",
-        "Creating standard getter for detector %s. Top folder is %s.",
-         GetName(),topfoldername);
+ AliDebug(1,Form("Creating standard getter for detector %s. Top folder is %s.",
+         GetName(),topfoldername));
      
  fLoader = new AliLoader(GetName(),topfoldername);
  return fLoader;
@@ -465,7 +464,7 @@ TTree* AliDetector::TreeH() const
   if (GetLoader() == 0x0) 
     {
     //sunstitude this with make getter when we can obtain the event folder name 
-     Error("TreeH","Can not get the getter");
+     AliError("Can not get the getter");
      return 0x0;
     }
  
index 7b60c40c80694f7b609be8641c9c643101bd6ada..a32be6e7ec423e3756ad3bfb7b879d00fd18db09 100644 (file)
@@ -27,6 +27,7 @@
 // ROOT includes
 
 // AliROOT includes
+#include "AliLog.h"
 #include "AliDigitizer.h"
 #include "AliRunDigitizer.h"
 
@@ -58,7 +59,7 @@ AliDigitizer::AliDigitizer(const AliDigitizer &dig):
 //_______________________________________________________________________
 void AliDigitizer::Copy(TObject &) const
 {
-  Fatal("Copy","Not yet implemented\n");
+  AliFatal("Not yet implemented");
 }
 
 //_______________________________________________________________________
index fc09dc438381ed303b12458f81a765710be49768..edf4ea23867f9dfc66fba55704288cfac25ac7f3 100644 (file)
@@ -37,6 +37,7 @@
 #include <TView.h>
 #include <TVirtualX.h>
 
+#include "AliLog.h"
 #include "AliDetector.h"
 #include "AliDisplay.h"
 #include "AliHeader.h"
@@ -349,7 +350,7 @@ void AliDisplay::Copy(TObject &) const
   //
   // Copy *this onto disp -- not implemented
   //
-  Fatal("Copy","Not implemented~\n");
+  AliFatal("Not implemented");
 }
 
 //----------------------------------------------------------------------------
@@ -373,11 +374,11 @@ void AliDisplay::ShowTrack(Int_t idx)
         //         TClonesArray *particles=gAlice->Particles();
         //         TParticle *p = (TParticle*)particles->UncheckedAt(idx);
         TParticle *p = gAlice->GetMCApp()->Particle(idx);
-         printf("\nTrack index %d\n",idx);
-         printf("Particle ID %d\n",p->GetPdgCode());
-         printf("Parent %d\n",p->GetFirstMother());
-         printf("First child %d\n",p->GetFirstDaughter());
-         printf("Px,Py,Pz %f %f %f\n",p->Px(),p->Py(),p->Pz());
+         AliInfo(Form("Track index %d",idx));
+         AliInfo(Form("Particle ID %d",p->GetPdgCode()));
+         AliInfo(Form("Parent %d",p->GetFirstMother()));
+         AliInfo(Form("First child %d",p->GetFirstDaughter()));
+         AliInfo(Form("Px,Py,Pz %f %f %f",p->Px(),p->Py(),p->Pz()));
          return;
       }
    }
@@ -947,9 +948,8 @@ void AliDisplay::ShowNextEvent(Int_t delta)
      Int_t currentEvent = gAlice->GetRunLoader()->GetEventNumber();
      Int_t newEvent     = currentEvent + delta;
      gAlice->GetEvent(newEvent);
-     cout<<"AliDisplay::ShowNextEvent: delta = "<<delta
-         <<"  currentEvent = "<<currentEvent
-         <<"  newEvent = "<<newEvent<<endl;
+     AliInfo(Form("delta = %d  currentEvent = %d  newEvent = %d",
+                  delta, currentEvent, newEvent));
    }
   LoadPoints();
   fPad->cd(); 
index 8fb713f66a3efdb3e6f8874dfdc5b1f47420f5aa..3d53ffa21c52f5b260683d12aa154ff46b038379 100644 (file)
@@ -37,6 +37,7 @@
 #include <TGenerator.h>
 #include <TMCProcess.h>
 
+#include "AliLog.h"
 #include "AliCollisionGeometry.h"
 #include "AliConfig.h"
 #include "AliGenerator.h"
@@ -81,8 +82,7 @@ AliGenerator::AliGenerator():
   // Default constructor
   //
     if (gAlice) {
-       if (gAlice->GetDebug()>0)
-           printf("\n AliGenerator Default Constructor\n\n");
+       AliDebug(1, "AliGenerator Default Constructor");
        AliMC * mc = gAlice->GetMCApp();
        if (mc) mc->SetGenerator(this);
     }
@@ -138,8 +138,7 @@ AliGenerator::AliGenerator(Int_t npart):
   // Standard constructor
   //
     if (gAlice) {
-       if (gAlice->GetDebug()>0)
-           printf("\n AliGenerator Constructor initializing number of particles \n\n");
+        AliDebug(1, "AliGenerator Constructor initializing number of particles");
        AliMC * mc = gAlice->GetMCApp();
        if (mc) mc->SetGenerator(this);
     }
@@ -216,7 +215,7 @@ void AliGenerator::Copy(TObject &/* gen */) const
   //
   // Copy *this onto gen
   //
-  Fatal("Copy","Not implemented!\n");
+  AliFatal("Not implemented!");
 }
 
 //_______________________________________________________________________
index 25f867190d88685e3f56e0defd30ca89a9783a8f..5b6c2922be811a98becc4ecdb95d01989b698b34 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 
+#include "AliLog.h"
 #include "AliHeader.h"
  
 ClassImp(AliHeader)
@@ -170,7 +171,7 @@ AliGenEventHeader*  AliHeader::GenEventHeader() const
 //_______________________________________________________________________
 void AliHeader::Copy(TObject&) const
 {
-  Fatal("Copy","Not implemented\n");
+  AliFatal("Not implemented");
 }
 
 
index 1710d02806e93b6ac1448c79096b50aac3892ba3..7ec67c48a0ce6e9d1b17f428ee42b97637c3d42d 100644 (file)
@@ -21,6 +21,7 @@
 // Author:
 //----------------------------------------------------------------------
 
+#include "AliLog.h"
 #include "AliMagF.h"
 Bool_t AliMagF::fgReadField = kTRUE;
 ClassImp(AliMagF)
@@ -31,8 +32,7 @@ AliMagF::AliMagF():
   fType(0),
   fInteg(0),
   fFactor(0),
-  fMax(0),
-  fDebug(0)
+  fMax(0)
 {
   //
   // Default constructor
@@ -47,23 +47,21 @@ AliMagF::AliMagF(const char *name, const char *title, Int_t integ,
   fType(0),
   fInteg(0),
   fFactor(factor),
-  fMax(fmax),
-  fDebug(0)
+  fMax(fmax)
 {
   //
   // Standard constructor
   //
     if(integ<0 || integ > 2) {
-      Warning("SetField",
-              "Invalid magnetic field flag: %5d; Helix tracking chosen instead\n"
-              ,integ);
+      AliWarning(Form(
+              "Invalid magnetic field flag: %5d; Helix tracking chosen instead"
+              ,integ));
       fInteg = 2;
     } else {
       fInteg = integ;
     }
     fType = kUndef;
     //
-    fDebug = 0;
 }
 
 //_______________________________________________________________________
@@ -72,6 +70,6 @@ void AliMagF::Field(Float_t*, Float_t *b) const
   //
   // Method to return the field in one point -- dummy in this case
   //
-  Warning("Field","Undefined MagF Field called, returning 0\n");
+  AliWarning("Undefined MagF Field called, returning 0");
   b[0]=b[1]=b[2]=0;
 }
index 7a4f2564541562024c19079feaffe92336af413f..2e0f2e779f77d7c23561e8fac18c38e2982c8ad2 100644 (file)
@@ -29,9 +29,7 @@ public:
   virtual Int_t Integ() const {return fInteg;}
   virtual Float_t Factor() const {return fFactor;}
   virtual void ReadField() {}
-  virtual void SetDebug(Int_t level=0) {fDebug=level;}
   virtual Float_t SolenoidField() const {return 2.;}
-  virtual Int_t GetDebug() const {return fDebug;}
   static void  SetReadField(Bool_t flag = kTRUE) {fgReadField = flag;}
  protected:
   Int_t     fMap;       // Field Map identifier
@@ -39,9 +37,8 @@ public:
   Int_t     fInteg;     // Integration method as indicated in Geant
   Float_t   fFactor;    // Multiplicative factor
   Float_t   fMax;       // Max Field as indicated in Geant
-  Int_t     fDebug;     // Debug flag
   static  Bool_t    fgReadField;  // Flag for reading the field from file (if available) 
-  ClassDef(AliMagF,2)  //Base class for all Alice MagField
+  ClassDef(AliMagF,3)  //Base class for all Alice MagField
 };
 
 #endif
index f424acae354e655611cdfa0577407b093eafbb98..bd00909e98a1d0e1abf66fbe5e329ac6517be1d8 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 
+#include "AliLog.h"
 #include "AliMagFC.h"
 
 ClassImp(AliMagFC)
@@ -64,8 +65,7 @@ void AliMagFC::Field(Float_t *x, Float_t *b) const
        b[2]*=fFactor;
     }
   } else {
-      printf("Invalid field map for constant field %d\n",fMap);
-      exit(1);
+      AliFatal(Form("Invalid field map for constant field %d",fMap));
   }
 }
 
index 903cc454bcaa29b694158b4449c608272ecffc40..8d808d4c52e28d02376947e9a860a3b75a197161 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "TVector.h"
 
+#include "AliLog.h"
 #include "AliMagFCM.h"
 
 ClassImp(AliMagFCM)
@@ -80,9 +81,9 @@ AliMagFCM::AliMagFCM(const char *name, const char *title, Int_t integ,
   fMap  = 2;
   SetSolenoidField();
 
-  if(fDebug>-1) Info("ctor",
-     "%s: Constant Mesh Field %s created: map= %d, factor= %f, file= %s\n",
-        ClassName(),fName.Data(), fMap, factor,fTitle.Data());
+  AliDebug(1, Form(
+     "Constant Mesh Field %s created: map= %d, factor= %f, file= %s",
+        fName.Data(), fMap, factor,fTitle.Data()));
 }
 
 //_______________________________________________________________________
@@ -194,7 +195,7 @@ void AliMagFCM::Field(Float_t *x, Float_t *b) const
        b[2] = -b[2];
        
       } else {
-       printf("Invalid field map for constant mesh %d\n",fMap);
+       AliError(Form("Invalid field map for constant mesh %d",fMap));
       }
     } else {
 //This is the ZDC part
@@ -219,15 +220,15 @@ void AliMagFCM::ReadField()
   Int_t ix, iy, iz, ipx, ipy, ipz;
   Float_t bx, by, bz;
   char *fname;
-  if(fDebug) printf("%s: Reading Magnetic Field %s from file %s\n",ClassName(),fName.Data(),fTitle.Data());
+  AliDebug(1,Form("Reading Magnetic Field %s from file %s",fName.Data(),fTitle.Data()));
   fname = gSystem->ExpandPathName(fTitle.Data());
   magfile=fopen(fname,"r");
   delete [] fname;
   if (magfile) {
     fscanf(magfile,"%d %d %d %f %f %f %f %f %f",
           &fXn, &fYn, &fZn, &fXdel, &fYdel, &fZdel, &fXbeg, &fYbeg, &fZbeg);
-    if(fDebug>1) printf("%s: fXn %d, fYn %d, fZn %d, fXdel %f, fYdel %f, fZdel %f, fXbeg %f, fYbeg %f, fZbeg %f\n",
-                       ClassName(),fXn, fYn, fZn, fXdel, fYdel, fZdel, fXbeg, fYbeg, fZbeg);
+    AliDebug(2,Form("fXn %d, fYn %d, fZn %d, fXdel %f, fYdel %f, fZdel %f, fXbeg %f, fYbeg %f, fZbeg %f",
+                       fXn, fYn, fZn, fXdel, fYdel, fZdel, fXbeg, fYbeg, fZbeg));
     fXdeli=1./fXdel;
     fYdeli=1./fYdel;
     fZdeli=1./fZdel;
@@ -246,8 +247,7 @@ void AliMagFCM::ReadField()
       }
     }
   } else { 
-    printf("%s: File %s not found !\n",ClassName(),fTitle.Data());
-    exit(1);
+    AliFatal(Form("File %s not found !",fTitle.Data()));
   }
 }
 
@@ -257,6 +257,6 @@ void AliMagFCM::Copy(TObject & /* magf */) const
   //
   // Copy *this onto magf -- Not implemented
   //
-  Fatal("Copy","Not implemented!\n");
+  AliFatal("Not implemented!");
 }
 
index 269ce397f3d8db5bdb59658ce099dfe4bff04494..eac15e857f36e39788a211fac2ce74cbc3b7e85c 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "TSystem.h"
 
+#include "AliLog.h"
 #include "AliMagFDM.h"
 
 ClassImp(AliMagFDM)
@@ -99,9 +100,9 @@ AliMagFDM::AliMagFDM(const char *name, const char *title, Int_t integ,
   fMap  = 3;
   SetSolenoidField();
   
-  Info("ctor",
-       "Field Map for Muon Arm from IP till muon filter %s created: map= %d, integ= %d, factor= %f, file=%s\n",
-       fName.Data(), fMap ,integ,factor,fTitle.Data());
+  AliDebug(1, Form(
+       "Field Map for Muon Arm from IP till muon filter %s created: map= %d, integ= %d, factor= %f, file=%s",
+       fName.Data(), fMap ,integ,factor,fTitle.Data()));
  
 }
 
@@ -202,7 +203,7 @@ if ((kfZbg/100<xL3[2] && xL3[2]<=zCmin && r0<=rPmax) || ((zCmin<xL3[2] && xL3[2]
        cphi=TMath::Abs(yyp/r0);
        Int_t kcphi=0;
        if (cphi > kone) {
-        printf("xL3[0] %e, xL3[1] %e, xL3[2] %e, yyp %e, r0 %e, cphi %e\n",xL3[0],xL3[1],xL3[2],yyp,r0,cphi);
+        AliDebug(2,Form("xL3[0] %e, xL3[1] %e, xL3[2] %e, yyp %e, r0 %e, cphi %e",xL3[0],xL3[1],xL3[2],yyp,r0,cphi));
         cphi =kone;
         kcphi=777;
        } 
@@ -212,7 +213,7 @@ if ((kfZbg/100<xL3[2] && xL3[2]<=zCmin && r0<=rPmax) || ((zCmin<xL3[2] && xL3[2]
        if (xL3[0] > 0 && yyp < 0 ) {ph0=kPI2 - ph0;}  
        if (ph0 > kPI2) {       ph0=ph0 - kPI2;}
        if (kcphi==777) {
-        printf("xL3[0] %e, xL3[1] %e, xL3[2] %e, yyp %e, r0 %e, ph0 %e\n",xL3[0],xL3[1],xL3[2],yyp,r0,ph0);
+        AliDebug(2,Form("xL3[0] %e, xL3[1] %e, xL3[2] %e, yyp %e, r0 %e, ph0 %e",xL3[0],xL3[1],xL3[2],yyp,r0,ph0));
        }  
        fip=ph0; 
        mp0=FZ(fip,fPhi,fPhid ,mpi,fPhin);
@@ -298,7 +299,7 @@ if ((kfZbg/100<xL3[2] && xL3[2]<=zCmin && r0<=rPmax) || ((zCmin<xL3[2] && xL3[2]
    if(xL3[0]<(xx1+m0*dx) || xL3[0] >(xx1+(m0+1)*dx)) 
     {
       m0=m0+1;   
-      printf(" m0 %d, m0+1 %d\n",m0,m0+1);  
+      AliDebug(2,Form(" m0 %d, m0+1 %d\n",m0,m0+1));  
     }
 
    x2=(xL3[0]-( xx1+m0*dx))/dx;
@@ -318,7 +319,7 @@ if ((kfZbg/100<xL3[2] && xL3[2]<=zCmin && r0<=rPmax) || ((zCmin<xL3[2] && xL3[2]
 
 
   } else {
-        printf("Unknown map of Dipole region %d\n",fMap);
+        AliError(Form("Unknown map of Dipole region %d",fMap));
  }
            
 } else {
@@ -404,7 +405,7 @@ Double_t AliMagFDM::Ba(Int_t kaai,Double_t zaa1, Double_t zaa2,
     fa23 = fBpz[kaa+1][0][maa+1]; 
     break;
   default:
-    Fatal("Ba","Invalid value of kaai %d\n",kaai);
+    AliFatal(Form("Invalid value of kaai %d",kaai));
   }                            
   faY1=alf1*fa11+alf2*fa12+alf3*fa13;
   faY2=alf1*fa21+alf2*fa22+alf3*fa23;
@@ -504,7 +505,7 @@ Double_t AliMagFDM::Bb(Double_t z1,Double_t z2, Double_t y1,Double_t y2,
     break;
 
   default:
-    Fatal("Bb","Invalid value of kv %d\n",kv);
+    AliFatal(Form("Invalid value of kv %d",kv));
   }  
   
   
@@ -537,12 +538,12 @@ void AliMagFDM::ReadField()
   Float_t zz, yy, bx,by,bz,bb;
 
   char *fname;
-  printf("Reading Magnetic Field %s from file %s\n",fName.Data(),fTitle.Data());
+  AliDebug(1,Form("Reading Magnetic Field %s from file %s",fName.Data(),fTitle.Data()));
   fname = gSystem->ExpandPathName(fTitle.Data());
   magfile=fopen(fname,"r");
   delete [] fname;
 
-  printf("Cartensian part\n");
+  AliDebug(2,"Cartensian part");
  
   if (magfile) {
   
@@ -550,7 +551,7 @@ void AliMagFDM::ReadField()
  
     fscanf(magfile,"%d %d %d ",&fYl, &fXl, &fZl); 
     
-    printf("fYl %d, fXl %d, fZl %d\n",fYl, fXl, fZl);     
+    AliDebug(3,Form("fYl %d, fXl %d, fZl %d",fYl, fXl, fZl));     
     
     for (ik=0; ik<fZl; ik++)
     { 
@@ -568,14 +569,14 @@ void AliMagFDM::ReadField()
     } 
     for (ik=0; ik<81; ik++)
     {    
-           printf("fZc %e,fY %e\n", fZc[ik],fY[ik]); 
+           AliDebug(4,Form("fZc %e,fY %e", fZc[ik],fY[ik])); 
     }   
              
     fscanf(magfile," %e %e %e %e %e %e %e %e %e %e %e ", &fYdel,&fXdel,&fZdel,&fZmax,&fZmin,&fYmax,&fYmin,&fAx1,&fCx1,&fAx2,&fCx2); 
 
-printf("fYdel %e, fXdel %e, fZdel %e\n",fYdel,fXdel,fZdel);
-printf("fZmax %e, fZmin %e, fYmax %e,fYmin %e\n",fZmax,fZmin,fYmax,fYmin);
-printf("fAx1 %e, fCx1 %e, fAx2 %e, fCx %e\n",fAx1,fCx1,fAx2,fCx2);
+AliDebug(3,Form("fYdel %e, fXdel %e, fZdel %e",fYdel,fXdel,fZdel));
+AliDebug(3,Form("fZmax %e, fZmin %e, fYmax %e,fYmin %e",fZmax,fZmin,fYmax,fYmin));
+AliDebug(3,Form("fAx1 %e, fCx1 %e, fAx2 %e, fCx %e",fAx1,fCx1,fAx2,fCx2));
 
     for (il=0; il<44; il++)  { 
      for (im=0; im<81; im++)  {      
@@ -608,40 +609,40 @@ printf("fAx1 %e, fCx1 %e, fAx2 %e, fCx %e\n",fAx1,fCx1,fAx2,fCx2);
     } 
 //----------------------   Polar part ---------------------------------
 
-    printf("Polar part\n");
+    AliDebug(2,"Polar part");
     fscanf(magfile,"%d %d %d ", &fZpl, &fRn, &fPhin); 
-    printf("fZpl %d, fRn %d, fPhin %d\n",fZpl,fRn,fPhin);   
+    AliDebug(3,Form("fZpl %d, fRn %d, fPhin %d",fZpl,fRn,fPhin));   
 
-    printf(" fZp array\n"); 
+    AliDebug(4," fZp array"); 
      
     for (ik=0; ik<51; ik++) 
     {    
      fscanf(magfile, " %e ", &zzp);
      fZp[ik]=zzp; 
-     printf(" %e\n",fZp[ik]);      
+     AliDebug(4,Form(" %e",fZp[ik]));      
     } 
   
-    printf(" fR array\n"); 
+    AliDebug(4," fR array"); 
          
     for (ik=0; ik<10; ik++) 
     {    
      fscanf(magfile, " %e ", &rr); 
      fR[ik]=rr;
-     printf(" %e\n",fR[ik]);
+     AliDebug(4,Form(" %e",fR[ik]));
     } 
     
-//    printf("fPhi array\n"); 
+//    AliDebug(4,"fPhi array"); 
      
      for (il=0; il<33; il++)  
      {
        fscanf(magfile, " %e ", &phii); 
        fPhi[il]=phii; 
-//        printf(" %e\n",fPhi[il]);          
+//        AliDebug(4,Form(" %e",fPhi[il]));          
      }
 
     fscanf(magfile," %e %e %e %e %e %e %e ",&fZpdl,&fPhid,&fRdel,&fZpmx,&fZpmn,&fRmax, &fRmin); 
 
-printf("fZpdl %e, fPhid %e, fRdel %e, fZpmx %e, fZpmn %e,fRmax %e,fRmin %e \n", fZpdl,fPhid, fRdel,fZpmx, fZpmn,fRmax, fRmin);
+AliDebug(3,Form("fZpdl %e, fPhid %e, fRdel %e, fZpmx %e, fZpmn %e,fRmax %e,fRmin %e", fZpdl,fPhid, fRdel,fZpmx, fZpmn,fRmax, fRmin));
 
                       
     for (il=0; il<33; il++)  { 
@@ -683,6 +684,6 @@ printf("fZpdl %e, fPhid %e, fRdel %e, fZpmx %e, fZpmn %e,fRmax %e,fRmin %e \n",
     }
 //
   } else { 
-    Fatal("ReadField","File %s not found !\n",fTitle.Data());
+    AliFatal(Form("File %s not found !",fTitle.Data()));
   }
 }
index f8eb71ebf662bff657b5d796a9b75af8c3dbf568..1c78a65184dc4e136d9d02b5134d7d8dcb78d4ff 100644 (file)
@@ -25,6 +25,7 @@
 #include <TFile.h>
 #include <TSystem.h>
 
+#include "AliLog.h"
 #include "AliFieldMap.h"
 #include "AliMagFMaps.h"
 
@@ -239,7 +240,7 @@ void AliMagFMaps::Copy(TObject & /* magf */) const
   //
   // Copy *this onto magf -- Not implemented
   //
-  Fatal("Copy","Not implemented!\n");
+  AliFatal("Not implemented!");
 }
 
 //_______________________________________________________________________
index 83a1bd8e785e039b155675a90d4f3f7ec4619386..ec170f6b3cf716669474e8e9f7ed8662814de50c 100644 (file)
@@ -41,6 +41,7 @@
 #include <TDirectory.h>
 #include <TVirtualMC.h>
 
+#include "AliLog.h"
 #include "AliConfig.h"
 #include "AliLoader.h"
 #include "AliMagF.h"
@@ -63,7 +64,6 @@ AliModule::AliModule():
   fActive(0),
   fHistograms(0),
   fNodes(0),
-  fDebug(0),
   fEnable(1),
   fTrackReferences(0),
   fMaxIterTrackRef(0),
@@ -87,7 +87,6 @@ AliModule::AliModule(const char* name,const char *title):
   fActive(0),
   fHistograms(new TList()),
   fNodes(new TList()),
-  fDebug(0),
   fEnable(1),
   fTrackReferences(new TClonesArray("AliTrackReference", 100)),
   fMaxIterTrackRef(0),
@@ -103,7 +102,7 @@ AliModule::AliModule(const char* name,const char *title):
   Int_t id = gAlice->GetModuleID(name);
   if (id>=0) {
     // Module already added !
-     Warning("Ctor","Module: %s already present at %d\n",name,id);
+     AliWarning(Form("Module: %s already present at %d",name,id));
      return;
   }
   //
@@ -116,9 +115,6 @@ AliModule::AliModule(const char* name,const char *title):
   // Clear space for tracking media and material indexes
 
   for(Int_t i=0;i<100;i++) (*fIdmate)[i]=(*fIdtmed)[i]=0;
-
-    
-  SetDebug(gAlice->GetDebug());
 }
  
 //_______________________________________________________________________
@@ -136,7 +132,6 @@ AliModule::AliModule(const AliModule &mod):
   fActive(0),
   fHistograms(0),
   fNodes(0),
-  fDebug(0),
   fEnable(0),
   fTrackReferences(0),
   fMaxIterTrackRef(0),
@@ -191,7 +186,7 @@ void AliModule::Copy(TObject & /* mod */) const
   //
   // Copy *this onto mod, not implemented for AliModule
   //
-  Fatal("Copy","Not implemented!\n");
+  AliFatal("Not implemented!");
 }
 
 //_______________________________________________________________________
@@ -427,7 +422,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
   lun=fopen(filtmp,"r");
   delete [] filtmp;
   if(!lun) {
-    Error("ReadEuclid","Could not open file %s\n",filnam);
+    AliError(Form("Could not open file %s",filnam));
     return;
   }
   //* --- definition of rotation matrix 0 ---  
@@ -446,7 +441,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
   if (!strcmp(key,"TMED")) {
     sscanf(&card[5],"%d '%[^']'",&itmed,natmed);
     if( itmed<0 || itmed>=100 ) {
-      Error("ReadEuclid","TMED illegal medium number %d for %s\n",itmed,natmed);
+      AliError(Form("TMED illegal medium number %d for %s",itmed,natmed));
       exit(1);
     }
     //Pad the string with blanks
@@ -456,7 +451,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
     natmed[i]='\0';
     //
     if( idtmed[itmed]<=0 ) {
-      Error("ReadEuclid","TMED undefined medium number %d for %s\n",itmed,natmed);
+      AliError(Form("TMED undefined medium number %d for %s",itmed,natmed));
       exit(1);
     }
     gMC->Gckmat(idtmed[itmed],natmed);
@@ -464,7 +459,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
   } else if (!strcmp(key,"ROTM")) {
     sscanf(&card[4],"%d %f %f %f %f %f %f",&irot,&teta1,&phi1,&teta2,&phi2,&teta3,&phi3);
     if( irot<=0 || irot>=kMaxRot ) {
-      Error("ReadEuclid","ROTM rotation matrix number %d illegal\n",irot);
+      AliError(Form("ROTM rotation matrix number %d illegal",irot));
       exit(1);
     }
     AliMatrix(idrot[irot],teta1,phi1,teta2,phi2,teta3,phi3);
@@ -540,26 +535,26 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
   flag=0;
   for(i=1;i<=nvol;i++) {
     if (istop[i] && flag) {
-      Warning("ReadEuclid"," %s is another possible top volume\n",volst[i]);
+      AliWarning(Form(" %s is another possible top volume",volst[i]));
     }
     if (istop[i] && !flag) {
       strcpy(topvol,volst[i]);
-      if(fDebug) printf("%s::ReadEuclid: volume %s taken as a top volume\n",ClassName(),topvol);
+      AliDebug(2, Form("volume %s taken as a top volume",topvol));
       flag=1;
     }
   }
   if (!flag) {
-    Warning("ReadEuclid","top volume not found\n");
+    AliWarning("top volume not found");
   }
   fclose (lun);
   //*
   //*     commented out only for the not cernlib version
-  if(fDebug) printf("%s::ReadEuclid: file: %s is now read in\n",ClassName(),filnam);
+  AliDebug(1, Form("file: %s is now read in",filnam));
   //
   return;
   //*
   L20:
-  Error("ReadEuclid","reading error or premature end of file\n");
+  AliError("reading error or premature end of file");
 }
 
 //_______________________________________________________________________
@@ -592,12 +587,12 @@ void AliModule::ReadEuclidMedia(const char* filnam)
   }
   //
   // *** The input filnam name will be with extension '.euc'
-  if(fDebug) printf("%s::ReadEuclid: The file name is %s\n",ClassName(),filnam); //Debug
+  AliDebug(1, Form("The file name is %s",filnam)); //Debug
   filtmp=gSystem->ExpandPathName(filnam);
   lun=fopen(filtmp,"r");
   delete [] filtmp;
   if(!lun) {
-    Warning("ReadEuclidMedia","Could not open file %s\n",filnam);
+    AliWarning(Form("Could not open file %s",filnam));
     return;
   }
   //
@@ -647,13 +642,12 @@ void AliModule::ReadEuclidMedia(const char* filnam)
   fclose (lun);
   //*
   //*     commented out only for the not cernlib version
-  if(fDebug) printf("%s::ReadEuclidMedia: file %s is now read in\n",
-       ClassName(),filnam);
+  AliDebug(1, Form("file %s is now read in",filnam));
   //*
   return;
   //*
  L20:
-  Warning("ReadEuclidMedia","reading error or premature end of file\n");
+  AliWarning("reading error or premature end of file");
 } 
 
 //_______________________________________________________________________
@@ -694,7 +688,7 @@ AliTrackReference* AliModule::FirstTrackReference(Int_t track)
   if(track>=0) 
    {
      if (fRunLoader == 0x0)
-       Fatal("FirstTrackReference","AliRunLoader not initialized. Can not proceed");
+       AliFatal("AliRunLoader not initialized. Can not proceed");
      fRunLoader->GetAliRun()->GetMCApp()->ResetTrackReferences();
      fRunLoader->TreeTR()->GetEvent(track);
    }
@@ -717,7 +711,7 @@ AliTrackReference* AliModule::NextTrackReference()
     else        
       return 0;
   } else {
-    printf("* AliModule::NextTrackReference * TrackReference  Iterator called without calling FistTrackReference before\n");
+    AliWarning("Iterator called without calling FistTrackReference before");
     return 0;
   }
 }
@@ -759,17 +753,14 @@ void AliModule::SetTreeAddress()
      branch = treeTR->GetBranch(GetName());
     if (branch) 
      {
-       if(GetDebug()) 
-         Info("SetTreeAddress","(%s) Setting for TrackRefs",GetName());
+       AliDebug(3, Form("(%s) Setting for TrackRefs",GetName()));
        branch->SetAddress(&fTrackReferences);
      }
     else
      { 
      //can be called before MakeBranch and than does not make sense to issue the warning
-       if(GetDebug()) 
-         Warning("SetTreeAddress",
-                 "(%s) Failed for Track References. Can not find branch in tree.",
-                 GetName());
+       AliDebug(1, Form("(%s) Failed for Track References. Can not find branch in tree.",
+                 GetName()));
      }
   }
 }
@@ -779,7 +770,7 @@ void  AliModule::AddTrackReference(Int_t label){
   //
   // add a trackrefernce to the list
   if (!fTrackReferences) {
-    cerr<<"Container trackrefernce not active\n";
+    AliError("Container trackrefernce not active");
     return;
   }
   Int_t nref = fTrackReferences->GetEntriesFast();
@@ -794,14 +785,14 @@ void AliModule::MakeBranchTR(Option_t */*option*/)
     //
     // Makes branch in treeTR
     //  
-  if(GetDebug()) Info("MakeBranchTR","Making Track Refs. Branch for %s",GetName());
+  AliDebug(2,Form("Making Track Refs. Branch for %s",GetName()));
   TTree * tree = TreeTR();
   if (fTrackReferences && tree) 
    {
       TBranch *branch = tree->GetBranch(GetName());
      if (branch) 
        {  
-        if(GetDebug()) Info("MakeBranch","Branch %s is already in tree.",GetName());
+        AliDebug(2,Form("Branch %s is already in tree.",GetName()));
         return;
        }
   
@@ -809,9 +800,8 @@ void AliModule::MakeBranchTR(Option_t */*option*/)
    }
   else
     {
-      if(GetDebug()) 
-       Info("MakeBranchTR","FAILED for %s: tree=%#x fTrackReferences=%#x",
-            GetName(),tree,fTrackReferences);
+      AliDebug(2,Form("FAILED for %s: tree=%#x fTrackReferences=%#x",
+            GetName(),tree,fTrackReferences));
     }
 }
 
@@ -823,7 +813,7 @@ TTree* AliModule::TreeTR()
   //
   if ( fRunLoader == 0x0)
    {
-     Error("TreeTR","Can not get the run loader");
+     AliError("Can not get the run loader");
      return 0x0;
    }
 
@@ -838,7 +828,7 @@ void AliModule::Digits2Raw()
 // This is a dummy version that just copies the digits file contents
 // to a raw data file.
 
-  Warning("Digits2Raw", "Dummy version called for %s", GetName());
+  AliWarning(Form("Dummy version called for %s", GetName()));
 
   const Int_t kNDetectors = 17;
   const char* kDetectors[kNDetectors] = {"TPC", "ITSSPD", "ITSSDD", "ITSSSD", "TRD", "TOF", "PHOS", "RICH", "EMCAL", "MUON", "MUTR", "ZDC", "PMD", "START", "VZERO", "CRT", "FMD"};
@@ -879,3 +869,11 @@ void AliModule::Digits2Raw()
   digitsFile.close();
   delete[] buffer;
 }
+
+
+//_____________________________________________________________________________
+Int_t AliModule::GetDebug() const
+{
+  AliWarning("Don't use this method any more, use AliDebug instead");
+  return fDebug;
+}
index 1ad60fcc7de6590cb2ebe129effe2a8774950abf..c63afafb0e9bf59bd543d60138f7ecb6be967994 100644 (file)
@@ -59,8 +59,7 @@ public:
   virtual  Bool_t        IsFolder() const {return kTRUE;}
   virtual  Int_t&        LoMedium() {return fLoMedium;}
   virtual  Int_t&        HiMedium() {return fHiMedium;}
-  virtual  Int_t         GetDebug() const {return fDebug;}
-  virtual  void          SetDebug(Int_t deb=0) {fDebug=deb;}
+  virtual  Int_t         GetDebug() const;
 
   // Module composition
   virtual void AliMaterial(Int_t imat, const char* name, Float_t a, 
index 635d0f3580a41c1deedda5da2d0ea99506d2d481..5ce2a4681cceb850dafd491f521d9ac52f9ab62d 100644 (file)
@@ -455,7 +455,6 @@ Bool_t AliReconstruction::RunVertexFinder(AliESD*& esd)
 
   if (fITSVertexer) {
     AliInfo("running the ITS vertex finder");
-    fITSVertexer->SetDebug(1);
     vertex = fITSVertexer->FindVertexForCurrentEvent(fRunLoader->GetEventNumber());
     if(!vertex){
       AliWarning("Vertex not found");
index 114a66482ae875cb28de7c2ad4e538b2bcf2f6f1..027c19b811c3b248c080328282ab5c344df19c81 100644 (file)
@@ -97,6 +97,7 @@ class TList;
 
 // AliROOT includes
 
+#include "AliLog.h"
 #include "AliDigitizer.h"
 #include "AliHeader.h"
 #include "AliLoader.h"
@@ -127,8 +128,7 @@ AliRunDigitizer::AliRunDigitizer(): TTask("AliRunDigitizer","The manager for Mer
  fOutputInitialized(kFALSE),
  fCombi(0),
  fCombination(0),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
 {
   //
   // root requires default ctor, where no new objects can be created
@@ -152,8 +152,7 @@ AliRunDigitizer::AliRunDigitizer(Int_t nInputStreams, Int_t sperb):
  fOutputInitialized(kFALSE),
  fCombi(new AliMergeCombi(nInputStreams,sperb)),
  fCombination(MAXSTREAMSTOMERGE),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
 
 {
   //
@@ -162,7 +161,7 @@ AliRunDigitizer::AliRunDigitizer(Int_t nInputStreams, Int_t sperb):
   //
   if (nInputStreams == 0) 
    {//kidding
-    Fatal("AliRunDigitizer","Specify nr of input streams");
+    AliFatal("Specify nr of input streams");
     return;
    }
   Int_t i;
@@ -199,8 +198,7 @@ AliRunDigitizer::AliRunDigitizer(const AliRunDigitizer& dig):
  fOutputInitialized(kFALSE),
  fCombi(0),
  fCombination(0),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
 {
   //
   // Copy ctor
@@ -214,7 +212,7 @@ void AliRunDigitizer::Copy(TObject&) const
   //
   // Non implemented copy function
   //
-  Fatal("Copy","Not installed\n");
+  AliFatal("Not installed");
 }
 
 //_______________________________________________________________________
@@ -243,7 +241,7 @@ void AliRunDigitizer::SetInputStream(Int_t i, const char *inputFile, TString fol
 // Sets the name of the input file
 //
   if (i > fInputStreams->GetLast()) {
-    Error("SetInputStream","Input stream number too high");
+    AliError("Input stream number too high");
     return;
   }
   AliStream * stream = static_cast<AliStream*>(fInputStreams->At(i)) ; 
@@ -266,13 +264,13 @@ void AliRunDigitizer::Digitize(Option_t* option)
   
   if (!static_cast<AliStream*>(fInputStreams->At(0))->ImportgAlice()) 
    {
-     Error("Digitize","Error occured while getting gAlice from Input 0");
+     AliError("Error occured while getting gAlice from Input 0");
      return;
    }
     
   if (!InitGlobal()) //calls Init() for all (sub)digitizers
    {
-     Error("Digitize","InitGlobal returned error");
+     AliError("InitGlobal returned error");
      return;
    }
    
@@ -311,7 +309,7 @@ Bool_t AliRunDigitizer::ConnectInputTrees()
      } 
     else if (delta[i] != 0) 
      {
-      Error("ConnectInputTrees","Only delta 0 or 1 is implemented");
+      AliError("Only delta 0 or 1 is implemented");
       return kFALSE;
      }
    }
@@ -345,7 +343,7 @@ void AliRunDigitizer::SetOutputFile(TString fn)
   // not to the signal file here should be protection 
   //to avoid setting the same file as any input 
   //
-  Info("SetOutputFile","Setting Output File Name %s ",fn.Data());
+  AliInfo(Form("Setting Output File Name %s ",fn.Data()));
   fOutputFileName = fn;
   // InitOutputGlobal();
 }
@@ -365,17 +363,17 @@ Bool_t AliRunDigitizer::InitOutputGlobal()
     
     if (fOutRunLoader == 0x0)
      {
-       Error("InitOutputGlobal","Can not open ooutput");
+       AliError("Can not open output");
        return kFALSE;
      }
     Info("InitOutputGlobal", " 1 %s = ", GetInputFolderName(0).Data()) ; 
     AliRunLoader* inrl = AliRunLoader::GetRunLoader(GetInputFolderName(0));
     if (inrl == 0x0)
      {
-       Error("InitOutputGlobal","Can not get Run Loader Input 0. Maybe yet not initialized?");
+       AliError("Can not get Run Loader Input 0. Maybe yet not initialized?");
        return kFALSE;
      }
-    Info("InitOutputGlobal", " 2 %#x = ", inrl) ; 
+    AliDebug(2, Form(" 2 %#x = ", inrl)) ; 
 
     //Copy all detector loaders from input 0 to output
     const TObjArray* inloaders = inrl->GetArrayOfLoaders();
@@ -390,7 +388,7 @@ Bool_t AliRunDigitizer::InitOutputGlobal()
 
     fOutRunLoader->MakeTree("E");
     
-    if (GetDebug()>2)  Info("InitOutputGlobal","file %s was opened.",fOutputFileName.Data());
+    AliDebug(3,Form("file %s was opened.",fOutputFileName.Data()));
    }
   fOutputInitialized = kTRUE; 
   return kTRUE;
@@ -402,11 +400,8 @@ void AliRunDigitizer::InitEvent()
   //
   // redirects output properly
   //
-  if (GetDebug()>2)
-   {
-    Info("InitEvent","fEvent = %d",fEvent);
-    Info("InitEvent","fOutputFileName \"%s\"",fOutputFileName.Data());
-   }
+  AliDebug(3,Form("fEvent = %d",fEvent));
+  AliDebug(3,Form("fOutputFileName \"%s\"",fOutputFileName.Data()));
   if (fOutputInitialized == kFALSE) InitOutputGlobal();
   
   // if fOutputFileName was not given, write output to signal directory
@@ -421,7 +416,7 @@ void AliRunDigitizer::FinishEvent()
   
   if (GetOutRunLoader() == 0x0)
    {
-     Error("FinishEvent","fOutRunLoader is null");
+     AliError("fOutRunLoader is null");
      return;
    }
   
@@ -437,7 +432,7 @@ void AliRunDigitizer::FinishEvent()
      {
        inrl->LoadHeader();
        inheader = inrl->GetHeader();
-       if (inheader == 0x0) Fatal("FinishEvent","Can not get header from input 0");
+       if (inheader == 0x0) AliFatal("Can not get header from input 0");
      }
      
      outheader->SetNprimary(inheader->GetNprimary());
@@ -452,7 +447,7 @@ void AliRunDigitizer::FinishEvent()
    {
     //this is sensless since no information would be coherent in case of merging
     //
-    cout<<"Copy trees from input: Copy or link files manually"<<endl;
+    AliWarning("Copy trees from input: Copy or link files manually");
     return;
    }
 }
@@ -466,7 +461,7 @@ void AliRunDigitizer::FinishGlobal()
   //
   if (GetOutRunLoader() == 0x0)
    {
-     Error("FinishGlobal","Can not get RunLoader from Output Stream folder");
+     AliError("Can not get RunLoader from Output Stream folder");
      return;
    }
   GetOutRunLoader()->CdGAFile();
@@ -478,7 +473,7 @@ void AliRunDigitizer::FinishGlobal()
      TFolder* outfolder = fOutRunLoader->GetEventFolder();
      if (outfolder == 0x0)
      {
-       Error("FinishEvent","Can not get Event Folder");
+       AliError("Can not get Event Folder");
        return;
      }    
   
@@ -588,7 +583,7 @@ const TString& AliRunDigitizer::GetInputFolderName(Int_t i) const
   //
   AliStream* stream = dynamic_cast<AliStream*>(fInputStreams->At(i));
   if (stream == 0x0)
-    Fatal("GetInputFolderName","Can not get the input stream. Index = %d. Exiting",i);
+    AliFatal(Form("Can not get the input stream. Index = %d. Exiting",i));
   return stream->GetFolderName();
 }
 //_______________________________________________________________________
@@ -611,10 +606,7 @@ AliRunLoader* AliRunDigitizer::GetOutRunLoader()
   
   if ( fOutputFileName.IsNull() )
    {//guard that sombody calls it without settting file name
-    if (GetDebug()>0) {
-      Info("GetOutRunLoader", 
-          "Output file name is empty. Using Input 0 for output");
-    }
+    AliDebug(1,"Output file name is empty. Using Input 0 for output");
     return AliRunLoader::GetRunLoader(GetInputFolderName(0));
    }
 //  InitOutputGlobal();
index 49235596e2f989f4c9b5c95ef830101d1035c790..dcc9544e771e95e12e30403b78fc8e89b24ec35a 100644 (file)
@@ -97,9 +97,6 @@ public:
 // return TString with input file name  
   TString GetInputFileName(Int_t input, Int_t order) const;
   
-  Int_t     GetDebug() const {return fDebug;}
-  void      SetDebug(Int_t level) {fDebug = level;}
-
 private:
   void Copy(TObject& dig) const;
   Bool_t            ConnectInputTrees();
@@ -133,13 +130,12 @@ private:
   TArrayI           fCombination;         //! combination of events from
   TString           fCombinationFileName; // fn with combinations (used
                                           // with type 2 of comb.)
-  Int_t             fDebug;                //! specifies debug level, 0 is min
 
   AliRunLoader*     GetOutRunLoader();
   
   static const TString fgkDefOutFolderName;//default name for output foler 
   static const TString fgkBaseInFolderName;//default name for input foler
-  ClassDef(AliRunDigitizer,5)
+  ClassDef(AliRunDigitizer,6)
 };
 
 #endif // ALIRUNDIGITIZER_H
index 2d78b1661a5af985b24fbfebe2533b9748078c62..7658b123196efb466260cb0cd27b55c94c6df52f 100644 (file)
@@ -19,6 +19,7 @@
 #include <TFile.h>
 #include <TObjString.h>
 
+#include "AliLog.h"
 #include "AliLoader.h"
 #include "AliRun.h"
 #include "AliStream.h"
@@ -94,7 +95,7 @@ void AliStream::Copy(TObject &) const
   //
   // Copy function
   //
-  Fatal("Copy","Not implemented!");
+  AliFatal("Not implemented!");
 }
 //_______________________________________________________________________
 
@@ -118,9 +119,9 @@ Bool_t AliStream::NextEventInStream()
   AliRunLoader* currentloader = AliRunLoader::GetRunLoader(fEventFolderName);
   if (currentloader == 0x0) 
    {
-    Info("NextEventInStream",
+    AliDebug(1, Form(
          "Can not get RL from folder named %s. Attempting to open next file",
-         fEventFolderName.Data());
+         fEventFolderName.Data()));
     Int_t res = OpenNextFile();
     if ( res == 0) return kFALSE;
     currentloader = AliRunLoader::GetRunLoader(fEventFolderName);
@@ -130,7 +131,7 @@ Bool_t AliStream::NextEventInStream()
    {
     if (!OpenNextFile()) return kFALSE;
    }
-  Info("NextEventInStream","Trying to get event %d",fLastEventSerialNr+1);
+  AliDebug(1, Form("Trying to get event %d",fLastEventSerialNr+1));
   currentloader->GetEvent(++fLastEventSerialNr);
   return kTRUE;
 }
@@ -158,7 +159,7 @@ Bool_t AliStream::OpenNextFile()
   // Opens next file in the list
   //
   if (++fCurrentFileIndex > fFileNames->GetLast()) {
-    Error("OpenNextFile", "No more files in the stream") ;
+    AliInfo("No more files in the stream") ;
     return kFALSE;
   }
 
@@ -181,7 +182,7 @@ Bool_t AliStream::OpenNextFile()
   if (currentloader == 0x0) 
    {
 // cannot open file specified on input. Do not skip it silently.
-    Error("OpenNextFile", "Cannot open session ");
+    AliError("Cannot open session ");
     return kFALSE;
    }
    
@@ -192,7 +193,7 @@ Bool_t AliStream::OpenNextFile()
     Int_t res = currentloader->LoadHeader();
     if (res)
      {
-       Error("OpenNextFile","Problems with loading header");
+       AliError("Problems with loading header");
        return kFALSE;
      }
     fEvents = static_cast<Int_t>(currentloader->TreeE()->GetEntries());
index c4c9d48409ed3ab6e3a60a74a50f150cd91075fc..0888440e61f8fa89ed91295f8f1f1fe7228bcc44 100644 (file)
@@ -15,6 +15,7 @@
 
 /* $Id$ */
 
+#include "AliLog.h"
 #include <AliVertexer.h>
 
 ClassImp(AliVertexer)
@@ -31,7 +32,6 @@ AliVertexer::AliVertexer() {
   // Default Constructor
 
     fCurrentVertex  = 0;
-    SetDebug();
     SetFirstEvent(0);
     SetLastEvent(0);
 }
@@ -41,14 +41,14 @@ AliVertexer::AliVertexer() {
 AliVertexer::AliVertexer(const AliVertexer &vtxr) : TObject(vtxr) {
   // Copy constructor
   // Copies are not allowed. The method is protected to avoid misuse.
-  Error("AliVertexer","Copy constructor not allowed\n");
+  AliFatal("Copy constructor not allowed");
 }
 
 //______________________________________________________________________
 AliVertexer& AliVertexer::operator=(const AliVertexer& /* vtxr */){
   // Assignment operator
   // Assignment is not allowed. The method is protected to avoid misuse.
-  Error("= operator","Assignment operator not allowed\n");
+  AliFatal("Assignment operator not allowed");
   return *this;
 }
 
@@ -60,3 +60,10 @@ AliVertexer::~AliVertexer() {
 
     fCurrentVertex  = 0;
 }
+
+//______________________________________________________________________
+void AliVertexer::SetDebug(Int_t debug)
+{
+  AliWarning("Don't use this method any more, use AliDebug instead");
+  fDebug = debug;
+}
index 64afa9ef94e5826dc308b0e6ffa98eda37153e1d..40388ac196245b5a2c9ba2bd9864d3b264e3b233 100644 (file)
@@ -28,7 +28,7 @@ class AliVertexer : public TObject {
     // computes the vetex for each event and stores it on file
     virtual void FindVertices()= 0;
     virtual void PrintStatus() const = 0;
-    virtual void SetDebug(Int_t debug = 0){fDebug = debug;}
+    virtual void SetDebug(Int_t debug = 0);
     virtual void SetFirstEvent(Int_t ev){fFirstEvent = ev;}
     virtual void SetLastEvent(Int_t ev){fLastEvent = ev;}
     virtual void SetUseV2Clusters(Bool_t choice) = 0;