Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class RawToDigitConverterSpec : public framework::Task
/// \brief Creating DataProcessorSpec for the CPV Digit Converter Spec
///
/// Refer to RawToDigitConverterSpec::run for input and output specs
o2::framework::DataProcessorSpec getRawToDigitConverterSpec();
o2::framework::DataProcessorSpec getRawToDigitConverterSpec(bool askDISTSTF = true);

} // namespace reco_workflow

Expand Down
6 changes: 3 additions & 3 deletions Detectors/CPV/workflow/include/CPVWorkflow/RecoWorkflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ enum struct OutputType { Digits,
framework::WorkflowSpec getWorkflow(bool disableRootInp,
bool disableRootOut,
bool propagateMC = true,
std::string const& cfgInput = "digits", //
std::string const& cfgOutput = "clusters" //
);
bool askSTFDist = true,
std::string const& cfgInput = "digits",
std::string const& cfgOutput = "clusters");
} // namespace reco_workflow

} // namespace cpv
Expand Down
9 changes: 5 additions & 4 deletions Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@ void RawToDigitConverterSpec::run(framework::ProcessingContext& ctx)
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0, o2::framework::Lifetime::Timeframe}, mOutputHWErrors);
}

o2::framework::DataProcessorSpec o2::cpv::reco_workflow::getRawToDigitConverterSpec()
o2::framework::DataProcessorSpec o2::cpv::reco_workflow::getRawToDigitConverterSpec(bool askDISTSTF)
{
std::vector<o2::framework::InputSpec> inputs;
inputs.emplace_back("RAWDATA", o2::framework::ConcreteDataTypeMatcher{"CPV", "RAWDATA"}, o2::framework::Lifetime::Timeframe);
inputs.emplace_back("RAWDATA", o2::framework::ConcreteDataTypeMatcher{"CPV", "RAWDATA"}, o2::framework::Lifetime::Optional);
//receive at least 1 guaranteed input (which will allow to acknowledge the TF)
inputs.emplace_back("STFDist", "FLP", "DISTSUBTIMEFRAME", 0, o2::framework::Lifetime::Timeframe);

if (askDISTSTF) {
inputs.emplace_back("STFDist", "FLP", "DISTSUBTIMEFRAME", 0, o2::framework::Lifetime::Timeframe);
}
std::vector<o2::framework::OutputSpec> outputs;
outputs.emplace_back("CPV", "DIGITS", 0, o2::framework::Lifetime::Timeframe);
outputs.emplace_back("CPV", "DIGITTRIGREC", 0, o2::framework::Lifetime::Timeframe);
Expand Down
5 changes: 3 additions & 2 deletions Detectors/CPV/workflow/src/RecoWorkflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const std::unordered_map<std::string, OutputType> OutputMap{
o2::framework::WorkflowSpec getWorkflow(bool disableRootInp,
bool disableRootOut,
bool propagateMC,
bool askSTFDist,
std::string const& cfgInput,
std::string const& cfgOutput)
{
Expand Down Expand Up @@ -84,14 +85,14 @@ o2::framework::WorkflowSpec getWorkflow(bool disableRootInp,
//no explicit raw reader

if (isEnabled(OutputType::Digits)) {
specs.emplace_back(o2::cpv::reco_workflow::getRawToDigitConverterSpec());
specs.emplace_back(o2::cpv::reco_workflow::getRawToDigitConverterSpec(askSTFDist));
if (!disableRootOut) {
specs.emplace_back(o2::cpv::getDigitWriterSpec(false));
}
}
if (isEnabled(OutputType::Clusters)) {
// add clusterizer
specs.emplace_back(o2::cpv::reco_workflow::getRawToDigitConverterSpec());
specs.emplace_back(o2::cpv::reco_workflow::getRawToDigitConverterSpec(askSTFDist));
specs.emplace_back(o2::cpv::reco_workflow::getClusterizerSpec(false));
if (!disableRootOut) {
specs.emplace_back(o2::cpv::getClusterWriterSpec(false));
Expand Down
2 changes: 2 additions & 0 deletions Detectors/CPV/workflow/src/cpv-reco-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
{"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writer"}},
{"pedestal", o2::framework::VariantType::Bool, false, {"pedestal run? if true then don't subtract pedestals from digits"}},
{"ignore-dist-stf", o2::framework::VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
//{"ccdb-url", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"path to CCDB like http://ccdb-test.cern.ch:8080"}},
{"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
std::swap(workflowOptions, options);
Expand Down Expand Up @@ -62,6 +63,7 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co
return o2::cpv::reco_workflow::getWorkflow(cfgc.options().get<bool>("disable-root-input"),
cfgc.options().get<bool>("disable-root-output"),
!cfgc.options().get<bool>("disable-mc"),
!cfgc.options().get<bool>("ignore-dist-stf"),
cfgc.options().get<std::string>("input-type"),
cfgc.options().get<std::string>("output-type"));
}