Skip to content

Commit fc8d1cb

Browse files
Add stracentconverter2 for StraCents conversion
Implement stracentconverter2 to convert Stra Cents from version 001 to 002.
1 parent 3e7af2c commit fc8d1cb

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
#include "Framework/runDataProcessing.h"
12+
#include "Framework/AnalysisTask.h"
13+
#include "Framework/AnalysisDataModel.h"
14+
#include "PWGLF/DataModel/LFStrangenessTables.h"
15+
16+
using namespace o2;
17+
using namespace o2::framework;
18+
19+
// Converts Stra Cents from 001 to 002
20+
struct stracentconverter2 {
21+
Produces<aod::StraCents_002> straCents_002;
22+
23+
void process(aod::StraCents_001 const& straCents_001)
24+
{
25+
for (auto& values : straCents_001) {
26+
straCents_002(values.centFT0M(),
27+
values.centFT0A(),
28+
values.centFT0C(),
29+
values.centFV0A(),
30+
values.centFT0CVariant1(),
31+
-999.0 /*dummy FT0C Variant 2*/,
32+
values.centMFT(),
33+
values.centNGlobal(),
34+
-999.0 /*dummy NTPV value*/);
35+
}
36+
}
37+
};
38+
39+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
40+
{
41+
return WorkflowSpec{
42+
adaptAnalysisTask<stracentconverter2>(cfgc)};
43+
}

0 commit comments

Comments
 (0)