Project
Loading...
Searching...
No Matches
digits-reader-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
16
17#include <string>
18#include <vector>
19#include "Framework/Variant.h"
27
28using namespace o2::framework;
29
30void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
31{
33}
34
35// we need to add workflow options before including Framework/runDataProcessing
36void customize(std::vector<ConfigParamSpec>& workflowOptions)
37{
38 std::vector<ConfigParamSpec> options{
39 {"disable-mc", VariantType::Bool, false, {"Do not propagate MC info"}},
40 {"disable-zero-suppression", VariantType::Bool, true, {"Do not apply zero suppression. Option is disabled since ZS cannot be applied right now (see ROBoradConfigHanler)"}},
41 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
43 std::swap(workflowOptions, options);
44}
45
47
49{
50 bool disableZS = cfgc.options().get<bool>("disable-zero-suppression");
51 disableZS = true; // Option is disabled
52 bool useMC = !cfgc.options().get<bool>("disable-mc");
53
54 o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
55
56 WorkflowSpec specs;
57 std::string dataDesc = disableZS ? "DATA" : "DATAMC";
58 specs.emplace_back(o2::mid::getDigitReaderSpec(useMC, dataDesc.data()));
59 if (!disableZS) {
60 std::string outDesc = "MFDATA";
61 specs.emplace_back(o2::mid::getFilteringSpec(useMC, dataDesc, outDesc));
62 specs.emplace_back(o2::mid::getZeroSuppressionSpec(useMC, outDesc));
63 }
64
65 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
66 o2::raw::HBFUtilsInitializer hbfIni(cfgc, specs);
67
68 return specs;
69}
Data processor specs for MID digits reader device.
MID filtering spec.
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
MID zero suppression spec.
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getDigitReaderSpec(bool useMC, const char *baseDescription="DATAMC")
framework::DataProcessorSpec getFilteringSpec(bool useMC=true, std::string_view inDesc="DATA", std::string_view outDesc="FDATA")
framework::DataProcessorSpec getZeroSuppressionSpec(bool useMC=true, std::string_view dataDesc="DATAMC")
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))