CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::AllStubsMemory Class Reference

#include <AllStubsMemory.h>

Inheritance diagram for trklet::AllStubsMemory:
trklet::MemoryBase

Public Member Functions

void addStub (const Stub *stub)
 
 AllStubsMemory (std::string name, Settings const &settings, unsigned int iSector)
 
void clean () override
 
const StubgetStub (unsigned int i) const
 
unsigned int nStubs () const
 
void writeStubs (bool first)
 
 ~AllStubsMemory () override=default
 
- Public Member Functions inherited from trklet::MemoryBase
void findAndReplaceAll (std::string &data, std::string toSearch, std::string replaceStr)
 
std::string getLastPartOfName () const
 
std::string const & getName () const
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initSpecialSeeding (unsigned int pos, bool &overlap, bool &extra, bool &extended)
 
 MemoryBase (std::string name, Settings const &settings, unsigned int iSector)
 
void openFile (bool first, std::string filebase)
 
virtual ~MemoryBase ()=default
 

Private Attributes

std::vector< const Stub * > stubs_
 

Additional Inherited Members

- Static Public Member Functions inherited from trklet::MemoryBase
static size_t find_nth (const std::string &haystack, size_t pos, const std::string &needle, size_t nth)
 
- Protected Attributes inherited from trklet::MemoryBase
int bx_
 
int event_
 
unsigned int iSector_
 
std::string name_
 
std::ofstream out_
 
Settings const & settings_
 

Detailed Description

Definition at line 16 of file AllStubsMemory.h.

Constructor & Destructor Documentation

◆ AllStubsMemory()

AllStubsMemory::AllStubsMemory ( std::string  name,
Settings const &  settings,
unsigned int  iSector 
)

Definition at line 9 of file AllStubsMemory.cc.

10  : MemoryBase(name, settings, iSector) {}

◆ ~AllStubsMemory()

trklet::AllStubsMemory::~AllStubsMemory ( )
overridedefault

Member Function Documentation

◆ addStub()

void trklet::AllStubsMemory::addStub ( const Stub stub)
inline

Definition at line 22 of file AllStubsMemory.h.

22 { stubs_.push_back(stub); }

References stubs_.

◆ clean()

void trklet::AllStubsMemory::clean ( )
inlineoverridevirtual

Implements trklet::MemoryBase.

Definition at line 28 of file AllStubsMemory.h.

28 { stubs_.clear(); }

References stubs_.

◆ getStub()

const Stub* trklet::AllStubsMemory::getStub ( unsigned int  i) const
inline

Definition at line 26 of file AllStubsMemory.h.

26 { return stubs_[i]; }

References mps_fire::i, and stubs_.

◆ nStubs()

unsigned int trklet::AllStubsMemory::nStubs ( ) const
inline

Definition at line 24 of file AllStubsMemory.h.

24 { return stubs_.size(); }

References stubs_.

◆ writeStubs()

void AllStubsMemory::writeStubs ( bool  first)

Definition at line 12 of file AllStubsMemory.cc.

12  {
13  openFile(first, "../data/MemPrints/Stubs/AllStubs_");
14 
15  for (unsigned int j = 0; j < stubs_.size(); j++) {
16  string stub = stubs_[j]->str();
17  out_ << "0x";
18  out_ << std::setfill('0') << std::setw(2);
19  out_ << hex << j << dec;
20  out_ << " " << stub << " " << hexFormat(stub) << endl;
21  }
22  out_.close();
23 }

References TauDecayModes::dec, dqmdumpme::first, trklet::hexFormat(), dqmiolumiharvest::j, trklet::MemoryBase::openFile(), trklet::MemoryBase::out_, and stubs_.

Member Data Documentation

◆ stubs_

std::vector<const Stub*> trklet::AllStubsMemory::stubs_
private

Definition at line 33 of file AllStubsMemory.h.

Referenced by addStub(), clean(), getStub(), nStubs(), and writeStubs().

mps_fire.i
i
Definition: mps_fire.py:355
trklet::MemoryBase::openFile
void openFile(bool first, std::string filebase)
Definition: MemoryBase.cc:72
trklet::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
trklet::AllStubsMemory::stubs_
std::vector< const Stub * > stubs_
Definition: AllStubsMemory.h:33
dqmdumpme.first
first
Definition: dqmdumpme.py:55
trklet::MemoryBase::MemoryBase
MemoryBase(std::string name, Settings const &settings, unsigned int iSector)
Definition: MemoryBase.cc:11
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:14
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143