36#include <unordered_map>
48void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
55void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
59 std::vector<ConfigParamSpec> options{
60 {
"input-type", VariantType::String,
"digits", {
"digitizer, digits, zsraw, clustershw, clusters, compressed-clusters, compressed-clusters-ctf, pass-through"}},
61 {
"output-type", VariantType::String,
"tracks", {
"digits, zsraw, clustershw, clusters, tracks, compressed-clusters, encoded-clusters, disable-writer, send-clusters-per-sector, qa, no-shared-cluster-map, tpc-triggers"}},
63 {
"no-ca-clusterer", VariantType::Bool,
false, {
"Use HardwareClusterer instead of clusterer of GPUCATracking"}},
64 {
"disable-mc", VariantType::Bool,
false, {
"disable sending of MC information"}},
65 {
"tpc-sectors", VariantType::String,
"0-35", {
"TPC sector range, e.g. 5-7,8,9"}},
66 {
"tpc-lanes", VariantType::Int, 1, {
"number of parallel lanes up to the tracker"}},
67 {
"dispatching-mode", VariantType::String,
"prompt", {
"determines when to dispatch: prompt, complete"}},
68 {
"no-tpc-zs-on-the-fly", VariantType::Bool,
false, {
"Do not use TPC zero suppression on the fly"}},
69 {
"ignore-dist-stf", VariantType::Bool,
false, {
"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
70 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings (e.g.: 'TPCHwClusterer.peakChargeThreshold=4;...')"}},
71 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}},
72 {
"filtered-input", VariantType::Bool,
false, {
"Filtered tracks, clusters input, prefix dataDescriptors with F"}},
73 {
"select-ir-frames", VariantType::Bool,
false, {
"Subscribe and filter according to external IR Frames"}},
74 {
"tpc-deadMap-sources", VariantType::Int, -1, {
"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
75 {
"tpc-mc-time-gain", VariantType::Bool,
false, {
"use time gain calibration for MC (true) or for data (false)"}},
79 std::swap(workflowOptions, options);
83void customize(std::vector<o2::framework::DispatchPolicy>& policies)
87 auto readerMatcher = [](
auto const& spec) {
88 return std::regex_match(spec.name.begin(), spec.name.end(), std::regex(
".*-reader"));
90 auto triggerMatcher = [](
auto const& query) {
95 return gDispatchTrigger.
origin == query.origin && gDispatchTrigger.
description == query.description;
97 policies.push_back({
"prompt-for-reader", readerMatcher, DispatchOp::WhenReady, triggerMatcher});
101void customize(std::vector<o2::framework::CompletionPolicy>& policies)
116 hook = [](
const char* idstring) {
141 std::vector<int> tpcSectors = o2::RangeTokenizer::tokenize<int>(cfgc.
options().
get<std::string>(
"tpc-sectors"));
143 std::vector<int> laneConfiguration = tpcSectors;
144 auto nLanes = cfgc.
options().
get<
int>(
"tpc-lanes");
145 auto inputType = cfgc.
options().
get<std::string>(
"input-type");
150 auto dispmode = cfgc.
options().
get<std::string>(
"dispatching-mode");
151 if (dispmode ==
"complete") {
154 }
else if (inputType ==
"digits") {
156 }
else if (inputType ==
"clustershw") {
158 }
else if (inputType ==
"clustersnative") {
160 }
else if (inputType ==
"zsraw") {
169 for (
auto s : tpcSectors) {
172 bool doMC = not cfgc.
options().
get<
bool>(
"disable-mc");
182 cfgc.
options().
get<std::string>(
"output-type"),
183 cfgc.
options().
get<
bool>(
"disable-root-input"),
185 !cfgc.
options().
get<
bool>(
"no-tpc-zs-on-the-fly"),
189 cfgc.
options().
get<
int>(
"tpc-deadMap-sources"),
190 cfgc.
options().
get<
bool>(
"tpc-mc-time-gain"));
195 return std::move(wf);
Helper class to access load maps from CCDB.
Helper function to tokenize sequences and ranges of integral numbers.
DPL completion policy helper for TPC scetor data.
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 void addGlobalOptions(std::vector< o2::framework::ConfigParamSpec > &options)
static CorrectionMapsLoaderGloOpts parseGlobalOptions(const o2::framework::ConfigParamRegistry &opts)
Defining PrimaryVertex explicitly as messageable.
std::function< void(const char *)> OnWorkflowTerminationHook
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< framework::InputSpec > CompletionPolicyData
framework::WorkflowSpec getWorkflow(CompletionPolicyData *policyData, std::vector< int > const &tpcSectors, unsigned long tpcSectorMask, std::vector< int > const &laneConfiguration, const o2::tpc::CorrectionMapsLoaderGloOpts &sclOpts, bool propagateMC=true, unsigned nLanes=1, std::string const &cfgInput="digitizer", std::string const &cfgOutput="tracks", bool disableRootInput=false, int caClusterer=0, int zsOnTheFly=0, bool askDISTSTF=true, bool selIR=false, bool filteredInp=false, int deadMapSources=-1, bool useMCTimeGain=false)
create the workflow for TPC reconstruction
Helper class which holds commonly used policies.
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static CompletionPolicy defineByName(std::string const &name, CompletionPolicy::CompletionOp op)
header::DataDescription description
header::DataOrigin origin
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))
std::vector< InputSpec > gPolicyData
unsigned long gTpcSectorMask
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)