Skip to content

Commit 0f16803

Browse files
author
Yuanjun Mei
committed
Remove unused headers and add default case to switch
1 parent b6bdff6 commit 0f16803

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <Framework/runDataProcessing.h>
3030

3131
#include <TCollection.h>
32-
#include <TColor.h>
3332
#include <TFile.h>
3433
#include <TGrid.h>
3534
#include <TH1.h>
@@ -38,7 +37,6 @@
3837
#include <TList.h>
3938
#include <TObject.h>
4039
#include <TString.h>
41-
#include <TStyle.h>
4240
#include <TSystem.h>
4341

4442
#include <Rtypes.h>
@@ -133,7 +131,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
133131
OutputObjSourceType::OutputObjSource};
134132

135133
// *) CCDB:
136-
Service<ccdb::BasicCCDBManager> ccdb; // support for offline callibration data base, not needed for the time being...
134+
Service<ccdb::BasicCCDBManager> ccdb{}; // support for offline callibration data base, not needed for the time being...
137135

138136
// *) Define configurables:
139137
Configurable<int> centralityEstimator{"centralityEstimator", 0, "centrality estimator: 0=FT0C, 1=FT0M, 2=FV0A, 3=NTPV"};
@@ -241,7 +239,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
241239
}
242240
} // while(objectIter = next())
243241

244-
return NULL;
242+
return nullptr;
245243
} // TObject* getObjectFromList(TList *list, char *objectName)
246244

247245
TH1D* getHistogramWithWeights(const char* filePath, const char* runNumber)
@@ -416,6 +414,9 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
416414
case ENTPV:
417415
thisCent = collision.centNTPV();
418416
break;
417+
default:
418+
LOG(warning) << "Unknown centrality estimator. Using FT0C as default.";
419+
break; // thisCent is already FT0C
419420
}
420421

421422
auto thisRefMult = collision.multTPC(); // use auto to determine the type
@@ -435,6 +436,9 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
435436
case EMultNTracksPV:
436437
thisRefMult = collision.multNTracksPV();
437438
break;
439+
default:
440+
LOG(warning) << "Unknown multiplicity. Using multTPC as default.";
441+
break; // thisRefMult is already multTPC
438442
}
439443

440444
if constexpr (rs == ERec || rs == ERecAndSim) {
@@ -569,6 +573,9 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
569573
case ENTPV:
570574
thisCent = collision.centNTPV();
571575
break;
576+
default:
577+
LOG(warning) << "Unknown centrality estimator. Using FT0C as default.";
578+
break; // thisCent is already FT0C
572579
}
573580
if constexpr (rs == ERecAndSim || rs == ESim) {
574581
if (!collision.has_mcCollision()) {

0 commit comments

Comments
 (0)