Skip to content

Commit 373c6cc

Browse files
Add converters to move from StraStamps_000 to StraStramps_001
1 parent c579330 commit 373c6cc

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

PWGLF/TableProducer/Strangeness/Converters/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,9 @@ o2physics_add_dpl_workflow(v0mlscoresconverter
7272
o2physics_add_dpl_workflow(stramccollisionconverter
7373
SOURCES stramccollisionconverter.cxx
7474
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
75-
COMPONENT_NAME Analysis)
75+
COMPONENT_NAME Analysis)
76+
77+
o2physics_add_dpl_workflow(strastampsconverter
78+
SOURCES strastampsconverter.cxx
79+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
80+
COMPONENT_NAME Analysis)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 "ITStracking/Vertexer.h"
15+
#include "PWGLF/DataModel/LFStrangenessTables.h"
16+
17+
using namespace o2;
18+
using namespace o2::framework;
19+
20+
// Converts Stra Stamps from 000 to 001
21+
struct strastampsconverter {
22+
Produces<aod::StraStamps_001> straStamps_001;
23+
24+
void process(aod::StraStamps_000 const& straStamps_000)
25+
{
26+
for (auto& values : straStamps_000) {
27+
straStamps_001(values.runNumber(),
28+
values.timestamp(),
29+
0 /*dummy globalBC value*/);
30+
}
31+
}
32+
};
33+
34+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
35+
{
36+
return WorkflowSpec{
37+
adaptAnalysisTask<strastampsconverter>(cfgc)};
38+
}

0 commit comments

Comments
 (0)