Project
Loading...
Searching...
No Matches
o2AnalysisWorkflow.cxx
Go to the documentation of this file.
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.
15
19#include <TH2F.h>
20
21using namespace o2;
22using namespace o2::framework;
23using namespace o2::framework::expressions;
24
25namespace o2::aod
26{
27namespace test
28{
29DECLARE_SOA_COLUMN(X, x, float);
30DECLARE_SOA_COLUMN(Y, y, float);
31DECLARE_SOA_COLUMN(Z, z, float);
32} // namespace test
33DECLARE_SOA_TABLE(Points, "AOD", "POINTS",
34 test::X, test::Y, test::Z);
35} // namespace o2::aod
36
38 OutputObj<TH3F> etaClsH{TH3F("eta_vs_cls_vs_sigmapT", "#eta vs N_{cls} vs sigma_{1/pT}", 102, -2.01, 2.01, 160, -0.5, 159.5, 100, 0, 10)};
40
42 {
43 for (auto& track : tracks) {
44 etaClsH->Fill(track.eta(), track.tpcNClsFindable(), track.sigma1Pt());
45 points(1, 2, 3);
46 }
47 }
48};
49
51{
52 // For the sake of running without an option, we do not throw an exception
53 // in case the option is not present.
54 if (cfgc.options().hasOption("aod-metadata-Run") == false ||
55 cfgc.options().get<std::string>("aod-metadata-Run") == "2") {
56 return WorkflowSpec{
57 adaptAnalysisTask<EtaAndClsHistograms>(cfgc),
58 };
59 } else {
60 throw std::runtime_error("Unsupported run type");
61 }
62}
#define DECLARE_SOA_TABLE(_Name_, _Origin_, _Desc_,...)
Definition ASoA.h:3052
#define DECLARE_SOA_COLUMN(_Name_, _Getter_, _Type_)
Definition ASoA.h:2314
ConfigParamRegistry & options() const
bool hasOption(const char *key) const
GLint GLenum GLint x
Definition glcorearb.h:403
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
FIXME: do not use data model tables.
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
This function hooks up the the workflow specifications into the DPL driver.
OutputObj< TH3F > etaClsH
void process(soa::Join< aod::FullTracks, aod::TracksCov > const &tracks)
Produces< aod::Points > points