12#include <fmt/format.h>
33void customize(std::vector<o2::framework::CompletionPolicy>& policies)
40void customize(std::vector<ConfigParamSpec>& workflowOptions)
43 int defaultlanes = std::max(1u, std::thread::hardware_concurrency() / 2);
44 const std::string laneshelp(
"Number of tpc processing lanes. A lane is a pipeline of algorithms.");
46 const std::string sectorshelp(
"List of TPC sectors, comma separated ranges, e.g. 0-3,7,9-15");
48 const std::string tpcrthelp(
"Run TPC reco workflow to specified output type, currently supported: 'digits,clusters,tracks'");
50 std::vector<ConfigParamSpec> options{
51 {
"input-spec", VariantType::String,
"A:TPC/RAWDATA", {
"selection string input specs"}},
52 {
"tpc-lanes", VariantType::Int, defaultlanes, {laneshelp}},
53 {
"tpc-sectors", VariantType::String, sectorDefault.c_str(), {sectorshelp}},
54 {
"tpc-reco-output", VariantType::String,
"", {tpcrthelp}},
55 {
"ignore-dist-stf", VariantType::Bool,
false, {
"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
56 {
"send-ce-digits", VariantType::Bool,
false, {
"filter CE digits and publish them for analysis on a separate stream"}},
57 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings (e.g.: 'TPCCalibPedestal.FirstTimeBin=10;...')"}},
58 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}}};
60 std::swap(workflowOptions, options);
70 auto lanes = configcontext.
options().
get<
int>(
"tpc-lanes");
72 LOG(fatal) <<
"tpc-lanes needs to be positive\n";
76 return std::min(lanes, (
int)sectors.size());
90 auto tpcSectors = o2::RangeTokenizer::tokenize<int>(configcontext.
options().
get<std::string>(
"tpc-sectors"));
92 const bool sendCEdigits = configcontext.
options().
get<
bool>(
"send-ce-digits");
95 for (
int l = 0; l < lanes; ++l) {
102 std::string_view recoOuput =
"digits";
103 const auto tpcRecoOutputType = configcontext.
options().
get<std::string>(
"tpc-reco-output");
104 if (!tpcRecoOutputType.empty()) {
105 recoOuput = tpcRecoOutputType.c_str();
Helper function to tokenize sequences and ranges of integral numbers.
Processor spec for running TPC GBT raw frame to digit converter.
Workflow definition for the TPC reconstruction.
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromFile(std::string const &, std::string const ¶msList="", bool unchangedOnly=false)
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
T get(const char *key) const
static constexpr int MAXSECTOR
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getRawToDigitsSpec(int channel, const std::string inputSpec, bool ignoreDistStf, std::vector< int > const &tpcSectors, bool sendCEdigits=false)
std::string to_string(gsl::span< T, Size > span)
static CompletionPolicy defineByName(std::string const &name, CompletionPolicy::CompletionOp op)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
int getNumTPCLanes(std::vector< int > const §ors, ConfigContext const &configcontext)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CompletionPolicy > &policies)