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 dirName, 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  const string dirS = settings_.memPath() + "Stubs/";
14  openFile(first, dirS, "AllStubs_");
15 
16  for (unsigned int j = 0; j < stubs_.size(); j++) {
17  string stub = stubs_[j]->str();
18  out_ << "0x";
19  out_ << std::setfill('0') << std::setw(2);
20  out_ << hex << j << dec;
21  out_ << " " << stub << " " << hexFormat(stub) << endl;
22  }
23  out_.close();
24 }

References TauDecayModes::dec, first, trklet::hexFormat(), dqmiolumiharvest::j, trklet::Settings::memPath(), trklet::MemoryBase::openFile(), trklet::MemoryBase::out_, trklet::MemoryBase::settings_, 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().

trklet::MemoryBase::settings_
Settings const & settings_
Definition: MemoryBase.h:50
mps_fire.i
i
Definition: mps_fire.py:428
trklet::Settings::memPath
std::string const & memPath() const
Definition: Settings.h:169
trklet::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
trklet::AllStubsMemory::stubs_
std::vector< const Stub * > stubs_
Definition: AllStubsMemory.h:33
trklet::MemoryBase::openFile
void openFile(bool first, std::string dirName, std::string filebase)
Definition: MemoryBase.cc:73
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
trklet::MemoryBase::MemoryBase
MemoryBase(std::string name, Settings const &settings, unsigned int iSector)
Definition: MemoryBase.cc:12
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:15
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143