From 766fe848f561a26cc3f1b556dd8f5d4748838139 Mon Sep 17 00:00:00 2001 From: cnkoster Date: Wed, 17 Jun 2026 15:30:11 +0200 Subject: [PATCH 1/4] Change new to unique_ptr --- PWGCF/Flow/TableProducer/zdcQVectors.cxx | 2 +- PWGCF/Flow/Tasks/flowSP.cxx | 44 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/PWGCF/Flow/TableProducer/zdcQVectors.cxx b/PWGCF/Flow/TableProducer/zdcQVectors.cxx index 4dfb2f8eba7..c646b410b5e 100644 --- a/PWGCF/Flow/TableProducer/zdcQVectors.cxx +++ b/PWGCF/Flow/TableProducer/zdcQVectors.cxx @@ -1138,7 +1138,7 @@ struct ZdcQVectors { double qYcShift = std::hypot(qRec[2], qRec[3]) * std::sin(psiZDCCshift); if (isSelected && cfgFillHistRegistry && !cfgFillNothing) { - fillCommonRegistry(qRec[0], qRec[1], qRec[2], qRec[3], v, centrality, rsTimestamp); + fillCommonRegistry(qXaShift, qYaShift, qXcShift, qYcShift, v, centrality, rsTimestamp); registry.fill(HIST("QA/centrality_after"), centrality); registry.get(HIST("QA/after/ZNA_Qx"))->Fill(Form("%d", runnumber), qXaShift); registry.get(HIST("QA/after/ZNA_Qy"))->Fill(Form("%d", runnumber), qYaShift); diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 4c2e03141bd..1e67f24220e 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -259,18 +259,18 @@ struct FlowSP { } spm; struct ptMaps { - TProfile* meanPTMap = new TProfile("meanPTMap", "meanPTMap", 8, -0.8, 0.8); - TProfile* meanPTMapPos = new TProfile("meanPTMapPos", "meanPTMapPos", 8, -0.8, 0.8); - TProfile* meanPTMapNeg = new TProfile("meanPTMapNeg", "meanPTMapNeg", 8, -0.8, 0.8); + std::unique_ptr meanPTMap = std::make_unique("meanPTMap", "meanPTMap", 8, -0.8, 0.8); + std::unique_ptr meanPTMapPos = std::make_unique("meanPTMapPos", "meanPTMapPos", 8, -0.8, 0.8); + std::unique_ptr meanPTMapNeg = std::make_unique("meanPTMapNeg", "meanPTMapNeg", 8, -0.8, 0.8); - TProfile* relPxA = new TProfile("relPxA", "relPxA", 8, -0.8, 0.8); - TProfile* relPxC = new TProfile("relPxC", "relPxC", 8, -0.8, 0.8); + std::unique_ptr relPxA = std::make_unique("relPxA", "relPxA", 8, -0.8, 0.8); + std::unique_ptr relPxC = std::make_unique("relPxC", "relPxC", 8, -0.8, 0.8); - TProfile* relPxANeg = new TProfile("relPxANeg", "relPxANeg", 8, -0.8, 0.8); - TProfile* relPxAPos = new TProfile("relPxAPos", "relPxAPos", 8, -0.8, 0.8); + std::unique_ptr relPxANeg = std::make_unique("relPxANeg", "relPxANeg", 8, -0.8, 0.8); + std::unique_ptr relPxAPos = std::make_unique("relPxAPos", "relPxAPos", 8, -0.8, 0.8); - TProfile* relPxCNeg = new TProfile("relPxCNeg", "relPxCNeg", 8, -0.8, 0.8); - TProfile* relPxCPos = new TProfile("relPxCPos", "relPxCPos", 8, -0.8, 0.8); + std::unique_ptr relPxCNeg = std::make_unique("relPxCNeg", "relPxCNeg", 8, -0.8, 0.8); + std::unique_ptr relPxCPos = std::make_unique("relPxCPos", "relPxCPos", 8, -0.8, 0.8); } ptmaps; OutputObj fWeights{GFWWeights("weights")}; @@ -281,13 +281,13 @@ struct FlowSP { HistogramRegistry histos{"QAhistos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; // Event selection cuts - TF1* fPhiCutLow = nullptr; - TF1* fPhiCutHigh = nullptr; - TF1* fMultPVCutLow = nullptr; - TF1* fMultPVCutHigh = nullptr; - TF1* fMultCutLow = nullptr; - TF1* fMultCutHigh = nullptr; - TF1* fMultMultPVCut = nullptr; + std::unique_ptr fPhiCutLow = nullptr; + std::unique_ptr fPhiCutHigh = nullptr; + std::unique_ptr fMultPVCutLow = nullptr; + std::unique_ptr fMultPVCutHigh = nullptr; + std::unique_ptr fMultCutLow = nullptr; + std::unique_ptr fMultCutHigh = nullptr; + std::unique_ptr fMultMultPVCut = nullptr; enum SelectionCriteria { evSel_FilteredEvent, @@ -694,10 +694,10 @@ struct FlowSP { } if (cfg.cEvSelsUseAdditionalEventCut) { - fMultPVCutLow = new TF1("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultPVCutHigh = new TF1("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultCutLow = new TF1("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); - fMultCutHigh = new TF1("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultPVCutLow = std::make_unique("fMultPVCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultPVCutHigh = std::make_unique("fMultPVCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultCutLow = std::make_unique("fMultCutLow", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); + fMultCutHigh = std::make_unique("fMultCutHigh", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100); std::vector paramsMultPVCut; std::vector paramsMultCut; @@ -756,8 +756,8 @@ struct FlowSP { } if (cfg.cTrackSelsUseAdditionalTrackCut) { - fPhiCutLow = new TF1("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); - fPhiCutHigh = new TF1("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); + fPhiCutLow = std::make_unique("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); + fPhiCutHigh = std::make_unique("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); } } // end of init From 0f83715d5c9c6b7e046d40653bf18f5aacb8a50b Mon Sep 17 00:00:00 2001 From: cnkoster Date: Wed, 17 Jun 2026 15:34:34 +0200 Subject: [PATCH 2/4] Fix case for struct warning --- PWGCF/Flow/Tasks/flowSP.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 1e67f24220e..78e1e87fbe0 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -258,7 +258,7 @@ struct FlowSP { double meanPxC = 0; } spm; - struct ptMaps { + struct PtMaps { std::unique_ptr meanPTMap = std::make_unique("meanPTMap", "meanPTMap", 8, -0.8, 0.8); std::unique_ptr meanPTMapPos = std::make_unique("meanPTMapPos", "meanPTMapPos", 8, -0.8, 0.8); std::unique_ptr meanPTMapNeg = std::make_unique("meanPTMapNeg", "meanPTMapNeg", 8, -0.8, 0.8); From 81a5bce958ef2d2abab40f824e0178006c6f12c7 Mon Sep 17 00:00:00 2001 From: cnkoster Date: Wed, 17 Jun 2026 15:42:16 +0200 Subject: [PATCH 3/4] include --- PWGCF/Flow/Tasks/flowSP.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 78e1e87fbe0..5590bb5345b 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -63,6 +63,7 @@ #include #include #include +#include using namespace o2; using namespace o2::framework; From ebc47beee979ceab6f9d04a9c7127dd612d94ad7 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 17 Jun 2026 13:43:06 +0000 Subject: [PATCH 4/4] Please consider the following formatting changes --- PWGCF/Flow/Tasks/flowSP.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Flow/Tasks/flowSP.cxx b/PWGCF/Flow/Tasks/flowSP.cxx index 5590bb5345b..29245794607 100644 --- a/PWGCF/Flow/Tasks/flowSP.cxx +++ b/PWGCF/Flow/Tasks/flowSP.cxx @@ -58,12 +58,12 @@ #include #include #include +#include #include #include #include #include #include -#include using namespace o2; using namespace o2::framework;