CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes

sistrip::FEDBackendStatusRegister Class Reference

#include <SiStripFEDBufferComponents.h>

List of all members.

Public Member Functions

bool backpressureFlag () const
 FEDBackendStatusRegister (const uint32_t backendStatusRegister)
 FEDBackendStatusRegister (const FEDBufferState qdrMemoryBufferState=BUFFER_STATE_UNSET, const FEDBufferState frameAddressFIFOBufferState=BUFFER_STATE_UNSET, const FEDBufferState totalLengthFIFOBufferState=BUFFER_STATE_UNSET, const FEDBufferState trackerHeaderFIFOBufferState=BUFFER_STATE_UNSET, const FEDBufferState l1aBxFIFOBufferState=BUFFER_STATE_UNSET, const FEDBufferState feEventLengthFIFOBufferState=BUFFER_STATE_UNSET, const FEDBufferState feFPGABufferState=BUFFER_STATE_UNSET, const bool backpressure=false, const bool slinkFull=false, const bool slinkDown=false, const bool internalFreeze=false, const bool trackerHeaderMonitorDataReady=false, const bool ttcReady=true)
FEDBufferState feEventLengthFIFOState () const
FEDBufferState feFPGABufferState () const
FEDBufferState frameAddressFIFOState () const
bool internalFreezeFlag () const
FEDBufferState l1aBxFIFOState () const
 operator uint32_t () const
void print (std::ostream &os) const
void printFlags (std::ostream &os) const
FEDBufferState qdrMemoryState () const
FEDBackendStatusRegistersetBackpressureFlag (const bool bitSet)
FEDBackendStatusRegistersetFEEventLengthFIFOState (const FEDBufferState state)
FEDBackendStatusRegistersetFEFPGABufferState (const FEDBufferState state)
FEDBackendStatusRegistersetFrameAddressFIFOState (const FEDBufferState state)
FEDBackendStatusRegistersetInternalFreezeFlag (const bool bitSet)
FEDBackendStatusRegistersetL1ABXFIFOState (const FEDBufferState state)
FEDBackendStatusRegistersetQDRMemoryState (const FEDBufferState state)
FEDBackendStatusRegistersetSLinkDownFlag (const bool bitSet)
FEDBackendStatusRegistersetSLinkFullFlag (const bool bitSet)
FEDBackendStatusRegistersetTotalLengthFIFOState (const FEDBufferState state)
FEDBackendStatusRegistersetTrackerHeaderFIFOState (const FEDBufferState state)
FEDBackendStatusRegistersetTrackerHeaderMonitorDataReadyFlag (const bool bitSet)
FEDBackendStatusRegistersetTTCReadyFlag (const bool bitSet)
bool slinkDownFlag () const
bool slinkFullFlag () const
FEDBufferState totalLengthFIFOState () const
FEDBufferState trackerHeaderFIFOState () const
bool trackerHeaderMonitorDataReadyFlag () const
bool ttcReadyFlag () const

Private Types

enum  bufferPositions {
  BUFFER_POSITION_QDR_MEMORY = 0, BUFFER_POSITION_FRAME_ADDRESS_FIFO = 1, BUFFER_POSITION_TOTAL_LENGTH_FIFO = 2, BUFFER_POSITION_TRACKER_HEADER_FIFO = 3,
  BUFFER_POSITION_L1ABX_FIFO = 4, BUFFER_POSITION_FE_EVENT_LENGTH_FIFO = 5, BUFFER_POSITION_FE_FPGA_BUFFER = 6
}
enum  stateOffsets { STATE_OFFSET_FULL = 8, STATE_OFFSET_PARTIAL_FULL = 16, STATE_OFFSET_EMPTY = 24 }

Private Member Functions

bool getBit (const uint8_t num) const
FEDBufferState getBufferState (const uint8_t bufferPosition) const
void printFlagsForBuffer (const FEDBufferState bufferState, const std::string name, std::ostream &os) const
void setBit (const uint8_t num, const bool bitSet)
void setBufferSate (const uint8_t bufferPosition, const FEDBufferState state)

Private Attributes

uint32_t data_

Detailed Description

Definition at line 313 of file SiStripFEDBufferComponents.h.


Member Enumeration Documentation

Enumerator:
BUFFER_POSITION_QDR_MEMORY 
BUFFER_POSITION_FRAME_ADDRESS_FIFO 
BUFFER_POSITION_TOTAL_LENGTH_FIFO 
BUFFER_POSITION_TRACKER_HEADER_FIFO 
BUFFER_POSITION_L1ABX_FIFO 
BUFFER_POSITION_FE_EVENT_LENGTH_FIFO 
BUFFER_POSITION_FE_FPGA_BUFFER 

Definition at line 369 of file SiStripFEDBufferComponents.h.

Enumerator:
STATE_OFFSET_FULL 
STATE_OFFSET_PARTIAL_FULL 
STATE_OFFSET_EMPTY 

Definition at line 376 of file SiStripFEDBufferComponents.h.


Constructor & Destructor Documentation

sistrip::FEDBackendStatusRegister::FEDBackendStatusRegister ( const uint32_t  backendStatusRegister) [inline]

Definition at line 860 of file SiStripFEDBufferComponents.h.

    : data_(backendStatusRegister) { }
sistrip::FEDBackendStatusRegister::FEDBackendStatusRegister ( const FEDBufferState  qdrMemoryBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  frameAddressFIFOBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  totalLengthFIFOBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  trackerHeaderFIFOBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  l1aBxFIFOBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  feEventLengthFIFOBufferState = BUFFER_STATE_UNSET,
const FEDBufferState  feFPGABufferState = BUFFER_STATE_UNSET,
const bool  backpressure = false,
const bool  slinkFull = false,
const bool  slinkDown = false,
const bool  internalFreeze = false,
const bool  trackerHeaderMonitorDataReady = false,
const bool  ttcReady = true 
)

Member Function Documentation

bool sistrip::FEDBackendStatusRegister::backpressureFlag ( ) const [inline]

Definition at line 881 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(4); }
FEDBufferState sistrip::FEDBackendStatusRegister::feEventLengthFIFOState ( ) const [inline]
FEDBufferState sistrip::FEDBackendStatusRegister::feFPGABufferState ( ) const [inline]
FEDBufferState sistrip::FEDBackendStatusRegister::frameAddressFIFOState ( ) const [inline]
bool sistrip::FEDBackendStatusRegister::getBit ( const uint8_t  num) const [inline, private]
FEDBufferState sistrip::FEDBackendStatusRegister::getBufferState ( const uint8_t  bufferPosition) const [private]
bool sistrip::FEDBackendStatusRegister::internalFreezeFlag ( ) const [inline]

Definition at line 872 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(1); }
FEDBufferState sistrip::FEDBackendStatusRegister::l1aBxFIFOState ( ) const [inline]
sistrip::FEDBackendStatusRegister::operator uint32_t ( ) const [inline]

Definition at line 863 of file SiStripFEDBufferComponents.h.

References data_.

    { return data_; }
void sistrip::FEDBackendStatusRegister::print ( std::ostream &  os) const [inline]

Definition at line 866 of file SiStripFEDBufferComponents.h.

References data_, and sistrip::printHex().

    { printHex(&data_,4,os); }
void sistrip::FEDBackendStatusRegister::printFlags ( std::ostream &  os) const
void sistrip::FEDBackendStatusRegister::printFlagsForBuffer ( const FEDBufferState  bufferState,
const std::string  name,
std::ostream &  os 
) const [private]

Definition at line 538 of file SiStripFEDBufferComponents.cc.

References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, and sistrip::BUFFER_STATE_UNSET.

Referenced by printFlags().

  {
    if (bufferState&BUFFER_STATE_EMPTY) os << name << "_EMPTY ";
    if (bufferState&BUFFER_STATE_PARTIAL_FULL) os << name << "_PARTIAL_FULL ";
    if (bufferState&BUFFER_STATE_FULL) os << name << "_FULL ";
    if (bufferState == BUFFER_STATE_UNSET) os << name << "_UNSET ";
  }
FEDBufferState sistrip::FEDBackendStatusRegister::qdrMemoryState ( ) const [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setBackpressureFlag ( const bool  bitSet) [inline]

Definition at line 899 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(4,bitSet); return *this; }
void sistrip::FEDBackendStatusRegister::setBit ( const uint8_t  num,
const bool  bitSet 
) [private]

Definition at line 574 of file SiStripFEDBufferComponents.cc.

References data_.

Referenced by setBackpressureFlag(), setBufferSate(), setInternalFreezeFlag(), setSLinkDownFlag(), setSLinkFullFlag(), setTrackerHeaderMonitorDataReadyFlag(), and setTTCReadyFlag().

  {
    const uint32_t mask = (0x00000001 << num);
    if (bitSet) data_ |= mask;
    else data_ &= (~mask);
  }
void sistrip::FEDBackendStatusRegister::setBufferSate ( const uint8_t  bufferPosition,
const FEDBufferState  state 
) [private]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFEEventLengthFIFOState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFEFPGABufferState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFrameAddressFIFOState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setInternalFreezeFlag ( const bool  bitSet) [inline]

Definition at line 890 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(1,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setL1ABXFIFOState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setQDRMemoryState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setSLinkDownFlag ( const bool  bitSet) [inline]

Definition at line 893 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(2,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setSLinkFullFlag ( const bool  bitSet) [inline]

Definition at line 896 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(3,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTotalLengthFIFOState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTrackerHeaderFIFOState ( const FEDBufferState  state) [inline]
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTrackerHeaderMonitorDataReadyFlag ( const bool  bitSet) [inline]

Definition at line 905 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(7,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTTCReadyFlag ( const bool  bitSet) [inline]

Definition at line 902 of file SiStripFEDBufferComponents.h.

References setBit().

Referenced by FEDBackendStatusRegister().

    { setBit(6,bitSet); return *this; }
bool sistrip::FEDBackendStatusRegister::slinkDownFlag ( ) const [inline]

Definition at line 875 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(2); }
bool sistrip::FEDBackendStatusRegister::slinkFullFlag ( ) const [inline]

Definition at line 878 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(3); }
FEDBufferState sistrip::FEDBackendStatusRegister::totalLengthFIFOState ( ) const [inline]
FEDBufferState sistrip::FEDBackendStatusRegister::trackerHeaderFIFOState ( ) const [inline]
bool sistrip::FEDBackendStatusRegister::trackerHeaderMonitorDataReadyFlag ( ) const [inline]

Definition at line 887 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(7); }
bool sistrip::FEDBackendStatusRegister::ttcReadyFlag ( ) const [inline]

Definition at line 884 of file SiStripFEDBufferComponents.h.

References getBit().

Referenced by printFlags().

    { return getBit(6); }

Member Data Documentation

Definition at line 379 of file SiStripFEDBufferComponents.h.

Referenced by getBit(), operator uint32_t(), print(), and setBit().