ATLAS Offline Software
Loading...
Searching...
No Matches
SectorLogicReadOut.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_SectorLogicReadOut_H
6#define TrigT1RPChardware_SectorLogicReadOut_H
7
8#include <iostream>
9
16
18public:
22 void initialize();
23 void reset();
24 void overwriteHeader(ubit16 thisRecord) { m_Header = thisRecord; };
25 void overwriteFooter(ubit16 thisRecord) { m_Footer = thisRecord; };
26 void writeRecord(ubit16 newHit, bool last);
36 float padTriggerRate(ubit16 padAddress);
37 //
38 ubit16 cmadd(ubit16 indexLink, ubit16 indexGate);
39 ubit16 ptid(ubit16 indexLink, ubit16 indexGate);
40 ubit16 opl(ubit16 indexLink, ubit16 indexGate);
41 ubit16 ovphi(ubit16 indexLink, ubit16 indexGate);
42 ubit16 oveta(ubit16 indexLink, ubit16 indexGate);
43 ubit16 res(ubit16 indexLink, ubit16 indexGate);
44 ubit16 bcid(ubit16 indexLink, ubit16 indexGate);
45 void display(std::ostream &stream);
46 bool checkFragment();
47 //
48 //*********************************************************//
49 // overload of "inseritore" operator //
50 //*********************************************************//
51 friend std::ostream &operator<<(std::ostream &stream, SectorLogicReadOut *p) {
52 p->display(stream);
53 return stream;
54 }
55 friend std::ostream &operator<<(std::ostream &stream, SectorLogicReadOut &p) {
56 p.display(stream);
57 return stream;
58 }
59 //*********************************************************//
60
61private:
62 void deleteSLBody();
63 void doHit();
64 void doCounter32();
65 void makeNewHit(ubit16 newHit);
66
71
72 //*******************************************************//
73 SLROData *m_BodyLast{nullptr}; // pointer to the last hit recorded
74 SLROData *m_BodyCurr{nullptr}; // pointer to the current hit scanned
75 //*******************************************************//
76 static constexpr ubit16 s_nGates = 7;
77 static constexpr ubit16 s_nLinks = 8;
78
80
81 static const ubit16 s_numberOfDataCounters = 21;
83 std::array<ubit16, s_numberOfDataCounters> m_counter16{0};
84 std::array<RODword, s_numberOfDecodedCounters> m_counter32{0};
85
86 bool m_counter32ok{false};
87 bool m_hitok{false};
90 SLROData *m_Body{nullptr};
91 SLROData *m_BodyCounter{nullptr}; // pointer to the SL Counters
96 //
97 // 14+21 words
98 // first 14 words
99 // nella finestra di lettura SL si da nei 12 bit meno significativi
100 // la mappa sotto riportatata
101 // word tower BCID
102 // 1 0 0
103 // 2 1 0
104 // 3 0 1
105 // .. .. ..
106 // 14 1 6
107 //
108 // map of counter32
109 //
110 // counter32[ 0] ----> pad 0 trigger data enable=0 counter
111 // counter32[ 1] ----> pad 0 trigger data enable=1 counter
112 // counter32[ 2] ----> pad 1 trigger data enable=0 counter
113 // counter32[ 3] ----> pad 1 trigger data enable=1 counter
114 // ...
115 // counter32[n-3] ----> sector logic valid trigger counter
116 // counter32[n-2] ----> selected lvl1a counter
117 // counter32[n-1] ----> lost lvl1a counter
118 //
119 //
120 // map of the hit section of the SectorLogic Body
121 //
122 // bit from 0 to 1 --> cmadd
123 // bit from 2 to 4 --> ptcode
124 // bit from 5 to 5 --> outer plane flag
125 // bit from 6 to 6 --> overlap-in-phi flag
126 // bit from 7 to 7 --> overlap-in-eta flag
127 // bit from 8 to 8 --> (reserved)
128 // bit from 9 to 11 --> bcid
129 //
130};
131#endif
std::pair< std::vector< unsigned int >, bool > res
uint32_t RODword
Definition Lvl1Def.h:18
unsigned short int ubit16
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7
ubit16 ptid(ubit16 indexLink, ubit16 indexGate)
ubit16 oveta(ubit16 indexLink, ubit16 indexGate)
ubit16 opl(ubit16 indexLink, ubit16 indexGate)
ubit16 ovphi(ubit16 indexLink, ubit16 indexGate)
std::array< RODword, s_numberOfDecodedCounters > m_counter32
void overwriteFooter(ubit16 thisRecord)
void display(std::ostream &stream)
friend std::ostream & operator<<(std::ostream &stream, SectorLogicReadOut *p)
friend std::ostream & operator<<(std::ostream &stream, SectorLogicReadOut &p)
float padTriggerRate(ubit16 padAddress)
ubit16 cmadd(ubit16 indexLink, ubit16 indexGate)
ubit16 bcid(ubit16 indexLink, ubit16 indexGate)
RODword getCounter32(ubit16 index)
static const ubit16 s_numberOfDataCounters
std::array< ubit16, s_numberOfDataCounters > m_counter16
static constexpr ubit16 s_nLinks
void overwriteHeader(ubit16 thisRecord)
ubit16 m_hit[s_nLinks][s_nGates]
static const ubit16 s_numberOfDecodedCounters
void makeNewHit(ubit16 newHit)
void writeRecord(ubit16 newHit, bool last)
static constexpr ubit16 s_nGates
Definition index.py:1