Project
Loading...
Searching...
No Matches
ft0-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#if defined(__has_include)
21#if defined(__linux__) && (defined(__x86_64) || defined(__x86_64__)) && __has_include(<emmintrin.h>) && __has_include(<immintrin.h>) && defined(FT0_DECODER_AVX512)
22#define FT0_NEW_DECOER_ON
24#endif
25#endif
26
27using namespace o2::framework;
28
29// ------------------------------------------------------------------
30void customize(std::vector<o2::framework::CompletionPolicy>& policies)
31{
32 // ordered policies for the writers
33 policies.push_back(CompletionPolicyHelpers::consumeWhenAllOrdered(".*(?:FT0|ft0).*[W,w]riter.*"));
34}
35// we need to add workflow options before including Framework/runDataProcessing
36void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
37{
38 // option allowing to set parameters
39 workflowOptions.push_back(
40 ConfigParamSpec{"tcm-extended-mode",
42 false,
43 {"in case of extended TCM mode (1 header + 1 TCMdata + 8 "
44 "TCMdataExtended)"}});
45
46 workflowOptions.push_back(
47 ConfigParamSpec{"dump-blocks-reader",
49 false,
50 {"enable dumping of event blocks at reader side"}});
51 workflowOptions.push_back(
52 ConfigParamSpec{"disable-root-output",
54 false,
55 {"disable root-files output writers"}});
56 workflowOptions.push_back(
57 ConfigParamSpec{"configKeyValues",
59 "",
60 {"Semicolon separated key=value strings"}});
61 workflowOptions.push_back(
62 ConfigParamSpec{"ignore-dist-stf",
64 false,
65 {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}});
66 workflowOptions.push_back(
67 ConfigParamSpec{"input-sub-sampled",
69 false,
70 {"SUB_RAWDATA DPL channel will be used as input, in case of dispatcher usage"}});
71 workflowOptions.push_back(
72 ConfigParamSpec{"disable-dpl-ccdb-fetcher",
74 false,
75 {"Disable DPL CCDB fetcher, channel map will be uploaded during initialization by taking last entry in CCDB"}});
76#if defined(FT0_NEW_DECOER_ON)
77 workflowOptions.push_back(
78 ConfigParamSpec{"new-decoder",
80 false,
81 {"New decoder which uses AVX-512 CPU instractions"}});
82#endif
83}
84
85// ------------------------------------------------------------------
86
88
90{
91 LOG(info) << "WorkflowSpec defineDataProcessing";
92 auto dumpReader = configcontext.options().get<bool>("dump-blocks-reader");
93 auto isExtendedMode = configcontext.options().get<bool>("tcm-extended-mode");
94 auto disableRootOut = configcontext.options().get<bool>("disable-root-output");
95 auto askSTFDist = !configcontext.options().get<bool>("ignore-dist-stf");
96 const auto isSubSampled = configcontext.options().get<bool>("input-sub-sampled");
97 const auto disableDplCcdbFetcher = configcontext.options().get<bool>("disable-dpl-ccdb-fetcher");
98 bool isNewDecoder = false;
99#if defined(FT0_NEW_DECOER_ON)
100 isNewDecoder = configcontext.options().get<bool>("new-decoder");
101#endif
102 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
103 LOG(info) << "WorkflowSpec FLPWorkflow";
104 // Type aliases
105 // using RawReaderFT0trgInput = o2::fit::RawReaderFIT<o2::ft0::RawReaderFT0BaseNorm,true>;
107 // using RawReaderFT0trgInputExt = o2::fit::RawReaderFIT<o2::ft0::RawReaderFT0BaseExt,true>;
111 //
112 WorkflowSpec specs;
113 if (!isNewDecoder) {
114 if (isExtendedMode) {
115 specs.emplace_back(o2::fit::getFITDataReaderDPLSpec(RawReaderFT0ext{dataOrigin, dumpReader}, askSTFDist, isSubSampled, disableDplCcdbFetcher));
116 if (!disableRootOut) {
118 }
119 } else {
120 specs.emplace_back(o2::fit::getFITDataReaderDPLSpec(RawReaderFT0{dataOrigin, dumpReader}, askSTFDist, isSubSampled, disableDplCcdbFetcher));
121 if (!disableRootOut) {
123 }
124 }
125 } else {
126#if defined(FT0_NEW_DECOER_ON)
127 specs.emplace_back(o2::ft0::getFT0DataDecoderDPLSpec(askSTFDist));
128#endif
129 }
130 return std::move(specs);
131}
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 gDataOriginFT0
Definition DataHeader.h:566
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"