33constexpr std::string_view kLegacyITSNamespace =
"ITSCATrackerParam";
42 for (
const auto& token : tokens) {
43 const auto eq = token.find(
'=');
44 if (eq == std::string::npos || eq == 0 || eq == token.size() - 1) {
47 const auto key = token.substr(0, eq);
48 const auto dot =
key.find(
'.');
49 const auto ns = dot == std::string::npos ?
key :
key.substr(0, dot);
50 if (ns == kLegacyITSNamespace) {
52 "ITS common-CA tracker workflow rejects legacy '{}' --configKeyValues override ('{}'); "
53 "use the dedicated 'ITSCommonCATrackerParam' namespace instead",
64 "ITS common-CA tracker workflow supports tracking-mode 'sync' and 'async'; '{}' is not supported",
71 if (!explicitSource.empty() && explicitSource !=
"diamond" && explicitSource !=
"truth") {
72 throw std::invalid_argument(
"--vertex-source must be diamond or truth");
74 const bool diamond = useDiamond || explicitSource ==
"diamond";
75 const bool truth = useTruth || explicitSource ==
"truth";
76 if (diamond == truth) {
77 throw std::invalid_argument(
78 "Select exactly one ITS vertex source: --vertex-source={diamond,truth}; "
79 "legacy aliases ITSCommonCATrackerParam.useDiamond and ITSVertexerParam.useTruthSeeding must agree");
86 const auto& options = context.
options();
96 if (
result.nThreads <= 0) {
97 throw std::invalid_argument(
"ITSCommonCATrackerParam.nThreads must be > 0");
99 result.truthContext = options.get<std::string>(
"truth-context");
101 throw std::invalid_argument(
"--truth-context must name the digitization context for --vertex-source=truth");
103 result.useMC = !options.get<
bool>(
"disable-mc");
104 result.useFullGeometry = options.get<
bool>(
"use-geom") || options.get<
bool>(
"use-full-geometry");
106 result.writeRootOutput = !options.get<
bool>(
"disable-root-output");
107 LOGP(info,
"ITS CA resolved: mode={} threads={} vertex={} truth context={} geometry={} MC={} ROOT output={}",
Driver-level configuration and vertex-constraint preflight for the ITS common-CA tracker workflow.
static const TrackerParamConfig< Detector > & Instance()
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
GLenum const GLfloat * params
WorkflowOptions readWorkflowOptions(const o2::framework::ConfigContext &)
void requireSupportedTrackingModeOrFatal(o2::itsmft::TrackingMode::Type mode)
void applyConfigKeyValuesOrFatal(const std::string &configKeyValues)
VertexSource resolveVertexSource(const std::string &explicitSource, bool useDiamond, bool useTruth)
std::string toString(Type mode)
Type fromString(std::string_view str)
static std::vector< std::string > tokenize(const std::string &src, char delim, bool trimToken=true, bool skipEmpty=true)