CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctGlobalHfSumAlgos.h
Go to the documentation of this file.
1 #ifndef L1GCTGLOBALHFSUMALGOS_H_
2 #define L1GCTGLOBALHFSUMALGOS_H_
3 
7 
8 #include <vector>
9 #include <map>
10 
11 class L1GctWheelJetFpga;
12 class L1GctHfLutSetup;
14 
28 {
29  public:
30 
32 
34  L1GctGlobalHfSumAlgos(const std::vector<L1GctWheelJetFpga*>& WheelJetFpga);
37 
39  friend std::ostream& operator << (std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
40 
42  virtual void fetchInput();
43 
45  virtual void process();
46 
48  std::vector<uint16_t> hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const;
49  std::vector<unsigned> hfSumsWord() const;
50 
52  void setupLuts(const L1CaloEtScale* scale);
53 
57 
59  std::vector<double> getThresholds(const L1GctHfEtSumsLut::hfLutType type) const;
60 
65 
67  bool setupOk() const { return m_setupOk; }
68 
69  protected:
71  virtual void resetProcessor();
72  virtual void resetPipelines();
73 
75  virtual void setupObjects() {}
76 
77  private:
78  // Here are the algorithm types we get our inputs from
81 
82  // Here are the lookup tables
83  std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*> m_bitCountLuts;
84  std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*> m_etSumLuts;
85 
86  // Input data for one bunch crossing
89 
90  // Output data
91  std::map<L1GctHfEtSumsLut::hfLutType, Pipeline<uint16_t> > m_hfOutputSumsPipe;
92 
93  bool m_setupOk;
94 
95  // private methods
96  // Convert bit count value using LUT and store in the pipeline
98  // Convert et sum value using LUT and store in the pipeline
100 
101 };
102 
103 std::ostream& operator << (std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
104 
105 #endif /*L1GCTGLOBALHFSUMALGOS_H_*/
type
Definition: HCALResponse.h:21
bool setupOk() const
check setup
std::vector< unsigned > hfSumsWord() const
L1GctWheelJetFpga * m_minusWheelJetFpga
std::map< L1GctHfEtSumsLut::hfLutType, Pipeline< uint16_t > > m_hfOutputSumsPipe
Represents a GCT Wheel Jet FPGA.
Emulates the GCT summing and packing of Hf Et sums and tower-over-threshold counts.
~L1GctGlobalHfSumAlgos()
Destructor.
hfTowerSumsType m_hfInputSumsPlusWheel
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
L1GctGlobalHfSumAlgos(const std::vector< L1GctWheelJetFpga * > &WheelJetFpga)
Constructor needs the Wheel card Fpgas set up first.
friend std::ostream & operator<<(std::ostream &os, const L1GctGlobalHfSumAlgos &fpga)
Overload &lt;&lt; operator.
virtual void fetchInput()
get input data from sources; this is the standard way to provide input
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
hfTowerSumsType m_hfInputSumsMinusWheel
ABC for a GCT trigger data processing unit.
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut * > m_etSumLuts
const L1GctHfBitCountsLut * getBCLut(const L1GctHfEtSumsLut::hfLutType type) const
Get lut pointers.
L1GctWheelJetFpga * m_plusWheelJetFpga
LUT for compression of HF feature bit counts to output format.
void storeEtSum(L1GctHfEtSumsLut::hfLutType type, uint16_t value)
std::vector< uint16_t > hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const
Access to output quantities.
LUT for compression of HF Et sum to output format.
virtual void process()
process the data, fill output buffers
std::map< L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut * > m_bitCountLuts
L1GctJetFinderBase::hfTowerSumsType hfTowerSumsType
const L1GctHfEtSumsLut * getESLut(const L1GctHfEtSumsLut::hfLutType type) const
std::vector< double > getThresholds(const L1GctHfEtSumsLut::hfLutType type) const
Get thresholds.
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
L1GctWheelJetFpga * getMinusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 0
L1GctWheelJetFpga * getPlusWheelJetFpga() const
provide access to input pointer, Wheel Jet Fpga 1
void setupLuts(const L1CaloEtScale *scale)
Setup luts.
void storeBitCount(L1GctHfEtSumsLut::hfLutType type, uint16_t value)