CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StubTripletsMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_StubTripletsMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_StubTripletsMemory_h
3 
5 
6 #include <vector>
7 
8 namespace trklet {
9 
10  class Settings;
11  class Stub;
12  class L1TStub;
13 
14  class StubTripletsMemory : public MemoryBase {
15  public:
16  StubTripletsMemory(std::string name, Settings const& settings);
17 
18  ~StubTripletsMemory() override = default;
19 
20  void addStubs(const Stub* stub1, const Stub* stub2, const Stub* stub3) {
21  stubs1_.push_back(stub1);
22  stubs2_.push_back(stub2);
23  stubs3_.push_back(stub3);
24  }
25 
26  unsigned int nStubTriplets() const { return stubs1_.size(); }
27 
28  const Stub* getFPGAStub1(unsigned int i) const { return stubs1_[i]; }
29  const Stub* getFPGAStub2(unsigned int i) const { return stubs2_[i]; }
30  const Stub* getFPGAStub3(unsigned int i) const { return stubs3_[i]; }
31 
32  void clean() override {
33  stubs1_.clear();
34  stubs2_.clear();
35  stubs3_.clear();
36  }
37 
38  void writeST(bool first, unsigned int iSector);
39 
40  private:
41  std::vector<const Stub*> stubs1_;
42  std::vector<const Stub*> stubs2_;
43  std::vector<const Stub*> stubs3_;
44  };
45 
46 }; // namespace trklet
47 #endif
StubTripletsMemory(std::string name, Settings const &settings)
std::vector< const Stub * > stubs2_
const Stub * getFPGAStub3(unsigned int i) const
void addStubs(const Stub *stub1, const Stub *stub2, const Stub *stub3)
unsigned int nStubTriplets() const
std::vector< const Stub * > stubs1_
const Stub * getFPGAStub1(unsigned int i) const
void writeST(bool first, unsigned int iSector)
const Stub * getFPGAStub2(unsigned int i) const
~StubTripletsMemory() override=default
std::vector< const Stub * > stubs3_