|
CbmRoot
|
#include <ReadoutConfig.h>
Public Member Functions | |
| ReadoutConfig () | |
| Default Constructor if no valid YAMl file available. | |
| ReadoutConfig (const ReadoutSetup &) | |
| Constructor with values from YAML file. | |
| virtual | ~ReadoutConfig () |
| Destructor. | |
| int32_t | GetSystemTimeOffset () const |
| System time offset for MUCH. | |
| std::vector< uint16_t > | GetEquipmentIds () |
| Equipment in the configuration. | |
| size_t | GetNumElinks (uint16_t equipmentId) |
| Number of elinks of a component. | |
| std::vector< uint32_t > | Map (uint16_t equipId, uint16_t elink) |
| API: Mapping from component and elink to addresses per channel. | |
| std::vector< bool > | MaskMap (uint16_t equipId, uint16_t elink) |
| API: Mapping from component and elink to channel mask flags. | |
| std::map< uint16_t, std::vector< std::vector< uint32_t > > > | GetFullMap () |
| API: Get fullMapping from component and elink to addresses per channel. | |
Private Member Functions | |
| void | Init () |
| Initialisation of readout map with hardcoded values. | |
| void | Init (const ReadoutSetup &) |
| Initialisation of readout map with data from param file. | |
| void | InitHardcoded () |
| Initialisation of readout map from hardcoded valus, backup if YAML missing. | |
| uint32_t | CreateMuchAddress (uint32_t dpbidx, int32_t iFebId, uint32_t usChan) |
| Maps component index, Fed Id and channel number to Much Address. | |
| void | InitChannelToPadMaps () |
| Init arrays which store positions of PADs. | |
| int32_t | GetFebId (uint16_t) |
| int8_t | GetPadXA (uint8_t febid, uint8_t channelid) |
| int8_t | GetPadYA (uint8_t febid, uint8_t channelid) |
| int8_t | GetPadXB (uint8_t febid, uint8_t channelid) |
| int8_t | GetPadYB (uint8_t febid, uint8_t channelid) |
| int8_t | GetPadXRpc (uint8_t febid, uint8_t channelid) |
| int8_t | GetPadYRpc (uint8_t febid, uint8_t channelid) |
Private Attributes | |
| int32_t | fTimeOffset = 0 |
| std::map< uint16_t, std::vector< std::vector< uint32_t > > > | fReadoutMap = {} |
| std::map< uint16_t, std::map< size_t, std::vector< bool > > > | fMaskMap = {} |
| const uint16_t | numChanPerAsic = 128 |
| Number of channels in each ASIC. | |
| uint16_t | numFebsInGemA = 27 |
| Variables. | |
| uint16_t | numFebsInGemB = 27 |
| Number of FEBs connected in GEM Module B. | |
| uint16_t | numFebsInRpc = 9 |
| Number of FEBs connected in RPC Module. | |
| std::vector< int16_t > | fnFebsIdsArrayGemA |
| Array to hold FEB IDs connected to GEM Module A. | |
| std::vector< int16_t > | fnFebsIdsArrayGemB |
| Array to hold FEB IDs connected to GEM Module B. | |
| std::vector< int16_t > | fnFebsIdsArrayRpc |
| Array to hold FEB IDs connected to RPC Module. | |
| std::vector< int16_t > | fChannelsToPadXA |
| Array which stores the corresponding x position of PAD of entire module A. | |
| std::vector< int16_t > | fChannelsToPadYA |
| Array which stores the corresponding y position of PAD of entire module A. | |
| std::vector< int16_t > | fChannelsToPadXB |
| Array which stores the corresponding x position of PAD of entire module B. | |
| std::vector< int16_t > | fChannelsToPadYB |
| Array which stores the corresponding y position of PAD of entire module B. | |
| std::vector< int16_t > | fChannelsToPadXRpc |
| Array which stores the corresponding x position of PAD of RPC module. | |
| std::vector< int16_t > | fChannelsToPadYRpc |
| Array which stores the corresponding y position of PAD of RPC module. | |
Static Private Attributes | |
| static const uint16_t | numCrobPerComp = 1 |
| Constants. | |
| static const uint16_t | numElinksPerCrob = 42 |
| Number of elinks in each CROB ? | |
| static const uint16_t | numFebsPerCrob = 9 |
| Number of FEBs connected to each CROB for mMuch 2019. | |
| static const uint16_t | numAsicsPerFeb = 1 |
| Number of ASICs connected in each FEB for MUCH. | |
| static constexpr int16_t | elink2Feb [numElinksPerCrob] |
Definition at line 75 of file much/ReadoutConfig.h.
| ReadoutConfig::ReadoutConfig | ( | ) |
Default Constructor if no valid YAMl file available.
Definition at line 20 of file much/ReadoutConfig.cxx.
References InitHardcoded().
| ReadoutConfig::ReadoutConfig | ( | const ReadoutSetup & | config | ) |
Constructor with values from YAML file.
Definition at line 24 of file much/ReadoutConfig.cxx.
References Init().
|
virtual |
Destructor.
Definition at line 28 of file much/ReadoutConfig.cxx.
|
private |
Maps component index, Fed Id and channel number to Much Address.
Below FebID is according to FEB Position in Module GEM A or Module GEM B (Carefully write MUCH Par file)
Switch to smx2.0/smx2.1 data-> fiFlag = 0 for 2.0 and fiFlag = 1 for 2.1
Definition at line 244 of file much/ReadoutConfig.cxx.
References CbmMuchAddress::GetAddress(), GetPadXA(), GetPadXB(), GetPadXRpc(), GetPadYA(), GetPadYB(), GetPadYRpc(), and CbmMuchAddress::SetElementId().
Referenced by Init(), and InitHardcoded().
| std::vector< uint16_t > ReadoutConfig::GetEquipmentIds | ( | ) |
Equipment in the configuration.
Definition at line 32 of file much/ReadoutConfig.cxx.
References fReadoutMap.
|
private |
Definition at line 422 of file much/ReadoutConfig.cxx.
References fnFebsIdsArrayGemA, fnFebsIdsArrayGemB, fnFebsIdsArrayRpc, numFebsInGemA, numFebsInGemB, and numFebsInRpc.
Referenced by Init(), and InitHardcoded().
|
inline |
API: Get fullMapping from component and elink to addresses per channel.
Definition at line 120 of file much/ReadoutConfig.h.
References fReadoutMap.
| size_t ReadoutConfig::GetNumElinks | ( | uint16_t | equipmentId | ) |
Number of elinks of a component.
| Equipment | ID |
Definition at line 42 of file much/ReadoutConfig.cxx.
References fReadoutMap.
|
private |
Definition at line 359 of file much/ReadoutConfig.cxx.
References fChannelsToPadXA, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
private |
Definition at line 382 of file much/ReadoutConfig.cxx.
References fChannelsToPadXB, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
private |
Definition at line 402 of file much/ReadoutConfig.cxx.
References fChannelsToPadXRpc, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
private |
Definition at line 371 of file much/ReadoutConfig.cxx.
References fChannelsToPadYA, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
private |
Definition at line 392 of file much/ReadoutConfig.cxx.
References fChannelsToPadYB, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
private |
Definition at line 412 of file much/ReadoutConfig.cxx.
References fChannelsToPadYRpc, and numChanPerAsic.
Referenced by CreateMuchAddress().
|
inline |
System time offset for MUCH.
Definition at line 90 of file much/ReadoutConfig.h.
References fTimeOffset.
|
private |
Initialisation of readout map with hardcoded values.
Referenced by ReadoutConfig().
|
private |
Initialisation of readout map with data from param file.
FIXME: add readout of masked channels
Definition at line 81 of file much/ReadoutConfig.cxx.
References cbm::algo::much::ReadoutSetup::PadsConfig::channelToPadX, cbm::algo::much::ReadoutSetup::PadsConfig::channelToPadY, cbm::algo::much::ReadoutSetup::components, CreateMuchAddress(), elink2Feb, fChannelsToPadXA, fChannelsToPadXB, fChannelsToPadXRpc, fChannelsToPadYA, fChannelsToPadYB, fChannelsToPadYRpc, cbm::algo::much::ReadoutSetup::FebsIds::febsGemA, cbm::algo::much::ReadoutSetup::FebsIds::febsGemB, cbm::algo::much::ReadoutSetup::febsMapping, cbm::algo::much::ReadoutSetup::FebsIds::febsRpc, fMaskMap, fnFebsIdsArrayGemA, fnFebsIdsArrayGemB, fnFebsIdsArrayRpc, fReadoutMap, fTimeOffset, GetFebId(), numAsicsPerFeb, numChanPerAsic, numCrobPerComp, numElinksPerCrob, numFebsInGemA, numFebsInGemB, numFebsInRpc, numFebsPerCrob, cbm::algo::much::ReadoutSetup::padsConfigGemA, cbm::algo::much::ReadoutSetup::padsConfigGemB, cbm::algo::much::ReadoutSetup::padsConfigRpc, and cbm::algo::much::ReadoutSetup::timeOffset.
|
private |
Init arrays which store positions of PADs.
Definition at line 439 of file much/ReadoutConfig.cxx.
References fChannelsToPadXA, fChannelsToPadXB, fChannelsToPadXRpc, fChannelsToPadYA, fChannelsToPadYB, and fChannelsToPadYRpc.
Referenced by InitHardcoded().
|
private |
Initialisation of readout map from hardcoded valus, backup if YAML missing.
< Total number of MUCH DPBs in system
Definition at line 151 of file much/ReadoutConfig.cxx.
References CreateMuchAddress(), elink2Feb, fMaskMap, fnFebsIdsArrayGemA, fnFebsIdsArrayGemB, fnFebsIdsArrayRpc, fReadoutMap, fTimeOffset, GetFebId(), InitChannelToPadMaps(), numAsicsPerFeb, numChanPerAsic, numCrobPerComp, numElinksPerCrob, and numFebsPerCrob.
Referenced by ReadoutConfig().
| std::vector< uint32_t > ReadoutConfig::Map | ( | uint16_t | equipId, |
| uint16_t | elink ) |
API: Mapping from component and elink to addresses per channel.
| equipId | Equipment identifier (component) |
| elink | Elink number within component |
Definition at line 52 of file much/ReadoutConfig.cxx.
References fReadoutMap.
| std::vector< bool > ReadoutConfig::MaskMap | ( | uint16_t | equipId, |
| uint16_t | elink ) |
API: Mapping from component and elink to channel mask flags.
| equipId | Equipment identifier (component) |
| elink | Elink number within component |
Definition at line 66 of file much/ReadoutConfig.cxx.
References fMaskMap.
|
staticconstexprprivate |
Definition at line 156 of file much/ReadoutConfig.h.
Referenced by Init(), and InitHardcoded().
|
private |
Array which stores the corresponding x position of PAD of entire module A.
Definition at line 168 of file much/ReadoutConfig.h.
Referenced by GetPadXA(), Init(), and InitChannelToPadMaps().
|
private |
Array which stores the corresponding x position of PAD of entire module B.
Definition at line 172 of file much/ReadoutConfig.h.
Referenced by GetPadXB(), Init(), and InitChannelToPadMaps().
|
private |
Array which stores the corresponding x position of PAD of RPC module.
Definition at line 175 of file much/ReadoutConfig.h.
Referenced by GetPadXRpc(), Init(), and InitChannelToPadMaps().
|
private |
Array which stores the corresponding y position of PAD of entire module A.
Definition at line 170 of file much/ReadoutConfig.h.
Referenced by GetPadYA(), Init(), and InitChannelToPadMaps().
|
private |
Array which stores the corresponding y position of PAD of entire module B.
Definition at line 174 of file much/ReadoutConfig.h.
Referenced by GetPadYB(), Init(), and InitChannelToPadMaps().
|
private |
Array which stores the corresponding y position of PAD of RPC module.
Definition at line 176 of file much/ReadoutConfig.h.
Referenced by GetPadYRpc(), Init(), and InitChannelToPadMaps().
|
private |
Definition at line 132 of file much/ReadoutConfig.h.
Referenced by Init(), InitHardcoded(), and MaskMap().
|
private |
Array to hold FEB IDs connected to GEM Module A.
Definition at line 164 of file much/ReadoutConfig.h.
Referenced by GetFebId(), Init(), and InitHardcoded().
|
private |
Array to hold FEB IDs connected to GEM Module B.
Definition at line 165 of file much/ReadoutConfig.h.
Referenced by GetFebId(), Init(), and InitHardcoded().
|
private |
Array to hold FEB IDs connected to RPC Module.
Definition at line 166 of file much/ReadoutConfig.h.
Referenced by GetFebId(), Init(), and InitHardcoded().
|
private |
Definition at line 128 of file much/ReadoutConfig.h.
Referenced by GetEquipmentIds(), GetFullMap(), GetNumElinks(), Init(), InitHardcoded(), and Map().
|
private |
Definition at line 124 of file much/ReadoutConfig.h.
Referenced by GetSystemTimeOffset(), Init(), and InitHardcoded().
|
staticprivate |
Number of ASICs connected in each FEB for MUCH.
Definition at line 150 of file much/ReadoutConfig.h.
Referenced by Init(), and InitHardcoded().
|
private |
Number of channels in each ASIC.
Definition at line 151 of file much/ReadoutConfig.h.
Referenced by GetPadXA(), GetPadXB(), GetPadXRpc(), GetPadYA(), GetPadYB(), GetPadYRpc(), Init(), and InitHardcoded().
|
staticprivate |
Constants.
Number of CROBs possible per DPB
Definition at line 147 of file much/ReadoutConfig.h.
Referenced by Init(), and InitHardcoded().
|
staticprivate |
Number of elinks in each CROB ?
Definition at line 148 of file much/ReadoutConfig.h.
Referenced by Init(), and InitHardcoded().
|
private |
Variables.
Number of FEBs connected in GEM Module A
Definition at line 161 of file much/ReadoutConfig.h.
Referenced by GetFebId(), and Init().
|
private |
Number of FEBs connected in GEM Module B.
Definition at line 162 of file much/ReadoutConfig.h.
Referenced by GetFebId(), and Init().
|
private |
Number of FEBs connected in RPC Module.
Definition at line 163 of file much/ReadoutConfig.h.
Referenced by GetFebId(), and Init().
|
staticprivate |
Number of FEBs connected to each CROB for mMuch 2019.
Definition at line 149 of file much/ReadoutConfig.h.
Referenced by Init(), and InitHardcoded().