ATLAS Offline Software
Loading...
Searching...
No Matches
RPCReadOut Class Reference

#include <RPCReadOut.h>

Inheritance diagram for RPCReadOut:
Collaboration diagram for RPCReadOut:

Public Member Functions

 RPCReadOut ()=default
 ~RPCReadOut ()=default
ubit16 getWord () const
char field () const

Protected Member Functions

ubit16 set16Bits (const ubit16 n, const ubit16 *pos, const ubit16 *val) const
template<size_t n>
ubit16 set16Bits (const std::array< ubit16, n > &pos, const std::array< ubit16, n > &val) const
ubit16 get16Bits (const ubit16 input, const ubit16 position, const ubit16 length) const

Protected Attributes

ubit16 m_word {0xffff}
char m_field {0}

Static Protected Attributes

static constexpr ubit16 s_last2bitsON {0xc000}
static constexpr ubit16 s_last4bitsON {0xf000}
static constexpr ubit16 s_first8bitsON {0}

Detailed Description

Definition at line 13 of file RPCReadOut.h.

Constructor & Destructor Documentation

◆ RPCReadOut()

RPCReadOut::RPCReadOut ( )
default

◆ ~RPCReadOut()

RPCReadOut::~RPCReadOut ( )
default

Member Function Documentation

◆ field()

char RPCReadOut::field ( ) const
inline

Definition at line 19 of file RPCReadOut.h.

19{ return m_field; };
char m_field
Definition RPCReadOut.h:28

◆ get16Bits()

ubit16 RPCReadOut::get16Bits ( const ubit16 input,
const ubit16 position,
const ubit16 length ) const
inlineprotected

Definition at line 47 of file RPCReadOut.h.

47 {
48 ubit16 output = 0;
49 ubit16 CMfield = 0;
50 for (ubit16 i = 0; i < length; i++) { CMfield = CMfield | 1 << (position + i); }
51 output = (input & CMfield) >> position;
52 return output;
53 } // end-of-MatrixReadOutStructure::get16Bits
double length(const pvec &v)
unsigned short int ubit16
output
Definition merge.py:16

◆ getWord()

ubit16 RPCReadOut::getWord ( ) const
inline

Definition at line 18 of file RPCReadOut.h.

18{ return m_word; };
ubit16 m_word
Definition RPCReadOut.h:27

◆ set16Bits() [1/2]

template<size_t n>
ubit16 RPCReadOut::set16Bits ( const std::array< ubit16, n > & pos,
const std::array< ubit16, n > & val ) const
inlineprotected

Definition at line 40 of file RPCReadOut.h.

40 {
41 ubit16 output = 0;
42 for (size_t i = 0; i < n; ++i) { output |= (val[i] << pos[i]); }
43 return output;
44 }

◆ set16Bits() [2/2]

ubit16 RPCReadOut::set16Bits ( const ubit16 n,
const ubit16 * pos,
const ubit16 * val ) const
inlineprotected

Definition at line 30 of file RPCReadOut.h.

30 {
31 ubit16 output = 0;
32 ubit16 p = 0, v = 0;
33 for (ubit16 i = 0; i < n; i++) {
34 v = *(val + i);
35 p = *(pos + i);
36 output = output | (v << p);
37 } // end-of-for
38 return output;
39 } // end-of-MatrixReadOutStructure::set16Bits

Member Data Documentation

◆ m_field

char RPCReadOut::m_field {0}
protected

Definition at line 28 of file RPCReadOut.h.

28{0};

◆ m_word

ubit16 RPCReadOut::m_word {0xffff}
protected

Definition at line 27 of file RPCReadOut.h.

27{0xffff};

◆ s_first8bitsON

ubit16 RPCReadOut::s_first8bitsON {0}
staticconstexprprotected

Definition at line 57 of file RPCReadOut.h.

57{0};

◆ s_last2bitsON

ubit16 RPCReadOut::s_last2bitsON {0xc000}
staticconstexprprotected

Definition at line 55 of file RPCReadOut.h.

55{0xc000};

◆ s_last4bitsON

ubit16 RPCReadOut::s_last4bitsON {0xf000}
staticconstexprprotected

Definition at line 56 of file RPCReadOut.h.

56{0xf000};

The documentation for this class was generated from the following file: