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, unsigned int iSector);
19 
20  ~VMStubsMEMemory() override = default;
21 
22  void addStub(VMStubME stub, unsigned int bin) {
24  binnedstubs_[bin].push_back(stub);
25  }
26  }
27 
28  unsigned int nStubsBin(unsigned int bin) const {
29  assert(bin < binnedstubs_.size());
30  return binnedstubs_[bin].size();
31  }
32 
33  const VMStubME& getVMStubMEBin(unsigned int bin, unsigned int i) const {
34  assert(bin < binnedstubs_.size());
36  return binnedstubs_[bin][i];
37  }
38 
39  const Stub* getStubBin(unsigned int bin, unsigned int i) const {
40  assert(bin < binnedstubs_.size());
42  return binnedstubs_[bin][i].stub();
43  }
44 
45  void clean() override {
46  for (auto& binnedstub : binnedstubs_) {
47  binnedstub.clear();
48  }
49  }
50 
51  void writeStubs(bool first);
52 
53  private:
54  std::vector<std::vector<VMStubME> > binnedstubs_;
55  };
56 
57 }; // namespace trklet
58 #endif
trklet::MemoryBase::settings_
Settings const & settings_
Definition: MemoryBase.h:50
mps_fire.i
i
Definition: mps_fire.py:355
trklet::VMStubsMEMemory
Definition: VMStubsMEMemory.h:16
trklet::Settings
Definition: Settings.h:26
trklet::VMStubsMEMemory::getVMStubMEBin
const VMStubME & getVMStubMEBin(unsigned int bin, unsigned int i) const
Definition: VMStubsMEMemory.h:33
cms::cuda::assert
assert(be >=bs)
trklet::VMStubsMEMemory::binnedstubs_
std::vector< std::vector< VMStubME > > binnedstubs_
Definition: VMStubsMEMemory.h:54
trklet::VMStubsMEMemory::~VMStubsMEMemory
~VMStubsMEMemory() override=default
dqmdumpme.first
first
Definition: dqmdumpme.py:55
trklet::Stub
Definition: Stub.h:16
trklet::VMStubsMEMemory::clean
void clean() override
Definition: VMStubsMEMemory.h:45
trklet::VMStubsMEMemory::addStub
void addStub(VMStubME stub, unsigned int bin)
Definition: VMStubsMEMemory.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::VMStubsMEMemory::getStubBin
const Stub * getStubBin(unsigned int bin, unsigned int i) const
Definition: VMStubsMEMemory.h:39
trklet::Settings::maxStubsPerBin
unsigned int maxStubsPerBin() const
Definition: Settings.h:183
trklet
Definition: AllProjectionsMemory.h:9
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
trklet::VMStubsMEMemory::VMStubsMEMemory
VMStubsMEMemory(std::string name, Settings const &settings, unsigned int iSector)
Definition: VMStubsMEMemory.cc:8
MemoryBase.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
VMStubME.h
trklet::VMStubsMEMemory::writeStubs
void writeStubs(bool first)
Definition: VMStubsMEMemory.cc:19
trklet::VMStubME
Definition: VMStubME.h:15
trklet::VMStubsMEMemory::nStubsBin
unsigned int nStubsBin(unsigned int bin) const
Definition: VMStubsMEMemory.h:28
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443