Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:53

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_CandidateMatchMemory_h
0002 #define L1Trigger_TrackFindingTracklet_interface_CandidateMatchMemory_h
0003 
0004 #include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"
0005 
0006 #include <vector>
0007 #include <string>
0008 #include <utility>
0009 
0010 namespace trklet {
0011 
0012   class Settings;
0013   class Stub;
0014   class L1TStub;
0015   class Tracklet;
0016 
0017   class CandidateMatchMemory : public MemoryBase {
0018   public:
0019     CandidateMatchMemory(std::string name, Settings const& settings);
0020 
0021     ~CandidateMatchMemory() override = default;
0022 
0023     void addMatch(std::pair<Tracklet*, int> tracklet, const Stub* stub);
0024 
0025     unsigned int nMatches() const { return matches_.size(); }
0026 
0027     std::pair<std::pair<Tracklet*, int>, const Stub*> getMatch(unsigned int i) { return matches_[i]; }
0028 
0029     void clean() override { matches_.clear(); }
0030 
0031     void writeCM(bool first, unsigned int iSector);
0032 
0033   private:
0034     std::vector<std::pair<std::pair<Tracklet*, int>, const Stub*> > matches_;
0035   };
0036 
0037 };  // namespace trklet
0038 #endif