test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
32 public:
37 
38  enum maxValues {
41  };
42 
44  static const unsigned int MAX_LEAF_CARDS;
45 
47  L1GctWheelEnergyFpga(int id, const std::vector<L1GctJetLeafCard*>& leafCards);
50 
52  friend std::ostream& operator << (std::ostream& os, const L1GctWheelEnergyFpga& fpga);
53 
55  virtual void fetchInput();
56 
58  virtual void process();
59 
61  void setInputEnergy(unsigned i, int ex, int ey, unsigned et, unsigned ht);
62 
64  L1GctJetLeafCard* getinputLeafCard(unsigned leafnum) const { return m_inputLeafCards.at(leafnum); }
65 
67  inline etComponentType getInputEx(unsigned leafnum) const { return m_inputEx.at(leafnum); }
69  inline etComponentType getInputEy(unsigned leafnum) const { return m_inputEy.at(leafnum); }
71  inline etTotalType getInputEt(unsigned leafnum) const { return m_inputEt.at(leafnum); }
73  inline etHadType inputHt(unsigned leafnum) const { return m_inputHt.at(leafnum); }
74 
76  inline etComponentType getOutputEx() const { return m_outputEx; }
78  inline etComponentType getOutputEy() const { return m_outputEy; }
80  inline etTotalType getOutputEt() const { return m_outputEt; }
82  inline etHadType getOutputHt() const { return m_outputHt; }
83 
85  std::vector< L1GctInternEtSum > getInternalEtSums() const;
86 
88  bool setupOk() const { return m_setupOk; }
89 
90  protected:
91 
93  virtual void resetProcessor();
94  virtual void resetPipelines();
95 
97  virtual void setupObjects() {}
98 
99  private:
100 
103  int m_id;
106  std::vector<L1GctJetLeafCard*> m_inputLeafCards;
109  std::vector< etComponentType > m_inputEx;
110  std::vector< etComponentType > m_inputEy;
111  std::vector< etTotalType > m_inputEt;
112  std::vector< etHadType > m_inputHt;
119 
121  bool m_setupOk;
122 
128 };
129 
130 std::ostream& operator << (std::ostream& os, const L1GctWheelEnergyFpga& fpga);
131 
132 #endif /*L1GCTWHEELENERGYFPGA_H_*/
Emulates the energy summing on a GCT Wheel card.
friend std::ostream & operator<<(std::ostream &os, const L1GctWheelEnergyFpga &fpga)
Overload &lt;&lt; operator.
etComponentType m_outputEx
output data
int i
Definition: DBlmapReader.cc:9
std::vector< etTotalType > m_inputEt
L1GctJetLeafCard * getinputLeafCard(unsigned leafnum) const
provide access to input Leaf card pointer (0-2)
std::vector< etComponentType > m_inputEx
the input components from each input card
etComponentType getInputEx(unsigned leafnum) const
get input Ex value from a Leaf card (0-2)
etTotalType getInputEt(unsigned leafnum) const
get input Et value from a Leaf card (0-2)
Pipeline< etHadType > m_outputHtPipe
etComponentType getOutputEy() const
get output Ey value
void setInputEnergy(unsigned i, int ex, int ey, unsigned et, unsigned ht)
set input data; not used in normal operation
bool setupOk() const
check the setup
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
Pipeline< etTotalType > m_outputEtPipe
ABC for a GCT trigger data processing unit.
L1GctTwosComplement< L1GctInternEtSum::kMissExOrEyNBits > etComponentType
std::vector< L1GctInternEtSum > getInternalEtSums() const
get the Et sums in internal component format
~L1GctWheelEnergyFpga()
Destructor.
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
std::vector< etComponentType > m_inputEy
etComponentType getOutputEx() const
get output Ex value
Pipeline< etComponentType > m_outputExPipe
record the output data history
etHadType getOutputHt() const
get the output Ht
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
typedefs for energy values in fixed numbers of bits
bool m_setupOk
check the setup
std::vector< etHadType > m_inputHt
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
etTotalType getOutputEt() const
get output Et value
L1GctWheelEnergyFpga(int id, const 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
Pipeline< etComponentType > m_outputEyPipe
virtual void fetchInput()
get input data from sources; this is the standard way to provide input
std::vector< L1GctJetLeafCard * > m_inputLeafCards
the jet leaf card
etComponentType getInputEy(unsigned leafnum) const
get input Ey value from a Leaf card (0-2)
etHadType inputHt(unsigned leafnum) const
get input Ht value from a Leaf card (0-2)
static const unsigned int MAX_LEAF_CARDS
Max number of leaf card pointers.