24void customize(std::vector<ConfigParamSpec>& workflowOptions)
27 const int defaultlanes = std::max(1u, std::thread::hardware_concurrency() / 2);
29 std::vector<ConfigParamSpec> options{
30 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}},
31 {
"loadStatusMap", VariantType::Bool,
false, {
"Loading pad status map from the CCDB."}},
32 {
"lanes", VariantType::Int, defaultlanes, {
"Number of parallel processing lanes (crus are split per device)."}},
33 {
"time-lanes", VariantType::Int, 1, {
"Number of parallel processing lanes (timeframes are split per device)."}},
34 {
"crus", VariantType::String, cruDefault.c_str(), {
"List of CRUs, comma separated ranges, e.g. 0-3,7,9-15"}},
35 {
"rangeIDC", VariantType::Int, 200, {
"Number of 1D-IDCs which will be used for the calculation of the fourier coefficients."}},
36 {
"minIDCsPerTF", VariantType::Int, 10, {
"minimum number of IDCs per TF (needed for sending to 1D-IDCs to EPNs. Depends on number of orbits per TF. 10 for 128 orbits per TF)."}},
37 {
"idc0File", VariantType::String,
"", {
"file to reference IDC0 object"}},
38 {
"disableIDC0CCDB", VariantType::Bool,
false, {
"Disabling loading the IDC0 object from the CCDB (no normalization is applied for IDC1 calculation)"}},
39 {
"enable-synchronous-processing", VariantType::Bool,
false, {
"Enable calculation and sending of 1D-IDCs for synchronous processing"}},
40 {
"n-TFs-buffer", VariantType::Int, 1, {
"Buffer n-TFs to reduce the messaged which will be send."}},
41 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings (e.g. 'TPCIDCGroupParam.Method=0;')"}}};
43 std::swap(workflowOptions, options);
52 const auto tpcCRUs = o2::RangeTokenizer::tokenize<int>(config.
options().
get<std::string>(
"crus"));
53 const auto nCRUs = tpcCRUs.size();
54 const auto nLanes = std::min(
static_cast<unsigned long>(config.
options().
get<
int>(
"lanes")), nCRUs);
55 const auto time_lanes =
static_cast<unsigned int>(config.
options().
get<
int>(
"time-lanes"));
56 const auto crusPerLane = nCRUs / nLanes + ((nCRUs % nLanes) != 0);
57 const auto loadStatusMap = config.
options().
get<
bool>(
"loadStatusMap");
58 const auto rangeIDC =
static_cast<unsigned int>(config.
options().
get<
int>(
"rangeIDC"));
59 const auto minIDCsPerTF =
static_cast<unsigned int>(config.
options().
get<
int>(
"minIDCsPerTF"));
62 const std::string idc0File = config.
options().
get<std::string>(
"idc0File");
63 const auto disableIDC0CCDB = config.
options().
get<
bool>(
"disableIDC0CCDB");
64 const auto enableSynchProc = config.
options().
get<
bool>(
"enable-synchronous-processing");
65 const int nTFsBufferTmp = config.
options().
get<
int>(
"n-TFs-buffer");
76 for (
int ilane = 0; ilane < nLanes; ++ilane) {
77 const auto first = tpcCRUs.begin() + ilane * crusPerLane;
78 if (
first >= tpcCRUs.end()) {
81 const auto last = std::min(tpcCRUs.end(),
first + crusPerLane);
82 const std::vector<uint32_t> rangeCRUs(
first, last);
83 int nTFsBuffer = nTFsBufferTmp * rangeCRUs.size();
84 if (nTFsBuffer <= 0) {
85 nTFsBuffer = rangeCRUs.size();
87 workflow.emplace_back(
timePipeline(
getTPCFLPIDCSpec(ilane, rangeCRUs, rangeIDC, loadStatusMap, idc0File, disableIDC0CCDB, enableSynchProc, nTFsBuffer), time_lanes));
Helper function to tokenize sequences and ranges of integral numbers.
TPC device for processing on FLPs.
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 void setMinIDCsPerTF(const unsigned int nMinIDCsPerTF)
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
DataProcessorSpec timePipeline(DataProcessorSpec original, size_t count)
Global TPC definitions and constants.
DataProcessorSpec getTPCFLPIDCSpec(const int ilane, const std::vector< uint32_t > &crus, const unsigned int rangeIDC, const bool loadStatusMap, const std::string idc0File, const bool disableIDC0CCDB, const bool enableSynchProc, const int nTFsBuffer=1)
std::string to_string(gsl::span< T, Size > span)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< ConfigParamSpec > &workflowOptions)