4#ifndef CBM_ALGO_DETECTOR_STS_READOUT_CONFIG_H
5#define CBM_ALGO_DETECTOR_STS_READOUT_CONFIG_H
18 struct ChannelMaskSet;
39 "Type 0 had the connector at the right side, type 1 at the left side. For type 0, the mapping "
40 "of FEB to module side as above applies, for type 1, it has to be inverted."));
54 "Equipment ID of component. Written to the data stream (MicrosliceDescriptor).", YAML::Hex),
56 "Mapping of FEB within CROB to module index (-1 = inactive)"),
58 "Mapping of FEB within CROB to module side (0 = left, 1 = right)"),
85 "Elinks for FEB8_1 (1:1 elink:ASIC, 5 FEB / ROB)", {}, YAML::Flow),
87 "Elinks for FEB8_5 (5:1 elink:ASIC, 1 FEB / ROB)", {}, YAML::Flow));
143 std::vector<bool>
MaskMap(uint16_t equipId, uint16_t elink);
150 uint32_t
AdcCutMap(uint16_t equipId, uint16_t elink);
163 std::map<uint16_t, std::map<size_t, uint32_t>>
fAdcCutMap = {};
167 std::map<uint16_t, std::map<size_t, std::vector<bool>>>
fMaskMap = {};
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
Provides the hardware-to-software address mapping for the CBM-STS.
void Init(const ReadoutSetup &, const ChannelMaskSet &)
Initialisation of readout map.
std::map< uint16_t, std::map< size_t, std::vector< bool > > > fMaskMap
std::string PrintReadoutMap()
Debug output of readout map.
ReadoutConfig()=default
Empty mapping.
std::map< uint16_t, std::map< size_t, uint32_t > > fAdcCutMap
std::vector< bool > MaskMap(uint16_t equipId, uint16_t elink)
API: Mapping from component and elink to channel mask flags.
std::map< u16, std::vector< Entry > > fReadoutConfig
Entry Map(u16 equipId, u16 elink)
API: Mapping from component and elink to address / ASIC number + pulser flag.
std::vector< u16 > GetEquipmentIds()
Equipment in the configuration.
size_t GetNumElinks()
Total number of elinks for STS.
uint32_t AdcCutMap(uint16_t equipId, uint16_t elink)
API: Mapping from component and elink to minimum adc cut.
Property(T Class::*member, std::string_view key, std::string_view description) -> Property< Class, T >
CBM_YAML_PROPERTIES(yaml::Property(&Component::equipmentId, "equipmentId", "Equipment ID of component. Written to the data stream (MicrosliceDescriptor).", YAML::Hex), yaml::Property(&Component::feb2module, "feb2module", "Mapping of FEB within CROB to module index (-1 = inactive)"), yaml::Property(&Component::feb2moduleSide, "feb2moduleSide", "Mapping of FEB within CROB to module side (0 = left, 1 = right)"), yaml::Property(&Component::febIsPulser, "febIsPulser", "Flag if FEB is pulser (true) or not (false)"))
FEBType GetFEBType() const
size_t FEBsPerCrob() const
std::vector< std::vector< i16 > > feb2module
std::vector< std::vector< bool > > febIsPulser
std::vector< std::vector< i16 > > feb2moduleSide
CBM_YAML_PROPERTIES(yaml::Property(&Elink::toFeb, "toFeb", "Mapping of elink to FEB within CROB (-1 = inactive)"), yaml::Property(&Elink::toAsicFebA, "toAsicFebA", "Mapping of eLink to ASIC for FEB Type A", YAML::Hex), yaml::Property(&Elink::toAsicFebB, "toAsicFebB", "Mapping of eLink to ASIC for FEB Type B", YAML::Hex))
CBM_YAML_PROPERTIES(yaml::Property(&Module::address, "address", "HW address of module", YAML::Hex), yaml::Property(&Module::type, "type", "Type 0 had the connector at the right side, type 1 at the left side. For type 0, the mapping " "of FEB to module side as above applies, for type 1, it has to be inverted."))
Readout setup / Hardware cabling for STS Used to create the hardware mapping for the STS unpacker.
std::vector< Module > modules
const std::vector< Elink > & GetElinks(FEBType type) const
std::vector< Elink > elinksFeb8_5
CBM_YAML_PROPERTIES(yaml::Property(&ReadoutSetup::numAsicsPerFeb, "numAsicsPerFeb", "Number of ASICs per FEB"), yaml::Property(&ReadoutSetup::modules, "modules", "Modules", {}, YAML::Flow), yaml::Property(&ReadoutSetup::components, "components", "Components", {}, YAML::Flow), yaml::Property(&ReadoutSetup::elinksFeb8_1, "elinksFeb8_1", "Elinks for FEB8_1 (1:1 elink:ASIC, 5 FEB / ROB)", {}, YAML::Flow), yaml::Property(&ReadoutSetup::elinksFeb8_5, "elinksFeb8_5", "Elinks for FEB8_5 (5:1 elink:ASIC, 1 FEB / ROB)", {}, YAML::Flow))
std::vector< Elink > elinksFeb8_1
std::vector< Component > components