28void customize(std::vector<ConfigParamSpec>& workflowOptions)
31 const int defaultlanes = std::max(1u, std::thread::hardware_concurrency() / 2);
33 std::vector<ConfigParamSpec> options{
34 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings"}},
35 {
"nOrbits", VariantType::Int, 12, {
"number of orbits for which the IDCs are integrated"}},
36 {
"outputFormat", VariantType::String,
"Sim", {
"setting the output format type: 'Sim'=IDC simulation format, 'Real'=real output format of CRUs (not implemented yet)"}},
37 {
"debug", VariantType::Bool,
false, {
"create debug tree"}},
38 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}},
39 {
"lanes", VariantType::Int, defaultlanes, {
"Number of parallel processing lanes."}},
40 {
"sectors", VariantType::String, sectorDefault.c_str(), {
"List of TPC sectors, comma separated ranges, e.g. 0-3,7,9-15"}},
43 std::swap(workflowOptions, options);
54 std::string confDig = config.
options().
get<std::string>(
"hbfutils-config");
55 if (!confDig.empty() && confDig !=
"none") {
62 LOGP(info,
"Setting {} orbits per TF", hbfu.getNOrbitsPerTF());
65 const auto nOrbits = config.
options().
get<
int>(
"nOrbits");
66 const auto outputFormatStr = config.
options().
get<std::string>(
"outputFormat");
67 const TPCIntegrateIDCDevice::IDCFormat outputFormat = outputFormatStr.compare(
"Sim") ? TPCIntegrateIDCDevice::IDCFormat::Real : TPCIntegrateIDCDevice::IDCFormat::Sim;
69 const auto tpcsectors = o2::RangeTokenizer::tokenize<int>(config.
options().
get<std::string>(
"sectors"));
70 const auto nSectors = tpcsectors.size();
71 const auto nLanes = std::min(
static_cast<unsigned long>(config.
options().
get<
int>(
"lanes")), nSectors);
72 const auto sectorsPerLane = nSectors / nLanes + ((nSectors % nLanes) != 0);
79 for (
int ilane = 0; ilane < nLanes; ++ilane) {
80 const auto first = tpcsectors.begin() + ilane * sectorsPerLane;
81 if (
first >= tpcsectors.end()) {
84 const auto last = std::min(tpcsectors.end(),
first + sectorsPerLane);
85 const std::vector<unsigned int> rangeSectors(
first, last);
class for integration of IDCs
Definition of the Names Generator class.
Helper function to tokenize sequences and ranges of integral numbers.
TPC integration of IDCs processor.
static constexpr std::string_view DIGITIZATIONCONFIGFILE
static const HBFUtils & Instance()
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 setNOrbitsPerTF(const unsigned int nOrbitsPerTF)
static constexpr int MAXSECTOR
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
Global TPC definitions and constants.
DataProcessorSpec getTPCIntegrateIDCSpec(const int ilane, const std::vector< unsigned int > §ors, const int nOrbits=12, const TPCIntegrateIDCDevice::IDCFormat outputFormat=TPCIntegrateIDCDevice::IDCFormat::Sim, const bool debug=false)
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)