Project
Loading...
Searching...
No Matches
TRDEventDisplayFeedWorkflow.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.
11
16
18
19using namespace o2::framework;
20
21void customize(std::vector<ConfigParamSpec>& workflowOptions)
22{
23 std::vector<o2::framework::ConfigParamSpec> options{
24 {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
25 {"nEventsMax", o2::framework::VariantType::Int, 5, {"Number of events to display"}},
26 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
27
28 std::swap(workflowOptions, options);
29}
30
32
34{
35 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
36
37 WorkflowSpec spec;
38
39 bool useMC = true;
40 if (!configcontext.options().get<bool>("disable-root-input")) {
41 spec.emplace_back(o2::trd::getTRDGlobalTrackReaderSpec(useMC));
42 spec.emplace_back(o2::trd::getTRDTrackletReaderSpec(useMC, false));
43 spec.emplace_back(o2::trd::getTRDDigitReaderSpec(useMC));
44 }
45
46 int nEventsMax = configcontext.options().get<int>("nEventsMax");
47 spec.emplace_back(o2::trd::getTRDEventDisplayFeedSpec(nEventsMax));
48
49 return spec;
50}
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< ConfigParamSpec > &workflowOptions)
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getTRDEventDisplayFeedSpec(int nEventsMax)
framework::DataProcessorSpec getTRDTrackletReaderSpec(bool useMC, bool useCalibratedTracklets)
framework::DataProcessorSpec getTRDGlobalTrackReaderSpec(bool useMC)
read ITS-TPC-TRD matched tracks from a root file
o2::framework::DataProcessorSpec getTRDDigitReaderSpec(bool useMC, bool trigRec=true, int dataSubspec=1)