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

#include <RPCRODStructure.h>

Inheritance diagram for RPCRODStructure:
Collaboration diagram for RPCRODStructure:

Public Member Functions

 RPCRODStructure ()
 RPCRODStructure (ubit16 inputData)
 ~RPCRODStructure ()
void decodeSourceID (RODword sourceID)
ubit16 getSourceIDReserved ()
ubit16 getSourceIDModuleType ()
ubit16 getSourceIDSubdetectorID ()
ubit16 getSourceIDRODID ()
ubit16 makeHeader (ubit16 *inputData)
ubit16 makeSubHeader ()
ubit16 makeBody (ubit16 *inputData)
ubit16 makeFooter (ubit16 errorCode)
ubit16 makeFooter (ubit16 *errorCode)
bool isHeader ()
bool isBody ()
bool isFooter ()
RODword getHeaderMarker ()
RODword getHeaderSize ()
RODword getFooterSize ()
RODword getFormatVersion ()
RODword getSourceID (ubit16 subsystem, ubit16 RODID)
ubit16 getEmptyDataWord ()
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}

Private Member Functions

void setInit ()
ubit16 getSubDetectorID (ubit16 subsystem)

Private Attributes

ubit16 m_sourceIDreserved
ubit16 m_moduleType
ubit16 m_subDetectorID
ubit16 m_RODID

Static Private Attributes

static const RODword s_headerMarker = 0xee1234ee
static const RODword s_headerSize = 8
static const RODword s_formatVersion = 0x00000000
static const ubit16 s_sourceIDreserved = 0x00
static const ubit16 s_moduleType = 0x00
static const ubit16 s_subDetectorIDA = 0x65
static const ubit16 s_subDetectorIDC = 0x66
static const ubit16 s_emptyDataWord = 0xf000
static const RODword s_footerSize = 3

Detailed Description

Definition at line 16 of file RPCRODStructure.h.

Constructor & Destructor Documentation

◆ RPCRODStructure() [1/2]

RPCRODStructure::RPCRODStructure ( )

Definition at line 16 of file RPCRODStructure.cxx.

16 {
17 //
18 // Constructor used by the simulation program
19 //
20 setInit();
21} // end-of-RPCRODStructure::RPCRODStructure()

◆ RPCRODStructure() [2/2]

RPCRODStructure::RPCRODStructure ( ubit16 inputData)

Definition at line 23 of file RPCRODStructure.cxx.

23 {
24 //
25 // Constructor used by the simulation program
26 //
27 // decodeFragment;
28 m_sourceIDreserved = 0xffff;
29 m_moduleType = 0xffff;
30 m_subDetectorID = 0xffff;
31 m_RODID = 0xffff;
32} // end-of-RPCRODStructure::RPCRODStructure()

◆ ~RPCRODStructure()

RPCRODStructure::~RPCRODStructure ( )

Definition at line 34 of file RPCRODStructure.cxx.

34{} // end-of-RPCRODStructure::~RPCRODStructure

Member Function Documentation

◆ decodeSourceID()

void RPCRODStructure::decodeSourceID ( RODword sourceID)

Definition at line 49 of file RPCRODStructure.cxx.

49 {
50 m_sourceIDreserved = (sourceID & 0xff000000) >> 24;
51 m_moduleType = (sourceID & 0x00ff0000) >> 16;
52 m_subDetectorID = (sourceID & 0x0000ff00) >> 8;
53 m_RODID = (sourceID & 0x000000ff);
54} // end-of-decodeSourceID

◆ field()

char RPCReadOut::field ( ) const
inlineinherited

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
inlineprotectedinherited

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

◆ getEmptyDataWord()

ubit16 RPCRODStructure::getEmptyDataWord ( )
inline

Definition at line 48 of file RPCRODStructure.h.

48{ return s_emptyDataWord; };
static const ubit16 s_emptyDataWord

◆ getFooterSize()

RODword RPCRODStructure::getFooterSize ( )
inline

Definition at line 45 of file RPCRODStructure.h.

45{ return s_footerSize; };
static const RODword s_footerSize

◆ getFormatVersion()

RODword RPCRODStructure::getFormatVersion ( )
inline

Definition at line 46 of file RPCRODStructure.h.

46{ return s_formatVersion; };
static const RODword s_formatVersion

◆ getHeaderMarker()

RODword RPCRODStructure::getHeaderMarker ( )
inline

Definition at line 43 of file RPCRODStructure.h.

43{ return s_headerMarker; };
static const RODword s_headerMarker

◆ getHeaderSize()

RODword RPCRODStructure::getHeaderSize ( )
inline

Definition at line 44 of file RPCRODStructure.h.

44{ return s_headerSize; };
static const RODword s_headerSize

◆ getSourceID()

RODword RPCRODStructure::getSourceID ( ubit16 subsystem,
ubit16 RODID )

Definition at line 43 of file RPCRODStructure.cxx.

43 {
44 RODword sourceIdentifier = 0;
45 sourceIdentifier = s_sourceIDreserved << 24 | s_moduleType << 16 | getSubDetectorID(subsystem) << 8 | RODID;
46 return sourceIdentifier;
47} // end-of-RPCRODStructure::getSourceID
uint32_t RODword
Definition Lvl1Def.h:18
static const ubit16 s_moduleType
static const ubit16 s_sourceIDreserved
ubit16 getSubDetectorID(ubit16 subsystem)

◆ getSourceIDModuleType()

ubit16 RPCRODStructure::getSourceIDModuleType ( )
inline

Definition at line 23 of file RPCRODStructure.h.

23{ return m_moduleType; };

◆ getSourceIDReserved()

ubit16 RPCRODStructure::getSourceIDReserved ( )
inline

Definition at line 22 of file RPCRODStructure.h.

22{ return m_sourceIDreserved; };

◆ getSourceIDRODID()

ubit16 RPCRODStructure::getSourceIDRODID ( )
inline

Definition at line 25 of file RPCRODStructure.h.

25{ return m_RODID; };

◆ getSourceIDSubdetectorID()

ubit16 RPCRODStructure::getSourceIDSubdetectorID ( )
inline

Definition at line 24 of file RPCRODStructure.h.

24{ return m_subDetectorID; };

◆ getSubDetectorID()

ubit16 RPCRODStructure::getSubDetectorID ( ubit16 subsystem)
private

Definition at line 56 of file RPCRODStructure.cxx.

56 {
58 if (subsystem) id = s_subDetectorIDC;
59 return id;
60} // end-of-getSubDetectorID
static const ubit16 s_subDetectorIDC
static const ubit16 s_subDetectorIDA

◆ getWord()

ubit16 RPCReadOut::getWord ( ) const
inlineinherited

Definition at line 18 of file RPCReadOut.h.

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

◆ isBody()

bool RPCRODStructure::isBody ( )
inline

Definition at line 40 of file RPCRODStructure.h.

40{ return false; };

◆ isFooter()

bool RPCRODStructure::isFooter ( )
inline

Definition at line 41 of file RPCRODStructure.h.

41{ return false; };

◆ isHeader()

bool RPCRODStructure::isHeader ( )
inline

Definition at line 39 of file RPCRODStructure.h.

39{ return false; };

◆ makeBody()

ubit16 RPCRODStructure::makeBody ( ubit16 * inputData)
inline

Definition at line 31 of file RPCRODStructure.h.

31{ return *inputData; };

◆ makeFooter() [1/2]

ubit16 RPCRODStructure::makeFooter ( ubit16 * errorCode)
inline

Definition at line 34 of file RPCRODStructure.h.

34{ return (*errorCode) & 0x0; };

◆ makeFooter() [2/2]

ubit16 RPCRODStructure::makeFooter ( ubit16 errorCode)
inline

Definition at line 33 of file RPCRODStructure.h.

33{ return errorCode; };

◆ makeHeader()

ubit16 RPCRODStructure::makeHeader ( ubit16 * inputData)
inline

Definition at line 28 of file RPCRODStructure.h.

28{ return *inputData; };

◆ makeSubHeader()

ubit16 RPCRODStructure::makeSubHeader ( )
inline

Definition at line 29 of file RPCRODStructure.h.

29{ return 0; };

◆ set16Bits() [1/2]

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

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
inlineprotectedinherited

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

◆ setInit()

void RPCRODStructure::setInit ( )
private

Definition at line 36 of file RPCRODStructure.cxx.

36 {
37 m_sourceIDreserved = 0xffff;
38 m_moduleType = 0xffff;
39 m_subDetectorID = 0xffff;
40 m_RODID = 0xffff;
41} // end-of-setInit

Member Data Documentation

◆ m_field

char RPCReadOut::m_field {0}
protectedinherited

Definition at line 28 of file RPCReadOut.h.

28{0};

◆ m_moduleType

ubit16 RPCRODStructure::m_moduleType
private

Definition at line 52 of file RPCRODStructure.h.

◆ m_RODID

ubit16 RPCRODStructure::m_RODID
private

Definition at line 54 of file RPCRODStructure.h.

◆ m_sourceIDreserved

ubit16 RPCRODStructure::m_sourceIDreserved
private

Definition at line 51 of file RPCRODStructure.h.

◆ m_subDetectorID

ubit16 RPCRODStructure::m_subDetectorID
private

Definition at line 53 of file RPCRODStructure.h.

◆ m_word

ubit16 RPCReadOut::m_word {0xffff}
protectedinherited

Definition at line 27 of file RPCReadOut.h.

27{0xffff};

◆ s_emptyDataWord

const ubit16 RPCRODStructure::s_emptyDataWord = 0xf000
staticprivate

Definition at line 67 of file RPCRODStructure.h.

◆ s_first8bitsON

ubit16 RPCReadOut::s_first8bitsON {0}
staticconstexprprotectedinherited

Definition at line 57 of file RPCReadOut.h.

57{0};

◆ s_footerSize

const RODword RPCRODStructure::s_footerSize = 3
staticprivate

Definition at line 71 of file RPCRODStructure.h.

◆ s_formatVersion

const RODword RPCRODStructure::s_formatVersion = 0x00000000
staticprivate

Definition at line 60 of file RPCRODStructure.h.

◆ s_headerMarker

const RODword RPCRODStructure::s_headerMarker = 0xee1234ee
staticprivate

Definition at line 58 of file RPCRODStructure.h.

◆ s_headerSize

const RODword RPCRODStructure::s_headerSize = 8
staticprivate

Definition at line 59 of file RPCRODStructure.h.

◆ s_last2bitsON

ubit16 RPCReadOut::s_last2bitsON {0xc000}
staticconstexprprotectedinherited

Definition at line 55 of file RPCReadOut.h.

55{0xc000};

◆ s_last4bitsON

ubit16 RPCReadOut::s_last4bitsON {0xf000}
staticconstexprprotectedinherited

Definition at line 56 of file RPCReadOut.h.

56{0xf000};

◆ s_moduleType

const ubit16 RPCRODStructure::s_moduleType = 0x00
staticprivate

Definition at line 63 of file RPCRODStructure.h.

◆ s_sourceIDreserved

const ubit16 RPCRODStructure::s_sourceIDreserved = 0x00
staticprivate

Definition at line 62 of file RPCRODStructure.h.

◆ s_subDetectorIDA

const ubit16 RPCRODStructure::s_subDetectorIDA = 0x65
staticprivate

Definition at line 64 of file RPCRODStructure.h.

◆ s_subDetectorIDC

const ubit16 RPCRODStructure::s_subDetectorIDC = 0x66
staticprivate

Definition at line 65 of file RPCRODStructure.h.


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