CMS 3D CMS Logo

VMStubsMEMemory.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_VMStubsMEMemory_h
2 #define L1Trigger_TrackFindingTracklet_interface_VMStubsMEMemory_h
3 
6 
7 #include <string>
8 #include <vector>
9 
10 namespace trklet {
11 
12  class Settings;
13  class Stub;
14  class L1TStub;
15 
16  class VMStubsMEMemory : public MemoryBase {
17  public:
18  VMStubsMEMemory(std::string name, Settings const& settings);
19 
20  ~VMStubsMEMemory() override = default;
21 
22  void addStub(VMStubME stub, unsigned int bin) {
24  binnedstubs_[bin].push_back(stub);
25  }
26  }
27 
28  void resize(int nbins) { binnedstubs_.resize(nbins); }
29 
30  unsigned int nStubsBin(unsigned int bin) const {
31  assert(bin < binnedstubs_.size());
32  return binnedstubs_[bin].size();
33  }
34 
35  const VMStubME& getVMStubMEBin(unsigned int bin, unsigned int i) const {
36  assert(bin < binnedstubs_.size());
38  return binnedstubs_[bin][i];
39  }
40 
41  const Stub* getStubBin(unsigned int bin, unsigned int i) const {
42  assert(bin < binnedstubs_.size());
44  return binnedstubs_[bin][i].stub();
45  }
46 
47  void clean() override {
48  for (auto& binnedstub : binnedstubs_) {
49  binnedstub.clear();
50  }
51  }
52 
53  void writeStubs(bool first, unsigned int iSector);
54 
55  private:
56  std::vector<std::vector<VMStubME> > binnedstubs_;
57  };
58 
59 }; // namespace trklet
60 #endif
trklet::MemoryBase::settings_
Settings const & settings_
Definition: MemoryBase.h:50
mps_fire.i
i
Definition: mps_fire.py:428
trklet::VMStubsMEMemory
Definition: VMStubsMEMemory.h:16
trklet::Settings
Definition: Settings.h:52
trklet::VMStubsMEMemory::getVMStubMEBin
const VMStubME & getVMStubMEBin(unsigned int bin, unsigned int i) const
Definition: VMStubsMEMemory.h:35
cms::cuda::assert
assert(be >=bs)
trklet::VMStubsMEMemory::binnedstubs_
std::vector< std::vector< VMStubME > > binnedstubs_
Definition: VMStubsMEMemory.h:56
trklet::VMStubsMEMemory::~VMStubsMEMemory
~VMStubsMEMemory() override=default
trklet::Stub
Definition: Stub.h:18
trklet::VMStubsMEMemory::clean
void clean() override
Definition: VMStubsMEMemory.h:47
trklet::VMStubsMEMemory::addStub
void addStub(VMStubME stub, unsigned int bin)
Definition: VMStubsMEMemory.h:22
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
trklet::VMStubsMEMemory::writeStubs
void writeStubs(bool first, unsigned int iSector)
Definition: VMStubsMEMemory.cc:19
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::VMStubsMEMemory::getStubBin
const Stub * getStubBin(unsigned int bin, unsigned int i) const
Definition: VMStubsMEMemory.h:41
trklet::Settings::maxStubsPerBin
unsigned int maxStubsPerBin() const
Definition: Settings.h:224
trklet::VMStubsMEMemory::VMStubsMEMemory
VMStubsMEMemory(std::string name, Settings const &settings)
Definition: VMStubsMEMemory.cc:9
trklet
Definition: AllInnerStubsMemory.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
trklet::VMStubsMEMemory::resize
void resize(int nbins)
Definition: VMStubsMEMemory.h:28
MemoryBase.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
VMStubME.h
trklet::VMStubME
Definition: VMStubME.h:15
trklet::VMStubsMEMemory::nStubsBin
unsigned int nStubsBin(unsigned int bin) const
Definition: VMStubsMEMemory.h:30
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443