33#include <unordered_map>
43static std::shared_ptr<GPURecoWorkflowSpec> gTask;
45void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
50void customize(std::vector<ConfigParamSpec>& workflowOptions)
53 std::vector<ConfigParamSpec> options{
54 {
"input-type", VariantType::String,
"digits", {
"digitizer, digits, zsraw, zsonthefly, clustersnative, compressed-clusters-root, compressed-clusters-ctf, trd-tracklets, its-clusters"}},
55 {
"output-type", VariantType::String,
"tracks", {
"clustersnative, tracks, compressed-clusters-ctf, qa, no-shared-cluster-map, send-clusters-per-sector, trd-tracks, error-qa, tpc-triggers, its-tracks"}},
56 {
"corrmap-lumi-mode", VariantType::Int, 0, {
"scaling mode: (default) 0 = static + scale * full; 1 = full + scale * derivative"}},
57 {
"disable-root-input", VariantType::Bool,
true, {
"disable root-files input reader"}},
58 {
"disable-mc", VariantType::Bool,
false, {
"disable sending of MC information"}},
59 {
"ignore-dist-stf", VariantType::Bool,
false, {
"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
60 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings (e.g.: 'TPCHwClusterer.peakChargeThreshold=4;...')"}},
61 {
"configFile", VariantType::String,
"", {
"configuration file for configurable parameters"}},
62 {
"enableDoublePipeline", VariantType::Bool,
false, {
"enable GPU double pipeline mode"}},
63 {
"tpc-deadMap-sources", VariantType::Int, -1, {
"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
64 {
"tpc-mc-time-gain", VariantType::Bool,
false, {
"use time gain calibration for MC (true) or for data (false)"}},
68 std::swap(workflowOptions, options);
72void customize(std::vector<DispatchPolicy>& policies)
75 policies.push_back({
"prompt-for-gpu-reco", [](
auto const& spec) {
return true; }, DispatchOp::WhenReady});
78void customize(std::vector<CompletionPolicy>& policies)
85 hook = [](
const char* idstring) {
87 gTask->deinitialize();
114static const std::unordered_map<std::string, ioType>
InputMap{
126static const std::unordered_map<std::string, ioType>
OutputMap{
142 std::iota(tpcSectors.begin(), tpcSectors.end(), 0);
144 auto inputType = cfgc.
options().
get<std::string>(
"input-type");
145 bool doMC = !cfgc.
options().
get<
bool>(
"disable-mc");
151 std::vector<ioType> outputTypes, inputTypes;
153 outputTypes = o2::RangeTokenizer::tokenize<ioType>(cfgc.
options().
get<std::string>(
"output-type"), [](std::string
const& token) { return OutputMap.at(token); });
154 inputTypes = o2::RangeTokenizer::tokenize<ioType>(cfgc.
options().
get<std::string>(
"input-type"), [](std::string
const& token) { return InputMap.at(token); });
155 }
catch (std::out_of_range&) {
156 throw std::invalid_argument(
"invalid input / output type");
196 auto task = std::make_shared<GPURecoWorkflowSpec>(&
gPolicyData, cfg, tpcSectors,
gTpcSectorMask, ggRequest, &gPolicyOrderCheck);
197 Inputs taskInputs = task->inputs();
198 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
202 "gpu-reconstruction",
211 auto ggRequestPrepare = std::make_shared<o2::base::GRPGeomRequest>(
false,
true,
false,
false,
false,
o2::base::GRPGeomRequest::None, ggInputsPrepare,
true);
212 auto taskPrepare = std::make_shared<GPURecoWorkflowSpec>(&
gPolicyData, cfg, tpcSectors,
gTpcSectorMask, ggRequestPrepare);
213 Inputs taskInputsPrepare = taskPrepare->inputs();
214 std::move(ggInputsPrepare.begin(), ggInputsPrepare.end(), std::back_inserter(taskInputsPrepare));
216 "gpu-reconstruction-prepare",
220 taskPrepare->options()});
223 if (!cfgc.
options().
get<
bool>(
"ignore-dist-stf")) {
Helper class to access load maps from CCDB.
Helper for geometry and GRP related CCDB requests.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
std::vector< InputSpec > CompletionPolicyData
Helper function to tokenize sequences and ranges of integral numbers.
DPL completion policy helper for TPC scetor data.
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)
static constexpr int MAXSECTOR
GLint GLint GLsizei GLint GLenum GLenum type
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)
const std::unordered_map< std::string, OutputType > OutputMap
const std::unordered_map< std::string, InputType > InputMap
Defining PrimaryVertex explicitly as messageable.
std::function< void(const char *)> OnWorkflowTerminationHook
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< InputSpec > Inputs
int32_t tpcDeadMapSources
bool decompressTPCFromROOT
bool sendClustersPerSector
int32_t enableDoublePipeline
bool outputSharedClusterMap
bool outputCompClustersFlat
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