42void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
47void customize(std::vector<o2::framework::CompletionPolicy>& policies)
54void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
57 std::vector<o2::framework::ConfigParamSpec> options{
62 {
"track-sources", VariantType::String, std::string{
GID::ALL}, {
"comma-separated list of sources to use: allowed TPC,ITS-TPC,TPC-TRD,ITS-TPC-TRD (all)"}},
71 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings ..."}},
75 std::swap(workflowOptions, options);
91 auto useMC = !configcontext.
options().
get<
bool>(
"disable-mc");
92 auto disableRootIn = configcontext.
options().
get<
bool>(
"disable-root-input");
93 auto disableRootOut = configcontext.
options().
get<
bool>(
"disable-root-output");
94 auto useFIT = configcontext.
options().
get<
bool>(
"use-fit");
95 auto useCCDB = configcontext.
options().
get<
bool>(
"use-ccdb");
96 auto strict = configcontext.
options().
get<
bool>(
"strict-matching");
97 auto diagnostic = configcontext.
options().
get<
bool>(
"enable-dia");
98 auto extratolerancetrd = configcontext.
options().
get<
float>(
"trd-extra-tolerance");
99 auto writeMatchable = configcontext.
options().
get<
bool>(
"write-matchable");
101 bool writematching = 0;
103 bool refitTPCTOF = configcontext.
options().
get<
bool>(
"refit-tpc-tof");
104 auto outputType = configcontext.
options().
get<std::string>(
"output-type");
105 auto nLanes = configcontext.
options().
get<
int>(
"tof-lanes");
106 if (outputType.rfind(
"matching-info") < outputType.size()) {
109 if (outputType.rfind(
"calib-info") < outputType.size()) {
113 LOG(info) <<
"Diagnostic switched on since required for calibInfo time";
121 LOG(
debug) <<
"TOF MATCHER WORKFLOW configuration";
122 LOG(
debug) <<
"TOF track inputs = " << configcontext.
options().
get<std::string>(
"track-sources");
123 LOG(
debug) <<
"TOF output = " << outputType;
124 LOG(
debug) <<
"TOF disable-mc = " << configcontext.
options().
get<std::string>(
"disable-mc");
125 LOG(
debug) <<
"TOF use-ccdb = " << useCCDB;
126 LOG(
debug) <<
"TOF use-fit = " << useFIT;
127 LOG(
debug) <<
"TOF disable-root-input = " << disableRootIn;
128 LOG(
debug) <<
"TOF disable-root-output = " << disableRootOut;
129 LOG(
debug) <<
"TOF matching in strict mode = " << strict;
130 LOG(
debug) <<
"TOF extra time tolerance for TRD tracks = " << extratolerancetrd;
131 LOG(
debug) <<
"Store all matchables = " << writeMatchable;
132 LOG(
debug) <<
"TOF Nlanes for matcher = " << nLanes;
139 LOGP(warning,
"In strict matching mode only TPC and TPC-TRD sources allowed, {} asked, redefining",
GID::getSourcesNames(
src));
146 clustermask |= GID::getSourceMask(
GID::FT0);
149 clustermask |= GID::getSourceMask(
GID::TPC);
151 if (sclOpt.requestCTPLumi) {
155 mcmaskcl |= GID::getSourceMask(
GID::TOF);
160 if (configcontext.
options().
get<
bool>(
"combine-devices")) {
161 std::vector<DataProcessorSpec> unmerged;
162 specs.push_back(
specCombiner(
"TOF-readers", inputspecs, unmerged));
163 if (unmerged.size() > 0) {
164 LOG(fatal) <<
"Unexpected DPL device merge problem";
167 for (
auto& s : inputspecs) {
171 if (sclOpt.needTPCScalersWorkflow() && !configcontext.
options().
get<
bool>(
"disable-root-input")) {
176 if (!disableRootOut) {
177 std::vector<DataProcessorSpec> writers;
196 if (writeMatchable) {
200 if (configcontext.
options().
get<
bool>(
"combine-devices")) {
201 std::vector<DataProcessorSpec> unmerged;
202 specs.push_back(
specCombiner(
"TOF-writers", writers, unmerged));
203 if (unmerged.size() > 0) {
204 LOG(fatal) <<
"Unexpected DPL device merge problem";
207 for (
auto& s : writers) {
216 return std::move(specs);
Helper class to access load maps from CCDB.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
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 updateFromString(std::string const &)
Static class with identifiers, bitmasks and names for ALICE detectors.
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.
o2::framework::DataProcessorSpec specCombiner(std::string const &name, std::vector< DataProcessorSpec > const &speccollection, std::vector< DataProcessorSpec > &remaining)
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getTOFMatcherSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, bool useFIT, bool tpcRefit, bool strict, float extratolerancetrd, bool pushMatchable, const o2::tpc::CorrectionMapsLoaderGloOpts &sclOpts, int nlanes=1)
create a processor spec
o2::framework::DataProcessorSpec getTOFMatchedWriterSpec(bool useMC, const char *outdef="o2match_tof.root", bool writeTracks=false, int mode=0, bool strict=false)
o2::framework::DataProcessorSpec getTOFMatchableWriterSpec(const char *outdef="o2matchable_tof.root")
o2::framework::DataProcessorSpec getTOFCalibWriterSpec(const char *outdef="o2calib_tof.root", bool toftpc=false, bool addDia=false, bool onlyDia=false)
o2::framework::DataProcessorSpec getTPCScalerSpec(bool enableIDCs, bool enableMShape)
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
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))
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)