Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:19

0001 #ifndef CondFormats_L1TObjects_L1GtBoard_h
0002 #define CondFormats_L1TObjects_L1GtBoard_h
0003 
0004 /**
0005  * \class L1GtBoard
0006  *
0007  *
0008  * Description: class for L1 GT board.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *
0015  * $Date$
0016  * $Revision$
0017  *
0018  */
0019 
0020 // system include files
0021 #include "CondFormats/Serialization/interface/Serializable.h"
0022 
0023 #include <string>
0024 #include <vector>
0025 #include <map>
0026 
0027 // user include files
0028 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0029 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0030 #include <cstdint>
0031 
0032 // forward declarations
0033 
0034 // class declaration
0035 class L1GtBoard {
0036 public:
0037   /// constructors
0038   L1GtBoard();
0039 
0040   L1GtBoard(const L1GtBoardType&);
0041 
0042   L1GtBoard(const L1GtBoardType&, const int&);
0043 
0044   /// destructor
0045   virtual ~L1GtBoard();
0046 
0047   /// copy constructor
0048   L1GtBoard(const L1GtBoard&);
0049 
0050   /// assignment operator
0051   L1GtBoard& operator=(const L1GtBoard&);
0052 
0053   /// equal operator
0054   bool operator==(const L1GtBoard&) const;
0055 
0056   /// unequal operator
0057   bool operator!=(const L1GtBoard&) const;
0058 
0059   /// less than operator
0060   bool operator<(const L1GtBoard&) const;
0061 
0062 public:
0063   /// number of InfiniCables per board
0064   static const int NumberCablesBoard;
0065 
0066 public:
0067   /// get / set board type
0068   inline const L1GtBoardType gtBoardType() const { return m_gtBoardType; }
0069 
0070   void setGtBoardType(const L1GtBoardType&);
0071 
0072   /// get / set board index
0073   inline const int gtBoardIndex() const { return m_gtBoardIndex; }
0074 
0075   void setGtBoardIndex(const int&);
0076 
0077   /// get / set the position of board data block
0078   /// in the GT DAQ readout record
0079   inline const int gtPositionDaqRecord() const { return m_gtPositionDaqRecord; }
0080 
0081   void setGtPositionDaqRecord(const int&);
0082 
0083   /// get / set the position of board data block
0084   /// in the GT EVM readout record
0085   inline const int gtPositionEvmRecord() const { return m_gtPositionEvmRecord; }
0086 
0087   void setGtPositionEvmRecord(const int&);
0088 
0089   /// get / set the bit of board in the GTFE ACTIVE_BOARDS
0090   /// for the GT DAQ readout record
0091   inline const int gtBitDaqActiveBoards() const { return m_gtBitDaqActiveBoards; }
0092 
0093   void setGtBitDaqActiveBoards(const int&);
0094 
0095   /// get / set the bit of board in the GTFE ACTIVE_BOARDS
0096   /// for the GT EVM readout record
0097   inline const int gtBitEvmActiveBoards() const { return m_gtBitEvmActiveBoards; }
0098 
0099   void setGtBitEvmActiveBoards(const int&);
0100 
0101   /// get / set board slot
0102   inline const int gtBoardSlot() const { return m_gtBoardSlot; }
0103 
0104   void setGtBoardSlot(const int&);
0105 
0106   /// get / set board hex fragment name in hw record
0107   inline const int gtBoardHexName() const { return m_gtBoardHexName; }
0108 
0109   void setGtBoardHexName(const int&);
0110 
0111   /// get / set L1 quadruplet (4x16 bits)(cable) in the PSB input
0112   /// valid for PSB only
0113   const std::vector<L1GtPsbQuad>& gtQuadInPsb() const { return m_gtQuadInPsb; }
0114 
0115   void setGtQuadInPsb(const std::vector<L1GtPsbQuad>&);
0116 
0117   /// get / set detailed input configuration for PSB (objects pro channel)
0118   /// int: channel number
0119   const std::map<int, std::vector<L1GtObject> >& gtInputPsbChannels() const { return m_gtInputPsbChannels; }
0120 
0121   void setGtInputPsbChannels(const std::map<int, std::vector<L1GtObject> >&);
0122 
0123   /// get the board ID
0124   const uint16_t gtBoardId() const;
0125 
0126   /// return board name - it depends on L1GtBoardType enum!!!
0127   std::string gtBoardName() const;
0128 
0129   /// print board
0130   void print(std::ostream& myCout) const;
0131 
0132   /// output stream operator
0133   friend std::ostream& operator<<(std::ostream&, const L1GtBoard&);
0134 
0135 private:
0136   /// board type (from L1GtBoardType enum)
0137   L1GtBoardType m_gtBoardType;
0138 
0139   /// board index
0140   int m_gtBoardIndex;
0141 
0142   /// the position of board data block in the GT DAQ readout record
0143   int m_gtPositionDaqRecord;
0144 
0145   /// the position of board data block in the GT EVM readout record
0146   int m_gtPositionEvmRecord;
0147 
0148   /// the bit of board in the GTFE ACTIVE_BOARDS
0149   /// for the GT DAQ readout record
0150   int m_gtBitDaqActiveBoards;
0151 
0152   /// the bit of board in the GTFE ACTIVE_BOARDS
0153   /// for the GT EVM readout record
0154   int m_gtBitEvmActiveBoards;
0155 
0156   /// the slot of board (part of Board_Id)
0157   int m_gtBoardSlot;
0158 
0159   /// board hex fragment name in hw record
0160   /// gives the bits written for each GT board in the Board_Id
0161   int m_gtBoardHexName;
0162 
0163   /// valid for PSB only
0164   /// L1 quadruplet (4x16 bits)(cable) in the PSB input
0165   std::vector<L1GtPsbQuad> m_gtQuadInPsb;
0166 
0167   /// valid for PSB only
0168   /// detailed input configuration for PSB (objects pro channel)
0169   /// int: channel number
0170   std::map<int, std::vector<L1GtObject> > m_gtInputPsbChannels;
0171 
0172   COND_SERIALIZABLE;
0173 };
0174 
0175 #endif /*CondFormats_L1TObjects_L1GtBoard_h*/