CMS 3D CMS Logo

StubPairsMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_StubPairsMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_StubPairsMemory_h
3 
6 
7 #include <vector>
8 
9 namespace trklet {
10 
11  class Settings;
12 
13  class StubPairsMemory : public MemoryBase {
14  public:
15  StubPairsMemory(std::string name, Settings const& settings, unsigned int iSector);
16 
17  ~StubPairsMemory() override = default;
18 
19  void addStubPair(const VMStubTE& stub1,
20  const VMStubTE& stub2,
21  const unsigned index = 0,
22  const std::string& tedName = "") {
23  stubs_.emplace_back(stub1, stub2);
24  indices_.push_back(index);
25  tedNames_.push_back(tedName);
26  }
27 
28  unsigned int nStubPairs() const { return stubs_.size(); }
29 
30  const VMStubTE& getVMStub1(unsigned int i) const { return stubs_[i].first; }
31  const VMStubTE& getVMStub2(unsigned int i) const { return stubs_[i].second; }
32 
33  unsigned getIndex(const unsigned i) const { return indices_.at(i); }
34  const std::string& getTEDName(const unsigned i) const { return tedNames_.at(i); }
35 
36  void clean() override {
37  stubs_.clear();
38  indices_.clear();
39  tedNames_.clear();
40  }
41 
42  void writeSP(bool first);
43 
44  private:
45  std::vector<std::pair<const VMStubTE, const VMStubTE> > stubs_;
46 
47  std::vector<unsigned> indices_;
48  std::vector<std::string> tedNames_;
49  };
50 
51 }; // namespace trklet
52 #endif
trklet::StubPairsMemory::writeSP
void writeSP(bool first)
Definition: StubPairsMemory.cc:11
mps_fire.i
i
Definition: mps_fire.py:428
trklet::StubPairsMemory
Definition: StubPairsMemory.h:13
trklet::StubPairsMemory::~StubPairsMemory
~StubPairsMemory() override=default
trklet::VMStubTE
Definition: VMStubTE.h:15
trklet::StubPairsMemory::getVMStub2
const VMStubTE & getVMStub2(unsigned int i) const
Definition: StubPairsMemory.h:31
trklet::Settings
Definition: Settings.h:26
trklet::StubPairsMemory::StubPairsMemory
StubPairsMemory(std::string name, Settings const &settings, unsigned int iSector)
Definition: StubPairsMemory.cc:8
trklet::StubPairsMemory::addStubPair
void addStubPair(const VMStubTE &stub1, const VMStubTE &stub2, const unsigned index=0, const std::string &tedName="")
Definition: StubPairsMemory.h:19
trklet::StubPairsMemory::getVMStub1
const VMStubTE & getVMStub1(unsigned int i) const
Definition: StubPairsMemory.h:30
dqmdumpme.first
first
Definition: dqmdumpme.py:55
trklet::StubPairsMemory::indices_
std::vector< unsigned > indices_
Definition: StubPairsMemory.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::StubPairsMemory::stubs_
std::vector< std::pair< const VMStubTE, const VMStubTE > > stubs_
Definition: StubPairsMemory.h:45
trklet::StubPairsMemory::nStubPairs
unsigned int nStubPairs() const
Definition: StubPairsMemory.h:28
trklet::StubPairsMemory::clean
void clean() override
Definition: StubPairsMemory.h:36
trklet::StubPairsMemory::tedNames_
std::vector< std::string > tedNames_
Definition: StubPairsMemory.h:48
trklet
Definition: AllProjectionsMemory.h:9
VMStubTE.h
trklet::StubPairsMemory::getIndex
unsigned getIndex(const unsigned i) const
Definition: StubPairsMemory.h:33
MemoryBase.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::StubPairsMemory::getTEDName
const std::string & getTEDName(const unsigned i) const
Definition: StubPairsMemory.h:34