CMS 3D CMS Logo

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

L1GtBoard Class Reference

#include <L1GtBoard.h>

List of all members.

Public Member Functions

const int gtBitDaqActiveBoards () const
const int gtBitEvmActiveBoards () const
const int gtBoardHexName () const
 get / set board hex fragment name in hw record
const boost::uint16_t gtBoardId () const
 get the board ID
const int gtBoardIndex () const
 get / set board index
std::string gtBoardName () const
 return board name - it depends on L1GtBoardType enum!!!
const int gtBoardSlot () const
 get / set board slot
const L1GtBoardType gtBoardType () const
 get / set board type
const std::map< int,
std::vector< L1GtObject > > & 
gtInputPsbChannels () const
const int gtPositionDaqRecord () const
const int gtPositionEvmRecord () const
const std::vector< L1GtPsbQuad > & gtQuadInPsb () const
 L1GtBoard ()
 constructors
 L1GtBoard (const L1GtBoardType &)
 L1GtBoard (const L1GtBoard &)
 copy constructor
 L1GtBoard (const L1GtBoardType &, const int &)
bool operator!= (const L1GtBoard &) const
 unequal operator
bool operator< (const L1GtBoard &) const
 less than operator
L1GtBoardoperator= (const L1GtBoard &)
 assignment operator
bool operator== (const L1GtBoard &) const
 equal operator
void print (std::ostream &myCout) const
 print board
void setGtBitDaqActiveBoards (const int &)
void setGtBitEvmActiveBoards (const int &)
void setGtBoardHexName (const int &)
void setGtBoardIndex (const int &)
void setGtBoardSlot (const int &)
void setGtBoardType (const L1GtBoardType &)
void setGtInputPsbChannels (const std::map< int, std::vector< L1GtObject > > &)
void setGtPositionDaqRecord (const int &)
void setGtPositionEvmRecord (const int &)
void setGtQuadInPsb (const std::vector< L1GtPsbQuad > &)
virtual ~L1GtBoard ()
 destructor

Static Public Attributes

static const int NumberCablesBoard = 4
 number of InfiniCables per board

Private Attributes

int m_gtBitDaqActiveBoards
int m_gtBitEvmActiveBoards
int m_gtBoardHexName
int m_gtBoardIndex
 board index
int m_gtBoardSlot
 the slot of board (part of Board_Id)
L1GtBoardType m_gtBoardType
 board type (from L1GtBoardType enum)
std::map< int, std::vector
< L1GtObject > > 
m_gtInputPsbChannels
int m_gtPositionDaqRecord
 the position of board data block in the GT DAQ readout record
int m_gtPositionEvmRecord
 the position of board data block in the GT EVM readout record
std::vector< L1GtPsbQuadm_gtQuadInPsb

Friends

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

Detailed Description

Description: class for L1 GT board.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 34 of file L1GtBoard.h.


Constructor & Destructor Documentation

L1GtBoard::L1GtBoard ( )

constructors

Definition at line 32 of file L1GtBoard.cc.

{

    // empty

}
L1GtBoard::L1GtBoard ( const L1GtBoardType gtBoardTypeValue)
L1GtBoard::L1GtBoard ( const L1GtBoardType gtBoardTypeValue,
const int &  gtBoardIndexValue 
)
L1GtBoard::~L1GtBoard ( ) [virtual]

destructor

Definition at line 77 of file L1GtBoard.cc.

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

Member Function Documentation

const int L1GtBoard::gtBitDaqActiveBoards ( ) const [inline]

get / set the bit of board in the GTFE ACTIVE_BOARDS for the GT DAQ readout record

Definition at line 107 of file L1GtBoard.h.

References m_gtBitDaqActiveBoards.

const int L1GtBoard::gtBitEvmActiveBoards ( ) const [inline]

get / set the bit of board in the GTFE ACTIVE_BOARDS for the GT EVM readout record

Definition at line 116 of file L1GtBoard.h.

References m_gtBitEvmActiveBoards.

const int L1GtBoard::gtBoardHexName ( ) const [inline]

get / set board hex fragment name in hw record

Definition at line 132 of file L1GtBoard.h.

References m_gtBoardHexName.

    {
        return m_gtBoardHexName;
    }
const boost::uint16_t L1GtBoard::gtBoardId ( ) const

get the board ID

Definition at line 275 of file L1GtBoard.cc.

References GTFE, m_gtBoardHexName, m_gtBoardSlot, and m_gtBoardType.

Referenced by print().

{

    boost::uint16_t boardIdValue = 0;

    if (m_gtBoardType == GTFE) {
        boardIdValue = boardIdValue | m_gtBoardSlot;
    } else {
        boardIdValue = boardIdValue | (m_gtBoardHexName << 8) | m_gtBoardSlot;
    }

    return boardIdValue;
}
const int L1GtBoard::gtBoardIndex ( ) const [inline]

get / set board index

Definition at line 80 of file L1GtBoard.h.

References m_gtBoardIndex.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer(), and operator<().

    {
        return m_gtBoardIndex;
    }
std::string L1GtBoard::gtBoardName ( ) const

return board name - it depends on L1GtBoardType enum!!!

Definition at line 290 of file L1GtBoard.cc.

References FDL, GMT, GTFE, m_gtBoardType, PSB, AlCaHLTBitMon_QueryRunRegistry::string, TCS, and TIM.

Referenced by print().

{

    std::string gtBoardNameValue;

    // active board, add its size
    switch (m_gtBoardType) {

        case GTFE: {
                gtBoardNameValue = "GTFE";
            }
            break;
        case FDL: {
                gtBoardNameValue = "FDL";
            }
            break;
        case PSB: {
                gtBoardNameValue = "PSB";
            }
            break;
        case GMT: {
                gtBoardNameValue = "GMT";
            }
            break;
        case TCS: {
                gtBoardNameValue = "TCS";
            }
            break;
        case TIM: {
                gtBoardNameValue = "TIM";
            }
            break;
        default: {
            //edm::LogWarning("L1GtBoard") << "\n\nError: no such board type" <<  m_gtBoardType
            //<< " in enum L1GtBoardType from L1GtFwd\n\n" << std::endl;
            gtBoardNameValue = "ERROR";
            }
            break;
    }


    return gtBoardNameValue;

}
const int L1GtBoard::gtBoardSlot ( ) const [inline]

get / set board slot

Definition at line 124 of file L1GtBoard.h.

References m_gtBoardSlot.

    {
        return m_gtBoardSlot;
    }
const L1GtBoardType L1GtBoard::gtBoardType ( ) const [inline]

get / set board type

Definition at line 72 of file L1GtBoard.h.

References m_gtBoardType.

Referenced by operator<().

    {
        return m_gtBoardType;
    }
const std::map<int, std::vector<L1GtObject> >& L1GtBoard::gtInputPsbChannels ( ) const [inline]

get / set detailed input configuration for PSB (objects pro channel) int: channel number

Definition at line 151 of file L1GtBoard.h.

References m_gtInputPsbChannels.

                                                                          {
        return m_gtInputPsbChannels;
    }
const int L1GtBoard::gtPositionDaqRecord ( ) const [inline]

get / set the position of board data block in the GT DAQ readout record

Definition at line 89 of file L1GtBoard.h.

References m_gtPositionDaqRecord.

    {
        return m_gtPositionDaqRecord;
    }
const int L1GtBoard::gtPositionEvmRecord ( ) const [inline]

get / set the position of board data block in the GT EVM readout record

Definition at line 98 of file L1GtBoard.h.

References m_gtPositionEvmRecord.

    {
        return m_gtPositionEvmRecord;
    }
const std::vector<L1GtPsbQuad>& L1GtBoard::gtQuadInPsb ( ) const [inline]

get / set L1 quadruplet (4x16 bits)(cable) in the PSB input valid for PSB only

Definition at line 142 of file L1GtBoard.h.

References m_gtQuadInPsb.

    {
        return m_gtQuadInPsb;
    }
bool L1GtBoard::operator!= ( const L1GtBoard result) const

unequal operator

Definition at line 183 of file L1GtBoard.cc.

{

    return !( result == *this);

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

less than operator

Definition at line 191 of file L1GtBoard.cc.

References gtBoardIndex(), gtBoardType(), m_gtBoardIndex, and m_gtBoardType.

{
    if (m_gtBoardType < gtb.gtBoardType()) {
        return true;
    } else {
        if (m_gtBoardType == gtb.gtBoardType()) {

            if (m_gtBoardIndex < gtb.gtBoardIndex()) {
                return true;
            }
        }
    }

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

equal operator

Definition at line 132 of file L1GtBoard.cc.

References m_gtBitDaqActiveBoards, m_gtBitEvmActiveBoards, m_gtBoardHexName, m_gtBoardIndex, m_gtBoardSlot, m_gtBoardType, m_gtInputPsbChannels, m_gtPositionDaqRecord, m_gtPositionEvmRecord, and m_gtQuadInPsb.

{

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

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

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

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

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

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

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

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

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

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

    // all members identical
    return true;

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

print board

Definition at line 336 of file L1GtBoard.cc.

References BPTX, CenJet, CenJetQ, end, ESumsQ, ETM, ETT, ForJet, ForJetQ, Free, gtBoardId(), gtBoardName(), GtExternal, HfBitCounts, HfQ, HfRingEtSums, HTM, HTT, IsoEG, IsoEGQ, JetCounts, JetCountsQ, m_gtBitDaqActiveBoards, m_gtBitEvmActiveBoards, m_gtBoardHexName, m_gtBoardIndex, m_gtBoardType, m_gtInputPsbChannels, m_gtPositionDaqRecord, m_gtPositionEvmRecord, m_gtQuadInPsb, Association::map, MQB1, MQB10, MQB2, MQB5, MQB6, MQB9, MQF11, MQF12, MQF3, MQF4, MQF7, MQF8, Mu, NoIsoEG, NoIsoEGQ, PSB, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, TauJet, TauJetQ, TechTr, and TechTrig.

Referenced by operator<<().

{

    boost::uint16_t boardId = gtBoardId();
    std::string boardName = gtBoardName();

    myCout
    << "Board ID:                        " << std::hex << boardId << std::dec << std::endl
    << "Board Name:                      " << boardName << "_" << m_gtBoardIndex << std::endl
    << "Position in DAQ Record:          " << m_gtPositionDaqRecord << std::endl
    << "Position in EVM Record:          " << m_gtPositionEvmRecord << std::endl
    << "Active_Boards bit in DAQ Record: " << m_gtBitDaqActiveBoards << std::endl
    << "Active_Boards bit in EVM Record: " << m_gtBitEvmActiveBoards << std::endl
    << "Board HexName:                   " << std::hex << m_gtBoardHexName << std::dec
    << std::endl;

    if (m_gtBoardType == PSB) {
        myCout
        << "PSB Input per Cable: DEPRECATED"
        << std::endl;
    }


    for (std::vector<L1GtPsbQuad>::const_iterator
            cIt = m_gtQuadInPsb.begin(); cIt != m_gtQuadInPsb.end(); ++cIt) {

        std::string objType;

        if ( *cIt == TechTr ) {
            objType = "TechTr";
        } else if ( *cIt == IsoEGQ ) {
            objType = "IsoEGQ";
        } else if ( *cIt == NoIsoEGQ ) {
            objType = "NoIsoEGQ";
        } else if ( *cIt == CenJetQ ) {
            objType = "CenJetQ";
        } else if ( *cIt == ForJetQ ) {
            objType = "ForJetQ";
        } else if ( *cIt == TauJetQ ) {
            objType = "TauJetQ";
        } else if ( *cIt == ESumsQ ) {
            objType = "ESumsQ";
        } else if ( *cIt == JetCountsQ ) {
            objType = "JetCountsQ";
        } else if ( *cIt == MQB1 ) {
            objType = "MQB1";
        } else if ( *cIt == MQB2 ) {
            objType = "MQB2";
        } else if ( *cIt == MQF3 ) {
            objType = "MQF3";
        } else if ( *cIt == MQF4 ) {
            objType = "MQF4";
        } else if ( *cIt == MQB5 ) {
            objType = "MQB5";
        } else if ( *cIt == MQB6 ) {
            objType = "MQB6";
        } else if ( *cIt == MQF7 ) {
            objType = "MQF7";
        } else if ( *cIt == MQF8 ) {
            objType = "MQF8";
        } else if ( *cIt == MQB9 ) {
            objType = "MQB9";
        } else if ( *cIt == MQB10 ) {
            objType = "MQB10";
        } else if ( *cIt == MQF11 ) {
            objType = "MQF11";
        } else if ( *cIt == MQF12 ) {
            objType = "MQF12";
        } else if ( *cIt == Free ) {
            objType = "Free";
        } else if ( *cIt == HfQ ) {
            objType = "HfQ";
        } else {
            myCout << "\n\nError: no such member " <<  (*cIt)
            << " in enum L1GtPsbQuad\n\n" << std::endl;
            objType = "ERROR";
        }


        myCout << "       " << objType << " ";
    }
    myCout << std::endl;

    if (m_gtBoardType == PSB) {
        myCout
        << "Input objects pro channel:";
    }

    for (std::map<int, std::vector<L1GtObject> >::const_iterator cIt =
            m_gtInputPsbChannels.begin(); cIt != m_gtInputPsbChannels.end(); ++cIt) {

        myCout << "\n  Channel " << cIt->first << " (" << (cIt->second).size() << " objects): ";

        for (std::vector<L1GtObject>::const_iterator itObj =
                (cIt->second).begin(); itObj != (cIt->second).end(); ++itObj) {

            switch (*itObj) {
                case Mu: {
                    myCout << " Mu ";
                }

                    break;
                case NoIsoEG: {
                    myCout << " NoIsoEG ";
                }

                    break;
                case IsoEG: {
                    myCout << " IsoEG ";
                }

                    break;
                case CenJet: {
                    myCout << " CenJet ";
                }

                    break;
                case ForJet: {
                    myCout << " ForJet ";
                }

                    break;
                case TauJet: {
                    myCout << " TauJet ";
                }

                    break;
                case ETM: {
                    myCout << " ETM ";
                }

                    break;
                case ETT: {
                    myCout << " ETT ";
                }

                    break;
                case HTT: {
                    myCout << " HTT ";
                }

                    break;
                case HTM: {
                    myCout << " HTM ";
                }

                    break;
                case JetCounts: {
                    myCout << " JetCounts ";
                }

                    break;
                case HfBitCounts: {
                    myCout << " HfBitCounts ";
                }

                    break;
                case HfRingEtSums: {
                    myCout << " HfRingEtSums ";
                }

                    break;
                case TechTrig: {
                    myCout << " TechTrig ";
                }

                    break;
                case Castor: {
                    myCout << " Castor ";
                }

                    break;
                case BPTX: {
                    myCout << " BPTX ";
                }

                    break;
                case GtExternal: {
                    myCout << " GtExternal ";
                }

                    break;
                default: {
                    myCout << " ERROR: Unknown type " << (*itObj);
                }
                    break;
            }
        }

    }


    myCout << std::endl;
}
void L1GtBoard::setGtBitDaqActiveBoards ( const int &  gtBitDaqActiveBoardsValue)

Definition at line 235 of file L1GtBoard.cc.

References m_gtBitDaqActiveBoards.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtBitDaqActiveBoards = gtBitDaqActiveBoardsValue;
}
void L1GtBoard::setGtBitEvmActiveBoards ( const int &  gtBitEvmActiveBoardsValue)

Definition at line 243 of file L1GtBoard.cc.

References m_gtBitEvmActiveBoards.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtBitEvmActiveBoards = gtBitEvmActiveBoardsValue;
}
void L1GtBoard::setGtBoardHexName ( const int &  gtBoardHexNameValue)

Definition at line 255 of file L1GtBoard.cc.

References m_gtBoardHexName.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtBoardHexName = gtBoardHexNameValue;
}
void L1GtBoard::setGtBoardIndex ( const int &  gtBoardIndexValue)

Definition at line 214 of file L1GtBoard.cc.

References m_gtBoardIndex.

{
    m_gtBoardIndex = gtBoardIndexValue;
}
void L1GtBoard::setGtBoardSlot ( const int &  gtBoardSlotValue)

Definition at line 249 of file L1GtBoard.cc.

References m_gtBoardSlot.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtBoardSlot = gtBoardSlotValue;
}
void L1GtBoard::setGtBoardType ( const L1GtBoardType gtBoardTypeValue)

Definition at line 208 of file L1GtBoard.cc.

References m_gtBoardType.

{
    m_gtBoardType = gtBoardTypeValue;
}
void L1GtBoard::setGtInputPsbChannels ( const std::map< int, std::vector< L1GtObject > > &  gtInputPsbChannelsValue)

Definition at line 270 of file L1GtBoard.cc.

References m_gtInputPsbChannels.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

                                                                                                        {
    m_gtInputPsbChannels = gtInputPsbChannelsValue;
}
void L1GtBoard::setGtPositionDaqRecord ( const int &  gtPositionDaqRecordValue)

Definition at line 221 of file L1GtBoard.cc.

References m_gtPositionDaqRecord.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtPositionDaqRecord = gtPositionDaqRecordValue;
}
void L1GtBoard::setGtPositionEvmRecord ( const int &  gtPositionEvmRecordValue)

Definition at line 228 of file L1GtBoard.cc.

References m_gtPositionEvmRecord.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtPositionEvmRecord = gtPositionEvmRecordValue;
}
void L1GtBoard::setGtQuadInPsb ( const std::vector< L1GtPsbQuad > &  gtQuadInPsbValue)

Definition at line 263 of file L1GtBoard.cc.

References m_gtQuadInPsb.

Referenced by L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().

{
    m_gtQuadInPsb = gtQuadInPsbValue;
}

Friends And Related Function Documentation

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

output stream operator

Definition at line 532 of file L1GtBoard.cc.

{
    result.print(os);
    return os;

}

Member Data Documentation

the bit of board in the GTFE ACTIVE_BOARDS for the GT DAQ readout record

Definition at line 186 of file L1GtBoard.h.

Referenced by gtBitDaqActiveBoards(), L1GtBoard(), operator=(), operator==(), print(), and setGtBitDaqActiveBoards().

the bit of board in the GTFE ACTIVE_BOARDS for the GT EVM readout record

Definition at line 190 of file L1GtBoard.h.

Referenced by gtBitEvmActiveBoards(), L1GtBoard(), operator=(), operator==(), print(), and setGtBitEvmActiveBoards().

board hex fragment name in hw record gives the bits written for each GT board in the Board_Id

Definition at line 197 of file L1GtBoard.h.

Referenced by gtBoardHexName(), gtBoardId(), L1GtBoard(), operator=(), operator==(), print(), and setGtBoardHexName().

board index

Definition at line 176 of file L1GtBoard.h.

Referenced by gtBoardIndex(), L1GtBoard(), operator<(), operator=(), operator==(), print(), and setGtBoardIndex().

int L1GtBoard::m_gtBoardSlot [private]

the slot of board (part of Board_Id)

Definition at line 193 of file L1GtBoard.h.

Referenced by gtBoardId(), gtBoardSlot(), L1GtBoard(), operator=(), operator==(), and setGtBoardSlot().

board type (from L1GtBoardType enum)

Definition at line 173 of file L1GtBoard.h.

Referenced by gtBoardId(), gtBoardName(), gtBoardType(), L1GtBoard(), operator<(), operator=(), operator==(), print(), and setGtBoardType().

std::map<int, std::vector<L1GtObject> > L1GtBoard::m_gtInputPsbChannels [private]

valid for PSB only detailed input configuration for PSB (objects pro channel) int: channel number

Definition at line 206 of file L1GtBoard.h.

Referenced by gtInputPsbChannels(), L1GtBoard(), operator=(), operator==(), print(), and setGtInputPsbChannels().

the position of board data block in the GT DAQ readout record

Definition at line 179 of file L1GtBoard.h.

Referenced by gtPositionDaqRecord(), L1GtBoard(), operator=(), operator==(), print(), and setGtPositionDaqRecord().

the position of board data block in the GT EVM readout record

Definition at line 182 of file L1GtBoard.h.

Referenced by gtPositionEvmRecord(), L1GtBoard(), operator=(), operator==(), print(), and setGtPositionEvmRecord().

std::vector<L1GtPsbQuad> L1GtBoard::m_gtQuadInPsb [private]

valid for PSB only L1 quadruplet (4x16 bits)(cable) in the PSB input

Definition at line 201 of file L1GtBoard.h.

Referenced by gtQuadInPsb(), L1GtBoard(), operator=(), operator==(), print(), and setGtQuadInPsb().

const int L1GtBoard::NumberCablesBoard = 4 [static]

number of InfiniCables per board

Definition at line 67 of file L1GtBoard.h.

Referenced by L1GtBoard(), and L1GtBoardMapsTrivialProducer::L1GtBoardMapsTrivialProducer().