Skip to content

Commit 53c306a

Browse files
committed
cppcoreguidelines-pro-type-member-init
1 parent 4899e1e commit 53c306a

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ struct TableMakerMC {
177177

178178
OutputObj<THashList> fOutputList{"output"};
179179
OutputObj<TList> fStatsList{"Statistics"}; //! skimming statistics
180-
HistogramManager* fHistMan;
180+
HistogramManager* fHistMan = nullptr;
181181

182182
Configurable<bool> fIsRun2{"cfgIsRun2", false, "Whether we analyze Run-2 or Run-3 data"};
183183

@@ -250,18 +250,18 @@ struct TableMakerMC {
250250
Configurable<std::vector<std::string>> fModelNames{"cfgModelNames", std::vector<std::string>{"model.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"};
251251
} fConfigVariousOptions;
252252

253-
Service<o2::ccdb::BasicCCDBManager> fCCDB;
253+
Service<o2::ccdb::BasicCCDBManager> fCCDB{};
254254
o2::ccdb::CcdbApi fCCDBApi;
255255

256256
o2::parameters::GRPObject* fGrpMagRun2 = nullptr; // for run 2, we access the GRPObject from GLO/GRP/GRP
257257
o2::parameters::GRPMagField* fGrpMag = nullptr; // for run 3, we access GRPMagField from GLO/Config/GRPMagField
258258

259-
AnalysisCompositeCut* fEventCut; //! Event selection cut
259+
AnalysisCompositeCut* fEventCut = nullptr; //! Event selection cut
260260
std::vector<AnalysisCompositeCut*> fTrackCuts; //! Barrel track cuts
261261
std::vector<AnalysisCompositeCut*> fMuonCuts; //! Muon track cuts
262262

263263
bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true
264-
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
264+
int fCurrentRun = -1; // needed to detect if the run changed and trigger update of calibrations etc.
265265

266266
// list of MCsignal objects
267267
std::vector<MCSignal*> fMCSignals;
@@ -280,7 +280,7 @@ struct TableMakerMC {
280280

281281
o2::analysis::MlResponseMFTMuonMatch<float> matchingMlResponse;
282282
std::vector<double> binsPtMl;
283-
std::array<double, 1> cutValues;
283+
std::array<double, 1> cutValues{};
284284
std::vector<int> cutDirMl;
285285

286286
// RCT flag checker

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct TableMaker {
215215
OutputObj<THashList> fOutputList{"output"}; //! the histogram manager output list
216216
OutputObj<TList> fStatsList{"Statistics"}; //! skimming statistics
217217

218-
HistogramManager* fHistMan;
218+
HistogramManager* fHistMan = nullptr;
219219

220220
// Event and track AnalysisCut configurables
221221
struct : ConfigurableGroup {
@@ -320,18 +320,18 @@ struct TableMaker {
320320
Configurable<bool> fExcludeShort{"cfgTPCExcludeShort", true, "Exclude short term from long term occupancy (micro-seconds)"};
321321
} fConfigVariousOptions;
322322

323-
Service<o2::ccdb::BasicCCDBManager> fCCDB;
323+
Service<o2::ccdb::BasicCCDBManager> fCCDB{};
324324
o2::ccdb::CcdbApi fCCDBApi;
325325

326326
o2::parameters::GRPObject* fGrpMagRun2 = nullptr; // for run 2, we access the GRPObject from GLO/GRP/GRP
327327
o2::parameters::GRPMagField* fGrpMag = nullptr; // for run 3, we access GRPMagField from GLO/Config/GRPMagField
328328

329-
AnalysisCompositeCut* fEventCut; //! Event selection cut
329+
AnalysisCompositeCut* fEventCut = nullptr; //! Event selection cut
330330
std::vector<AnalysisCompositeCut*> fTrackCuts; //! Barrel track cuts
331331
std::vector<AnalysisCompositeCut*> fMuonCuts; //! Muon track cuts
332332

333333
bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true
334-
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
334+
int fCurrentRun = -1; // needed to detect if the run changed and trigger update of calibrations etc.
335335

336336
// maps used to store index info; NOTE: std::map are sorted in ascending order by default (needed for track to collision indices)
337337
std::map<uint32_t, uint32_t> fCollIndexMap; // key: old collision index, value: skimmed collision index
@@ -346,7 +346,7 @@ struct TableMaker {
346346

347347
o2::analysis::MlResponseMFTMuonMatch<float> matchingMlResponse;
348348
std::vector<double> binsPtMl;
349-
std::array<double, 1> cutValues;
349+
std::array<double, 1> cutValues{};
350350
std::vector<int> cutDirMl;
351351

352352
// RCT flag checker

0 commit comments

Comments
 (0)