From 3dbcc46cf7a2796c4c7b699e58f18e0caf92893b Mon Sep 17 00:00:00 2001 From: lietava Date: Sat, 30 Oct 2021 21:36:33 +0200 Subject: [PATCH 01/13] digi2raw file-for; ctp-reco-workflow rebamed to ctp-raw-decoder --- Detectors/CTP/simulation/src/Digits2Raw.cxx | 4 ++-- Detectors/CTP/simulation/src/digi2raw.cxx | 10 ++++---- Detectors/CTP/workflow/CMakeLists.txt | 4 ++-- .../include/CTPWorkflow/RecoWorkflow.h | 9 +++----- Detectors/CTP/workflow/src/RecoWorkflow.cxx | 23 +------------------ ...-reco-workflow.cxx => ctp-raw-decoder.cxx} | 17 ++++---------- 6 files changed, 17 insertions(+), 50 deletions(-) rename Detectors/CTP/workflow/src/{ctp-reco-workflow.cxx => ctp-raw-decoder.cxx} (69%) diff --git a/Detectors/CTP/simulation/src/Digits2Raw.cxx b/Detectors/CTP/simulation/src/Digits2Raw.cxx index 0bed37004a11b..5386187301260 100644 --- a/Detectors/CTP/simulation/src/Digits2Raw.cxx +++ b/Detectors/CTP/simulation/src/Digits2Raw.cxx @@ -39,12 +39,12 @@ void Digits2Raw::init() // Interaction Record int ilink = 0; uint64_t feeID = getFEEIDIR(); - std::string outFileLink0 = mOutputPerLink ? fmt::format("{}{}_feeid{}.raw", outd, mCTPRawDataFileName, feeID) : fmt::format("{}{}.raw", outd, mCTPRawDataFileName, feeID); + std::string outFileLink0 = mOutputPerLink ? fmt::format("{}{}_feeid{}.raw", outd, mCTPRawDataFileName, feeID) : fmt::format("{}{}.raw", outd, mCTPRawDataFileName); mWriter.registerLink(feeID, mCruID, ilink, mEndPointID, outFileLink0); // Trigger Class record ilink = 1; feeID = getFEEIDTC(); - std::string outFileLink1 = mOutputPerLink ? fmt::format("{}{}_feeid{}.raw", outd, mCTPRawDataFileName, feeID) : fmt::format("{}{}.raw", outd, mCTPRawDataFileName, feeID); + std::string outFileLink1 = mOutputPerLink ? fmt::format("{}{}_feeid{}.raw", outd, mCTPRawDataFileName, feeID) : fmt::format("{}{}.raw", outd, mCTPRawDataFileName); mWriter.registerLink(feeID, mCruID, ilink, mEndPointID, outFileLink1); // ilink = 2: HBMap, Counters - tbd mWriter.setEmptyPageCallBack(this); diff --git a/Detectors/CTP/simulation/src/digi2raw.cxx b/Detectors/CTP/simulation/src/digi2raw.cxx index 49d6271388cb3..abb4079d56940 100644 --- a/Detectors/CTP/simulation/src/digi2raw.cxx +++ b/Detectors/CTP/simulation/src/digi2raw.cxx @@ -26,7 +26,7 @@ #include "DataFormatsParameters/GRPObject.h" namespace bpo = boost::program_options; -void digi2raw(const std::string& inpName, const std::string& outDir, int verbosity, bool filePerLink, uint32_t rdhV = 4, bool noEmptyHBF = false, +void digi2raw(const std::string& inpName, const std::string& outDir, int verbosity, const std::string& fileForLink, uint32_t rdhV = 4, bool noEmptyHBF = false, int superPageSizeInB = 1024 * 1024); int main(int argc, char** argv) @@ -44,7 +44,7 @@ int main(int argc, char** argv) add_option("verbosity,v", bpo::value()->default_value(0), "verbosity level"); // add_option("input-file,i", bpo::value()->default_value(o2::base::NameConf::getDigitsFileName(o2::detectors::DetID::CTP)),"input CTP digits file"); // why not used? add_option("input-file,i", bpo::value()->default_value("ctpdigits.root"), "input CTP digits file"); - add_option("file-per-link,l", bpo::value()->default_value(false)->implicit_value(true), "create output file per CRU (default: per layer)"); + add_option("file-for,f", bpo::value()->default_value("all"), "single file per: all,link,cru"); add_option("output-dir,o", bpo::value()->default_value("./"), "output directory for raw data"); uint32_t defRDH = o2::raw::RDHUtils::getVersion(); add_option("rdh-version,r", bpo::value()->default_value(defRDH), "RDH version to use"); @@ -79,7 +79,7 @@ int main(int argc, char** argv) digi2raw(vm["input-file"].as(), vm["output-dir"].as(), vm["verbosity"].as(), - vm["file-per-link"].as(), + vm["file-for"].as(), vm["rdh-version"].as(), vm["no-empty-hbf"].as()); @@ -88,12 +88,12 @@ int main(int argc, char** argv) return 0; } -void digi2raw(const std::string& inpName, const std::string& outDir, int verbosity, bool filePerLink, uint32_t rdhV, bool noEmptyHBF, int superPageSizeInB) +void digi2raw(const std::string& inpName, const std::string& outDir, int verbosity, const std::string& fileForLink, uint32_t rdhV, bool noEmptyHBF, int superPageSizeInB) { TStopwatch swTot; swTot.Start(); o2::ctp::Digits2Raw m2r; - m2r.setFilePerLink(filePerLink); + m2r.setFilePerLink(fileForLink == "link"); m2r.setVerbosity(verbosity); auto& wr = m2r.getWriter(); std::string inputGRP = o2::base::NameConf::getGRPFileName(); diff --git a/Detectors/CTP/workflow/CMakeLists.txt b/Detectors/CTP/workflow/CMakeLists.txt index 69aef2902e1e4..bfa962311c910 100644 --- a/Detectors/CTP/workflow/CMakeLists.txt +++ b/Detectors/CTP/workflow/CMakeLists.txt @@ -23,11 +23,11 @@ o2_add_library(CTPWorkflow O2::CTPWorkflowIO) o2_add_executable(reco-workflow COMPONENT_NAME ctp - SOURCES src/ctp-reco-workflow.cxx + SOURCES src/ctp-raw-decoder.cxx PUBLIC_LINK_LIBRARIES O2::Algorithm O2::CTPWorkflow) o2_add_executable(entropy-encoder-workflow COMPONENT_NAME ctp SOURCES src/entropy-encoder-workflow.cxx - PUBLIC_LINK_LIBRARIES O2::CTPWorkflow) \ No newline at end of file + PUBLIC_LINK_LIBRARIES O2::CTPWorkflow) diff --git a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h index 9a4826e64102e..40a3bf9bc192c 100644 --- a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h +++ b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h @@ -34,12 +34,9 @@ enum struct OutputType { Digits, }; /// create the workflow for CTP reconstruction -framework::WorkflowSpec getWorkflow(bool disableRootInp, - bool disableRootOut, - bool propagateMC = true, - bool noLostTF = false, - std::string const& cfgInput = "raw", // - std::string const& cfgOutput = "digits" // +framework::WorkflowSpec getWorkflow( + std::string const& cfgInput = "raw", + std::string const& cfgOutput = "digits" ); } // namespace reco_workflow diff --git a/Detectors/CTP/workflow/src/RecoWorkflow.cxx b/Detectors/CTP/workflow/src/RecoWorkflow.cxx index 6b17c5c8b7ffb..18f4747ca8ca2 100644 --- a/Detectors/CTP/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CTP/workflow/src/RecoWorkflow.cxx @@ -45,10 +45,7 @@ const std::unordered_map InputMap{ const std::unordered_map OutputMap{ {"digits", OutputType::Digits}}; -o2::framework::WorkflowSpec getWorkflow(bool disableRootInp, - bool disableRootOut, - bool propagateMC, - bool noLostTF, +o2::framework::WorkflowSpec getWorkflow( std::string const& cfgInput, std::string const& cfgOutput) { @@ -71,24 +68,6 @@ o2::framework::WorkflowSpec getWorkflow(bool disableRootInp, o2::framework::WorkflowSpec specs; - // //Raw to .... - if (inputType == InputType::Raw) { - //no explicit raw reader - - if (isEnabled(OutputType::Digits)) { - specs.emplace_back(o2::ctp::reco_workflow::getRawToDigitConverterSpec(noLostTF)); - if (!disableRootOut) { - specs.emplace_back(o2::ctp::getDigitWriterSpec(true)); - } - } - } - - // Digits to .... - if (inputType == InputType::Digits) { - if (!disableRootInp) { - specs.emplace_back(o2::ctp::getDigitsReaderSpec(propagateMC)); - } - } return std::move(specs); } diff --git a/Detectors/CTP/workflow/src/ctp-reco-workflow.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx similarity index 69% rename from Detectors/CTP/workflow/src/ctp-reco-workflow.cxx rename to Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index 684a677abda0d..f5be0c3b72bde 100644 --- a/Detectors/CTP/workflow/src/ctp-reco-workflow.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -29,12 +29,8 @@ void customize(std::vector& workflowOptions) { std::vector options{ {"input-type", o2::framework::VariantType::String, "raw", {"digits, raw"}}, - {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}, - {"disable-mc", o2::framework::VariantType::Bool, false, {"disable sending of MC information"}}, - {"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"}}, - {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}, - {"ignore-dist-stf", o2::framework::VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}}}; + {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}} + }; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); } @@ -58,13 +54,8 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co // Update the (declared) parameters if changed from the command line o2::conf::ConfigurableParam::updateFromString(cfgc.options().get("configKeyValues")); - auto wf = o2::ctp::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") // - ); + auto wf = o2::ctp::reco_workflow::getWorkflow( cfgc.options().get("input-type"), + cfgc.options().get("output-type") ); // configure dpl timer to inject correct firstTFOrbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf); return std::move(wf); From 4cde80c7e9308b62ce30626d10c57ce17bb3b9da Mon Sep 17 00:00:00 2001 From: lietava Date: Sat, 30 Oct 2021 21:36:56 +0200 Subject: [PATCH 02/13] clang format --- Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h | 5 ++--- Detectors/CTP/workflow/src/RecoWorkflow.cxx | 4 ++-- Detectors/CTP/workflow/src/ctp-raw-decoder.cxx | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h index 40a3bf9bc192c..de7c5298dd637 100644 --- a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h +++ b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h @@ -35,9 +35,8 @@ enum struct OutputType { Digits, /// create the workflow for CTP reconstruction framework::WorkflowSpec getWorkflow( - std::string const& cfgInput = "raw", - std::string const& cfgOutput = "digits" -); + std::string const& cfgInput = "raw", + std::string const& cfgOutput = "digits"); } // namespace reco_workflow } // namespace ctp diff --git a/Detectors/CTP/workflow/src/RecoWorkflow.cxx b/Detectors/CTP/workflow/src/RecoWorkflow.cxx index 18f4747ca8ca2..282a78da276d4 100644 --- a/Detectors/CTP/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CTP/workflow/src/RecoWorkflow.cxx @@ -46,8 +46,8 @@ const std::unordered_map OutputMap{ {"digits", OutputType::Digits}}; o2::framework::WorkflowSpec getWorkflow( - std::string const& cfgInput, - std::string const& cfgOutput) + std::string const& cfgInput, + std::string const& cfgOutput) { InputType inputType; diff --git a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index f5be0c3b72bde..608001d58a862 100644 --- a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -29,8 +29,7 @@ void customize(std::vector& workflowOptions) { std::vector options{ {"input-type", o2::framework::VariantType::String, "raw", {"digits, raw"}}, - {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}} - }; + {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}}; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); } @@ -54,8 +53,8 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co // Update the (declared) parameters if changed from the command line o2::conf::ConfigurableParam::updateFromString(cfgc.options().get("configKeyValues")); - auto wf = o2::ctp::reco_workflow::getWorkflow( cfgc.options().get("input-type"), - cfgc.options().get("output-type") ); + auto wf = o2::ctp::reco_workflow::getWorkflow(cfgc.options().get("input-type"), + cfgc.options().get("output-type")); // configure dpl timer to inject correct firstTFOrbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf); return std::move(wf); From 54fe40ed6c3e7e6e2ff6b243fa5732308d8cc04b Mon Sep 17 00:00:00 2001 From: lietava Date: Sun, 31 Oct 2021 01:33:19 +0200 Subject: [PATCH 03/13] full_system_test --file-for cru done --- prodtests/full_system_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prodtests/full_system_test.sh b/prodtests/full_system_test.sh index 5134079813614..32fc945a6b7bc 100755 --- a/prodtests/full_system_test.sh +++ b/prodtests/full_system_test.sh @@ -130,7 +130,7 @@ taskwrapper cpvraw.log o2-cpv-digi2raw --file-for cru -o raw/CPV taskwrapper zdcraw.log o2-zdc-digi2raw --file-for cru -o raw/ZDC taskwrapper hmpraw.log o2-hmpid-digits-to-raw-workflow --file-for cru --outdir raw/HMP taskwrapper trdraw.log o2-trd-trap2raw -o raw/TRD --fileper halfcru -taskwrapper ctpraw.log o2-ctp-digi2raw -o raw/CTP --file-per-link +taskwrapper ctpraw.log o2-ctp-digi2raw -o raw/CTP --file-for cru cat raw/*/*.cfg > rawAll.cfg From aa46a50caa3b33ae89ecd4f23b7bb8a82b89d05e Mon Sep 17 00:00:00 2001 From: lietava Date: Mon, 1 Nov 2021 02:11:41 +0100 Subject: [PATCH 04/13] configKeyValues is back --- Detectors/CTP/workflow/src/ctp-raw-decoder.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index 608001d58a862..8fa10d01bdda0 100644 --- a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -29,7 +29,9 @@ void customize(std::vector& workflowOptions) { std::vector options{ {"input-type", o2::framework::VariantType::String, "raw", {"digits, raw"}}, - {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}}; + {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}, + {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}} + }; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); } From ce2ecaa770f93bbf5db0bd0b7cc0db755fac2969 Mon Sep 17 00:00:00 2001 From: lietava Date: Mon, 1 Nov 2021 02:13:23 +0100 Subject: [PATCH 05/13] clang format --- Detectors/CTP/workflow/src/ctp-raw-decoder.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index 8fa10d01bdda0..19aa239a61648 100644 --- a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -30,8 +30,7 @@ void customize(std::vector& workflowOptions) std::vector options{ {"input-type", o2::framework::VariantType::String, "raw", {"digits, raw"}}, {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}, - {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}} - }; + {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}}; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); } From a8d9a342302381419ca4b7da3d66284f5be29057 Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:11:17 +0100 Subject: [PATCH 06/13] Suppress unneeded options --- Detectors/CTP/workflow/src/ctp-raw-decoder.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index 19aa239a61648..f947a7dce7c50 100644 --- a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -28,8 +28,6 @@ void customize(std::vector& workflowOptions) { std::vector options{ - {"input-type", o2::framework::VariantType::String, "raw", {"digits, raw"}}, - {"output-type", o2::framework::VariantType::String, "digits", {"digits, raw"}}, {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}}; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); @@ -54,8 +52,7 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co // Update the (declared) parameters if changed from the command line o2::conf::ConfigurableParam::updateFromString(cfgc.options().get("configKeyValues")); - auto wf = o2::ctp::reco_workflow::getWorkflow(cfgc.options().get("input-type"), - cfgc.options().get("output-type")); + auto wf = o2::ctp::reco_workflow::getWorkflow(); // configure dpl timer to inject correct firstTFOrbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf); return std::move(wf); From cce140559f8147b5b70c8af74d9a3cb18a20664b Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:16:12 +0100 Subject: [PATCH 07/13] Restore ignore-dist-stf option --- Detectors/CTP/workflow/src/ctp-raw-decoder.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx index f947a7dce7c50..f8e8f04f7ebb7 100644 --- a/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx +++ b/Detectors/CTP/workflow/src/ctp-raw-decoder.cxx @@ -28,6 +28,7 @@ void customize(std::vector& workflowOptions) { std::vector options{ + {"ignore-dist-stf", o2::framework::VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}}, {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}}; o2::raw::HBFUtilsInitializer::addConfigOption(options); std::swap(workflowOptions, options); @@ -52,7 +53,7 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co // Update the (declared) parameters if changed from the command line o2::conf::ConfigurableParam::updateFromString(cfgc.options().get("configKeyValues")); - auto wf = o2::ctp::reco_workflow::getWorkflow(); + auto wf = o2::ctp::reco_workflow::getWorkflow(!cfgc.options().get("ignore-dist-stf")); // configure dpl timer to inject correct firstTFOrbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf); return std::move(wf); From cb2c507d9b8a31265e92d3ce886b11313f6983e1 Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:19:17 +0100 Subject: [PATCH 08/13] Restore getRawToDigitConverterSpec --- Detectors/CTP/workflow/src/RecoWorkflow.cxx | 30 ++------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/Detectors/CTP/workflow/src/RecoWorkflow.cxx b/Detectors/CTP/workflow/src/RecoWorkflow.cxx index 282a78da276d4..69b9c1082f8b2 100644 --- a/Detectors/CTP/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CTP/workflow/src/RecoWorkflow.cxx @@ -38,36 +38,10 @@ namespace ctp namespace reco_workflow { -const std::unordered_map InputMap{ - {"raw", InputType::Raw}, - {"digits", InputType::Digits}}; - -const std::unordered_map OutputMap{ - {"digits", OutputType::Digits}}; - -o2::framework::WorkflowSpec getWorkflow( - std::string const& cfgInput, - std::string const& cfgOutput) +o2::framework::WorkflowSpec getWorkflow(bool noLostTF) { - InputType inputType; - - try { - inputType = InputMap.at(cfgInput); - } catch (std::out_of_range&) { - throw std::invalid_argument(std::string("invalid input type: ") + cfgInput); - } - std::vector outputTypes; - try { - outputTypes = RangeTokenizer::tokenize(cfgOutput, [](std::string const& token) { return OutputMap.at(token); }); - } catch (std::out_of_range&) { - throw std::invalid_argument(std::string("invalid output type: ") + cfgOutput); - } - auto isEnabled = [&outputTypes](OutputType type) { - return std::find(outputTypes.begin(), outputTypes.end(), type) != outputTypes.end(); - }; - o2::framework::WorkflowSpec specs; - + specs.emplace_back(o2::ctp::reco_workflow::getRawToDigitConverterSpec(noLostTF)); return std::move(specs); } From 4015b86651c60adb5a167c1d61cb203b28d9dcd3 Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:21:41 +0100 Subject: [PATCH 09/13] remove unnecessary includes --- Detectors/CTP/workflow/src/RecoWorkflow.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Detectors/CTP/workflow/src/RecoWorkflow.cxx b/Detectors/CTP/workflow/src/RecoWorkflow.cxx index 69b9c1082f8b2..8296aab148515 100644 --- a/Detectors/CTP/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CTP/workflow/src/RecoWorkflow.cxx @@ -15,17 +15,10 @@ #include "FairLogger.h" -#include "Framework/RootSerializationSupport.h" -#include "Algorithm/RangeTokenizer.h" -#include "DPLUtils/MakeRootTreeWriterSpec.h" #include "DataFormatsCTP/Digits.h" -#include "SimulationDataFormat/MCCompLabel.h" #include "CTPWorkflow/RecoWorkflow.h" -#include "CTPWorkflowIO/DigitReaderSpec.h" -#include "CTPWorkflowIO/DigitWriterSpec.h" #include "CTPWorkflow/RawToDigitConverterSpec.h" #include "Framework/DataSpecUtils.h" -#include "SimulationDataFormat/MCTruthContainer.h" using namespace o2::dataformats; From bdaa5474d6f627c99fadf2b98690b3a35c23d5cf Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:23:07 +0100 Subject: [PATCH 10/13] fixes for CTP bool noLostTF --- .../CTP/workflow/include/CTPWorkflow/RecoWorkflow.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h index de7c5298dd637..e243a4b810495 100644 --- a/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h +++ b/Detectors/CTP/workflow/include/CTPWorkflow/RecoWorkflow.h @@ -25,18 +25,9 @@ namespace ctp namespace reco_workflow { -/// define input and output types of the workflow -enum struct InputType { Digits, // read digits from file - Raw // read data in raw page format from file -}; -enum struct OutputType { Digits, - Raw -}; - /// create the workflow for CTP reconstruction -framework::WorkflowSpec getWorkflow( - std::string const& cfgInput = "raw", - std::string const& cfgOutput = "digits"); +framework::WorkflowSpec getWorkflow(bool noLostTF); + } // namespace reco_workflow } // namespace ctp From ebd3f660bb7b2e185592c24fb5bb62b799287234 Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 20:27:24 +0100 Subject: [PATCH 11/13] do not pass suppressed CTP option in the dpl-workflow --- prodtests/full-system-test/dpl-workflow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prodtests/full-system-test/dpl-workflow.sh b/prodtests/full-system-test/dpl-workflow.sh index a682d4b51cc17..16f6be9580f8c 100755 --- a/prodtests/full-system-test/dpl-workflow.sh +++ b/prodtests/full-system-test/dpl-workflow.sh @@ -366,7 +366,7 @@ if [ $CTFINPUT == 0 ]; then has_detector TRD && add_W o2-trd-datareader "$TRD_DECODER_OPTIONS --pipeline $(get_N trd-datareader TRD RAW TRDRAWDEC)" "" 0 has_detector ZDC && add_W o2-zdc-raw2digits "$DISABLE_ROOT_OUTPUT --pipeline $(get_N zdc-datareader-dpl ZDC RAW)" has_detector HMP && add_W o2-hmpid-raw-to-digits-stream-workflow "--pipeline $(get_N HMP-RawStreamDecoder HMP RAW)" - has_detector CTP && add_W o2-ctp-reco-workflow "$DISABLE_ROOT_OUTPUT --pipeline $(get_N CTP-RawStreamDecoder CTP RAW)" + has_detector CTP && add_W o2-ctp-reco-workflow --pipeline $(get_N CTP-RawStreamDecoder CTP RAW)" has_detector PHS && ! has_detector_flp_processing PHS && add_W o2-phos-reco-workflow "--input-type raw --output-type cells --disable-root-input $DISABLE_ROOT_OUTPUT --pipeline $(get_N PHOSRawToCellConverterSpec PHS REST) $DISABLE_MC" has_detector CPV && add_W o2-cpv-reco-workflow "--input-type $CPV_INPUT --output-type clusters --disable-root-input $DISABLE_ROOT_OUTPUT --pipeline $(get_N CPVRawToDigitConverterSpec CPV REST),$(get_N CPVClusterizerSpec CPV REST) $DISABLE_MC" has_detector EMC && ! has_detector_flp_processing EMC && add_W o2-emcal-reco-workflow "--input-type raw --output-type cells $EMCRAW2C_CONFIG $DISABLE_ROOT_OUTPUT $DISABLE_MC --pipeline $(get_N EMCALRawToCellConverterSpec EMC REST EMCREC)" From 913a14586e126bbec5cfe345050173a494f4515b Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Mon, 1 Nov 2021 21:50:38 +0100 Subject: [PATCH 12/13] fix1 --- Detectors/CTP/workflow/src/RecoWorkflow.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Detectors/CTP/workflow/src/RecoWorkflow.cxx b/Detectors/CTP/workflow/src/RecoWorkflow.cxx index 8296aab148515..2b4a91211584a 100644 --- a/Detectors/CTP/workflow/src/RecoWorkflow.cxx +++ b/Detectors/CTP/workflow/src/RecoWorkflow.cxx @@ -20,8 +20,6 @@ #include "CTPWorkflow/RawToDigitConverterSpec.h" #include "Framework/DataSpecUtils.h" -using namespace o2::dataformats; - namespace o2 { From 7997051d99390bdcba204c4dff4dae7af0a224ab Mon Sep 17 00:00:00 2001 From: Ruben Shahoyan Date: Wed, 3 Nov 2021 01:17:21 +0100 Subject: [PATCH 13/13] fix typo --- prodtests/full-system-test/dpl-workflow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prodtests/full-system-test/dpl-workflow.sh b/prodtests/full-system-test/dpl-workflow.sh index 16f6be9580f8c..c1f511b378284 100755 --- a/prodtests/full-system-test/dpl-workflow.sh +++ b/prodtests/full-system-test/dpl-workflow.sh @@ -366,7 +366,7 @@ if [ $CTFINPUT == 0 ]; then has_detector TRD && add_W o2-trd-datareader "$TRD_DECODER_OPTIONS --pipeline $(get_N trd-datareader TRD RAW TRDRAWDEC)" "" 0 has_detector ZDC && add_W o2-zdc-raw2digits "$DISABLE_ROOT_OUTPUT --pipeline $(get_N zdc-datareader-dpl ZDC RAW)" has_detector HMP && add_W o2-hmpid-raw-to-digits-stream-workflow "--pipeline $(get_N HMP-RawStreamDecoder HMP RAW)" - has_detector CTP && add_W o2-ctp-reco-workflow --pipeline $(get_N CTP-RawStreamDecoder CTP RAW)" + has_detector CTP && add_W o2-ctp-reco-workflow "--pipeline $(get_N CTP-RawStreamDecoder CTP RAW)" has_detector PHS && ! has_detector_flp_processing PHS && add_W o2-phos-reco-workflow "--input-type raw --output-type cells --disable-root-input $DISABLE_ROOT_OUTPUT --pipeline $(get_N PHOSRawToCellConverterSpec PHS REST) $DISABLE_MC" has_detector CPV && add_W o2-cpv-reco-workflow "--input-type $CPV_INPUT --output-type clusters --disable-root-input $DISABLE_ROOT_OUTPUT --pipeline $(get_N CPVRawToDigitConverterSpec CPV REST),$(get_N CPVClusterizerSpec CPV REST) $DISABLE_MC" has_detector EMC && ! has_detector_flp_processing EMC && add_W o2-emcal-reco-workflow "--input-type raw --output-type cells $EMCRAW2C_CONFIG $DISABLE_ROOT_OUTPUT $DISABLE_MC --pipeline $(get_N EMCALRawToCellConverterSpec EMC REST EMCREC)"