CMS 3D CMS Logo

L1GctWheelEnergyFpga.h
Go to the documentation of this file.
1 #ifndef L1GCTWHEELENERGYFPGA_H_
2 #define L1GCTWHEELENERGYFPGA_H_
3 
6 
11 
12 #include <vector>
13 
14 class L1GctJetLeafCard;
15 
31 public:
36 
37  enum maxValues {
40  };
41 
43  static const unsigned int MAX_LEAF_CARDS;
44 
46  L1GctWheelEnergyFpga(int id, const std::vector<L1GctJetLeafCard*>& leafCards);
48  ~L1GctWheelEnergyFpga() override;
49 
51  friend std::ostream& operator<<(std::ostream& os, const L1GctWheelEnergyFpga& fpga);
52 
54  void fetchInput() override;
55 
57  void process() override;
58 
60  void setInputEnergy(unsigned i, int ex, int ey, unsigned et, unsigned ht);
61 
63  L1GctJetLeafCard* getinputLeafCard(unsigned leafnum) const { return m_inputLeafCards.at(leafnum); }
64 
66  inline etComponentType getInputEx(unsigned leafnum) const { return m_inputEx.at(leafnum); }
68  inline etComponentType getInputEy(unsigned leafnum) const { return m_inputEy.at(leafnum); }
70  inline etTotalType getInputEt(unsigned leafnum) const { return m_inputEt.at(leafnum); }
72  inline etHadType inputHt(unsigned leafnum) const { return m_inputHt.at(leafnum); }
73 
75  inline etComponentType getOutputEx() const { return m_outputEx; }
77  inline etComponentType getOutputEy() const { return m_outputEy; }
79  inline etTotalType getOutputEt() const { return m_outputEt; }
81  inline etHadType getOutputHt() const { return m_outputHt; }
82 
84  std::vector<L1GctInternEtSum> getInternalEtSums() const;
85 
87  bool setupOk() const { return m_setupOk; }
88 
89 protected:
91  void resetProcessor() override;
92  void resetPipelines() override;
93 
95  void setupObjects() override {}
96 
97 private:
100  int m_id;
103  std::vector<L1GctJetLeafCard*> m_inputLeafCards;
106  std::vector<etComponentType> m_inputEx;
107  std::vector<etComponentType> m_inputEy;
108  std::vector<etTotalType> m_inputEt;
109  std::vector<etHadType> m_inputHt;
116 
118  bool m_setupOk;
119 
125 };
126 
127 std::ostream& operator<<(std::ostream& os, const L1GctWheelEnergyFpga& fpga);
128 
129 #endif /*L1GCTWHEELENERGYFPGA_H_*/
L1GctWheelEnergyFpga::setupObjects
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
Definition: L1GctWheelEnergyFpga.h:95
mps_fire.i
i
Definition: mps_fire.py:428
L1GctEtTotal.h
L1GctUnsignedInt.h
L1GctWheelEnergyFpga::getOutputEt
etTotalType getOutputEt() const
get output Et value
Definition: L1GctWheelEnergyFpga.h:79
L1GctWheelEnergyFpga::getInternalEtSums
std::vector< L1GctInternEtSum > getInternalEtSums() const
get the Et sums in internal component format
Definition: L1GctWheelEnergyFpga.cc:163
L1GctWheelEnergyFpga::m_outputEyPipe
Pipeline< etComponentType > m_outputEyPipe
Definition: L1GctWheelEnergyFpga.h:122
operator<<
std::ostream & operator<<(std::ostream &os, const L1GctWheelEnergyFpga &fpga)
L1GctWheelEnergyFpga::m_inputLeafCards
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf card
Definition: L1GctWheelEnergyFpga.h:103
L1GctWheelEnergyFpga::m_outputEt
etTotalType m_outputEt
Definition: L1GctWheelEnergyFpga.h:114
L1GctWheelEnergyFpga::getOutputHt
etHadType getOutputHt() const
get the output Ht
Definition: L1GctWheelEnergyFpga.h:81
L1GctInternEtSum::kTotEtOrHtMaxValue
Definition: L1GctInternEtSum.h:33
L1GctWheelEnergyFpga::m_outputHt
etHadType m_outputHt
Definition: L1GctWheelEnergyFpga.h:115
L1GctWheelEnergyFpga::etHadType
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
Definition: L1GctWheelEnergyFpga.h:34
L1GctWheelEnergyFpga::setInputEnergy
void setInputEnergy(unsigned i, int ex, int ey, unsigned et, unsigned ht)
set input data; not used in normal operation
Definition: L1GctWheelEnergyFpga.cc:152
L1GctWheelEnergyFpga::etComponentType
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
Definition: L1GctWheelEnergyFpga.h:35
L1GctWheelEnergyFpga::getinputLeafCard
L1GctJetLeafCard * getinputLeafCard(unsigned leafnum) const
provide access to input Leaf card pointer (0-2)
Definition: L1GctWheelEnergyFpga.h:63
L1GctWheelEnergyFpga::setupOk
bool setupOk() const
check the setup
Definition: L1GctWheelEnergyFpga.h:87
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits >
L1GctWheelEnergyFpga::~L1GctWheelEnergyFpga
~L1GctWheelEnergyFpga() override
Destructor.
Definition: L1GctWheelEnergyFpga.cc:67
L1GctTwosComplement.h
L1GctWheelEnergyFpga::htTotalMaxValue
Definition: L1GctWheelEnergyFpga.h:39
L1GctWheelEnergyFpga::m_outputEtPipe
Pipeline< etTotalType > m_outputEtPipe
Definition: L1GctWheelEnergyFpga.h:123
L1GctWheelEnergyFpga::m_outputEx
etComponentType m_outputEx
output data
Definition: L1GctWheelEnergyFpga.h:112
L1GctWheelEnergyFpga::maxValues
maxValues
Definition: L1GctWheelEnergyFpga.h:37
L1GctWheelEnergyFpga::process
void process() override
process the data, fill output buffers
Definition: L1GctWheelEnergyFpga.cc:132
L1GctWheelEnergyFpga::m_setupOk
bool m_setupOk
check the setup
Definition: L1GctWheelEnergyFpga.h:118
L1GctWheelEnergyFpga
Emulates the energy summing on a GCT Wheel card.
Definition: L1GctWheelEnergyFpga.h:30
L1GctWheelEnergyFpga::m_inputEx
std::vector< etComponentType > m_inputEx
the input components from each input card
Definition: L1GctWheelEnergyFpga.h:106
L1GctWheelEnergyFpga::etTotalMaxValue
Definition: L1GctWheelEnergyFpga.h:38
L1GctWheelEnergyFpga::m_id
int m_id
algo ID
Definition: L1GctWheelEnergyFpga.h:100
L1GctWheelEnergyFpga::operator<<
friend std::ostream & operator<<(std::ostream &os, const L1GctWheelEnergyFpga &fpga)
Overload << operator.
L1GctWheelEnergyFpga::getInputEx
etComponentType getInputEx(unsigned leafnum) const
get input Ex value from a Leaf card (0-2)
Definition: L1GctWheelEnergyFpga.h:66
L1GctWheelEnergyFpga::m_inputEt
std::vector< etTotalType > m_inputEt
Definition: L1GctWheelEnergyFpga.h:108
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >
L1GctWheelEnergyFpga::m_inputEy
std::vector< etComponentType > m_inputEy
Definition: L1GctWheelEnergyFpga.h:107
L1GctWheelEnergyFpga::m_outputEy
etComponentType m_outputEy
Definition: L1GctWheelEnergyFpga.h:113
L1GctWheelEnergyFpga::MAX_LEAF_CARDS
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.
Definition: L1GctWheelEnergyFpga.h:43
L1GctWheelEnergyFpga::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: L1GctWheelEnergyFpga.cc:15
L1GctWheelEnergyFpga::getOutputEy
etComponentType getOutputEy() const
get output Ey value
Definition: L1GctWheelEnergyFpga.h:77
L1GctWheelEnergyFpga::getOutputEx
etComponentType getOutputEx() const
get output Ex value
Definition: L1GctWheelEnergyFpga.h:75
L1GctWheelEnergyFpga::m_outputExPipe
Pipeline< etComponentType > m_outputExPipe
record the output data history
Definition: L1GctWheelEnergyFpga.h:121
L1GctWheelEnergyFpga::etTotalType
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
typedefs for energy values in fixed numbers of bits
Definition: L1GctWheelEnergyFpga.h:33
L1GctWheelEnergyFpga::m_inputHt
std::vector< etHadType > m_inputHt
Definition: L1GctWheelEnergyFpga.h:109
L1GctEtMiss.h
L1GctWheelEnergyFpga::fetchInput
void fetchInput() override
get input data from sources; this is the standard way to provide input
Definition: L1GctWheelEnergyFpga.cc:120
L1GctWheelEnergyFpga::inputHt
etHadType inputHt(unsigned leafnum) const
get input Ht value from a Leaf card (0-2)
Definition: L1GctWheelEnergyFpga.h:72
L1GctJetLeafCard.h
L1GctWheelEnergyFpga::getInputEt
etTotalType getInputEt(unsigned leafnum) const
get input Et value from a Leaf card (0-2)
Definition: L1GctWheelEnergyFpga.h:70
L1GctProcessor.h
L1GctWheelEnergyFpga::resetProcessor
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines.
Definition: L1GctWheelEnergyFpga.cc:100
L1GctWheelEnergyFpga::m_outputHtPipe
Pipeline< etHadType > m_outputHtPipe
Definition: L1GctWheelEnergyFpga.h:124
L1GctProcessor
ABC for a GCT trigger data processing unit.
Definition: L1GctProcessor.h:22
L1GctProcessor::Pipeline
Definition: L1GctProcessor.h:84
L1GctJetLeafCard
Definition: L1GctJetLeafCard.h:28
L1GctWheelEnergyFpga::resetPipelines
void resetPipelines() override
Definition: L1GctWheelEnergyFpga.cc:113
L1GctWheelEnergyFpga::getInputEy
etComponentType getInputEy(unsigned leafnum) const
get input Ey value from a Leaf card (0-2)
Definition: L1GctWheelEnergyFpga.h:68