24void customize(std::vector<o2::framework::CompletionPolicy>& policies)
31void customize(std::vector<ConfigParamSpec>& workflowOptions)
35 std::vector<ConfigParamSpec> options{
36 {
"configFile", VariantType::String,
"", {
"Configuration file for configurable parameters"}},
37 {
"timeframes", VariantType::Int, 2000, {
"Number of TFs aggregated per calibration interval"}},
38 {
"crus", VariantType::String, cruDefault.c_str(), {
"List of CRUs, comma-separated ranges, e.g. 0-3,7,9-15"}},
39 {
"input-lanes", VariantType::Int, 1, {
"Number of aggregate pipelines set by --output-lanes in TPCDistributeCMVSpec"}},
40 {
"use-precise-timestamp", VariantType::Bool,
false, {
"Use precise timestamp metadata from distribute when writing to CCDB"}},
41 {
"enable-CCDB-output", VariantType::Bool,
false, {
"Send output to the CCDB populator"}},
42 {
"n-TFs-buffer", VariantType::Int, 1, {
"Buffer size that was set in TPCFLPCMVSpec"}},
43 {
"configKeyValues", VariantType::String,
"", {
"Semicolon-separated key=value strings"}}};
45 std::swap(workflowOptions, options);
59 const auto tpcCRUs = o2::RangeTokenizer::tokenize<int>(config.
options().
get<std::string>(
"crus"));
60 auto timeframes =
static_cast<unsigned int>(config.
options().
get<
int>(
"timeframes"));
61 int aggregateLanes = config.
options().
get<
int>(
"input-lanes");
62 if (aggregateLanes <= 0) {
65 const bool usePreciseTimestamp = config.
options().
get<
bool>(
"use-precise-timestamp");
66 const bool sendCCDB = config.
options().
get<
bool>(
"enable-CCDB-output");
68 int nTFsBuffer = config.
options().
get<
int>(
"n-TFs-buffer");
69 if (nTFsBuffer <= 0) {
74 assert(timeframes >=
static_cast<unsigned int>(nTFsBuffer));
75 timeframes /=
static_cast<unsigned int>(nTFsBuffer);
77 const std::vector<uint32_t> rangeCRUs(tpcCRUs.begin(), tpcCRUs.end());
80 workflow.reserve(
static_cast<size_t>(aggregateLanes));
81 LOGP(info,
"Starting CMV aggregate with {} lanes, {} timeframes, {} n-TFs-buffer", aggregateLanes, timeframes, nTFsBuffer);
82 for (
int ilane = 0; ilane < aggregateLanes; ++ilane) {
83 workflow.emplace_back(getTPCAggregateCMVSpec(ilane, rangeCRUs, timeframes, sendCCDB, usePreciseTimestamp, nTFsBuffer));
Helper function to tokenize sequences and ranges of integral numbers.
TPC aggregation of distributed CMVs, including preprocessing, compression and CCDB output.
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
Defining ITS Vertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
Global TPC definitions and constants.
std::string to_string(gsl::span< T, Size > span)
static CompletionPolicy defineByName(std::string const &name, CompletionPolicy::CompletionOp op)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CompletionPolicy > &policies)