Skip to content
Snippets Groups Projects

Add SciFi hardware ID conversion from FTChannelID

Merged Lukas Witola requested to merge luwitola_ftchannelid into master
1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -123,6 +123,13 @@ namespace LHCb::Detector {
unsigned int channelInModule )
: FTChannelID{shift<Mask::station>( station ) | shift<Mask::layer>( layer ) | shift<Mask::quarter>( quarter ) |
shift<Mask::module>( module ) | shift<Mask::channelInModule>( channelInModule )} {}
// Explicit constructor from the hardware IDs
constexpr FTChannelID( StationID station, LayerID layer, QuartID quarter, ModuleID module, unsigned int halfRob,
unsigned int dataLink, unsigned int channel )
: FTChannelID{shift<Mask::station>( station ) | shift<Mask::layer>( layer ) | shift<Mask::quarter>( quarter ) |
shift<Mask::module>( module ) | shift<Mask::mat>( 2 * half + ( dataLink / 4 ) ) |
shift<Mask::sipm>( dataLink % 4 ) | shift<Mask::channel>( channel )} {}
/// Operator overload, to cast channel ID to unsigned int. Used by linkers where the key (channel id) is an int
constexpr operator unsigned int() const { return m_channelID; }
Loading