#include <TBrowser.h>
#include <TTree.h>
+#include "AliLog.h"
#include "AliConfig.h"
#include "AliDetector.h"
#include "AliHit.h"
//
//
// 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;
}
{
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;
}
//
// Copy *this onto det -- not implemented
//
- Fatal("Copy","Not implemented\n");
+ AliFatal("Not implemented");
}
//_______________________________________________________________________
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;
}
}
//
if (fHits == 0)
{
- Error("LoadPoints","fHits == 0. Name is %s",GetName());
+ AliError(Form("fHits == 0. Name is %s",GetName()));
return;
}
//
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])
{
//
// 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)
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()));
}
}
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
//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;
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;
}
// ROOT includes
// AliROOT includes
+#include "AliLog.h"
#include "AliDigitizer.h"
#include "AliRunDigitizer.h"
//_______________________________________________________________________
void AliDigitizer::Copy(TObject &) const
{
- Fatal("Copy","Not yet implemented\n");
+ AliFatal("Not yet implemented");
}
//_______________________________________________________________________
#include <TView.h>
#include <TVirtualX.h>
+#include "AliLog.h"
#include "AliDetector.h"
#include "AliDisplay.h"
#include "AliHeader.h"
//
// Copy *this onto disp -- not implemented
//
- Fatal("Copy","Not implemented~\n");
+ AliFatal("Not implemented");
}
//----------------------------------------------------------------------------
// 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;
}
}
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();
#include <TGenerator.h>
#include <TMCProcess.h>
+#include "AliLog.h"
#include "AliCollisionGeometry.h"
#include "AliConfig.h"
#include "AliGenerator.h"
// 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);
}
// 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);
}
//
// Copy *this onto gen
//
- Fatal("Copy","Not implemented!\n");
+ AliFatal("Not implemented!");
}
//_______________________________________________________________________
#include <stdio.h>
+#include "AliLog.h"
#include "AliHeader.h"
ClassImp(AliHeader)
//_______________________________________________________________________
void AliHeader::Copy(TObject&) const
{
- Fatal("Copy","Not implemented\n");
+ AliFatal("Not implemented");
}
// Author:
//----------------------------------------------------------------------
+#include "AliLog.h"
#include "AliMagF.h"
Bool_t AliMagF::fgReadField = kTRUE;
ClassImp(AliMagF)
fType(0),
fInteg(0),
fFactor(0),
- fMax(0),
- fDebug(0)
+ fMax(0)
{
//
// Default constructor
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;
}
//_______________________________________________________________________
//
// 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;
}
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
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
#include <stdlib.h>
+#include "AliLog.h"
#include "AliMagFC.h"
ClassImp(AliMagFC)
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));
}
}
#include "TVector.h"
+#include "AliLog.h"
#include "AliMagFCM.h"
ClassImp(AliMagFCM)
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()));
}
//_______________________________________________________________________
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
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;
}
}
} else {
- printf("%s: File %s not found !\n",ClassName(),fTitle.Data());
- exit(1);
+ AliFatal(Form("File %s not found !",fTitle.Data()));
}
}
//
// Copy *this onto magf -- Not implemented
//
- Fatal("Copy","Not implemented!\n");
+ AliFatal("Not implemented!");
}
#include "TSystem.h"
+#include "AliLog.h"
#include "AliMagFDM.h"
ClassImp(AliMagFDM)
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()));
}
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;
}
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);
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;
} else {
- printf("Unknown map of Dipole region %d\n",fMap);
+ AliError(Form("Unknown map of Dipole region %d",fMap));
}
} else {
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;
break;
default:
- Fatal("Bb","Invalid value of kv %d\n",kv);
+ AliFatal(Form("Invalid value of kv %d",kv));
}
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) {
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++)
{
}
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++) {
}
//---------------------- 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++) {
}
//
} else {
- Fatal("ReadField","File %s not found !\n",fTitle.Data());
+ AliFatal(Form("File %s not found !",fTitle.Data()));
}
}
#include <TFile.h>
#include <TSystem.h>
+#include "AliLog.h"
#include "AliFieldMap.h"
#include "AliMagFMaps.h"
//
// Copy *this onto magf -- Not implemented
//
- Fatal("Copy","Not implemented!\n");
+ AliFatal("Not implemented!");
}
//_______________________________________________________________________
#include <TDirectory.h>
#include <TVirtualMC.h>
+#include "AliLog.h"
#include "AliConfig.h"
#include "AliLoader.h"
#include "AliMagF.h"
fActive(0),
fHistograms(0),
fNodes(0),
- fDebug(0),
fEnable(1),
fTrackReferences(0),
fMaxIterTrackRef(0),
fActive(0),
fHistograms(new TList()),
fNodes(new TList()),
- fDebug(0),
fEnable(1),
fTrackReferences(new TClonesArray("AliTrackReference", 100)),
fMaxIterTrackRef(0),
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;
}
//
// Clear space for tracking media and material indexes
for(Int_t i=0;i<100;i++) (*fIdmate)[i]=(*fIdtmed)[i]=0;
-
-
- SetDebug(gAlice->GetDebug());
}
//_______________________________________________________________________
fActive(0),
fHistograms(0),
fNodes(0),
- fDebug(0),
fEnable(0),
fTrackReferences(0),
fMaxIterTrackRef(0),
//
// Copy *this onto mod, not implemented for AliModule
//
- Fatal("Copy","Not implemented!\n");
+ AliFatal("Not implemented!");
}
//_______________________________________________________________________
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 ---
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
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);
} 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);
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");
}
//_______________________________________________________________________
}
//
// *** 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;
}
//
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");
}
//_______________________________________________________________________
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);
}
else
return 0;
} else {
- printf("* AliModule::NextTrackReference * TrackReference Iterator called without calling FistTrackReference before\n");
+ AliWarning("Iterator called without calling FistTrackReference before");
return 0;
}
}
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()));
}
}
}
//
// 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();
//
// 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;
}
}
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));
}
}
//
if ( fRunLoader == 0x0)
{
- Error("TreeTR","Can not get the run loader");
+ AliError("Can not get the run loader");
return 0x0;
}
// 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"};
digitsFile.close();
delete[] buffer;
}
+
+
+//_____________________________________________________________________________
+Int_t AliModule::GetDebug() const
+{
+ AliWarning("Don't use this method any more, use AliDebug instead");
+ return fDebug;
+}
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,
if (fITSVertexer) {
AliInfo("running the ITS vertex finder");
- fITSVertexer->SetDebug(1);
vertex = fITSVertexer->FindVertexForCurrentEvent(fRunLoader->GetEventNumber());
if(!vertex){
AliWarning("Vertex not found");
// AliROOT includes
+#include "AliLog.h"
#include "AliDigitizer.h"
#include "AliHeader.h"
#include "AliLoader.h"
fOutputInitialized(kFALSE),
fCombi(0),
fCombination(0),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
{
//
// root requires default ctor, where no new objects can be created
fOutputInitialized(kFALSE),
fCombi(new AliMergeCombi(nInputStreams,sperb)),
fCombination(MAXSTREAMSTOMERGE),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
{
//
//
if (nInputStreams == 0)
{//kidding
- Fatal("AliRunDigitizer","Specify nr of input streams");
+ AliFatal("Specify nr of input streams");
return;
}
Int_t i;
fOutputInitialized(kFALSE),
fCombi(0),
fCombination(0),
- fCombinationFileName(0),
- fDebug(0)
+ fCombinationFileName(0)
{
//
// Copy ctor
//
// Non implemented copy function
//
- Fatal("Copy","Not installed\n");
+ AliFatal("Not installed");
}
//_______________________________________________________________________
// 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)) ;
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;
}
}
else if (delta[i] != 0)
{
- Error("ConnectInputTrees","Only delta 0 or 1 is implemented");
+ AliError("Only delta 0 or 1 is implemented");
return kFALSE;
}
}
// 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();
}
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();
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;
//
// 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
if (GetOutRunLoader() == 0x0)
{
- Error("FinishEvent","fOutRunLoader is null");
+ AliError("fOutRunLoader is null");
return;
}
{
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());
{
//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;
}
}
//
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();
TFolder* outfolder = fOutRunLoader->GetEventFolder();
if (outfolder == 0x0)
{
- Error("FinishEvent","Can not get Event Folder");
+ AliError("Can not get Event Folder");
return;
}
//
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();
}
//_______________________________________________________________________
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();
// 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();
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
#include <TFile.h>
#include <TObjString.h>
+#include "AliLog.h"
#include "AliLoader.h"
#include "AliRun.h"
#include "AliStream.h"
//
// Copy function
//
- Fatal("Copy","Not implemented!");
+ AliFatal("Not implemented!");
}
//_______________________________________________________________________
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);
{
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;
}
// 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;
}
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;
}
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());
/* $Id$ */
+#include "AliLog.h"
#include <AliVertexer.h>
ClassImp(AliVertexer)
// Default Constructor
fCurrentVertex = 0;
- SetDebug();
SetFirstEvent(0);
SetLastEvent(0);
}
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;
}
fCurrentVertex = 0;
}
+
+//______________________________________________________________________
+void AliVertexer::SetDebug(Int_t debug)
+{
+ AliWarning("Don't use this method any more, use AliDebug instead");
+ fDebug = debug;
+}
// 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;