CMS 3D CMS Logo

deregionizer_input.h
Go to the documentation of this file.
1 #ifndef L1Trigger_Phase2L1ParticleFlow_deregionizer_input_h
2 #define L1Trigger_Phase2L1ParticleFlow_deregionizer_input_h
3 
4 #include <vector>
5 #include <algorithm>
7 
8 namespace edm {
9  class ParameterSet;
10 }
11 
12 namespace l1ct {
13 
15  public:
16  // struct to represent how each correlator layer 1 board output is structured
17  struct BoardInfo {
23  std::vector<uint> regions_;
24  };
25 
26  // struct to represent how each puppi object is positioned in the input frame
31  // for sorting
32  bool operator<(const LinkPlacementInfo &other) const {
33  bool cc_lt = this->clock_cycle_ < other.clock_cycle_;
34  bool cc_eq = this->clock_cycle_ == other.clock_cycle_;
35  bool board_lt = this->board_ < other.board_;
36  bool board_eq = this->board_ == other.board_;
37  bool link_lt = this->link_ < other.link_;
38  return cc_eq ? (board_eq ? link_lt : board_lt) : cc_lt;
39  }
40  };
42  typedef std::pair<l1ct::PuppiObjEmu, LPI> PlacedPuppi;
43 
44  std::vector<BoardInfo> boardInfos_;
45 
46  // note: this one for use in standalone testbench
47  DeregionizerInput(std::vector<BoardInfo> boardInfos) : boardInfos_(boardInfos) {}
48 
49  // note: this one will work only in CMSSW
50  DeregionizerInput(const std::vector<edm::ParameterSet> linkConfigs);
51 
53 
54  std::vector<std::pair<l1ct::PuppiObjEmu, LPI>> inputOrderInfo(
55  const std::vector<l1ct::OutputRegion> &inputRegions) const;
56  std::vector<std::vector<std::vector<l1ct::PuppiObjEmu>>> orderInputs(
57  const std::vector<l1ct::OutputRegion> &inputRegions) const;
58 
59  void setDebug(bool debug = true) { debug_ = debug; }
60 
61  private:
62  bool debug_ = false;
63  // these are not configurable in current design
66  };
67 
68 } // namespace l1ct
69 
70 #endif
std::vector< std::vector< std::vector< l1ct::PuppiObjEmu > > > orderInputs(const std::vector< l1ct::OutputRegion > &inputRegions) const
static constexpr uint nInputFramesPerBX_
void setDebug(bool debug=true)
bool operator<(const LinkPlacementInfo &other) const
DeregionizerInput(std::vector< BoardInfo > boardInfos)
#define debug
Definition: HDRShower.cc:19
HLT enums.
std::pair< l1ct::PuppiObjEmu, LPI > PlacedPuppi
std::vector< std::pair< l1ct::PuppiObjEmu, LPI > > inputOrderInfo(const std::vector< l1ct::OutputRegion > &inputRegions) const
static constexpr uint tmuxFactor_
std::vector< BoardInfo > boardInfos_
Definition: datatypes.h:8