CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FullMatchMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_FullMatchMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_FullMatchMemory_h
3 
5 
6 #include <vector>
7 #include <string>
8 #include <utility>
9 
10 namespace trklet {
11 
12  class Settings;
13  class Stub;
14  class L1TStub;
15  class Tracklet;
16 
17  class FullMatchMemory : public MemoryBase {
18  public:
19  FullMatchMemory(std::string name, Settings const& settings);
20 
21  ~FullMatchMemory() override = default;
22 
23  void addMatch(Tracklet* tracklet, const Stub* stub);
24 
25  unsigned int nMatches() const { return matches_.size(); }
26 
27  Tracklet* getTracklet(unsigned int i) { return matches_[i].first; }
28 
29  std::pair<Tracklet*, const Stub*> getMatch(unsigned int i) { return matches_[i]; }
30 
31  void clean() override { matches_.clear(); }
32 
33  void writeMC(bool first, unsigned int iSector);
34 
35  int layer() const { return layer_; }
36  int disk() const { return disk_; }
37 
38  private:
39  std::vector<std::pair<Tracklet*, const Stub*> > matches_;
40 
41  int layer_;
42  int disk_;
43  };
44 
45 }; // namespace trklet
46 #endif
Tracklet * getTracklet(unsigned int i)
std::vector< std::pair< Tracklet *, const Stub * > > matches_
std::pair< Tracklet *, const Stub * > getMatch(unsigned int i)
void addMatch(Tracklet *tracklet, const Stub *stub)
FullMatchMemory(std::string name, Settings const &settings)
unsigned int nMatches() const
void writeMC(bool first, unsigned int iSector)
~FullMatchMemory() override=default