From ed7c95ad4084ef1876972569db94436544a7d371 Mon Sep 17 00:00:00 2001 From: shahoian Date: Tue, 22 Jun 2021 22:13:37 +0200 Subject: [PATCH] RAWDATA Lifetime must be Optional, add extra options --- .../include/CPVWorkflow/RawToDigitConverterSpec.h | 2 +- .../CPV/workflow/include/CPVWorkflow/RecoWorkflow.h | 6 +++--- Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx | 9 +++++---- Detectors/CPV/workflow/src/RecoWorkflow.cxx | 5 +++-- Detectors/CPV/workflow/src/cpv-reco-workflow.cxx | 2 ++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Detectors/CPV/workflow/include/CPVWorkflow/RawToDigitConverterSpec.h b/Detectors/CPV/workflow/include/CPVWorkflow/RawToDigitConverterSpec.h index 03dbe2f5308b1..fbb5b9496e5f7 100644 --- a/Detectors/CPV/workflow/include/CPVWorkflow/RawToDigitConverterSpec.h +++ b/Detectors/CPV/workflow/include/CPVWorkflow/RawToDigitConverterSpec.h @@ -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 diff --git a/Detectors/CPV/workflow/include/CPVWorkflow/RecoWorkflow.h b/Detectors/CPV/workflow/include/CPVWorkflow/RecoWorkflow.h index 900e40c080e2d..cd863e6fe2be1 100644 --- a/Detectors/CPV/workflow/include/CPVWorkflow/RecoWorkflow.h +++ b/Detectors/CPV/workflow/include/CPVWorkflow/RecoWorkflow.h @@ -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 diff --git a/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx b/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx index dbb5d636a0cca..83d5a2a3f3e22 100644 --- a/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx +++ b/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx @@ -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 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 outputs; outputs.emplace_back("CPV", "DIGITS", 0, o2::framework::Lifetime::Timeframe); outputs.emplace_back("CPV", "DIGITTRIGREC", 0, o2::framework::Lifetime::Timeframe); diff --git a/Detectors/CPV/workflow/src/RecoWorkflow.cxx b/Detectors/CPV/workflow/src/RecoWorkflow.cxx index 0f6f241843374..2f5cea8d046fe 100644 --- a/Detectors/CPV/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CPV/workflow/src/RecoWorkflow.cxx @@ -57,6 +57,7 @@ const std::unordered_map OutputMap{ o2::framework::WorkflowSpec getWorkflow(bool disableRootInp, bool disableRootOut, bool propagateMC, + bool askSTFDist, std::string const& cfgInput, std::string const& cfgOutput) { @@ -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)); diff --git a/Detectors/CPV/workflow/src/cpv-reco-workflow.cxx b/Detectors/CPV/workflow/src/cpv-reco-workflow.cxx index 010751b7085ca..4a98309a3e8fe 100644 --- a/Detectors/CPV/workflow/src/cpv-reco-workflow.cxx +++ b/Detectors/CPV/workflow/src/cpv-reco-workflow.cxx @@ -34,6 +34,7 @@ void customize(std::vector& 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); @@ -62,6 +63,7 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co return o2::cpv::reco_workflow::getWorkflow(cfgc.options().get("disable-root-input"), cfgc.options().get("disable-root-output"), !cfgc.options().get("disable-mc"), + !cfgc.options().get("ignore-dist-stf"), cfgc.options().get("input-type"), cfgc.options().get("output-type")); }