ATLAS Offline Software
TGCSlaveBoard.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 TrigT1TGC_TGCSlaveBoard_h
6 #define TrigT1TGC_TGCSlaveBoard_h
7 
10 
11 #include <bitset>
12 #include <string>
13 
14 namespace LVL1TGCTrigger {
15 
16 class TGCPatchPanel;
17 class TGCPatchPanelOut;
18 class TGCSlaveBoardOut;
19 class TGCHitPattern;
20 
22 {
23  private:
24  // offten use {A,B,C,D}={36,36,44,44} format, but some parts are not used.
25  static constexpr int s_pOffset[6] = {0,0,2,2,2,2};// WT,WD,ST,SD,WI,SI
26  static constexpr int s_iOffset[6] = {4,0,6,6,6,6};
27  static constexpr int s_pLength[6] = {36,36,32,32,32,32};
28  static constexpr int s_iLength[6] = {36,44,32,32,32,32};
29 
30  public:
31 
32  TGCSlaveBoard();
33  virtual ~TGCSlaveBoard();
34  TGCSlaveBoard(const TGCSlaveBoard& right) = delete;
35  TGCSlaveBoard& operator=(const TGCSlaveBoard& right) = delete;
36 
37  void clockIn(int bidIn);
39  void eraseOutput();
40 
41  int getId() const { return m_id;};
42  void setId(int idIn){ m_id=idIn;};
43 
44  void setPatchPanel(TGCPatchPanel* PPIn);
45 
46  int getIdHighPtBoard() const;
47  void setIdHighPtBoard(int m_id);
48 
49  int getType() const { return m_type;};
50  void setType(int typeIn){ m_type=typeIn;};
51 
52  TGCRegionType getRegion() const { return m_region;};
53  void setRegion(TGCRegionType regionIn){ m_region=regionIn;};
54 
55  void showResult() const;
56  std::string getTypeName(int typeIn) const;
57 
59 
60  void storeSlbIn();
61  const std::bitset<200>& GetSlbIn(void) const { return m_slbin; } // for readout
62 
63  protected:
64  void collectInput();
65  void doMaskOperation(){};
66  void doDecluster();
67  void deletePatchPanelOut();
68 
69  virtual void doCoincidence() = 0;
70  virtual void createSlaveBoardOut() = 0;
71 
75 
76  int m_id;
77  int m_bid;
79  int m_type;
81 
84  std::bitset<200> m_slbin; // store SlaveBoard input for readout
85 
86 };
87 
88 } // end of namespace
89 
90 #endif
LVL1TGCTrigger::TGCSlaveBoard::setIdHighPtBoard
void setIdHighPtBoard(int m_id)
Definition: TGCSlaveBoard.cxx:265
LVL1TGCTrigger::TGCSlaveBoard::storeSlbIn
void storeSlbIn()
Definition: TGCSlaveBoard.cxx:112
LVL1TGCTrigger::TGCSlaveBoard::m_bid
int m_bid
Definition: TGCSlaveBoard.h:77
LVL1TGCTrigger::TGCSlaveBoard::collectInput
void collectInput()
Definition: TGCSlaveBoard.cxx:240
LVL1TGCTrigger::TGCSlaveBoard::setPatchPanelOut
void setPatchPanelOut(TGCPatchPanelOut *PPOut)
Definition: TGCSlaveBoard.h:58
LVL1TGCTrigger::TGCSlaveBoard::s_iOffset
static constexpr int s_iOffset[6]
Definition: TGCSlaveBoard.h:26
LVL1TGCTrigger::TGCSlaveBoard::showResult
void showResult() const
Definition: TGCSlaveBoard.cxx:133
LVL1TGCTrigger::TGCSlaveBoard::m_id
int m_id
Definition: TGCSlaveBoard.h:76
LVL1TGCTrigger::TGCSlaveBoard::TGCSlaveBoard
TGCSlaveBoard(const TGCSlaveBoard &right)=delete
LVL1TGCTrigger::TGCSlaveBoard::doCoincidence
virtual void doCoincidence()=0
LVL1TGCTrigger::TGCSlaveBoard::getTypeName
std::string getTypeName(int typeIn) const
Definition: TGCSlaveBoard.cxx:173
LVL1TGCTrigger::TGCSlaveBoard::doDecluster
void doDecluster()
Definition: TGCSlaveBoard.cxx:190
LVL1TGCTrigger::TGCSlaveBoard::s_iLength
static constexpr int s_iLength[6]
Definition: TGCSlaveBoard.h:28
LVL1TGCTrigger::TGCSlaveBoard::s_pLength
static constexpr int s_pLength[6]
Definition: TGCSlaveBoard.h:27
LVL1TGCTrigger::TGCSlaveBoard::clockIn
void clockIn(int bidIn)
Definition: TGCSlaveBoard.cxx:37
LVL1TGCTrigger::TGCSlaveBoard::m_slbin
std::bitset< 200 > m_slbin
Definition: TGCSlaveBoard.h:84
LVL1TGCTrigger::TGCSlaveBoard
Definition: TGCSlaveBoard.h:22
LVL1TGCTrigger::TGCSlaveBoard::setRegion
void setRegion(TGCRegionType regionIn)
Definition: TGCSlaveBoard.h:53
LVL1TGCTrigger::TGCSlaveBoard::s_pOffset
static constexpr int s_pOffset[6]
Definition: TGCSlaveBoard.h:25
LVL1TGCTrigger::TGCSlaveBoard::eraseOutput
void eraseOutput()
Definition: TGCSlaveBoard.cxx:230
LVL1TGCTrigger::TGCSlaveBoard::m_region
TGCRegionType m_region
Definition: TGCSlaveBoard.h:80
LVL1TGCTrigger::TGCSlaveBoard::m_idHighPtBoard
int m_idHighPtBoard
Definition: TGCSlaveBoard.h:78
LVL1TGCTrigger::TGCSlaveBoard::GetSlbIn
const std::bitset< 200 > & GetSlbIn(void) const
Definition: TGCSlaveBoard.h:61
LVL1TGCTrigger::TGCSlaveBoard::operator=
TGCSlaveBoard & operator=(const TGCSlaveBoard &right)=delete
LVL1TGCTrigger::TGCSlaveBoard::doMaskOperation
void doMaskOperation()
Definition: TGCSlaveBoard.h:65
LVL1TGCTrigger::TGCSlaveBoard::getType
int getType() const
Definition: TGCSlaveBoard.h:49
LVL1TGCTrigger::TGCSlaveBoard::m_type
int m_type
Definition: TGCSlaveBoard.h:79
LVL1TGCTrigger::TGCSlaveBoardOut
Definition: TGCSlaveBoardOut.h:20
LVL1TGCTrigger::TGCSlaveBoard::m_slaveBoardOut
TGCSlaveBoardOut * m_slaveBoardOut
Definition: TGCSlaveBoard.h:74
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCSlaveBoard::setPatchPanel
void setPatchPanel(TGCPatchPanel *PPIn)
Definition: TGCSlaveBoard.cxx:235
LVL1TGCTrigger::TGCHitPattern
Definition: TGCHitPattern.h:11
LVL1TGCTrigger::TGCSlaveBoard::getId
int getId() const
Definition: TGCSlaveBoard.h:41
TGCNumbering.h
LVL1TGCTrigger::TGCSlaveBoard::deletePatchPanelOut
void deletePatchPanelOut()
Definition: TGCSlaveBoard.cxx:184
LVL1TGCTrigger::TGCSlaveBoard::setId
void setId(int idIn)
Definition: TGCSlaveBoard.h:42
LVL1TGCTrigger::TGCPatchPanel
Definition: TGCPatchPanel.h:38
LVL1TGCTrigger::TGCSlaveBoard::createSlaveBoardOut
virtual void createSlaveBoardOut()=0
LVL1TGCTrigger::TGCSlaveBoard::getIdHighPtBoard
int getIdHighPtBoard() const
Definition: TGCSlaveBoard.cxx:260
LVL1TGCTrigger::TGCSlaveBoard::TGCSlaveBoard
TGCSlaveBoard()
Definition: TGCSlaveBoard.cxx:16
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
LVL1TGCTrigger::TGCSlaveBoard::m_lengthOfCoincidenceOut
int m_lengthOfCoincidenceOut
Definition: TGCSlaveBoard.h:72
LVL1TGCTrigger::TGCSlaveBoard::setType
void setType(int typeIn)
Definition: TGCSlaveBoard.h:50
LVL1TGCTrigger::TGCSlaveBoard::m_patchPanel
TGCPatchPanel * m_patchPanel
Definition: TGCSlaveBoard.h:82
LVL1TGCTrigger::TGCSlaveBoard::m_patchPanelOut
TGCPatchPanelOut * m_patchPanelOut
Definition: TGCSlaveBoard.h:83
LVL1TGCTrigger::TGCSlaveBoard::getOutput
TGCSlaveBoardOut * getOutput()
Definition: TGCSlaveBoard.h:38
LVL1TGCTrigger::TGCSlaveBoard::~TGCSlaveBoard
virtual ~TGCSlaveBoard()
Definition: TGCSlaveBoard.cxx:25
TGCSlaveBoardOut.h
LVL1TGCTrigger::TGCPatchPanelOut
Definition: TGCPatchPanelOut.h:17
LVL1TGCTrigger::TGCSlaveBoard::getRegion
TGCRegionType getRegion() const
Definition: TGCSlaveBoard.h:52
LVL1TGCTrigger::TGCSlaveBoard::m_coincidenceOut
TGCHitPattern * m_coincidenceOut
Definition: TGCSlaveBoard.h:73