23void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
29void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
31 std::vector<o2::framework::ConfigParamSpec> options{
32 {
"output-type", VariantType::String,
"unbinnedResid,trackParams", {
"Comma separated list of outputs (without spaces). Valid strings: unbinnedResid, binnedResid, trackParams"}},
33 {
"enable-track-input", VariantType::Bool,
false, {
"Whether to expect track data from interpolation workflow"}},
34 {
"enable-ctp", VariantType::Bool,
false, {
"Subscribe to lumi info from CTP"}},
35 {
"disable-root-input", VariantType::Bool,
false, {
"disable root-files input readers"}},
36 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings ..."}}};
38 std::swap(workflowOptions, options);
48 auto trkInput = configcontext.
options().
get<
bool>(
"enable-track-input");
49 auto ctpInput = configcontext.
options().
get<
bool>(
"enable-ctp");
51 bool writeUnbinnedResiduals =
false;
52 bool writeBinnedResiduals =
false;
53 bool writeTrackData =
false;
54 auto outputType = configcontext.
options().
get<std::string>(
"output-type");
55 std::vector<std::string> outputTypes;
57 while ((
pos = outputType.find(
",")) != std::string::npos) {
58 outputTypes.push_back(outputType.substr(0,
pos));
59 outputType.erase(0,
pos + 1);
61 outputTypes.push_back(outputType);
62 for (
const auto& out : outputTypes) {
63 if (out ==
"unbinnedResid") {
64 writeUnbinnedResiduals =
true;
65 }
else if (out ==
"binnedResid") {
66 writeBinnedResiduals =
true;
67 }
else if (out ==
"trackParams") {
69 LOG(error) <<
"Track output will be empty, because it is not configured as input";
71 writeTrackData =
true;
73 LOG(error) <<
"Invalid output requested: " << out;
78 if (!configcontext.
options().
get<
bool>(
"disable-root-input")) {
81 specs.emplace_back(getTPCResidualAggregatorSpec(trkInput, ctpInput, writeUnbinnedResiduals, writeBinnedResiduals, writeTrackData));
Collects local TPC cluster residuals from EPNs.
DPL device for collecting and binning TPC cluster residuals.
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
T get(const char *key) const
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getUnbinnedTPCResidualsReaderSpec(bool trkInput)
read unbinned TPC residuals and reference tracks from a root file
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)