// --- Standard library ---
// --- AliRoot header files ---
-
+#include "AliLog.h"
#include "AliPHOSLoader.h"
#include "AliPHOS.h"
#include "AliPHOSHit.h"
Int_t retval = AliLoader::SetEvent();
if (retval)
{
- Error("SetEvent","AliLoader::SetEvent returned error");
+ AliError("returned error");
return retval;
}
retval = AliLoader::GetEvent();
if (retval)
{
- Error("GetEvent","AliLoader::GetEvent returned error");
+ AliError("returned error");
return retval;
}
if (res)
{//oops, error
- Error("LoadHits","AliLoader::LoadHits returned error");
+ AliError("returned error");
return res;
}
res = AliLoader::LoadSDigits(opt);
if (res)
{//oops, error
- Error("PostSDigits","AliLoader::LoadSDigits returned error");
+ AliError("returned error");
return res;
}
return ReadSDigits();
res = AliLoader::LoadDigits(opt);
if (res)
{//oops, error
- Error("LoadDigits","AliLoader::LoadDigits returned error");
+ AliError("returned error");
return res;
}
return ReadDigits();
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();
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();
res = AliLoader::LoadRecParticles(opt);
if (res)
{//oops, error
- Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
+ AliError("returned error");
return res;
}
return ReadRecParticles();
Int_t reval = AliLoader::PostHits();
if (reval)
{
- Error("PostHits","AliLoader:: returned error");
+ AliError("returned error");
return reval;
}
return ReadHits();
Int_t reval = AliLoader::PostSDigits();
if (reval)
{
- Error("PostSDigits","AliLoader::PostSDigits returned error");
+ AliError("returned error");
return reval;
}
return ReadSDigits();
Int_t reval = AliLoader::PostDigits();
if (reval)
{
- Error("PostDigits","AliLoader::PostDigits returned error");
+ AliError("returned error");
return reval;
}
return ReadDigits();
Int_t reval = AliLoader::PostRecPoints();
if (reval)
{
- Error("PostRecPoints","AliLoader::PostRecPoints returned error");
+ AliError("returned error");
return reval;
}
return ReadRecPoints();
Int_t reval = AliLoader::PostRecParticles();
if (reval)
{
- Error("PostRecParticles","AliLoader::PostRecParticles returned error");
+ AliError("returned error");
return reval;
}
return ReadRecParticles();
Int_t reval = AliLoader::PostTracks();
if (reval)
{
- Error("PostTracks","AliLoader::PostTracks returned error");
+ AliError("returned error");
return reval;
}
return ReadTracks();
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)
{
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;
}
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;
}
{
if (LoadHits())
{
- Error("Track","Can not load hits.");
+ AliError("Can not load hits.");
return;
}
}
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
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
{
//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;
}
//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;
}
{
// 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"));
}
/***************************************************************************************/
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 ;
}
}
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)) ;
}
//____________________________________________________________________________
// 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);
}
}