Skip to content

Commit 1356caf

Browse files
committed
Common: add Run2BCInfos converter
1 parent b8b7493 commit 1356caf

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

Common/TableProducer/Converters/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ o2physics_add_dpl_workflow(trackqa-converter-002
9393
SOURCES trackQA002Converter.cxx
9494
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
9595
COMPONENT_NAME Analysis)
96+
97+
o2physics_add_dpl_workflow(run2bcinfos-converter
98+
SOURCES run2bcinfosConverter.cxx
99+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
100+
COMPONENT_NAME Analysis)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
12+
/// \file tracksExtraConverter.cxx
13+
/// \brief Converts TracksExtra table from version 000 to 001
14+
15+
/// This task allows for the conversion of the TracksExtra table from version 000 to 001.
16+
/// The conversion is needed because the table has been extended with the ITSClusterSize column
17+
/// and the ITSClusterMap column is evaluated dynamically from it.
18+
/// In the converter a dummy ITSClusterSize column is filled with overflows if a hit in the layer is present
19+
20+
/// \author F.Mazzaschi <[email protected]>
21+
22+
#include "Framework/runDataProcessing.h"
23+
#include "Framework/AnalysisTask.h"
24+
#include "Framework/AnalysisDataModel.h"
25+
26+
using namespace o2;
27+
using namespace o2::framework;
28+
29+
struct Run2BCInfosConverter {
30+
Produces<aod::Run2TrackExtras_001> Run2TrackExtras_001;
31+
void process(aod::Run2BCInfos_000 const& Run2BCInfos_000)
32+
{
33+
34+
for (const auto& entry : Run2BCInfos_000) {
35+
Run2TrackExtras_001(entry.eventCuts(),
36+
entry.triggerMaskNext50(), entry.l0TriggerInputMask(),
37+
entry.spdClustersL0(), entry.spdClustersL1(),
38+
entry.spdFiredChipsL0(), entry.spdFiredChipsL1(),
39+
entry.spdFiredFastOrL0(), entry.spdFiredFastOrL1(),
40+
entry.v0TriggerChargeA(), entry.v0TriggerChargeC(),
41+
0, 0);
42+
}
43+
}
44+
};
45+
46+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
47+
{
48+
return WorkflowSpec{
49+
adaptAnalysisTask<Run2BCInfosConverter>(cfgc)
50+
};
51+
}

0 commit comments

Comments
 (0)