ATLAS Offline Software
SectorLogicReadOutStructure.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigT1RPChardware_SectorLogicReadOutStructure_H
6 #define TrigT1RPChardware_SectorLogicReadOutStructure_H
7 
10 
12 public:
16 
17  void setInit();
18  //
19  ubit16 makeHeader(ubit16 *inputData);
20  ubit16 makeSubHeader() { return 0; };
21  ubit16 makeBody(ubit16 *inputData) { return (*inputData) & 0x0; };
22  ubit16 makeFooter(ubit16 errorCode) { return errorCode & 0x0; };
23  ubit16 makeFooter(ubit16 *errorCode);
24 
25  //**************************************************//
26  // general user methods to decode ReadOut stream //
27  //**************************************************//
28  ubit16 decodeFragment(ubit16 inputWord, char &field);
29  //
30  bool isHeader();
31  bool isBody();
32  bool isFooter();
33  //
34 private:
35  //
36  // header
38  // footer
40  //
41  // internal objects;
42  //
43  //
44  // some static parameter describing the structure
45  //
46 
47  static constexpr ubit16 s_headerNum = 2;
48  static constexpr std::array<ubit16, s_headerNum> s_headerPos{12, 0};
49  static constexpr std::array<ubit16, s_headerNum> s_headerLen{4, 12};
50  static constexpr ubit16 s_headerVal = 0x000d;
51 
52  static constexpr ubit16 s_footerNum = 2;
53  static constexpr std::array<ubit16, s_footerNum> s_footerPos{12, 0};
54  static constexpr std::array<ubit16, s_footerNum> s_footerLen{4, 12};
55  static constexpr ubit16 s_footerVal = 0x000f;
56  //
57 };
58 
59 #endif
SectorLogicReadOutStructure::decodeFragment
ubit16 decodeFragment(ubit16 inputWord, char &field)
Definition: SectorLogicReadOutStructure.cxx:39
SectorLogicReadOutStructure::makeHeader
ubit16 makeHeader(ubit16 *inputData)
Definition: SectorLogicReadOutStructure.cxx:29
RPCReadOut.h
SectorLogicReadOutStructure::setInit
void setInit()
Definition: SectorLogicReadOutStructure.cxx:26
SectorLogicReadOutStructure::s_headerLen
static constexpr std::array< ubit16, s_headerNum > s_headerLen
Definition: SectorLogicReadOutStructure.h:49
SectorLogicReadOutStructure::m_footer
ubit16 m_footer
Definition: SectorLogicReadOutStructure.h:39
SectorLogicReadOutStructure::isFooter
bool isFooter()
Definition: SectorLogicReadOutStructure.cxx:74
SectorLogicReadOutStructure::s_footerNum
static constexpr ubit16 s_footerNum
Definition: SectorLogicReadOutStructure.h:52
SectorLogicReadOutStructure::~SectorLogicReadOutStructure
~SectorLogicReadOutStructure()=default
SectorLogicReadOutStructure::s_headerVal
static constexpr ubit16 s_headerVal
Definition: SectorLogicReadOutStructure.h:50
SectorLogicReadOutStructure::isHeader
bool isHeader()
Definition: SectorLogicReadOutStructure.cxx:66
Lvl1Def.h
SectorLogicReadOutStructure::s_headerNum
static constexpr ubit16 s_headerNum
Definition: SectorLogicReadOutStructure.h:47
SectorLogicReadOutStructure::s_footerPos
static constexpr std::array< ubit16, s_footerNum > s_footerPos
Definition: SectorLogicReadOutStructure.h:53
SectorLogicReadOutStructure::makeBody
ubit16 makeBody(ubit16 *inputData)
Definition: SectorLogicReadOutStructure.h:21
RPCReadOut::field
char field() const
Definition: RPCReadOut.h:19
SectorLogicReadOutStructure::m_secid
ubit16 m_secid
Definition: SectorLogicReadOutStructure.h:37
SectorLogicReadOutStructure
Definition: SectorLogicReadOutStructure.h:11
SectorLogicReadOutStructure::s_footerLen
static constexpr std::array< ubit16, s_footerNum > s_footerLen
Definition: SectorLogicReadOutStructure.h:54
SectorLogicReadOutStructure::isBody
bool isBody()
Definition: SectorLogicReadOutStructure.cxx:60
SectorLogicReadOutStructure::s_headerPos
static constexpr std::array< ubit16, s_headerNum > s_headerPos
Definition: SectorLogicReadOutStructure.h:48
SectorLogicReadOutStructure::makeSubHeader
ubit16 makeSubHeader()
Definition: SectorLogicReadOutStructure.h:20
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
RPCReadOut
Definition: RPCReadOut.h:13
SectorLogicReadOutStructure::SectorLogicReadOutStructure
SectorLogicReadOutStructure()
Definition: SectorLogicReadOutStructure.cxx:12
SectorLogicReadOutStructure::makeFooter
ubit16 makeFooter(ubit16 errorCode)
Definition: SectorLogicReadOutStructure.h:22
SectorLogicReadOutStructure::s_footerVal
static constexpr ubit16 s_footerVal
Definition: SectorLogicReadOutStructure.h:55