Skip to content

Commit 9b5efbe

Browse files
committed
PWGDQ:Fix Megalinter initialization issue
1 parent 802d723 commit 9b5efbe

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ struct AnalysisEventSelection {
338338

339339
std::map<int64_t, bool> fSelMap; // key: reduced event global index, value: event selection decision
340340
std::map<uint64_t, std::vector<int64_t>> fBCCollMap; // key: global BC, value: vector of reduced event global indices
341-
int fCurrentRun;
341+
int fCurrentRun = nullptr;
342342

343343
void init(o2::framework::InitContext& context)
344344
{
@@ -595,13 +595,13 @@ struct AnalysisTrackSelection {
595595
Service<o2::ccdb::BasicCCDBManager> fCCDB;
596596
Service<o2::pid::tof::TOFResponse> fTofResponse;
597597

598-
HistogramManager* fHistMan;
598+
HistogramManager* fHistMan = nullptr;
599599
std::vector<AnalysisCompositeCut*> fTrackCuts;
600600
std::vector<MCSignal*> fMCSignals; // list of signals to be checked
601601
std::vector<TString> fHistNamesReco;
602602
std::vector<TString> fHistNamesMCMatched;
603603

604-
int fCurrentRun; // current run (needed to detect run changes for loading CCDB parameters)
604+
int fCurrentRun = nullptr; // current run (needed to detect run changes for loading CCDB parameters)
605605

606606
std::map<int64_t, std::vector<int64_t>> fNAssocsInBunch; // key: track global index, value: vector of global index for events associated in-bunch (events that have in-bunch pileup or splitting)
607607
std::map<int64_t, std::vector<int64_t>> fNAssocsOutOfBunch; // key: track global index, value: vector of global index for events associated out-of-bunch (events that have no in-bunch pileup)
@@ -938,9 +938,9 @@ struct AnalysisPrefilterSelection {
938938
Configurable<bool> fPropTrack{"cfgPropTrack", false, "Propagate tracks to associated collision to recalculate DCA and momentum vector"};
939939

940940
std::map<uint32_t, uint32_t> fPrefilterMap;
941-
AnalysisCompositeCut* fPairCut;
942-
uint32_t fPrefilterMask;
943-
int fPrefilterCutBit;
941+
AnalysisCompositeCut* fPairCut = nullptr;
942+
uint32_t fPrefilterMask = nullptr;
943+
int fPrefilterCutBit = nullptr;
944944

945945
Preslice<aod::TrackAssoc> trackAssocsPerCollision = aod::track_association::collisionId;
946946

@@ -1206,14 +1206,14 @@ struct AnalysisSameEventPairing {
12061206
std::vector<AnalysisCut*> fMCGenAccCuts;
12071207
bool fUseMCGenAccCut = false;
12081208

1209-
uint32_t fTrackFilterMask; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream
1210-
uint32_t fMuonFilterMask; // mask for the muon cuts required in this task to be applied on the muon cuts produced upstream
1211-
int fNCutsBarrel;
1212-
int fNCutsMuon;
1213-
int fNPairCuts;
1209+
uint32_t fTrackFilterMask = nullptr; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream
1210+
uint32_t fMuonFilterMask = nullptr; // mask for the muon cuts required in this task to be applied on the muon cuts produced upstream
1211+
int fNCutsBarrel = nullptr;
1212+
int fNCutsMuon = nullptr;
1213+
int fNPairCuts = nullptr;
12141214
bool fHasTwoProngGenMCsignals = false;
12151215

1216-
bool fEnableBarrelHistos;
1216+
bool fEnableBarrelHistos = nullptr;
12171217
// bool fEnableMuonHistos;
12181218

12191219
Preslice<soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts, aod::Prefilter>> trackAssocsPerCollision = aod::track_association::collisionId;
@@ -2337,13 +2337,13 @@ struct AnalysisDileptonTrack {
23372337
Configurable<std::string> fConfigMCGenSignalHadronJSON{"cfgMCGenSignalHadronJSON", "", "generator level hadron signal (JSON format), used for MC level combinatorics"};
23382338
} fConfigMCOptions;
23392339

2340-
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
2341-
int fNCuts;
2342-
int fNLegCuts;
2343-
int fNPairCuts;
2344-
int fNCommonTrackCuts;
2340+
int fCurrentRun = nullptr; // needed to detect if the run changed and trigger update of calibrations etc.
2341+
int fNCuts = nullptr;
2342+
int fNLegCuts = nullptr;
2343+
int fNPairCuts = nullptr;
2344+
int fNCommonTrackCuts = nullptr;
23452345
std::map<int, int> fCommonTrackCutMap;
2346-
uint32_t fTrackCutBitMap; // track cut bit mask to be used in the selection of tracks associated with dileptons
2346+
uint32_t fTrackCutBitMap = nullptr; // track cut bit mask to be used in the selection of tracks associated with dileptons
23472347
// vector for single-lepton and track cut names for easy access when calling FillHistogramList()
23482348
std::vector<TString> fTrackCutNames;
23492349
std::vector<TString> fLegCutNames;
@@ -2360,14 +2360,14 @@ struct AnalysisDileptonTrack {
23602360
// Filter filterMuon = aod::dqanalysisflags::isMuonSelected > static_cast<uint32_t>(0);
23612361

23622362
// use two values array to avoid mixing up the quantities
2363-
float* fValuesDilepton;
2364-
float* fValuesHadron;
2365-
HistogramManager* fHistMan;
2363+
float* fValuesDilepton = nullptr;
2364+
float* fValuesHadron = nullptr;
2365+
HistogramManager* fHistMan = nullptr;
23662366

23672367
std::vector<MCSignal*> fRecMCSignals;
23682368
std::vector<MCSignal*> fGenMCSignals;
2369-
MCSignal* fDileptonLegSignal;
2370-
MCSignal* fHadronSignal;
2369+
MCSignal* fDileptonLegSignal = nullptr;
2370+
MCSignal* fHadronSignal = nullptr;
23712371

23722372
void init(o2::framework::InitContext& context)
23732373
{
@@ -2379,7 +2379,7 @@ struct AnalysisDileptonTrack {
23792379
bool isDummy = context.mOptions.get<bool>("processDummy");
23802380

23812381
if (isDummy) {
2382-
if (isBarrel || isMCGen /*|| isBarrelAsymmetric*/ /*|| isMuon*/) {
2382+
if (isBarrel || isMCGen) {
23832383
LOG(fatal) << "Dummy function is enabled even if there are normal process functions running! Fix your config!" << endl;
23842384
} else {
23852385
LOG(info) << "Dummy function is enabled. Skipping the rest of the init function" << endl;
@@ -2602,13 +2602,13 @@ struct AnalysisDileptonTrack {
26022602
fNLegCuts = fNCuts;
26032603

26042604
// loop over single lepton cuts
2605-
if (isBarrel /*|| isBarrelAsymmetric*/ /* || isMuon*/) {
2605+
if (isBarrel) {
26062606
for (int icut = 0; icut < fNLegCuts; ++icut) {
26072607

26082608
TString pairLegCutName;
26092609

26102610
// here we check that this cut is one of those used for building the dileptons
2611-
if (isBarrel /*|| isMuon*/) {
2611+
if (isBarrel) {
26122612
if (!cfgPairing_objArrayTrackCuts->FindObject(fTrackCutNames[icut].Data())) {
26132613
continue;
26142614
}

0 commit comments

Comments
 (0)