![]() |
![]() |
00001 #ifndef L1GCTWHEELENERGYFPGA_H_ 00002 #define L1GCTWHEELENERGYFPGA_H_ 00003 00004 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtTotal.h" 00005 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEtMiss.h" 00006 00007 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctProcessor.h" 00008 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctJetLeafCard.h" 00009 #include "L1Trigger/GlobalCaloTrigger/src/L1GctTwosComplement.h" 00010 #include "L1Trigger/GlobalCaloTrigger/src/L1GctUnsignedInt.h" 00011 00012 #include <vector> 00013 00014 class L1GctJetLeafCard; 00015 00030 class L1GctWheelEnergyFpga : public L1GctProcessor 00031 { 00032 public: 00034 typedef L1GctUnsignedInt< L1GctEtTotal::kEtTotalNBits > etTotalType; 00035 typedef L1GctJetLeafCard::etComponentType etComponentType; 00036 00038 static const unsigned int MAX_LEAF_CARDS; 00039 00041 L1GctWheelEnergyFpga(int id, std::vector<L1GctJetLeafCard*> leafCards); 00043 ~L1GctWheelEnergyFpga(); 00044 00046 friend std::ostream& operator << (std::ostream& os, const L1GctWheelEnergyFpga& fpga); 00047 00049 virtual void fetchInput(); 00050 00052 virtual void process(); 00053 00055 void setInputEnergy(unsigned i, int ex, int ey, unsigned et); 00056 00058 L1GctJetLeafCard* getinputLeafCard(unsigned leafnum) const { return m_inputLeafCards.at(leafnum); } 00059 00061 inline etComponentType getInputEx(unsigned leafnum) const { return m_inputEx.at(leafnum); } 00063 inline etComponentType getInputEy(unsigned leafnum) const { return m_inputEy.at(leafnum); } 00065 inline etTotalType getInputEt(unsigned leafnum) const { return m_inputEt.at(leafnum); } 00066 00068 inline etComponentType getOutputEx() const { return m_outputEx; } 00070 inline etComponentType getOutputEy() const { return m_outputEy; } 00072 inline etTotalType getOutputEt() const { return m_outputEt; } 00073 00075 bool setupOk() const { return m_setupOk; } 00076 00077 protected: 00078 00080 virtual void resetProcessor(); 00081 virtual void resetPipelines() {} 00082 00084 virtual void setupObjects() {} 00085 00086 private: 00087 00090 int m_id; 00093 std::vector<L1GctJetLeafCard*> m_inputLeafCards; 00096 std::vector< etComponentType > m_inputEx; 00097 std::vector< etComponentType > m_inputEy; 00098 std::vector< etTotalType > m_inputEt; 00101 etComponentType m_outputEx; 00102 etComponentType m_outputEy; 00103 etTotalType m_outputEt; 00104 00106 bool m_setupOk; 00107 00108 }; 00109 00110 std::ostream& operator << (std::ostream& os, const L1GctWheelEnergyFpga& fpga); 00111 00112 #endif /*L1GCTWHEELENERGYFPGA_H_*/