Emulates the energy summing on a GCT Wheel card. More...
#include <L1GctWheelEnergyFpga.h>
Public Types | |
typedef L1GctTwosComplement < L1GctInternEtSum::kMissExOrEyNBits > | etComponentType |
typedef L1GctUnsignedInt < L1GctInternEtSum::kTotEtOrHtNBits > | etHadType |
typedef L1GctUnsignedInt < L1GctInternEtSum::kTotEtOrHtNBits > | etTotalType |
typedefs for energy values in fixed numbers of bits More... | |
enum | maxValues { etTotalMaxValue = L1GctInternEtSum::kTotEtOrHtMaxValue, htTotalMaxValue = L1GctInternEtSum::kTotEtOrHtMaxValue } |
Public Member Functions | |
void | fetchInput () override |
get input data from sources; this is the standard way to provide input More... | |
etTotalType | getInputEt (unsigned leafnum) const |
get input Et value from a Leaf card (0-2) More... | |
etComponentType | getInputEx (unsigned leafnum) const |
get input Ex value from a Leaf card (0-2) More... | |
etComponentType | getInputEy (unsigned leafnum) const |
get input Ey value from a Leaf card (0-2) More... | |
L1GctJetLeafCard * | getinputLeafCard (unsigned leafnum) const |
provide access to input Leaf card pointer (0-2) More... | |
std::vector< L1GctInternEtSum > | getInternalEtSums () const |
get the Et sums in internal component format More... | |
etTotalType | getOutputEt () const |
get output Et value More... | |
etComponentType | getOutputEx () const |
get output Ex value More... | |
etComponentType | getOutputEy () const |
get output Ey value More... | |
etHadType | getOutputHt () const |
get the output Ht More... | |
etHadType | inputHt (unsigned leafnum) const |
get input Ht value from a Leaf card (0-2) More... | |
L1GctWheelEnergyFpga (int id, const std::vector< L1GctJetLeafCard * > &leafCards) | |
Constructor, needs the Leaf cards to be set up first. id should be 0 or 1. More... | |
void | process () override |
process the data, fill output buffers More... | |
void | setInputEnergy (unsigned i, int ex, int ey, unsigned et, unsigned ht) |
set input data; not used in normal operation More... | |
bool | setupOk () const |
check the setup More... | |
~L1GctWheelEnergyFpga () override | |
Destructor. More... | |
Public Member Functions inherited from L1GctProcessor | |
L1GctProcessor () | |
void | reset () |
complete reset of processor More... | |
void | setBxRange (const int firstBx, const int numberOfBx) |
define the bunch crossing range to process More... | |
void | setNextBx (const int bxnum) |
clear input data buffers and process a new bunch crossing More... | |
void | setTerse () |
bool | setupOk () const |
Method to check the setup for this processor. Returns true by default. More... | |
void | setVerbose () |
control output messages More... | |
virtual | ~L1GctProcessor () |
Static Public Attributes | |
static const unsigned int | MAX_LEAF_CARDS = L1GctWheelJetFpga::MAX_LEAF_CARDS |
Max number of leaf card pointers. More... | |
Protected Member Functions | |
void | resetPipelines () override |
void | resetProcessor () override |
Separate reset methods for the processor itself and any data stored in pipelines. More... | |
void | setupObjects () override |
Initialise inputs with null objects for the correct bunch crossing if required. More... | |
Protected Member Functions inherited from L1GctProcessor | |
int | bxAbs () const |
int | bxMax () const |
int | bxMin () const |
Support for multiple beam crossing operation. More... | |
int | bxRel () const |
int | numOfBx () const |
Private Attributes | |
int | m_id |
algo ID More... | |
std::vector< etTotalType > | m_inputEt |
std::vector< etComponentType > | m_inputEx |
the input components from each input card More... | |
std::vector< etComponentType > | m_inputEy |
std::vector< etHadType > | m_inputHt |
std::vector< L1GctJetLeafCard * > | m_inputLeafCards |
the jet leaf card More... | |
etTotalType | m_outputEt |
Pipeline< etTotalType > | m_outputEtPipe |
etComponentType | m_outputEx |
output data More... | |
Pipeline< etComponentType > | m_outputExPipe |
record the output data history More... | |
etComponentType | m_outputEy |
Pipeline< etComponentType > | m_outputEyPipe |
etHadType | m_outputHt |
Pipeline< etHadType > | m_outputHtPipe |
bool | m_setupOk |
check the setup More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const L1GctWheelEnergyFpga &fpga) |
Overload << operator. More... | |
Additional Inherited Members | |
Protected Attributes inherited from L1GctProcessor | |
bool | m_verbose |
Flag to control output messages. More... | |
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.
Definition at line 30 of file L1GctWheelEnergyFpga.h.
typedef L1GctTwosComplement<L1GctInternEtSum::kMissExOrEyNBits> L1GctWheelEnergyFpga::etComponentType |
Definition at line 35 of file L1GctWheelEnergyFpga.h.
Definition at line 34 of file L1GctWheelEnergyFpga.h.
typedefs for energy values in fixed numbers of bits
Definition at line 33 of file L1GctWheelEnergyFpga.h.
L1GctWheelEnergyFpga::L1GctWheelEnergyFpga | ( | int | id, |
const std::vector< L1GctJetLeafCard * > & | leafCards | ||
) |
Constructor, needs the Leaf cards to be set up first. id should be 0 or 1.
Definition at line 15 of file L1GctWheelEnergyFpga.cc.
References mps_fire::i, m_id, m_inputLeafCards, m_setupOk, L1GctProcessor::m_verbose, and MAX_LEAF_CARDS.
|
override |
|
overridevirtual |
get input data from sources; this is the standard way to provide input
Implements L1GctProcessor.
Definition at line 120 of file L1GctWheelEnergyFpga.cc.
References mps_fire::i, m_inputEt, m_inputEx, m_inputEy, m_inputHt, m_inputLeafCards, m_setupOk, and MAX_LEAF_CARDS.
|
inline |
get input Et value from a Leaf card (0-2)
Definition at line 70 of file L1GctWheelEnergyFpga.h.
References m_inputEt.
|
inline |
get input Ex value from a Leaf card (0-2)
Definition at line 66 of file L1GctWheelEnergyFpga.h.
References m_inputEx.
|
inline |
get input Ey value from a Leaf card (0-2)
Definition at line 68 of file L1GctWheelEnergyFpga.h.
References m_inputEy.
|
inline |
provide access to input Leaf card pointer (0-2)
Definition at line 63 of file L1GctWheelEnergyFpga.h.
References m_inputLeafCards.
std::vector< L1GctInternEtSum > L1GctWheelEnergyFpga::getInternalEtSums | ( | ) | const |
get the Et sums in internal component format
Definition at line 163 of file L1GctWheelEnergyFpga.cc.
References makePileupJSON::bx, L1GctProcessor::bxMin(), L1GctInternEtSum::fromEmulatorMissEtxOrEty(), L1GctInternEtSum::fromEmulatorTotalEtOrHt(), m_outputEtPipe, m_outputExPipe, m_outputEyPipe, m_outputHtPipe, L1GctProcessor::numOfBx(), and mps_fire::result.
|
inline |
get output Et value
Definition at line 79 of file L1GctWheelEnergyFpga.h.
References m_outputEt.
Referenced by L1GctGlobalEnergyAlgos::fetchInput().
|
inline |
get output Ex value
Definition at line 75 of file L1GctWheelEnergyFpga.h.
References m_outputEx.
Referenced by L1GctGlobalEnergyAlgos::fetchInput().
|
inline |
get output Ey value
Definition at line 77 of file L1GctWheelEnergyFpga.h.
References m_outputEy.
Referenced by L1GctGlobalEnergyAlgos::fetchInput().
|
inline |
get the output Ht
Definition at line 81 of file L1GctWheelEnergyFpga.h.
References m_outputHt.
Referenced by L1GctGlobalEnergyAlgos::fetchInput().
|
inline |
get input Ht value from a Leaf card (0-2)
Definition at line 72 of file L1GctWheelEnergyFpga.h.
References m_inputHt.
|
overridevirtual |
process the data, fill output buffers
Implements L1GctProcessor.
Definition at line 132 of file L1GctWheelEnergyFpga.cc.
References L1GctProcessor::bxRel(), etTotalMaxValue, htTotalMaxValue, m_inputEt, m_inputEx, m_inputEy, m_inputHt, m_outputEt, m_outputEtPipe, m_outputEx, m_outputExPipe, m_outputEy, m_outputEyPipe, m_outputHt, m_outputHtPipe, m_setupOk, L1GctUnsignedInt< nBits >::overFlow(), and L1GctUnsignedInt< nBits >::setValue().
|
overrideprotectedvirtual |
Implements L1GctProcessor.
Definition at line 113 of file L1GctWheelEnergyFpga.cc.
References m_outputEtPipe, m_outputExPipe, m_outputEyPipe, m_outputHtPipe, and L1GctProcessor::numOfBx().
|
overrideprotectedvirtual |
Separate reset methods for the processor itself and any data stored in pipelines.
Implements L1GctProcessor.
Definition at line 100 of file L1GctWheelEnergyFpga.cc.
References mps_fire::i, m_inputEt, m_inputEx, m_inputEy, m_inputHt, m_outputEt, m_outputEx, m_outputEy, m_outputHt, MAX_LEAF_CARDS, L1GctUnsignedInt< nBits >::reset(), and L1GctTwosComplement< nBits >::reset().
void L1GctWheelEnergyFpga::setInputEnergy | ( | unsigned | i, |
int | ex, | ||
int | ey, | ||
unsigned | et, | ||
unsigned | ht | ||
) |
set input data; not used in normal operation
set input data
Definition at line 152 of file L1GctWheelEnergyFpga.cc.
References m_inputEt, m_inputEx, m_inputEy, m_inputHt, and MAX_LEAF_CARDS.
|
inlineoverrideprotectedvirtual |
Initialise inputs with null objects for the correct bunch crossing if required.
Implements L1GctProcessor.
Definition at line 95 of file L1GctWheelEnergyFpga.h.
|
inline |
|
friend |
Overload << operator.
|
private |
algo ID
Definition at line 100 of file L1GctWheelEnergyFpga.h.
Referenced by L1GctWheelEnergyFpga(), and operator<<().
|
private |
Definition at line 108 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), getInputEt(), operator<<(), process(), resetProcessor(), and setInputEnergy().
|
private |
the input components from each input card
Definition at line 106 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), getInputEx(), operator<<(), process(), resetProcessor(), and setInputEnergy().
|
private |
Definition at line 107 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), getInputEy(), operator<<(), process(), resetProcessor(), and setInputEnergy().
|
private |
Definition at line 109 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), inputHt(), operator<<(), process(), resetProcessor(), and setInputEnergy().
|
private |
the jet leaf card
Definition at line 103 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), getinputLeafCard(), L1GctWheelEnergyFpga(), and operator<<().
|
private |
Definition at line 114 of file L1GctWheelEnergyFpga.h.
Referenced by getOutputEt(), operator<<(), process(), and resetProcessor().
|
private |
Definition at line 123 of file L1GctWheelEnergyFpga.h.
Referenced by getInternalEtSums(), process(), and resetPipelines().
|
private |
output data
Definition at line 112 of file L1GctWheelEnergyFpga.h.
Referenced by getOutputEx(), operator<<(), process(), and resetProcessor().
|
private |
record the output data history
Definition at line 121 of file L1GctWheelEnergyFpga.h.
Referenced by getInternalEtSums(), process(), and resetPipelines().
|
private |
Definition at line 113 of file L1GctWheelEnergyFpga.h.
Referenced by getOutputEy(), operator<<(), process(), and resetProcessor().
|
private |
Definition at line 122 of file L1GctWheelEnergyFpga.h.
Referenced by getInternalEtSums(), process(), and resetPipelines().
|
private |
Definition at line 115 of file L1GctWheelEnergyFpga.h.
Referenced by getOutputHt(), operator<<(), process(), and resetProcessor().
Definition at line 124 of file L1GctWheelEnergyFpga.h.
Referenced by getInternalEtSums(), process(), and resetPipelines().
|
private |
check the setup
Definition at line 118 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), L1GctWheelEnergyFpga(), process(), and setupOk().
|
static |
Max number of leaf card pointers.
Definition at line 43 of file L1GctWheelEnergyFpga.h.
Referenced by fetchInput(), L1GctWheelEnergyFpga(), resetProcessor(), and setInputEnergy().