Skip to content

Commit f34f0db

Browse files
committed
[PWGCF] Satisfy include-cleaner on the v02 tasks.
1 parent f279b79 commit f34f0db

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

‎PWGCF/JCorran/Tasks/jV02DmesonAnalysis.cxx‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
#include <Framework/HistogramRegistry.h>
3939
#include <Framework/HistogramSpec.h>
4040
#include <Framework/InitContext.h>
41+
#include <Framework/OutputObjHeader.h>
4142
#include <Framework/runDataProcessing.h>
4243

4344
#include <TAxis.h>
4445
#include <TProfile2D.h>
4546

47+
#include <algorithm>
4648
#include <cmath>
4749
#include <cstdint>
4850
#include <random>
@@ -53,11 +55,6 @@
5355
using namespace o2;
5456
using namespace o2::framework;
5557

56-
#define V02_FILL_QA(NAME, STEP) \
57-
for (int qaBin = 1; qaBin <= (STEP); ++qaBin) { \
58-
histos.fill(HIST(NAME), static_cast<float>(qaBin)); \
59-
}
60-
6158
struct JV02DmesonAnalysis {
6259
enum Detector {
6360
kFT0C = 0,
@@ -286,7 +283,9 @@ struct JV02DmesonAnalysis {
286283
float cent = -1.f;
287284
float xy = 0.f;
288285
const int step = passedEventStep(collision, cent);
289-
V02_FILL_QA("hadron/hEventQa", step);
286+
for (int qaBin = 1; qaBin <= step; ++qaBin) {
287+
histos.fill(HIST("hadron/hEventQa"), static_cast<float>(qaBin));
288+
}
290289
const int cfId = cfCollisionIndex(refs);
291290
if (step < StepAccepted || cfId < 0 || !referenceProduct(collision, xy)) {
292291
return;
@@ -304,7 +303,7 @@ struct JV02DmesonAnalysis {
304303
histos.fill(HIST("hadron/Prof_XY_sub"), static_cast<float>(sample), cent, xy);
305304
const int nBins = mHadPtAxis->GetNbins();
306305
for (int ibin = 1; ibin <= nBins; ++ibin) {
307-
const float pt = static_cast<float>(mHadPtAxis->GetBinCenter(ibin));
306+
const auto pt = static_cast<float>(mHadPtAxis->GetBinCenter(ibin));
308307
const float z = mHadCounts[ibin - 1] / nch;
309308
histos.fill(HIST("hadron/Prof_Z"), cent, pt, z);
310309
histos.fill(HIST("hadron/Prof_XYZ"), cent, pt, xy * z);
@@ -319,7 +318,9 @@ struct JV02DmesonAnalysis {
319318
float cent = -1.f;
320319
float xy = 0.f;
321320
const int step = passedEventStep(collision, cent);
322-
V02_FILL_QA("D0/hEventQa", step);
321+
for (int qaBin = 1; qaBin <= step; ++qaBin) {
322+
histos.fill(HIST("D0/hEventQa"), static_cast<float>(qaBin));
323+
}
323324
const int cfId = cfCollisionIndex(refs);
324325
if (step < StepAccepted || cfId < 0 || !referenceProduct(collision, xy)) {
325326
return;
@@ -343,7 +344,7 @@ struct JV02DmesonAnalysis {
343344
}
344345
histos.fill(HIST("D0/hEventQa"), 6.f);
345346
const int sample = mSampleDist(mRng);
346-
const float sampleCoord = static_cast<float>(sample);
347+
const auto sampleCoord = static_cast<float>(sample);
347348
histos.fill(HIST("D0/hEvents"), cent);
348349
histos.fill(HIST("D0/Prof_XY"), cent, xy);
349350
histos.fill(HIST("D0/Prof_Nch"), cent, nch);

‎PWGCF/JCorran/Tasks/jV02DmesonToy.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#include <Framework/AlgorithmSpec.h>
3232
#include <Framework/AnalysisDataModel.h>
3333
#include <Framework/AnalysisHelpers.h>
34-
#include <Framework/AnalysisTask.h>
3534
#include <Framework/ControlService.h>
3635
#include <Framework/DataProcessorSpec.h>
36+
#include <Framework/ProcessingContext.h>
3737
#include <Framework/TableBuilder.h>
3838
#include <Framework/runDataProcessing.h>
3939

@@ -114,9 +114,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
114114
{
115115
return WorkflowSpec{
116116
DataProcessorSpec{
117-
"jv02-dmeson-toy",
118-
Inputs{},
119-
Outputs{
117+
.name = "jv02-dmeson-toy",
118+
.inputs = {},
119+
.outputs = {
120120
OutputForTable<aod::BCs>::spec(),
121121
OutputForTable<aod::Collisions>::spec(),
122122
OutputForTable<aod::EvSels>::spec(),
@@ -130,7 +130,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
130130
OutputSpec{"TFN", "TFNumber"},
131131
OutputSpec{"TFF", "TFFilename"},
132132
},
133-
AlgorithmSpec{adaptStateless([](ProcessingContext& pc) {
133+
.algorithm = AlgorithmSpec{adaptStateless([](ProcessingContext& pc) {
134134
JV02DmesonToy toy;
135135
toy.bcs.resetCursor(pc.outputs().make<TableBuilder>(OutputForTable<aod::BCs>::ref()));
136136
toy.collisions.resetCursor(pc.outputs().make<TableBuilder>(OutputForTable<aod::Collisions>::ref()));

0 commit comments

Comments
 (0)