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 {
"enable-mc", VariantType::Bool,
false, {
"Whether to expect the MC truth of the track data from interpolation workflow (requires enable-track-input)"}},
36 {
"disable-root-input", VariantType::Bool,
false, {
"disable root-files input readers"}},
37 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings ..."}}};
39 std::swap(workflowOptions, options);
49 auto trkInput = configcontext.
options().
get<
bool>(
"enable-track-input");
50 auto ctpInput = configcontext.
options().
get<
bool>(
"enable-ctp");
51 auto mcInput = configcontext.
options().
get<
bool>(
"enable-mc");
52 if (mcInput && !trkInput) {
53 LOG(error) <<
"MC truth input requires the track input (enable-track-input), will be ignored";
57 bool writeUnbinnedResiduals =
false;
58 bool writeBinnedResiduals =
false;
59 bool writeTrackData =
false;
60 auto outputType = configcontext.
options().
get<std::string>(
"output-type");
61 std::vector<std::string> outputTypes;
63 while ((
pos = outputType.find(
",")) != std::string::npos) {
64 outputTypes.push_back(outputType.substr(0,
pos));
65 outputType.erase(0,
pos + 1);
67 outputTypes.push_back(outputType);
68 for (
const auto& out : outputTypes) {
69 if (out ==
"unbinnedResid") {
70 writeUnbinnedResiduals =
true;
71 }
else if (out ==
"binnedResid") {
72 writeBinnedResiduals =
true;
73 }
else if (out ==
"trackParams") {
75 LOG(error) <<
"Track output will be empty, because it is not configured as input";
77 writeTrackData =
true;
79 LOG(error) <<
"Invalid output requested: " << out;
84 if (!configcontext.
options().
get<
bool>(
"disable-root-input")) {
87 specs.emplace_back(getTPCResidualAggregatorSpec(trkInput, ctpInput, writeUnbinnedResiduals, writeBinnedResiduals, writeTrackData, mcInput));
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 ITS Vertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getUnbinnedTPCResidualsReaderSpec(bool trkInput, bool mcInput)
read unbinned TPC residuals and reference tracks (with mcInput also their MC truth) 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)