CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes | Friends

L1GtPsbConfig Class Reference

#include <L1GtPsbConfig.h>

List of all members.

Public Member Functions

const int gtBoardSlot () const
 get / set board slot
const bool gtPsbCh0SendLvds () const
 get / set CH0_SEND_LVDS_NOT_DS92LV16
const bool gtPsbCh1SendLvds () const
 get / set CH1_SEND_LVDS_NOT_DS92LV16
const std::vector< bool > & gtPsbEnableRecLvds () const
 get / set enable LVDS
const std::vector< bool > & gtPsbEnableRecSerLink () const
 get / set enable channels for receiving signal via serial links
 L1GtPsbConfig (const int &)
 constructor using board slot
 L1GtPsbConfig (const L1GtPsbConfig &)
 copy constructor
 L1GtPsbConfig ()
 constructors
bool operator!= (const L1GtPsbConfig &) const
 unequal operator
bool operator< (const L1GtPsbConfig &) const
 less than operator
L1GtPsbConfigoperator= (const L1GtPsbConfig &)
 assignment operator
bool operator== (const L1GtPsbConfig &) const
 equal operator
void print (std::ostream &myCout) const
 print board
void setGtBoardSlot (const int &)
void setGtPsbCh0SendLvds (const bool &)
void setGtPsbCh1SendLvds (const bool &)
void setGtPsbEnableRecLvds (const std::vector< bool > &)
void setGtPsbEnableRecSerLink (const std::vector< bool > &)
virtual ~L1GtPsbConfig ()
 destructor

Static Public Attributes

static const int PsbNumberLvdsGroups = 16
 number of LVDS groups per board
static const int PsbSerLinkNumberChannels = 8
 number of channels per board

Private Attributes

int m_gtBoardSlot
 the slot of board (part of Board_Id)
bool m_gtPsbCh0SendLvds
 CH0_SEND_LVDS_NOT_DS92LV16.
bool m_gtPsbCh1SendLvds
 CH1_SEND_LVDS_NOT_DS92LV16.
std::vector< bool > m_gtPsbEnableRecLvds
std::vector< bool > m_gtPsbEnableRecSerLink
 enable channels for receiving signal via serial links

Friends

std::ostream & operator<< (std::ostream &, const L1GtPsbConfig &)
 output stream operator

Detailed Description

Description: class for L1 GT PSB board configuration.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 30 of file L1GtPsbConfig.h.


Constructor & Destructor Documentation

L1GtPsbConfig::L1GtPsbConfig ( )
L1GtPsbConfig::L1GtPsbConfig ( const int &  psbSlot)
L1GtPsbConfig::~L1GtPsbConfig ( ) [virtual]

destructor

Definition at line 57 of file L1GtPsbConfig.cc.

{
    // empty
}
L1GtPsbConfig::L1GtPsbConfig ( const L1GtPsbConfig gtb)

Member Function Documentation

const int L1GtPsbConfig::gtBoardSlot ( ) const [inline]

get / set board slot

Definition at line 70 of file L1GtPsbConfig.h.

References m_gtBoardSlot.

    {
        return m_gtBoardSlot;
    }
const bool L1GtPsbConfig::gtPsbCh0SendLvds ( ) const [inline]

get / set CH0_SEND_LVDS_NOT_DS92LV16

Definition at line 78 of file L1GtPsbConfig.h.

References m_gtPsbCh0SendLvds.

    {
        return m_gtPsbCh0SendLvds;
    }
const bool L1GtPsbConfig::gtPsbCh1SendLvds ( ) const [inline]

get / set CH1_SEND_LVDS_NOT_DS92LV16

Definition at line 86 of file L1GtPsbConfig.h.

References m_gtPsbCh1SendLvds.

    {
        return m_gtPsbCh1SendLvds;
    }
const std::vector<bool>& L1GtPsbConfig::gtPsbEnableRecLvds ( ) const [inline]

get / set enable LVDS

Definition at line 94 of file L1GtPsbConfig.h.

References m_gtPsbEnableRecLvds.

    {
        return m_gtPsbEnableRecLvds;
    }
const std::vector<bool>& L1GtPsbConfig::gtPsbEnableRecSerLink ( ) const [inline]

get / set enable channels for receiving signal via serial links

Definition at line 102 of file L1GtPsbConfig.h.

References m_gtPsbEnableRecSerLink.

bool L1GtPsbConfig::operator!= ( const L1GtPsbConfig result) const

unequal operator

Definition at line 125 of file L1GtPsbConfig.cc.

{

    return !(result == *this);

}
bool L1GtPsbConfig::operator< ( const L1GtPsbConfig gtb) const

less than operator

Definition at line 133 of file L1GtPsbConfig.cc.

References m_gtBoardSlot.

{
    if (m_gtBoardSlot < gtb.m_gtBoardSlot) {
        return true;
    }
    else {
        return false;
    }

    return false;
}
L1GtPsbConfig & L1GtPsbConfig::operator= ( const L1GtPsbConfig gtb)
bool L1GtPsbConfig::operator== ( const L1GtPsbConfig gtb) const

equal operator

Definition at line 96 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

{

    if (m_gtBoardSlot != gtb.m_gtBoardSlot) {
        return false;
    }

    if (m_gtPsbCh0SendLvds != gtb.m_gtPsbCh0SendLvds) {
        return false;
    }

    if (m_gtPsbCh1SendLvds != gtb.m_gtPsbCh1SendLvds) {
        return false;
    }

    if (m_gtPsbEnableRecLvds != gtb.m_gtPsbEnableRecLvds) {
        return false;
    }

    if (m_gtPsbEnableRecSerLink != gtb.m_gtPsbEnableRecSerLink) {
        return false;
    }

    // all members identical
    return true;

}
void L1GtPsbConfig::print ( std::ostream &  myCout) const

print board

Definition at line 179 of file L1GtPsbConfig.cc.

References m_gtBoardSlot, m_gtPsbCh0SendLvds, m_gtPsbCh1SendLvds, m_gtPsbEnableRecLvds, and m_gtPsbEnableRecSerLink.

Referenced by operator<<().

{

    myCout << "PSB Board slot " << m_gtBoardSlot << " ( 0x" << std::hex
            << m_gtBoardSlot << std::dec << " ):" << std::endl;

    myCout << "    CH0_SEND_LVDS_NOT_DS92LV16 = "
            << (m_gtPsbCh0SendLvds ? "True" : "False") << std::endl;
    myCout << "    CH1_SEND_LVDS_NOT_DS92LV16 = "
            << (m_gtPsbCh1SendLvds ? "True" : "False") << std::endl;
    myCout << std::endl;

    int iLvds = -1;
    for (std::vector<bool>::const_iterator cIt = m_gtPsbEnableRecLvds.begin(); cIt
            != m_gtPsbEnableRecLvds.end(); ++cIt) {

        iLvds++;
        myCout << "\n    Enable_Rec_LVDS [" << iLvds << "] = "
                << ((*cIt) ? "True" : "False");
    }
    myCout << std::endl;

    int iCh = -1;
    for (std::vector<bool>::const_iterator cIt =
            m_gtPsbEnableRecSerLink.begin(); cIt
            != m_gtPsbEnableRecSerLink.end(); ++cIt) {

        iCh++;
        myCout << "\n    SerLink_Ch" << iCh << "_Rec_Enable = "
                << ((*cIt) ? "True" : "False");
    }
    myCout << std::endl;
}
void L1GtPsbConfig::setGtBoardSlot ( const int &  gtBoardSlotValue)

Definition at line 146 of file L1GtPsbConfig.cc.

References m_gtBoardSlot.

Referenced by L1GtPsbSetupConfigOnlineProd::addDefaultPsb(), and L1GtPsbSetupConfigOnlineProd::addPsbFromDb().

{
    m_gtBoardSlot = gtBoardSlotValue;
}
void L1GtPsbConfig::setGtPsbCh0SendLvds ( const bool &  gtPsbCh0SendLvdsValue)
void L1GtPsbConfig::setGtPsbCh1SendLvds ( const bool &  gtPsbCh1SendLvdsValue)
void L1GtPsbConfig::setGtPsbEnableRecLvds ( const std::vector< bool > &  gtPsbEnableRecLvdsValue)
void L1GtPsbConfig::setGtPsbEnableRecSerLink ( const std::vector< bool > &  gtPsbEnableRecSerLinkValue)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GtPsbConfig result 
) [friend]

output stream operator

Definition at line 214 of file L1GtPsbConfig.cc.

{
    result.print(os);
    return os;

}

Member Data Documentation

the slot of board (part of Board_Id)

Definition at line 118 of file L1GtPsbConfig.h.

Referenced by gtBoardSlot(), L1GtPsbConfig(), operator<(), operator=(), operator==(), print(), and setGtBoardSlot().

CH0_SEND_LVDS_NOT_DS92LV16.

Definition at line 121 of file L1GtPsbConfig.h.

Referenced by gtPsbCh0SendLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbCh0SendLvds().

CH1_SEND_LVDS_NOT_DS92LV16.

Definition at line 124 of file L1GtPsbConfig.h.

Referenced by gtPsbCh1SendLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbCh1SendLvds().

std::vector<bool> L1GtPsbConfig::m_gtPsbEnableRecLvds [private]

enable LVDS (PsbNumberLvdsGroups = 16 groups of four bits) can be enabled/disabled per group

Definition at line 128 of file L1GtPsbConfig.h.

Referenced by gtPsbEnableRecLvds(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbEnableRecLvds().

std::vector<bool> L1GtPsbConfig::m_gtPsbEnableRecSerLink [private]

enable channels for receiving signal via serial links

Definition at line 131 of file L1GtPsbConfig.h.

Referenced by gtPsbEnableRecSerLink(), L1GtPsbConfig(), operator=(), operator==(), print(), and setGtPsbEnableRecSerLink().

const int L1GtPsbConfig::PsbNumberLvdsGroups = 16 [static]