From 983c9df9685943b9461bb7fbfcb34b3a2f9f569a Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de> Date: Thu, 22 Jun 2023 09:52:15 +0000 Subject: [PATCH] algo::Unpack: Change return type of Init to void as it can never fail. --- algo/unpack/Unpack.cxx | 4 +--- algo/unpack/Unpack.h | 2 +- algo/unpack/UnpackChain.cxx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/algo/unpack/Unpack.cxx b/algo/unpack/Unpack.cxx index 230cdc86b3..0bfd734e67 100644 --- a/algo/unpack/Unpack.cxx +++ b/algo/unpack/Unpack.cxx @@ -130,7 +130,7 @@ namespace cbm::algo // ---------------------------------------------------------------------------- // ----- Initialisation --------------------------------------------------- - bool Unpack::Init(std::vector<fles::SubsystemIdentifier> subIds) + void Unpack::Init(std::vector<fles::SubsystemIdentifier> subIds) { fSubIds = subIds; @@ -284,8 +284,6 @@ namespace cbm::algo L_(info) << "--- Configured " << fAlgoTrd2d.size() << " unpacker algorithms for TRD2D."; L_(info) << "--- Configured " << fAlgoBmon.size() << " unpacker algorithms for T0."; L_(info) << "=================================================="; - - return true; } // ---------------------------------------------------------------------------- diff --git a/algo/unpack/Unpack.h b/algo/unpack/Unpack.h index 00ffce39bd..34c40520a2 100644 --- a/algo/unpack/Unpack.h +++ b/algo/unpack/Unpack.h @@ -105,7 +105,7 @@ namespace cbm::algo * @param subIds: vector of subsystem identifiers to unpack, default: all * @see Init() **/ - bool Init(std::vector<fles::SubsystemIdentifier> subIds = { + void Init(std::vector<fles::SubsystemIdentifier> subIds = { fles::SubsystemIdentifier::STS, fles::SubsystemIdentifier::MUCH, fles::SubsystemIdentifier::RPC, diff --git a/algo/unpack/UnpackChain.cxx b/algo/unpack/UnpackChain.cxx index 256d557307..b0c56787eb 100644 --- a/algo/unpack/UnpackChain.cxx +++ b/algo/unpack/UnpackChain.cxx @@ -7,14 +7,13 @@ using namespace cbm::algo; void UnpackChain::Init() { - bool ok = fUnpack.Init(std::vector<fles::SubsystemIdentifier> { + fUnpack.Init(std::vector<fles::SubsystemIdentifier> { fles::SubsystemIdentifier::STS, // fles::SubsystemIdentifier::MUCH, fles::SubsystemIdentifier::RPC, fles::SubsystemIdentifier::T0, // fles::SubsystemIdentifier::TRD, // fles::SubsystemIdentifier::TRD2D, }); - if (!ok) throw std::runtime_error("Unpack::Init failed"); } Unpack::resultType UnpackChain::Run(const fles::Timeslice& timeslice) -- GitLab