CMS 3D CMS Logo

L1GctWheelEnergyFpga Class Reference

Emulates the energy summing on a GCT Wheel card. More...

#include <L1Trigger/GlobalCaloTrigger/interface/L1GctWheelEnergyFpga.h>

Inheritance diagram for L1GctWheelEnergyFpga:

L1GctProcessor

List of all members.

Public Types

typedef
L1GctJetLeafCard::etComponentType 
etComponentType
typedef L1GctUnsignedInt
< L1GctEtTotal::kEtTotalNBits > 
etTotalType
 typedefs for energy values in fixed numbers of bits

Public Member Functions

virtual void fetchInput ()
 get input data from sources; this is the standard way to provide input
etTotalType getInputEt (unsigned leafnum) const
 get input Et value from a Leaf card (0-2)
etComponentType getInputEx (unsigned leafnum) const
 get input Ex value from a Leaf card (0-2)
etComponentType getInputEy (unsigned leafnum) const
 get input Ey value from a Leaf card (0-2)
L1GctJetLeafCardgetinputLeafCard (unsigned leafnum) const
 provide access to input Leaf card pointer (0-2)
etTotalType getOutputEt () const
 get output Et value
etComponentType getOutputEx () const
 get output Ex value
etComponentType getOutputEy () const
 get output Ey value
 L1GctWheelEnergyFpga (int id, std::vector< L1GctJetLeafCard * > leafCards)
 Constructor, needs the Leaf cards to be set up first. id should be 0 or 1.
virtual void process ()
 process the data, fill output buffers
void setInputEnergy (unsigned i, int ex, int ey, unsigned et)
 set input data; not used in normal operation
bool setupOk () const
 check the setup
 ~L1GctWheelEnergyFpga ()
 Destructor.

Static Public Attributes

static const unsigned int MAX_LEAF_CARDS = L1GctWheelJetFpga::MAX_LEAF_CARDS
 Max number of leaf card pointers.

Protected Member Functions

virtual void resetPipelines ()
virtual void resetProcessor ()
 Separate reset methods for the processor itself and any data stored in pipelines.
virtual void setupObjects ()
 Initialise inputs with null objects for the correct bunch crossing if required.

Private Attributes

int m_id
 algo ID
std::vector< etTotalTypem_inputEt
std::vector< etComponentTypem_inputEx
 the input components from each input card
std::vector< etComponentTypem_inputEy
std::vector< L1GctJetLeafCard * > m_inputLeafCards
 the jet leaf card
etTotalType m_outputEt
etComponentType m_outputEx
 output data
etComponentType m_outputEy
bool m_setupOk
 check the setup

Friends

std::ostream & operator<< (std::ostream &os, const L1GctWheelEnergyFpga &fpga)
 Overload << operator.


Detailed Description

Emulates the energy summing on a GCT Wheel card.

This class carries out the summing of total Et, and missing Et components Ex and Ey, for a single Wheel. The inputs come from the three Leaf cards and the outputs are sent to the L1GctGlobalEnergyAlgos class.

Author:
Jim Brooke & Greg Heath
Date:
20/2/2006

Definition at line 30 of file L1GctWheelEnergyFpga.h.


Member Typedef Documentation

typedef L1GctJetLeafCard::etComponentType L1GctWheelEnergyFpga::etComponentType

Definition at line 35 of file L1GctWheelEnergyFpga.h.

typedef L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > L1GctWheelEnergyFpga::etTotalType

typedefs for energy values in fixed numbers of bits

Definition at line 34 of file L1GctWheelEnergyFpga.h.


Constructor & Destructor Documentation

L1GctWheelEnergyFpga::L1GctWheelEnergyFpga ( int  id,
std::vector< L1GctJetLeafCard * >  leafCards 
)

Constructor, needs the Leaf cards to be set up first. id should be 0 or 1.

L1GctWheelEnergyFpga::~L1GctWheelEnergyFpga (  ) 

Destructor.

Definition at line 63 of file L1GctWheelEnergyFpga.cc.

00064 {
00065 }


Member Function Documentation

void L1GctWheelEnergyFpga::fetchInput (  )  [virtual]

get input data from sources; this is the standard way to provide input

Implements L1GctProcessor.

Definition at line 110 of file L1GctWheelEnergyFpga.cc.

References i, m_inputEt, m_inputEx, m_inputEy, m_inputLeafCards, m_setupOk, and MAX_LEAF_CARDS.

00111 {
00112   if (m_setupOk) {
00113     // Fetch the output values from each of our input leaf cards.
00114     for (unsigned int i=0; i<MAX_LEAF_CARDS; i++) {
00115       m_inputEx.at(i) = m_inputLeafCards.at(i)->getOutputEx();
00116       m_inputEy.at(i) = m_inputLeafCards.at(i)->getOutputEy();
00117       m_inputEt.at(i) = m_inputLeafCards.at(i)->getOutputEt();
00118     }
00119   }
00120 }

etTotalType L1GctWheelEnergyFpga::getInputEt ( unsigned  leafnum  )  const [inline]

get input Et value from a Leaf card (0-2)

Definition at line 65 of file L1GctWheelEnergyFpga.h.

References m_inputEt.

00065 { return m_inputEt.at(leafnum); }

etComponentType L1GctWheelEnergyFpga::getInputEx ( unsigned  leafnum  )  const [inline]

get input Ex value from a Leaf card (0-2)

Definition at line 61 of file L1GctWheelEnergyFpga.h.

References m_inputEx.

00061 { return m_inputEx.at(leafnum); }

etComponentType L1GctWheelEnergyFpga::getInputEy ( unsigned  leafnum  )  const [inline]

get input Ey value from a Leaf card (0-2)

Definition at line 63 of file L1GctWheelEnergyFpga.h.

References m_inputEy.

00063 { return m_inputEy.at(leafnum); }

L1GctJetLeafCard* L1GctWheelEnergyFpga::getinputLeafCard ( unsigned  leafnum  )  const [inline]

provide access to input Leaf card pointer (0-2)

Definition at line 58 of file L1GctWheelEnergyFpga.h.

References m_inputLeafCards.

00058 { return m_inputLeafCards.at(leafnum); }

etTotalType L1GctWheelEnergyFpga::getOutputEt (  )  const [inline]

get output Et value

Definition at line 72 of file L1GctWheelEnergyFpga.h.

References m_outputEt.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00072 { return m_outputEt; }

etComponentType L1GctWheelEnergyFpga::getOutputEx (  )  const [inline]

get output Ex value

Definition at line 68 of file L1GctWheelEnergyFpga.h.

References m_outputEx.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00068 { return m_outputEx; }

etComponentType L1GctWheelEnergyFpga::getOutputEy (  )  const [inline]

get output Ey value

Definition at line 70 of file L1GctWheelEnergyFpga.h.

References m_outputEy.

Referenced by L1GctGlobalEnergyAlgos::fetchInput().

00070 { return m_outputEy; }

void L1GctWheelEnergyFpga::process (  )  [virtual]

process the data, fill output buffers

Implements L1GctProcessor.

Definition at line 122 of file L1GctWheelEnergyFpga.cc.

References m_inputEt, m_inputEx, m_inputEy, m_outputEt, m_outputEx, m_outputEy, and m_setupOk.

00123 {
00124   if (m_setupOk) {
00125     m_outputEx = m_inputEx.at(0) + m_inputEx.at(1) + m_inputEx.at(2);
00126     m_outputEy = m_inputEy.at(0) + m_inputEy.at(1) + m_inputEy.at(2);
00127     m_outputEt = m_inputEt.at(0) + m_inputEt.at(1) + m_inputEt.at(2);
00128 
00129   }
00130 }

virtual void L1GctWheelEnergyFpga::resetPipelines (  )  [inline, protected, virtual]

Implements L1GctProcessor.

Definition at line 81 of file L1GctWheelEnergyFpga.h.

00081 {}

void L1GctWheelEnergyFpga::resetProcessor (  )  [protected, virtual]

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

Implements L1GctProcessor.

Definition at line 98 of file L1GctWheelEnergyFpga.cc.

References i, m_inputEt, m_inputEx, m_inputEy, m_outputEt, m_outputEx, m_outputEy, MAX_LEAF_CARDS, L1GctUnsignedInt< nBits >::reset(), and L1GctTwosComplement< nBits >::reset().

00099 {
00100   for (unsigned int i=0; i<MAX_LEAF_CARDS; i++) {
00101     m_inputEx.at(i).reset();
00102     m_inputEy.at(i).reset();
00103     m_inputEt.at(i).reset();
00104   }
00105   m_outputEx.reset();
00106   m_outputEy.reset();
00107   m_outputEt.reset();
00108 }

void L1GctWheelEnergyFpga::setInputEnergy ( unsigned  i,
int  ex,
int  ey,
unsigned  et 
)

set input data; not used in normal operation

set input data

Definition at line 135 of file L1GctWheelEnergyFpga.cc.

References m_inputEt, m_inputEx, m_inputEy, and MAX_LEAF_CARDS.

00136 {
00137   // Set the three input values from this Leaf card
00138   if (i>=0 && i<MAX_LEAF_CARDS) {
00139     m_inputEx.at(i).setValue(ex);
00140     m_inputEy.at(i).setValue(ey);
00141     m_inputEt.at(i).setValue(et);
00142   }
00143 
00144 }

virtual void L1GctWheelEnergyFpga::setupObjects (  )  [inline, protected, virtual]

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

Implements L1GctProcessor.

Definition at line 84 of file L1GctWheelEnergyFpga.h.

00084 {}

bool L1GctWheelEnergyFpga::setupOk (  )  const [inline]

check the setup

Reimplemented from L1GctProcessor.

Definition at line 75 of file L1GctWheelEnergyFpga.h.

References m_setupOk.

00075 { return m_setupOk; }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GctWheelEnergyFpga fpga 
) [friend]

Overload << operator.


Member Data Documentation

int L1GctWheelEnergyFpga::m_id [private]

algo ID

Definition at line 90 of file L1GctWheelEnergyFpga.h.

Referenced by operator<<().

std::vector< etTotalType > L1GctWheelEnergyFpga::m_inputEt [private]

Definition at line 98 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), getInputEt(), operator<<(), process(), resetProcessor(), and setInputEnergy().

std::vector< etComponentType > L1GctWheelEnergyFpga::m_inputEx [private]

the input components from each input card

Definition at line 96 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), getInputEx(), operator<<(), process(), resetProcessor(), and setInputEnergy().

std::vector< etComponentType > L1GctWheelEnergyFpga::m_inputEy [private]

Definition at line 97 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), getInputEy(), operator<<(), process(), resetProcessor(), and setInputEnergy().

std::vector<L1GctJetLeafCard*> L1GctWheelEnergyFpga::m_inputLeafCards [private]

the jet leaf card

Definition at line 93 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), getinputLeafCard(), and operator<<().

etTotalType L1GctWheelEnergyFpga::m_outputEt [private]

Definition at line 103 of file L1GctWheelEnergyFpga.h.

Referenced by getOutputEt(), operator<<(), process(), and resetProcessor().

etComponentType L1GctWheelEnergyFpga::m_outputEx [private]

output data

Definition at line 101 of file L1GctWheelEnergyFpga.h.

Referenced by getOutputEx(), operator<<(), process(), and resetProcessor().

etComponentType L1GctWheelEnergyFpga::m_outputEy [private]

Definition at line 102 of file L1GctWheelEnergyFpga.h.

Referenced by getOutputEy(), operator<<(), process(), and resetProcessor().

bool L1GctWheelEnergyFpga::m_setupOk [private]

check the setup

Definition at line 106 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), process(), and setupOk().

const unsigned int L1GctWheelEnergyFpga::MAX_LEAF_CARDS = L1GctWheelJetFpga::MAX_LEAF_CARDS [static]

Max number of leaf card pointers.

Definition at line 38 of file L1GctWheelEnergyFpga.h.

Referenced by fetchInput(), resetProcessor(), and setInputEnergy().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:39 2009 for CMSSW by  doxygen 1.5.4