CMS 3D CMS Logo

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

#include <AllInnerStubsMemory.h>

Inheritance diagram for trklet::AllInnerStubsMemory:
trklet::MemoryBase

Public Member Functions

void addStub (const Stub *stub)
 
 AllInnerStubsMemory (std::string name, Settings const &settings)
 
void clean () override
 
const StubgetStub (unsigned int i) const
 
unsigned int nStubs () const
 
void writeStubs (bool first, unsigned int iSector)
 
 ~AllInnerStubsMemory () 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)
 
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 AllInnerStubsMemory.h.

Constructor & Destructor Documentation

◆ AllInnerStubsMemory()

AllInnerStubsMemory::AllInnerStubsMemory ( std::string  name,
Settings const &  settings 
)

Definition at line 9 of file AllInnerStubsMemory.cc.

9 : MemoryBase(name, settings) {}

◆ ~AllInnerStubsMemory()

trklet::AllInnerStubsMemory::~AllInnerStubsMemory ( )
overridedefault

Member Function Documentation

◆ addStub()

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

Definition at line 22 of file AllInnerStubsMemory.h.

22 { stubs_.push_back(stub); }

References stubs_.

◆ clean()

void trklet::AllInnerStubsMemory::clean ( )
inlineoverridevirtual

Implements trklet::MemoryBase.

Definition at line 28 of file AllInnerStubsMemory.h.

28 { stubs_.clear(); }

References stubs_.

◆ getStub()

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

Definition at line 26 of file AllInnerStubsMemory.h.

26 { return stubs_[i]; }

References mps_fire::i, and stubs_.

◆ nStubs()

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

Definition at line 24 of file AllInnerStubsMemory.h.

24 { return stubs_.size(); }

References stubs_.

◆ writeStubs()

void AllInnerStubsMemory::writeStubs ( bool  first,
unsigned int  iSector 
)

Definition at line 11 of file AllInnerStubsMemory.cc.

11  {
12  iSector_ = iSector;
13  const string dirS = settings_.memPath() + "Stubs/";
14  openFile(first, dirS, "AllInnerStubs_");
15 
16  for (unsigned int j = 0; j < stubs_.size(); j++) {
17  string stub = stubs_[j]->strinner();
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(), trklet::MemoryBase::iSector_, 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::AllInnerStubsMemory::stubs_
private

Definition at line 33 of file AllInnerStubsMemory.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::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
trklet::MemoryBase::openFile
void openFile(bool first, std::string dirName, std::string filebase)
Definition: MemoryBase.cc:74
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
trklet::Settings::memPath
std::string memPath() const
Definition: Settings.h:192
trklet::MemoryBase::MemoryBase
MemoryBase(std::string name, Settings const &settings)
Definition: MemoryBase.cc:13
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::AllInnerStubsMemory::stubs_
std::vector< const Stub * > stubs_
Definition: AllInnerStubsMemory.h:33
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:19
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
trklet::MemoryBase::iSector_
unsigned int iSector_
Definition: MemoryBase.h:44