Skip to content

Commit f5fcfd1

Browse files
ddobrigkalibuild
andauthored
PWGLF: add minor converter for fast debug/QA (#4688)
* PWGLF: add minor converter for fast debug/QA * Please consider the following formatting changes (#237) * Forgot git add... --------- Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 463357b commit f5fcfd1

4 files changed

Lines changed: 58 additions & 3 deletions

File tree

PWGLF/DataModel/LFStrangenessTables.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ DECLARE_SOA_TABLE(StraCollisions, "AOD", "STRACOLLISION", //! basic collision pr
3131
DECLARE_SOA_TABLE(StraCents, "AOD", "STRACENTS", //! centrality percentiles
3232
cent::CentFT0M, cent::CentFT0A,
3333
cent::CentFT0C, cent::CentFV0A);
34-
DECLARE_SOA_TABLE(StraRawCents, "AOD", "STRARAWCENTS", //! debug information
35-
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, mult::MultNTracksPVeta1,
36-
mult::MultZNA, mult::MultZNC, mult::MultZEM1, mult::MultZEM2, mult::MultZPA, mult::MultZPC);
34+
DECLARE_SOA_TABLE(StraRawCents_000, "AOD", "STRARAWCENTS", //! debug information
35+
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, mult::MultNTracksPVeta1);
36+
DECLARE_SOA_TABLE_VERSIONED(StraRawCents_001, "AOD", "STRARAWCENTS", 1, //! debug information
37+
mult::MultFT0A, mult::MultFT0C, mult::MultFV0A, mult::MultNTracksPVeta1,
38+
mult::MultZNA, mult::MultZNC, mult::MultZEM1, mult::MultZEM2, mult::MultZPA, mult::MultZPC);
3739
DECLARE_SOA_TABLE(StraEvSels, "AOD", "STRAEVSELS", //! event selection: sel8
3840
evsel::Sel8);
3941
DECLARE_SOA_TABLE(StraFT0AQVs, "AOD", "STRAFT0AQVS", //! t0a Qvec
@@ -47,6 +49,7 @@ DECLARE_SOA_TABLE(StraFV0AQVs, "AOD", "STRAFV0AQVS", //! v0a Qvec
4749
DECLARE_SOA_TABLE(StraStamps, "AOD", "STRASTAMPS", //! information for ID-ing mag field if needed
4850
bc::RunNumber, timestamp::Timestamp);
4951

52+
using StraRawCents = StraRawCents_001;
5053
using StraCollision = StraCollisions::iterator;
5154
using StraCent = StraCents::iterator;
5255

PWGLF/TableProducer/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# or submit itself to any jurisdiction.
1111

1212
add_subdirectory(QC)
13+
add_subdirectory(converters)
1314

1415
# General purpose
1516
o2physics_add_dpl_workflow(tpcpid
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
o2physics_add_dpl_workflow(strarawcentsconverter
13+
SOURCES strarawcentsconverter.cxx
14+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
15+
COMPONENT_NAME Analysis)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 V0 version 001 to 002
20+
21+
struct strarawcentsconverter {
22+
Produces<aod::StraRawCents_001> straRawCents_001;
23+
24+
void process(aod::StraRawCents_000 const& straRawCents_000)
25+
{
26+
for (auto& values : straRawCents_000) {
27+
straRawCents_001(values.multFT0A(), values.multFT0C(), values.multFV0A(), values.multNTracksPVeta1(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
28+
}
29+
}
30+
};
31+
32+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
33+
{
34+
return WorkflowSpec{
35+
adaptAnalysisTask<strarawcentsconverter>(cfgc)};
36+
}

0 commit comments

Comments
 (0)