37#include <unordered_map>
49void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
56void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
60 std::vector<ConfigParamSpec> options{
61 {
"input-type", VariantType::String,
"digits", {
"digitizer, digits, zsraw, clustershw, clusters, compressed-clusters-root, compressed-clusters-flat, compressed-clusters-flat-for-encode, pass-through"}},
62 {
"output-type", VariantType::String,
"tracks", {
"digits, zsraw, clustershw, clusters, tracks, compressed-clusters-root, compressed-clusters-flat, encoded-clusters, disable-writer, send-clusters-per-sector, qa, no-shared-cluster-map, tpc-triggers"}},
64 {
"no-ca-clusterer", VariantType::Bool,
false, {
"Use HardwareClusterer instead of clusterer of GPUCATracking"}},
65 {
"disable-mc", VariantType::Bool,
false, {
"disable sending of MC information"}},
66 {
"tpc-sectors", VariantType::String,
"0-35", {
"TPC sector range, e.g. 5-7,8,9"}},
67 {
"tpc-lanes", VariantType::Int, 1, {
"number of parallel lanes up to the tracker"}},
68 {
"dispatching-mode", VariantType::String,
"prompt", {
"determines when to dispatch: prompt, complete"}},
69 {
"no-tpc-zs-on-the-fly", VariantType::Bool,
false, {
"Do not use TPC zero suppression on the fly"}},
70 {
"ignore-dist-stf", VariantType::Bool,
false, {
"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
71 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings (e.g.: 'TPCHwClusterer.peakChargeThreshold=4;...')"}},
72 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}},
73 {
"filtered-input", VariantType::Bool,
false, {
"Filtered tracks, clusters input, prefix dataDescriptors with F"}},
74 {
"select-ir-frames", VariantType::Bool,
false, {
"Subscribe and filter according to external IR Frames"}},
75 {
"ctf-dict", VariantType::String,
"none", {
"CTF dictionary: empty or ccdb=CCDB, none=no external dictionary otherwise: local filename"}},
76 {
"tpc-deadMap-sources", VariantType::Int, -1, {
"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
77 {
"tpc-mc-time-gain", VariantType::Bool,
false, {
"use time gain calibration for MC (true) or for data (false)"}},
81 std::swap(workflowOptions, options);
85void customize(std::vector<o2::framework::DispatchPolicy>& policies)
89 auto readerMatcher = [](
auto const& spec) {
90 return std::regex_match(spec.name.begin(), spec.name.end(), std::regex(
".*-reader"));
92 auto triggerMatcher = [](
auto const& query) {
97 return gDispatchTrigger.
origin == query.origin && gDispatchTrigger.
description == query.description;
99 policies.push_back({
"prompt-for-reader", readerMatcher, DispatchOp::WhenReady, triggerMatcher});
103void customize(std::vector<o2::framework::CompletionPolicy>& policies)
118 hook = [](
const char* idstring) {
143 std::vector<int> tpcSectors = o2::RangeTokenizer::tokenize<int>(cfgc.
options().
get<std::string>(
"tpc-sectors"));
145 std::vector<int> laneConfiguration = tpcSectors;
146 auto nLanes = cfgc.
options().
get<
int>(
"tpc-lanes");
147 auto inputType = cfgc.
options().
get<std::string>(
"input-type");
152 auto dispmode = cfgc.
options().
get<std::string>(
"dispatching-mode");
153 if (dispmode ==
"complete") {
156 }
else if (inputType ==
"digits") {
158 }
else if (inputType ==
"clustershw") {
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"),
190 cfgc.
options().
get<
int>(
"tpc-deadMap-sources"),
191 cfgc.
options().
get<
bool>(
"tpc-mc-time-gain"));
196 return std::move(wf);
Helper class to access load maps from CCDB.
Helper class to parse options for correction maps.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
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 CorrectionMapsGloOpts parseGlobalOptions(const o2::framework::ConfigParamRegistry &opts)
Defining ITS Vertex 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::CorrectionMapsGloOpts &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, const std::string &ctfdictOpt="none", 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::DataOrigin origin
header::DataDescription description
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)