ATLAS Offline Software
Loading...
Searching...
No Matches
MatrixReadOut.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigT1RPChardware_MatrixReadOut_H
6#define TrigT1RPChardware_MatrixReadOut_H
7
8#include <iostream>
9
15
16class ReadOutManager;
17
18class MatrixReadOut : public BaseObject {
19public:
21
25 MatrixReadOut(const MatrixReadOut &MROOrig); // copy constructor
26 MatrixReadOut &operator=(const MatrixReadOut &MROOrig) = delete;
32 void deleteCMABody();
33 void reset(uint NOBXS);
34 //***********************************************//
35 // following methods are used by Lvl1RpcTrig //
36 //***********************************************//
37
38 void writeHeader(ubit16 CMcode);
39 void writeSubHeader();
40 void writeCMABody(ubit16 _BC, ubit16 _TIME, ubit16 IJK, ubit16 _STRIP);
41 void writeFooter();
42 void writeRecord(ubit16 thisRecord, bool last);
43 void overwriteHeader(ubit16 thisRecord) { m_Header = thisRecord; }; // new method
44 void overwriteSubHeader(ubit16 thisRecord) { m_SubHeader = thisRecord; }; // new method
48 }; // new method
51 //**************************************************//
52 // general user methods to read back ReadOut stream //
53 //**************************************************//
57 void readCMABody(ubit16 *Body);
61 void topCMABody();
62 //*********************************************************//
63 // general user methods to display/print ReadOut stream //
64 //*********************************************************//
65 void display(std::ostream &stream);
66 void displayHeader(std::ostream &stream);
67 void displaySubHeader(std::ostream &stream);
68 void displayBody(std::ostream &stream);
69 void displayFooter(std::ostream &stream);
70 void bytestream(std::ostream &stream);
71 //*********************************************************//
72 // general user methods to check ReadOut stream structure //
73 //*********************************************************//
74 ubit16 checkBodyOrder(bool debugPrint = false);
76 //*********************************************************//
77 // overload of "inseritore" operator //
78 //*********************************************************//
79 friend std::ostream &operator<<(std::ostream &stream, MatrixReadOut *p) {
80 p->display(stream);
81 return stream;
82 }
83 friend std::ostream &operator<<(std::ostream &stream, MatrixReadOut &p) {
84 p.display(stream);
85 return stream;
86 }
87 //*********************************************************//
88 void doMatrix(Matrix *CMpointer);
89 void makeTestPattern(ubit16 mode, ubit16 ktimes, int eventNum);
90
91private:
92 // fp
93
94 friend class ReadOutManager;
96 void setManager(ReadOutManager *boss);
97 void makeFragment();
98
100
111 Matrix *m_CM{}; // pointer to the CM
112 ubit16 *m_BS{}; // pointer to Fragment
113 //**************************************//
114 // //
115 // Matrix ReadOut structure //
116 // //
117 //**************************************//
118 struct CMROData {
121 };
122 ubit16 m_Header{}; // Header record
123 ubit16 m_Footer{}; // Footer record
124 ubit16 m_SubHeader{}; // Subheader record
125 CMROData *m_Body{}; // Body structure record
126 //**********************************************************//
128 CMROData *m_BodyLast{}; // pointer to the last hit recorded
129 CMROData *m_BodyCurr{}; // pointer to the current hit scanned
130 //**********************************************************//
142 //************************//
143 void initialize(uint NOBXS);
144 void makeHeader();
145 void makeSubHeader();
146 void makeCMABody();
147 void makeFooter();
150 void makeNewHit(ubit16 newHit);
151 void makeNewHit(ubit16 newHit, CMROData *previous, CMROData *next);
152 void sortAndMakeNewHit(ubit16 newHit);
154};
155#endif
unsigned int uint
unsigned short int ubit16
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7
void writeRecord(ubit16 thisRecord, bool last)
ubit16 numberOfBodyWords()
ubit16 m_checkFooterNum
ubit16 checkCRC8(ubit16 foot)
MatrixReadOut(Matrix *p, ubit16 FEevent, uint NOBXS, DataVersion=MatrixReadOut::Atlas)
MatrixReadOut::DataVersion m_data_version
void setManager(ReadOutManager *boss)
friend std::ostream & operator<<(std::ostream &stream, MatrixReadOut &p)
void doMatrix(Matrix *CMpointer)
void readCMABody(ubit16 *Body)
ubit16 m_timeSeparation
CMROData * m_Body
ubit16 m_numberOfWordsInFrag
ubit16 checkBodyOrder(bool debugPrint=false)
MatrixReadOutStructure getFooter()
ubit16 readSubHeader()
void displayHeader(std::ostream &stream)
ubit16 makeCMABodyTrg()
void displayBody(std::ostream &stream)
ReadOutManager * m_myBoss
ubit16 m_checkHeaderPos
ubit16 m_addressOfWordScanned
friend class ReadOutManager
void overwriteHeader(ubit16 thisRecord)
void bytestream(std::ostream &stream)
CMROData * m_BodyCurr
void sortAndMakeNewHit(ubit16 newHit)
void displayFooter(std::ostream &stream)
void writeHeader(ubit16 CMcode)
MatrixReadOutStructure m_MROS
CMROData * m_BodyLast
ubit16 makeCMABodyHit()
MatrixReadOutStructure getCMAHit(int index)
ubit16 m_numberOfWordsInBody
ubit16 m_checkFooterPos
void display(std::ostream &stream)
void makeTestPattern(ubit16 mode, ubit16 ktimes, int eventNum)
ubit16 m_checkSubHeaderPos
ubit16 m_first8bitsON
ubit16 readCMABodyCurrent()
MatrixReadOutStructure getHeader()
ubit16 m_nchan[2]
ubit16 m_checkHeaderNum
friend std::ostream & operator<<(std::ostream &stream, MatrixReadOut *p)
MatrixReadOut & operator=(const MatrixReadOut &MROOrig)=delete
void reComputeFooter()
ubit16 numberOfFragmentWords()
void writeCMABody(ubit16 _BC, ubit16 _TIME, ubit16 IJK, ubit16 _STRIP)
ubit16 m_checkSubHeaderNum
void reset(uint NOBXS)
void makeNewHit(ubit16 newHit)
void displaySubHeader(std::ostream &stream)
void overwriteSubHeader(ubit16 thisRecord)
ubit16 checkFragment()
MatrixReadOutStructure getSubHeader()
Definition index.py:1
void initialize()