Replace Info, Error, Warning, Fatal by AliInfo, AliError, AliWarning, AliFatal.
#include <AliVVertex.h>
#include <AliEMCALGeometry.h>
#include <AliPHOSGeometry.h>
+#include <AliLog.h>
ClassImp(AliAnalysisTaskCaloCellsQA)
else if (det == kPHOS)
fCellsQA = new AliCaloCellsQA(nmods, AliCaloCellsQA::kPHOS);
else
- Fatal("AliAnalysisTaskCaloCellsQA::InitCellsQA", "Wrong detector provided");
+ AliFatal("Wrong detector provided");
if (outfile) fOutfile = outfile;
else
{
// Does the job for one event
+ // event
+ AliVEvent *event = InputEvent();
+ if (!event) {
+ AliWarning("Could not get event");
+ return;
+ }
+
+ fCellsQA->InitTransientFindCurrentRun(event->GetRunNumber());
+
// check geometry
if (fCellsQA->GetDetector() == AliCaloCellsQA::kEMCAL) {
if (!AliEMCALGeometry::GetInstance()) {
- Info("UserExec", "EMCAL geometry not initialized, initializing it for you");
+ AliInfo("EMCAL geometry not initialized, initializing it for you");
AliEMCALGeometry::GetInstance("EMCAL_COMPLETEV1");
}
} else {
if (!AliPHOSGeometry::GetInstance()) {
- Info("UserExec", "PHOS geometry not initialized, initializing it for you");
+ AliInfo("PHOS geometry not initialized, initializing it for you");
AliPHOSGeometry::GetInstance("IHEP");
}
}
- // event
- AliVEvent *event = InputEvent();
- if (!event) {
- Warning("AliAnalysisTaskCaloCellsQA::UserExec", "Could not get event");
- return;
- }
-
// pileup; FIXME: why AliVEvent does not allow a version without arguments?
if (fkAvoidPileup && event->IsPileupFromSPD(3,0.8,3.,2.,5.))
return;
cells = event->GetPHOSCells();
if (!cells) {
- Warning("AliAnalysisTaskCaloCellsQA::UserExec", "Could not get cells");
+ AliWarning("Could not get cells");
return;
}
// primary vertex
AliVVertex *vertex = (AliVVertex*) event->GetPrimaryVertex();
if (!vertex) {
- Warning("AliAnalysisTaskCaloCellsQA::UserExec", "Could not get primary vertex");
+ AliWarning("Could not get primary vertex");
return;
}
for (Int_t i = 0; i < event->GetNumberOfCaloClusters(); i++) {
AliVCluster *clus = event->GetCaloCluster(i);
if (!clus) {
- Warning("AliAnalysisTaskCaloCellsQA::UserExec", "Could not get cluster");
+ AliWarning("Could not get cluster");
return;
}
// check input (for design limitations only)
if (det != kEMCAL && det != kPHOS) {
- Error("AliCaloCellsQA::Init", "Wrong detector provided");
- Info("AliCaloCellsQA::Init", "I will use EMCAL");
+ AliError("Wrong detector provided");
+ AliInfo("I will use EMCAL");
det = kEMCAL;
}
if (nmods < 1 || nmods > 10) {
- Error("AliCaloCellsQA::Init", "Wrong last supermodule number + 1 provided");
- Info("AliCaloCellsQA::Init", "I will use nmods = 10");
+ AliError("Wrong last supermodule number + 1 provided");
+ AliInfo("I will use nmods = 10");
nmods = 10;
}
// ... or add a new run
if (fRI == fNRuns) {
- if (fNRuns >= 1000) Fatal("AliCaloCellsQA::FindCurrentRunIndex", "Too many runs, how is this possible?");
+ if (fNRuns >= 1000) AliFatal("Too many runs, how is this possible?");
fRunNumbers[fNRuns] = runNumber;
InitHistosForRun(runNumber);
// check for data corruption to avoid segfaults
if (sm < 0 || sm > 9) {
- Error("AliCaloCellsQA::GetSM", "Data corrupted");
+ AliError("Data corrupted");
return -1;
}
if (fDetector == kEMCAL) {
AliEMCALGeometry *geomEMCAL = AliEMCALGeometry::GetInstance();
if (!geomEMCAL)
- Fatal("AliCaloCellsQA::AbsIdToSMEtaPhi", "EMCAL geometry is not initialized");
+ AliFatal("EMCAL geometry is not initialized");
Int_t nModule, nIphi, nIeta;
geomEMCAL->GetCellIndex(absId, sm, nModule, nIphi, nIeta);
if (fDetector == kPHOS) {
AliPHOSGeometry *geomPHOS = AliPHOSGeometry::GetInstance();
if (!geomPHOS)
- Fatal("AliCaloCellsQA::AbsIdToSMEtaPhi", "PHOS geometry is not initialized");
+ AliFatal("PHOS geometry is not initialized");
Int_t relid[4];
geomPHOS->AbsToRelNumbering(absId, relid);
virtual void InitSummaryHistograms(Int_t nbins = 400, Double_t emax = 4.,
Int_t nbinsh = 100, Double_t emaxh = 300.,
Int_t nbinst = 250, Double_t tmin = 0.4e-6, Double_t tmax = 0.85e-6);
+ virtual void InitTransientFindCurrentRun(Int_t runNumber);
virtual void Fill(Int_t runNumber, TObjArray *clusArray, AliVCaloCells *cells, Double_t vertexXYZ[3]); // main method
// getters
protected:
virtual void Init(Int_t nmods, Int_t det, Int_t startRunNumber, Int_t endRunNumber);
- virtual void InitTransientFindCurrentRun(Int_t runNumber);
virtual void InitTransientMembers(Int_t run);
virtual void InitHistosForRun(Int_t run);