Skip to content
Snippets Groups Projects
Commit 4da3969a authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

algo: Rename StsReadoutConfig to StsReadoutConfigLegacy.

parent caf3c29e
No related branches found
No related tags found
1 merge request!1171algo: read STS Unpacker setup from yaml.
...@@ -19,7 +19,7 @@ set(SRCS ...@@ -19,7 +19,7 @@ set(SRCS
evselector/DigiEventSelector.cxx evselector/DigiEventSelector.cxx
detectors/sts/ReadoutConfig.cxx detectors/sts/ReadoutConfig.cxx
detectors/sts/StsHitfinderChain.cxx detectors/sts/StsHitfinderChain.cxx
detectors/sts/StsReadoutConfig.cxx detectors/sts/StsReadoutConfigLegacy.cxx
detectors/sts/StsUnpackChain.cxx detectors/sts/StsUnpackChain.cxx
detectors/sts/UnpackSts.cxx detectors/sts/UnpackSts.cxx
detectors/much/MuchReadoutConfig.cxx detectors/much/MuchReadoutConfig.cxx
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
SPDX-License-Identifier: GPL-3.0-only SPDX-License-Identifier: GPL-3.0-only
Authors: Volker Friese [committer] */ Authors: Volker Friese [committer] */
#include "StsReadoutConfig.h" #include "StsReadoutConfigLegacy.h"
#include "CbmStsAddress.h" #include "CbmStsAddress.h"
...@@ -17,17 +17,17 @@ namespace cbm::algo ...@@ -17,17 +17,17 @@ namespace cbm::algo
// --- Constructor ------------------------------------------------------------------ // --- Constructor ------------------------------------------------------------------
StsReadoutConfig::StsReadoutConfig() { Init(); } StsReadoutConfigLegacy::StsReadoutConfigLegacy() { Init(); }
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
// --- Destructor ----------------------------------------------------------------- // --- Destructor -----------------------------------------------------------------
StsReadoutConfig::~StsReadoutConfig() {} StsReadoutConfigLegacy::~StsReadoutConfigLegacy() {}
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
// --- Equipment IDs -------------------------------------------------------------- // --- Equipment IDs --------------------------------------------------------------
std::vector<uint16_t> StsReadoutConfig::GetEquipmentIds() std::vector<uint16_t> StsReadoutConfigLegacy::GetEquipmentIds()
{ {
std::vector<uint16_t> result; std::vector<uint16_t> result;
for (auto& entry : fReadoutMap) for (auto& entry : fReadoutMap)
...@@ -38,7 +38,7 @@ namespace cbm::algo ...@@ -38,7 +38,7 @@ namespace cbm::algo
// --- Number of elinks for a component / equipment ------------------------------- // --- Number of elinks for a component / equipment -------------------------------
size_t StsReadoutConfig::GetNumElinks(uint16_t equipmentId) size_t StsReadoutConfigLegacy::GetNumElinks(uint16_t equipmentId)
{ {
size_t result = 0; size_t result = 0;
auto it = fReadoutMap.find(equipmentId); auto it = fReadoutMap.find(equipmentId);
...@@ -49,7 +49,7 @@ namespace cbm::algo ...@@ -49,7 +49,7 @@ namespace cbm::algo
// --- Total number of elinks for STS --------------------------------------------- // --- Total number of elinks for STS ---------------------------------------------
size_t StsReadoutConfig::GetNumElinks() size_t StsReadoutConfigLegacy::GetNumElinks()
{ {
size_t result = 0; size_t result = 0;
for (auto& entry : fReadoutMap) { for (auto& entry : fReadoutMap) {
...@@ -61,7 +61,7 @@ namespace cbm::algo ...@@ -61,7 +61,7 @@ namespace cbm::algo
// --- Initialise the mapping structure -------------------------------------------- // --- Initialise the mapping structure --------------------------------------------
void StsReadoutConfig::Init() void StsReadoutConfigLegacy::Init()
{ {
// This here refers to the mCBM 2021 setup. // This here refers to the mCBM 2021 setup.
...@@ -184,7 +184,7 @@ namespace cbm::algo ...@@ -184,7 +184,7 @@ namespace cbm::algo
// --- Mapping (equimentId, elink) -> (address, ASIC) -------------------------------- // --- Mapping (equimentId, elink) -> (address, ASIC) --------------------------------
pair<int32_t, uint16_t> StsReadoutConfig::Map(uint16_t equipmentId, uint16_t elinkId) pair<int32_t, uint16_t> StsReadoutConfigLegacy::Map(uint16_t equipmentId, uint16_t elinkId)
{ {
std::pair<int32_t, uint16_t> result(-1, 0); std::pair<int32_t, uint16_t> result(-1, 0);
auto equipIter = fReadoutMap.find(equipmentId); auto equipIter = fReadoutMap.find(equipmentId);
...@@ -197,7 +197,7 @@ namespace cbm::algo ...@@ -197,7 +197,7 @@ namespace cbm::algo
// ----- Print readout map ------------------------------------------------ // ----- Print readout map ------------------------------------------------
std::string StsReadoutConfig::PrintReadoutMap() std::string StsReadoutConfigLegacy::PrintReadoutMap()
{ {
std::stringstream ss; std::stringstream ss;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
SPDX-License-Identifier: GPL-3.0-only SPDX-License-Identifier: GPL-3.0-only
Authors: Volker Friese [committer] */ Authors: Volker Friese [committer] */
#ifndef ALGO_DETECTORS_STS_STSREADOUTCONFIG_H #ifndef ALGO_DETECTORS_STS_StsReadoutConfigLegacy_H
#define ALGO_DETECTORS_STS_STSREADOUTCONFIG_H #define ALGO_DETECTORS_STS_StsReadoutConfigLegacy_H
#include <map> #include <map>
#include <sstream> #include <sstream>
...@@ -14,7 +14,7 @@ namespace cbm::algo ...@@ -14,7 +14,7 @@ namespace cbm::algo
{ {
/** @class StsReadoutConfig /** @class StsReadoutConfigLegacy
** @author Volker Friese <v.friese@gsi.de> ** @author Volker Friese <v.friese@gsi.de>
** @since 3 March 2022 ** @since 3 March 2022
** @brief Provides the hardware-to-software address mapping for the CBM-STS ** @brief Provides the hardware-to-software address mapping for the CBM-STS
...@@ -25,18 +25,18 @@ namespace cbm::algo ...@@ -25,18 +25,18 @@ namespace cbm::algo
** the module. ** the module.
** The mapping of the two address spaces is hard-coded in this class. ** The mapping of the two address spaces is hard-coded in this class.
** **
** NOTE: This class is deprecated. It's replaced by ReadoutMapping in algo/data/sts. The new class no longer hardcodes the mapping. It can be read from a configuration file instead. ** NOTE: This class is deprecated. It's replaced by ReadoutConfig in detector/sts. The new class no longer hardcodes the mapping. It can be read from a configuration file instead.
**/ **/
class StsReadoutConfig { class StsReadoutConfigLegacy {
public: public:
/** @brief Constructor **/ /** @brief Constructor **/
StsReadoutConfig(); StsReadoutConfigLegacy();
/** @brief Destructor **/ /** @brief Destructor **/
virtual ~StsReadoutConfig(); virtual ~StsReadoutConfigLegacy();
/** @brief Equipment in the configuration /** @brief Equipment in the configuration
...@@ -82,4 +82,4 @@ namespace cbm::algo ...@@ -82,4 +82,4 @@ namespace cbm::algo
} /* namespace cbm::algo */ } /* namespace cbm::algo */
#endif /* ALGO_DETECTORS_STS_STSREADOUTCONFIG_H_ */ #endif /* ALGO_DETECTORS_STS_StsReadoutConfigLegacy_H_ */
...@@ -95,7 +95,7 @@ XPU_KERNEL(cbm::algo::UnpackK, xpu::no_smem, UnpackStsXpuPar* params, UnpackStsX ...@@ -95,7 +95,7 @@ XPU_KERNEL(cbm::algo::UnpackK, xpu::no_smem, UnpackStsXpuPar* params, UnpackStsX
namespace cbm::algo namespace cbm::algo
{ {
// ---- Algorithm execution --------------------------------------------- // ---- Algorithm execution ---------------------------------------------
UnpackStsXpu::resultType UnpackStsXpu::operator()(const fles::Timeslice* ts, StsReadoutConfig& config) UnpackStsXpu::resultType UnpackStsXpu::operator()(const fles::Timeslice* ts, StsReadoutConfigLegacy& config)
{ {
// --- Output data // --- Output data
resultType result = {}; resultType result = {};
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <xpu/device.h> #include <xpu/device.h>
#include <xpu/host.h> #include <xpu/host.h>
#include "StsReadoutConfig.h" #include "StsReadoutConfigLegacy.h"
#include "StsXyterMessage.h" #include "StsXyterMessage.h"
#include "gpu/DeviceImage.h" #include "gpu/DeviceImage.h"
#include "gpu/xpu_legacy.h" #include "gpu/xpu_legacy.h"
...@@ -104,7 +104,7 @@ namespace cbm::algo ...@@ -104,7 +104,7 @@ namespace cbm::algo
** @param config Configuration data ** @param config Configuration data
** @return STS digi data ** @return STS digi data
**/ **/
resultType operator()(const fles::Timeslice* ts, StsReadoutConfig& config); resultType operator()(const fles::Timeslice* ts, StsReadoutConfigLegacy& config);
//Stores parameter structs for all elinks //Stores parameter structs for all elinks
xpu::hd_buffer<UnpackStsXpuElinkPar> fElinkParams; xpu::hd_buffer<UnpackStsXpuElinkPar> fElinkParams;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <vector> #include <vector>
#include "MuchReadoutConfig.h" #include "MuchReadoutConfig.h"
#include "StsReadoutConfig.h" #include "StsReadoutConfigLegacy.h"
#include "UnpackMuch.h" #include "UnpackMuch.h"
#include "UnpackSts.h" #include "UnpackSts.h"
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
private: private:
std::map<uint16_t, cbm::algo::UnpackSts> fAlgoSts = {}; std::map<uint16_t, cbm::algo::UnpackSts> fAlgoSts = {};
cbm::algo::StsReadoutConfig fStsConfig {}; cbm::algo::StsReadoutConfigLegacy fStsConfig {};
std::map<uint16_t, cbm::algo::UnpackMuch> fAlgoMuch = {}; std::map<uint16_t, cbm::algo::UnpackMuch> fAlgoMuch = {};
cbm::algo::MuchReadoutConfig fMuchConfig {}; cbm::algo::MuchReadoutConfig fMuchConfig {};
...@@ -65,7 +65,7 @@ private: ...@@ -65,7 +65,7 @@ private:
bool InitAlgos(); bool InitAlgos();
/** /**
* @brief Unpack a single timeslice * @brief Unpack a single timeslice
* @param ts Input FLES timeslice * @param ts Input FLES timeslice
*/ */
CbmDigiTimeslice DoUnpack(const fles::Timeslice& ts); CbmDigiTimeslice DoUnpack(const fles::Timeslice& ts);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "BmonReadoutConfig.h" #include "BmonReadoutConfig.h"
#include "EventBuilder.h" #include "EventBuilder.h"
#include "MuchReadoutConfig.h" #include "MuchReadoutConfig.h"
#include "StsReadoutConfig.h" #include "StsReadoutConfigLegacy.h"
#include "UnpackBmon.h" #include "UnpackBmon.h"
#include "UnpackMuch.h" #include "UnpackMuch.h"
#include "UnpackSts.h" #include "UnpackSts.h"
...@@ -86,7 +86,7 @@ private: // members ...@@ -86,7 +86,7 @@ private: // members
CbmSourceTs* fSource = nullptr; CbmSourceTs* fSource = nullptr;
std::map<uint16_t, cbm::algo::UnpackSts> fAlgoSts = {}; std::map<uint16_t, cbm::algo::UnpackSts> fAlgoSts = {};
cbm::algo::StsReadoutConfig fStsConfig {}; cbm::algo::StsReadoutConfigLegacy fStsConfig {};
std::map<uint16_t, cbm::algo::UnpackMuch> fAlgoMuch = {}; std::map<uint16_t, cbm::algo::UnpackMuch> fAlgoMuch = {};
cbm::algo::MuchReadoutConfig fMuchConfig {}; cbm::algo::MuchReadoutConfig fMuchConfig {};
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <vector> #include <vector>
#include "EventBuilder.h" #include "EventBuilder.h"
#include "StsReadoutConfig.h" #include "StsReadoutConfigLegacy.h"
#include "UnpackStsXpu.h" #include "UnpackStsXpu.h"
...@@ -70,7 +70,7 @@ private: // members ...@@ -70,7 +70,7 @@ private: // members
CbmSourceTs* fSource = nullptr; CbmSourceTs* fSource = nullptr;
cbm::algo::UnpackStsXpu fAlgoStsXpu; cbm::algo::UnpackStsXpu fAlgoStsXpu;
cbm::algo::StsReadoutConfig fStsConfig {}; cbm::algo::StsReadoutConfigLegacy fStsConfig {};
size_t fNumTs = 0; size_t fNumTs = 0;
size_t fNumMs = 0; size_t fNumMs = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment