CbmRoot
Loading...
Searching...
No Matches
TofHitfindQaParameters.cxx
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
11
13#include "CbmTofAddress.h"
14
17
18// ---------------------------------------------------------------------------------------------------------------------
19//
21{
22 rpcs.clear();
23 lookupMap.clear();
24 uint32_t iUniqueRpcId = 0;
25 for (const auto& smType : hitSetup.rpcs) {
26 for (const auto& rpc : smType) {
27 uint32_t address = static_cast<uint32_t>(CbmTofAddress::GetModFullId(rpc.chanPar[0].address));
28 lookupMap[address] = iUniqueRpcId;
29 auto& rpcPar = rpcs.emplace_back();
30 rpcPar.address = address;
31 rpcPar.chAddresses.resize(rpc.chanPar.size());
32 L_(debug) << "RPC: " << CbmTofAddress::ToString(address);
33 for (int iCh = 0; iCh < rpcPar.chAddresses.size(); ++iCh) {
34 rpcPar.chAddresses[iCh] = rpc.chanPar[iCh].address;
35 L_(debug) << "----> ch: " << CbmTofAddress::ToString(rpcPar.chAddresses[iCh]);
36 }
37 iUniqueRpcId++;
38 }
39 }
40}
#define L_(level)
A TOF hitfinder QA parameter configuration.
static int32_t GetModFullId(uint32_t address)
static std::string ToString(int32_t address)
A structure to handle TOF QA parameters.
std::unordered_map< uint32_t, uint32_t > lookupMap
A lookup map for RPC addresses.
std::vector< Rpc > rpcs
A map for different RPC properties.
HitfindQaParameters()=default
Default constructor.
Hitfind setup / Hardware cabling for TOF Used to create the hardware mapping for the TOF hitfinder.
std::vector< std::vector< Rpc > > rpcs