File indexing completed on 2024-04-06 12:21:55
0001 #ifndef L1Trigger_TrackFindingTracklet_interface_StubTripletsMemory_h
0002 #define L1Trigger_TrackFindingTracklet_interface_StubTripletsMemory_h
0003
0004 #include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"
0005
0006 #include <vector>
0007
0008 namespace trklet {
0009
0010 class Settings;
0011 class Stub;
0012 class L1TStub;
0013
0014 class StubTripletsMemory : public MemoryBase {
0015 public:
0016 StubTripletsMemory(std::string name, Settings const& settings);
0017
0018 ~StubTripletsMemory() override = default;
0019
0020 void addStubs(const Stub* stub1, const Stub* stub2, const Stub* stub3) {
0021 stubs1_.push_back(stub1);
0022 stubs2_.push_back(stub2);
0023 stubs3_.push_back(stub3);
0024 }
0025
0026 unsigned int nStubTriplets() const { return stubs1_.size(); }
0027
0028 const Stub* getFPGAStub1(unsigned int i) const { return stubs1_[i]; }
0029 const Stub* getFPGAStub2(unsigned int i) const { return stubs2_[i]; }
0030 const Stub* getFPGAStub3(unsigned int i) const { return stubs3_[i]; }
0031
0032 void clean() override {
0033 stubs1_.clear();
0034 stubs2_.clear();
0035 stubs3_.clear();
0036 }
0037
0038 void writeST(bool first, unsigned int iSector);
0039
0040 private:
0041 std::vector<const Stub*> stubs1_;
0042 std::vector<const Stub*> stubs2_;
0043 std::vector<const Stub*> stubs3_;
0044 };
0045
0046 };
0047 #endif