Skip to content
Snippets Groups Projects

Tweak UTDecoder

Merged Gerhard Raven requested to merge unify-utdecoders into master
3 files
+ 122
166
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 10
8
@@ -28,27 +28,29 @@ public:
/** constructer with int
@param value
*/
explicit UTADCWord( unsigned int value ) : m_value( value ) {}
explicit constexpr UTADCWord( unsigned int value ) : m_value( value ) {}
UTADCWord( unsigned int value, unsigned int nlane ) : m_value( value ), m_lane( nlane ){};
constexpr UTADCWord( unsigned int value, unsigned int nlane ) : m_value( value ), m_lane( nlane ){};
/** The actual value
@return value
*/
unsigned int value() const { return m_value; };
[[nodiscard]] constexpr unsigned int value() const { return m_value; };
unsigned int channelID() const {
[[nodiscard]] constexpr unsigned int channelID() const {
return ( ( m_value & static_cast<int>( mask::strip ) ) >> static_cast<int>( bits::strip ) ) +
static_cast<int>( bits::maxstrip ) * m_lane;
}
unsigned int adc() const { return ( m_value & static_cast<int>( mask::adc ) ) >> static_cast<int>( bits::adc ); }
[[nodiscard]] constexpr unsigned int adc() const {
return ( m_value & static_cast<int>( mask::adc ) ) >> static_cast<int>( bits::adc );
}
unsigned int fracStripBits() const { return 0; }
[[nodiscard]] constexpr unsigned int fracStripBits() const { return 0; }
unsigned int pseudoSizeBits() const { return 0; }
[[nodiscard]] constexpr unsigned int pseudoSizeBits() const { return 0; }
bool hasHighThreshold() const { return true; }
[[nodiscard]] constexpr bool hasHighThreshold() const { return true; }
/** Operator overloading for stringoutput */
friend std::ostream& operator<<( std::ostream& s, const UTADCWord& obj ) { return obj.fillStream( s ); }
Loading