CMS 3D CMS Logo

Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

L1GctProcessor Class Reference

ABC for a GCT trigger data processing unit. More...

#include <L1GctProcessor.h>

Inheritance diagram for L1GctProcessor:
L1GctElectronFinalSort L1GctElectronSorter L1GctEmLeafCard L1GctGlobalEnergyAlgos L1GctGlobalHfSumAlgos L1GctJetFinalStage L1GctJetFinderBase L1GctJetLeafCard L1GctWheelEnergyFpga L1GctWheelJetFpga

List of all members.

Classes

struct  Pipeline

Public Member Functions

virtual void fetchInput ()=0
 set the input buffers
 L1GctProcessor ()
virtual void process ()=0
 process the data and set outputs
void reset ()
 complete reset of processor
void setBxRange (const int firstBx, const int numberOfBx)
 define the bunch crossing range to process
void setNextBx (const int bxnum)
 clear input data buffers and process a new bunch crossing
void setTerse ()
bool setupOk () const
 Method to check the setup for this processor. Returns true by default.
void setVerbose ()
 control output messages
virtual ~L1GctProcessor ()

Protected Member Functions

int bxAbs () const
int bxMax () const
int bxMin () const
 Support for multiple beam crossing operation.
int bxRel () const
int numOfBx () const
virtual void resetPipelines ()=0
virtual void resetProcessor ()=0
 Separate reset methods for the processor itself and any data stored in pipelines.
virtual void setupObjects ()=0
 Initialise inputs with null objects for the correct bunch crossing if required.

Protected Attributes

bool m_verbose
 Flag to control output messages.

Private Attributes

int m_bx
 Support for multiple beam crossing operation.
int m_bxStart
int m_numOfBx

Detailed Description

ABC for a GCT trigger data processing unit.

Author:
Jim Brooke
Date:
April 2006

A processing unit can be a card, an FPGA, a chunk of firmware. This class exists simply to enforce a common interface.

There should not be any L1GctProcessor* pointers!

Definition at line 22 of file L1GctProcessor.h.


Constructor & Destructor Documentation

L1GctProcessor::L1GctProcessor ( ) [inline]

Definition at line 26 of file L1GctProcessor.h.

: m_verbose(false), m_bx(0), m_bxStart(0), m_numOfBx(1) {};
virtual L1GctProcessor::~L1GctProcessor ( ) [inline, virtual]

Definition at line 27 of file L1GctProcessor.h.

{};

Member Function Documentation

int L1GctProcessor::bxAbs ( ) const [inline, protected]
int L1GctProcessor::bxMax ( ) const [inline, protected]

Definition at line 81 of file L1GctProcessor.h.

References m_bxStart, and m_numOfBx.

{ return (m_bxStart + m_numOfBx - 1); }
int L1GctProcessor::bxMin ( ) const [inline, protected]
int L1GctProcessor::bxRel ( ) const [inline, protected]
virtual void L1GctProcessor::fetchInput ( ) [pure virtual]
int L1GctProcessor::numOfBx ( ) const [inline, protected]
virtual void L1GctProcessor::process ( ) [pure virtual]
void L1GctProcessor::reset ( void  ) [inline]
virtual void L1GctProcessor::resetPipelines ( ) [protected, pure virtual]
virtual void L1GctProcessor::resetProcessor ( ) [protected, pure virtual]

Separate reset methods for the processor itself and any data stored in pipelines.

Implemented in L1GctElectronFinalSort, L1GctElectronSorter, L1GctEmLeafCard, L1GctGlobalEnergyAlgos, L1GctGlobalHfSumAlgos, L1GctJetFinalStage, L1GctJetFinderBase, L1GctJetLeafCard, L1GctWheelEnergyFpga, and L1GctWheelJetFpga.

Referenced by reset(), and setNextBx().

void L1GctProcessor::setBxRange ( const int  firstBx,
const int  numberOfBx 
) [inline]

define the bunch crossing range to process

Reimplemented in L1GctEmLeafCard, L1GctGlobalEnergyAlgos, and L1GctJetLeafCard.

Definition at line 46 of file L1GctProcessor.h.

References m_bxStart, m_numOfBx, and resetPipelines().

Referenced by L1GlobalCaloTrigger::bxSetup(), L1GctJetLeafCard::setBxRange(), and L1GctGlobalEnergyAlgos::setBxRange().

                                                                  {
    m_bxStart = firstBx;
    m_numOfBx = numberOfBx;
    resetPipelines();
  }
void L1GctProcessor::setNextBx ( const int  bxnum) [inline]

clear input data buffers and process a new bunch crossing

Reimplemented in L1GctEmLeafCard, L1GctGlobalEnergyAlgos, and L1GctJetLeafCard.

Definition at line 53 of file L1GctProcessor.h.

References m_bx, m_bxStart, m_numOfBx, resetProcessor(), and setupObjects().

Referenced by L1GlobalCaloTrigger::bxReset(), L1GctGlobalEnergyAlgos::setNextBx(), and L1GctJetLeafCard::setNextBx().

                                         {
    if ( (bxnum-m_bxStart >= 0) && (bxnum-m_bxStart < m_numOfBx) ) {
      m_bx = bxnum;
    } else {
      m_bx = 0;
    }
    resetProcessor();
    setupObjects();
  }
void L1GctProcessor::setTerse ( ) [inline]

Definition at line 68 of file L1GctProcessor.h.

References m_verbose.

Referenced by L1GlobalCaloTrigger::setTerse().

{ m_verbose = false; }
virtual void L1GctProcessor::setupObjects ( ) [protected, pure virtual]

Initialise inputs with null objects for the correct bunch crossing if required.

Implemented in L1GctElectronFinalSort, L1GctElectronSorter, L1GctEmLeafCard, L1GctGlobalEnergyAlgos, L1GctGlobalHfSumAlgos, L1GctJetFinalStage, L1GctJetFinderBase, L1GctJetLeafCard, L1GctWheelEnergyFpga, and L1GctWheelJetFpga.

Referenced by reset(), and setNextBx().

bool L1GctProcessor::setupOk ( ) const [inline]

Method to check the setup for this processor. Returns true by default.

Reimplemented in L1GctElectronFinalSort, L1GctGlobalEnergyAlgos, L1GctGlobalHfSumAlgos, L1GctJetFinalStage, L1GctJetFinderBase, L1GctJetLeafCard, L1GctWheelEnergyFpga, and L1GctWheelJetFpga.

Definition at line 64 of file L1GctProcessor.h.

{ return true; }
void L1GctProcessor::setVerbose ( ) [inline]

control output messages

Definition at line 67 of file L1GctProcessor.h.

References m_verbose.

Referenced by L1GlobalCaloTrigger::setVerbose().

{ m_verbose = true; }

Member Data Documentation

int L1GctProcessor::m_bx [private]

Support for multiple beam crossing operation.

Definition at line 121 of file L1GctProcessor.h.

Referenced by bxAbs(), bxRel(), reset(), and setNextBx().

Definition at line 123 of file L1GctProcessor.h.

Referenced by bxMax(), bxMin(), bxRel(), reset(), setBxRange(), and setNextBx().

Definition at line 124 of file L1GctProcessor.h.

Referenced by bxMax(), numOfBx(), reset(), setBxRange(), and setNextBx().

bool L1GctProcessor::m_verbose [protected]