ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1TGCTrigger::TGCSlaveBoard Class Referenceabstract

#include <TGCSlaveBoard.h>

Inheritance diagram for LVL1TGCTrigger::TGCSlaveBoard:
Collaboration diagram for LVL1TGCTrigger::TGCSlaveBoard:

Public Member Functions

 TGCSlaveBoard ()
virtual ~TGCSlaveBoard ()
 TGCSlaveBoard (const TGCSlaveBoard &right)=delete
TGCSlaveBoardoperator= (const TGCSlaveBoard &right)=delete
void clockIn (int bidIn)
TGCSlaveBoardOutgetOutput ()
void eraseOutput ()
int getId () const
void setId (int idIn)
void setPatchPanel (TGCPatchPanel *PPIn)
int getIdHighPtBoard () const
void setIdHighPtBoard (int m_id)
int getType () const
void setType (int typeIn)
TGCRegionType getRegion () const
void setRegion (TGCRegionType regionIn)
void showResult () const
std::string getTypeName (int typeIn) const
void setPatchPanelOut (TGCPatchPanelOut *PPOut)
void storeSlbIn ()
const std::bitset< 200 > & GetSlbIn (void) const

Protected Member Functions

void collectInput ()
void doMaskOperation ()
void doDecluster ()
void deletePatchPanelOut ()
virtual void doCoincidence ()=0
virtual void createSlaveBoardOut ()=0

Protected Attributes

int m_lengthOfCoincidenceOut
TGCHitPatternm_coincidenceOut
TGCSlaveBoardOutm_slaveBoardOut
int m_id
int m_bid
int m_idHighPtBoard
int m_type
TGCRegionType m_region
TGCPatchPanelm_patchPanel
TGCPatchPanelOutm_patchPanelOut
std::bitset< 200 > m_slbin

Static Private Attributes

static constexpr int s_pOffset [6] = {0,0,2,2,2,2}
static constexpr int s_iOffset [6] = {4,0,6,6,6,6}
static constexpr int s_pLength [6] = {36,36,32,32,32,32}
static constexpr int s_iLength [6] = {36,44,32,32,32,32}

Detailed Description

Definition at line 21 of file TGCSlaveBoard.h.

Constructor & Destructor Documentation

◆ TGCSlaveBoard() [1/2]

◆ ~TGCSlaveBoard()

LVL1TGCTrigger::TGCSlaveBoard::~TGCSlaveBoard ( )
virtual

Definition at line 25 of file TGCSlaveBoard.cxx.

◆ TGCSlaveBoard() [2/2]

LVL1TGCTrigger::TGCSlaveBoard::TGCSlaveBoard ( const TGCSlaveBoard & right)
delete

Member Function Documentation

◆ clockIn()

void LVL1TGCTrigger::TGCSlaveBoard::clockIn ( int bidIn)

Definition at line 37 of file TGCSlaveBoard.cxx.

38{
39 m_bid = bidIn;
41
42 m_slbin.reset();
43
44#ifdef TGCDEBUG
45 int i;
46 std::cout << "#SB: BID= " << m_bid;
47 std::cout << " Rgn= " << m_region;
48 std::cout << " Typ= " << getTypeName(m_type);
49 std::cout << " ID= " << m_id << std::endl;
50 if(m_patchPanelOut!=0){
51 for( i=0; i<NumberOfConnectorPerPPOut; i+=1)
52 if(m_patchPanelOut->getHitPattern(i)!=0){
53 std::cout<<"#SB I: BID= "<<m_bid;
54 if(m_patchPanelOut->getOrigin()!=0){
55 std::cout << " Typ= " <<m_patchPanelOut->getOrigin()->getType();
56 std::cout << " Rgn= " <<m_patchPanelOut->getOrigin()->getRegion();
57 std::cout << " PPID= "<<m_patchPanelOut->getOrigin()->getId()<<" ";
58 std::cout << " port= "<<i;
59 std::cout << "" <<m_id;
60 }
61 std::cout << ":";
62 m_patchPanelOut->getHitPattern(i)->print();
63 }
64 } else {
65 std::cout << "NO PP IN" << std::endl;
66 }
67#endif
68
69 // delete m_slaveBoardOut and m_coincidenceOut
71 if( m_slaveBoardOut!=0) delete m_slaveBoardOut;
74
75 if(m_patchPanelOut!=0){
77
78 storeSlbIn();
79
81 if(m_coincidenceOut!=0) {
82#ifdef TGCDEBUG_VISUAL
83 std::cout << "TGCSlaveBoard::clockIn: after doCoincidence()\n";
84 m_coincidenceOut->visual(m_coincidenceOut->getLength(), 1, 0);
85#endif
86#ifdef TGCDEBUG
87 std::cout << "#SB C: BID= " << m_bid << ":";
88 m_coincidenceOut->print();
89#endif
90 }
92#ifdef TGCDEBUG_VISUAL
93 if(m_coincidenceOut!=0) {
94 std::cout << "TGCSlaveBoard::clockIn: after doDecluster()\n";
95 m_coincidenceOut->visual(m_coincidenceOut->getLength(), 1, 0);
96 }
97#endif
99
100#ifdef TGCDEBUG
101 showResult();
102#endif
103
105 if(m_coincidenceOut!=0){
106 delete m_coincidenceOut;
108 }
109 }
110}
std::string getTypeName(int typeIn) const
virtual void doCoincidence()=0
virtual void createSlaveBoardOut()=0
const int NumberOfConnectorPerPPOut

◆ collectInput()

void LVL1TGCTrigger::TGCSlaveBoard::collectInput ( )
protected

Definition at line 240 of file TGCSlaveBoard.cxx.

241{
242#ifdef TGCDEBUG
243 std::cout << "#SB: BID= " << m_bid;
244 std::cout << " Rgn= " << m_region;
245 std::cout << " Typ= " << getTypeName(m_type);
246 std::cout << " ID= " << m_id << std::endl;
247 if (m_patchPanel!=0) m_patchPanel->showProperty();
248#endif
249
250 if(m_patchPanel!=0){
251 m_patchPanelOut = m_patchPanel->getOutput(m_id);
252#ifdef TGCDEBUG
253 if(m_patchPanelOut!=0) m_patchPanelOut->print();
254#endif
255 m_patchPanel->eraseOutput(m_id);
256
257 }
258}

◆ createSlaveBoardOut()

virtual void LVL1TGCTrigger::TGCSlaveBoard::createSlaveBoardOut ( )
protectedpure virtual

◆ deletePatchPanelOut()

void LVL1TGCTrigger::TGCSlaveBoard::deletePatchPanelOut ( )
protected

Definition at line 184 of file TGCSlaveBoard.cxx.

185{
186 if( m_patchPanelOut!=0 ) delete m_patchPanelOut;
188}

◆ doCoincidence()

virtual void LVL1TGCTrigger::TGCSlaveBoard::doCoincidence ( )
protectedpure virtual

◆ doDecluster()

void LVL1TGCTrigger::TGCSlaveBoard::doDecluster ( )
protected

Definition at line 190 of file TGCSlaveBoard.cxx.

191{
192 int i;
193 bool A, B, C, D;
194
195 if(m_coincidenceOut!=0){
196 TGCHitPattern* out = new TGCHitPattern (m_coincidenceOut->getLength());
197 int length = out->getLength();
198 for( i=2; i<length-1; i+=1) {
199 A = m_coincidenceOut->getChannel(i-2);
200 B = m_coincidenceOut->getChannel(i-1);
201 C = m_coincidenceOut->getChannel(i);
202 D = m_coincidenceOut->getChannel(i+1);
203 out->setChannel(i,( !B & C & !D )|( !A & B & C ));
204 }
205
206 A = false;
207 B = false;
208 C = m_coincidenceOut->getChannel(0);
209 D = m_coincidenceOut->getChannel(1);
210 out->setChannel(0,( !B & C & !D )|( !A & B & C ));
211
212 A = false;
213 B = m_coincidenceOut->getChannel(0);
214 C = m_coincidenceOut->getChannel(1);
215 D = m_coincidenceOut->getChannel(2);
216 out->setChannel(1,( !B & C & !D )|( !A & B & C ));
217
218 A = m_coincidenceOut->getChannel(length-3);
219 B = m_coincidenceOut->getChannel(length-2);
220 C = m_coincidenceOut->getChannel(length-1);
221 D = false;
222 out->setChannel(length-1,( !B & C & !D )|( !A & B & C ));
223
224 delete m_coincidenceOut;
226 out=0;
227 }
228}
double length(const pvec &v)
struct color C

◆ doMaskOperation()

void LVL1TGCTrigger::TGCSlaveBoard::doMaskOperation ( )
inlineprotected

Definition at line 65 of file TGCSlaveBoard.h.

65{};

◆ eraseOutput()

void LVL1TGCTrigger::TGCSlaveBoard::eraseOutput ( )

Definition at line 230 of file TGCSlaveBoard.cxx.

231{
233}

◆ getId()

int LVL1TGCTrigger::TGCSlaveBoard::getId ( ) const
inline

Definition at line 41 of file TGCSlaveBoard.h.

41{ return m_id;};

◆ getIdHighPtBoard()

int LVL1TGCTrigger::TGCSlaveBoard::getIdHighPtBoard ( ) const

Definition at line 260 of file TGCSlaveBoard.cxx.

261{
262 return m_idHighPtBoard;
263}

◆ getOutput()

TGCSlaveBoardOut * LVL1TGCTrigger::TGCSlaveBoard::getOutput ( )
inline

Definition at line 38 of file TGCSlaveBoard.h.

38{ return m_slaveBoardOut; }

◆ getRegion()

TGCRegionType LVL1TGCTrigger::TGCSlaveBoard::getRegion ( ) const
inline

Definition at line 52 of file TGCSlaveBoard.h.

52{ return m_region;};

◆ GetSlbIn()

const std::bitset< 200 > & LVL1TGCTrigger::TGCSlaveBoard::GetSlbIn ( void ) const
inline

Definition at line 61 of file TGCSlaveBoard.h.

61{ return m_slbin; } // for readout

◆ getType()

int LVL1TGCTrigger::TGCSlaveBoard::getType ( ) const
inline

Definition at line 49 of file TGCSlaveBoard.h.

49{ return m_type;};

◆ getTypeName()

std::string LVL1TGCTrigger::TGCSlaveBoard::getTypeName ( int typeIn) const

Definition at line 173 of file TGCSlaveBoard.cxx.

174{
175 if(m_type==WTSB) return "WT";//0
176 if(m_type==WDSB) return "WD";//1
177 if(m_type==STSB) return "ST";//2
178 if(m_type==SDSB) return "SD";//3
179 if(m_type==WISB) return "WI";//4
180 if(m_type==SISB) return "SI";//5
181 return "";
182}

◆ operator=()

TGCSlaveBoard & LVL1TGCTrigger::TGCSlaveBoard::operator= ( const TGCSlaveBoard & right)
delete

◆ setId()

void LVL1TGCTrigger::TGCSlaveBoard::setId ( int idIn)
inline

Definition at line 42 of file TGCSlaveBoard.h.

42{ m_id=idIn;};

◆ setIdHighPtBoard()

void LVL1TGCTrigger::TGCSlaveBoard::setIdHighPtBoard ( int m_id)

Definition at line 265 of file TGCSlaveBoard.cxx.

266{
267 m_idHighPtBoard = idIn;
268}

◆ setPatchPanel()

void LVL1TGCTrigger::TGCSlaveBoard::setPatchPanel ( TGCPatchPanel * PPIn)

Definition at line 235 of file TGCSlaveBoard.cxx.

236{
237 m_patchPanel = PPIn;
238}

◆ setPatchPanelOut()

void LVL1TGCTrigger::TGCSlaveBoard::setPatchPanelOut ( TGCPatchPanelOut * PPOut)
inline

Definition at line 58 of file TGCSlaveBoard.h.

58{ m_patchPanelOut=PPOut;};

◆ setRegion()

void LVL1TGCTrigger::TGCSlaveBoard::setRegion ( TGCRegionType regionIn)
inline

Definition at line 53 of file TGCSlaveBoard.h.

53{ m_region=regionIn;};

◆ setType()

void LVL1TGCTrigger::TGCSlaveBoard::setType ( int typeIn)
inline

Definition at line 50 of file TGCSlaveBoard.h.

50{ m_type=typeIn;};

◆ showResult()

void LVL1TGCTrigger::TGCSlaveBoard::showResult ( ) const

Definition at line 133 of file TGCSlaveBoard.cxx.

134{
135
136 int i;
137 if(m_patchPanelOut!=0){
138 for( i=0; i<NumberOfConnectorPerPPOut; i+=1)
139 if(std::as_const(m_patchPanelOut)->getHitPattern(i)!=0){
140 std::cout<<"#SB I: BID= "<<m_bid;
141 if(m_patchPanelOut->getOrigin()!=0){
142 std::cout << " Typ= " << m_patchPanelOut->getOrigin()->getType();
143 std::cout << " Rgn= " << (m_patchPanelOut->getOrigin()->getRegion() == TGCRegionType::FORWARD ? "FORWARD" : "ENDCAP");
144 std::cout << " PPID= "<< m_patchPanelOut->getOrigin()->getId()<<" ";
145 std::cout << " port= "<< i;
146 std::cout << "" << m_id;
147 }
148 std::cout << ":";
149 std::as_const(m_patchPanelOut)->getHitPattern(i)->print();
150 }
151 }
152
153 if(m_slaveBoardOut!=0){
154 if(m_coincidenceOut!=0){
155 std::cout << "#SB O: BID= " << m_bid;
156 std::cout << " Rgn= " << (m_region == TGCRegionType::FORWARD ? "FORWARD" : "ENDCAP");
157 std::cout << " Typ= " << getTypeName(m_type);
158 std::cout << " ID= " << m_id << ":";
159 for( i=0; i<m_slaveBoardOut->getNumberOfData(); i++){
160 if(m_slaveBoardOut->getHit(i)){
161 std::cout << " i= " << i;
162 std::cout << " x= " << m_slaveBoardOut->getPos(i);
163 if((m_type==1)||(m_type==3))// doublet
164 std::cout << " d= " << m_slaveBoardOut->getDev(i);
165 }
166 }
167 std::cout<<std::endl;
168 std::cout<<"Destination HPBID= "<<m_idHighPtBoard<<std::endl;
169 }
170 }
171}
TGCRegionType getRegion() const

◆ storeSlbIn()

void LVL1TGCTrigger::TGCSlaveBoard::storeSlbIn ( )

Definition at line 112 of file TGCSlaveBoard.cxx.

113{
114 // store SlaveBoard input for readout
115 const TGCHitPattern* inner = m_patchPanelOut->getHitPattern(0);
116 const TGCHitPattern* pivot = m_patchPanelOut->getHitPattern(1);
117 int i;
118 if(pivot!=0){
119 for(i=0; i<s_pLength[m_type]; i++){
120 m_slbin.set(40+i+s_pOffset[m_type], pivot->getChannel(i+s_pLength[m_type]));
121 m_slbin.set(40+36+i+s_pOffset[m_type], pivot->getChannel(i));
122 }
123 }
124 if(inner!=0){
125 for(i=0; i<s_iLength[m_type]; i++){
126 if(inner->getLength()>s_iLength[m_type])//WTSB
127 m_slbin.set(40+36+36+i+s_iOffset[m_type], inner->getChannel(i+s_iLength[m_type]));
128 m_slbin.set(40+36+36+44+i+s_iOffset[m_type], inner->getChannel(i));
129 }
130 }
131}
static constexpr int s_pOffset[6]
static constexpr int s_pLength[6]
static constexpr int s_iLength[6]
static constexpr int s_iOffset[6]

Member Data Documentation

◆ m_bid

int LVL1TGCTrigger::TGCSlaveBoard::m_bid
protected

Definition at line 77 of file TGCSlaveBoard.h.

◆ m_coincidenceOut

TGCHitPattern* LVL1TGCTrigger::TGCSlaveBoard::m_coincidenceOut
protected

Definition at line 73 of file TGCSlaveBoard.h.

◆ m_id

int LVL1TGCTrigger::TGCSlaveBoard::m_id
protected

Definition at line 76 of file TGCSlaveBoard.h.

◆ m_idHighPtBoard

int LVL1TGCTrigger::TGCSlaveBoard::m_idHighPtBoard
protected

Definition at line 78 of file TGCSlaveBoard.h.

◆ m_lengthOfCoincidenceOut

int LVL1TGCTrigger::TGCSlaveBoard::m_lengthOfCoincidenceOut
protected

Definition at line 72 of file TGCSlaveBoard.h.

◆ m_patchPanel

TGCPatchPanel* LVL1TGCTrigger::TGCSlaveBoard::m_patchPanel
protected

Definition at line 82 of file TGCSlaveBoard.h.

◆ m_patchPanelOut

TGCPatchPanelOut* LVL1TGCTrigger::TGCSlaveBoard::m_patchPanelOut
protected

Definition at line 83 of file TGCSlaveBoard.h.

◆ m_region

TGCRegionType LVL1TGCTrigger::TGCSlaveBoard::m_region
protected

Definition at line 80 of file TGCSlaveBoard.h.

◆ m_slaveBoardOut

TGCSlaveBoardOut* LVL1TGCTrigger::TGCSlaveBoard::m_slaveBoardOut
protected

Definition at line 74 of file TGCSlaveBoard.h.

◆ m_slbin

std::bitset<200> LVL1TGCTrigger::TGCSlaveBoard::m_slbin
protected

Definition at line 84 of file TGCSlaveBoard.h.

◆ m_type

int LVL1TGCTrigger::TGCSlaveBoard::m_type
protected

Definition at line 79 of file TGCSlaveBoard.h.

◆ s_iLength

int LVL1TGCTrigger::TGCSlaveBoard::s_iLength[6] = {36,44,32,32,32,32}
staticconstexprprivate

Definition at line 28 of file TGCSlaveBoard.h.

28{36,44,32,32,32,32};

◆ s_iOffset

int LVL1TGCTrigger::TGCSlaveBoard::s_iOffset[6] = {4,0,6,6,6,6}
staticconstexprprivate

Definition at line 26 of file TGCSlaveBoard.h.

26{4,0,6,6,6,6};

◆ s_pLength

int LVL1TGCTrigger::TGCSlaveBoard::s_pLength[6] = {36,36,32,32,32,32}
staticconstexprprivate

Definition at line 27 of file TGCSlaveBoard.h.

27{36,36,32,32,32,32};

◆ s_pOffset

int LVL1TGCTrigger::TGCSlaveBoard::s_pOffset[6] = {0,0,2,2,2,2}
staticconstexprprivate

Definition at line 25 of file TGCSlaveBoard.h.

25{0,0,2,2,2,2};// WT,WD,ST,SD,WI,SI

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