Project
Loading...
Searching...
No Matches
fv0-flp-workflow.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
20
21using namespace o2::framework;
22
23// ------------------------------------------------------------------
24void customize(std::vector<o2::framework::CompletionPolicy>& policies)
25{
26 // ordered policies for the writers
27 policies.push_back(CompletionPolicyHelpers::consumeWhenAllOrdered(".*(?:FV0|fv0).*[W,w]riter.*"));
28}
29
30// we need to add workflow options before including Framework/runDataProcessing
31void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
32{
33 // option allowing to set parameters
34 workflowOptions.push_back(
35 ConfigParamSpec{"tcm-extended-mode",
37 false,
38 {"in case of extended TCM mode (1 header + 1 TCMdata + 8 "
39 "TCMdataExtended)"}});
40
41 workflowOptions.push_back(
42 ConfigParamSpec{"dump-blocks-reader",
44 false,
45 {"enable dumping of event blocks at reader side"}});
46 workflowOptions.push_back(
47 ConfigParamSpec{"disable-root-output",
49 false,
50 {"disable root-files output writers"}});
51 workflowOptions.push_back(
52 ConfigParamSpec{"configKeyValues",
54 "",
55 {"Semicolon separated key=value strings"}});
56 workflowOptions.push_back(
57 ConfigParamSpec{"ignore-dist-stf",
59 false,
60 {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}});
61 workflowOptions.push_back(
62 ConfigParamSpec{"input-sub-sampled",
64 false,
65 {"SUB_RAWDATA DPL channel will be used as input, in case of dispatcher usage"}});
66 workflowOptions.push_back(
67 ConfigParamSpec{"disable-dpl-ccdb-fetcher",
69 false,
70 {"Disable DPL CCDB fetcher, channel map will be uploaded during initialization by taking last entry in CCDB"}});
71}
72
73// ------------------------------------------------------------------
74
76
78{
79 LOG(info) << "WorkflowSpec defineDataProcessing";
80 auto dumpReader = configcontext.options().get<bool>("dump-blocks-reader");
81 auto isExtendedMode = configcontext.options().get<bool>("tcm-extended-mode");
82 auto disableRootOut = configcontext.options().get<bool>("disable-root-output");
83 auto askSTFDist = !configcontext.options().get<bool>("ignore-dist-stf");
84 const auto isSubSampled = configcontext.options().get<bool>("input-sub-sampled");
85 const auto disableDplCcdbFetcher = configcontext.options().get<bool>("disable-dpl-ccdb-fetcher");
86 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
87 LOG(info) << "WorkflowSpec FLPWorkflow";
88 // Type aliases
89 // using RawReaderFV0trgInput = o2::fit::RawReaderFIT<o2::fv0::RawReaderFV0BaseNorm,true>;
91 // using RawReaderFV0trgInputExt = o2::fit::RawReaderFIT<o2::fv0::RawReaderFV0BaseExt,true>;
95 //
96 WorkflowSpec specs;
97 if (isExtendedMode) {
98 specs.emplace_back(o2::fit::getFITDataReaderDPLSpec(RawReaderFV0ext{dataOrigin, dumpReader}, askSTFDist, isSubSampled, disableDplCcdbFetcher));
99 if (!disableRootOut) {
101 }
102 } else {
103 specs.emplace_back(o2::fit::getFITDataReaderDPLSpec(RawReaderFV0{dataOrigin, dumpReader}, askSTFDist, isSubSampled, disableDplCcdbFetcher));
104 if (!disableRootOut) {
106 }
107 }
108 return std::move(specs);
109}
Definition of a container to keep Monte Carlo truth external to simulation objects.
static void updateFromString(std::string const &)
A container to hold and manage MC truth information/labels.
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CompletionPolicy > &policies)
constexpr o2::header::DataOrigin gDataOriginFV0
Definition DataHeader.h:567
framework::DataProcessorSpec getFITDataReaderDPLSpec(const RawReaderType &rawReader, bool askSTFDist, bool isSubSampled, bool disableDplCcdbFetcher)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"