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+ #include " PWGLF/DataModel/LFStrangenessPIDTables.h"
16+
17+ using namespace o2 ;
18+ using namespace o2 ::framework;
19+
20+ // Converts daughter TracksExtra from 1 to 2
21+ struct stradautracksextraconverter2 {
22+ Produces<aod::DauTrackExtras_002> dauTrackExtras_002;
23+
24+ void process (aod::DauTrackExtras_001 const & dauTrackExtras_001)
25+ {
26+ for (auto & values : dauTrackExtras_001) {
27+ dauTrackExtras_002 (values.itsChi2PerNcl (),
28+ values.detectorMap (),
29+ values.itsClusterSizes (),
30+ static_cast <uint8_t >(0 ), // findable (unknown in old format)
31+ -values.tpcClusters (), // findable minus found: we know found
32+ values.tpcCrossedRows ()); // findable minus crossed rows: we know crossed rows
33+ }
34+ }
35+ };
36+
37+ WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
38+ {
39+ return WorkflowSpec{
40+ adaptAnalysisTask<stradautracksextraconverter2>(cfgc)};
41+ }
0 commit comments