Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondFormats_L1TObjects_L1GtPsbConfig_h
0002 #define CondFormats_L1TObjects_L1GtPsbConfig_h
0003 
0004 /**
0005  * \class L1GtPsbConfig
0006  *
0007  *
0008  * Description: class for L1 GT PSB board configuration.
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 <vector>
0024 #include <iosfwd>
0025 
0026 // user include files
0027 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0028 
0029 // forward declarations
0030 
0031 // class declaration
0032 class L1GtPsbConfig {
0033 public:
0034   /// constructors
0035   L1GtPsbConfig();
0036 
0037   /// constructor using board slot
0038   L1GtPsbConfig(const int&);
0039 
0040   /// destructor
0041   virtual ~L1GtPsbConfig();
0042 
0043   /// copy constructor
0044   L1GtPsbConfig(const L1GtPsbConfig&);
0045 
0046   /// assignment operator
0047   L1GtPsbConfig& operator=(const L1GtPsbConfig&);
0048 
0049   /// equal operator
0050   bool operator==(const L1GtPsbConfig&) const;
0051 
0052   /// unequal operator
0053   bool operator!=(const L1GtPsbConfig&) const;
0054 
0055   /// less than operator
0056   bool operator<(const L1GtPsbConfig&) const;
0057 
0058 public:
0059   /// number of LVDS groups per board
0060   static const int PsbNumberLvdsGroups;
0061 
0062   /// number of channels per board
0063   static const int PsbSerLinkNumberChannels;
0064 
0065 public:
0066   /// get / set board slot
0067   inline const int gtBoardSlot() const { return m_gtBoardSlot; }
0068 
0069   void setGtBoardSlot(const int&);
0070 
0071   /// get / set CH0_SEND_LVDS_NOT_DS92LV16
0072   inline const bool gtPsbCh0SendLvds() const { return m_gtPsbCh0SendLvds; }
0073 
0074   void setGtPsbCh0SendLvds(const bool&);
0075 
0076   /// get / set CH1_SEND_LVDS_NOT_DS92LV16
0077   inline const bool gtPsbCh1SendLvds() const { return m_gtPsbCh1SendLvds; }
0078 
0079   void setGtPsbCh1SendLvds(const bool&);
0080 
0081   /// get / set enable LVDS
0082   inline const std::vector<bool>& gtPsbEnableRecLvds() const { return m_gtPsbEnableRecLvds; }
0083 
0084   void setGtPsbEnableRecLvds(const std::vector<bool>&);
0085 
0086   /// get / set enable channels for receiving signal via serial links
0087   inline const std::vector<bool>& gtPsbEnableRecSerLink() const { return m_gtPsbEnableRecSerLink; }
0088 
0089   void setGtPsbEnableRecSerLink(const std::vector<bool>&);
0090 
0091   /// print board
0092   void print(std::ostream& myCout) const;
0093 
0094   /// output stream operator
0095   friend std::ostream& operator<<(std::ostream&, const L1GtPsbConfig&);
0096 
0097 private:
0098   /// the slot of board (part of Board_Id)
0099   int m_gtBoardSlot;
0100 
0101   /// CH0_SEND_LVDS_NOT_DS92LV16
0102   bool m_gtPsbCh0SendLvds;
0103 
0104   /// CH1_SEND_LVDS_NOT_DS92LV16
0105   bool m_gtPsbCh1SendLvds;
0106 
0107   /// enable LVDS (PsbNumberLvdsGroups = 16 groups of four bits)
0108   /// can be enabled/disabled per group
0109   std::vector<bool> m_gtPsbEnableRecLvds;
0110 
0111   /// enable channels for receiving signal via serial links
0112   std::vector<bool> m_gtPsbEnableRecSerLink;
0113 
0114   COND_SERIALIZABLE;
0115 };
0116 
0117 #endif /*CondFormats_L1TObjects_L1GtPsbConfig_h*/