CMS 3D CMS Logo

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

#include <InputLinkMemory.h>

Inheritance diagram for trklet::InputLinkMemory:
trklet::MemoryBase

Public Member Functions

void addStub (Stub *stub)
 
void clean () override
 
StubgetStub (unsigned int i)
 
 InputLinkMemory (std::string name, Settings const &settings, double, double)
 
unsigned int nStubs () const
 
void writeStubs (bool first, unsigned int iSector)
 
 ~InputLinkMemory () 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
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
unsigned int initLayerDisk (unsigned int pos)
 
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< 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)
 
static std::string hexstr (unsigned int index)
 
- 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 InputLinkMemory.h.

Constructor & Destructor Documentation

◆ InputLinkMemory()

InputLinkMemory::InputLinkMemory ( std::string  name,
Settings const &  settings,
double  ,
double   
)

Definition at line 15 of file InputLinkMemory.cc.

15 : MemoryBase(name, settings) {}
MemoryBase(std::string name, Settings const &settings)
Definition: MemoryBase.cc:14

◆ ~InputLinkMemory()

trklet::InputLinkMemory::~InputLinkMemory ( )
overridedefault

Member Function Documentation

◆ addStub()

void InputLinkMemory::addStub ( Stub stub)

Definition at line 17 of file InputLinkMemory.cc.

References stubs_.

17 { stubs_.push_back(stub); }
std::vector< Stub * > stubs_

◆ clean()

void InputLinkMemory::clean ( )
overridevirtual

Implements trklet::MemoryBase.

Definition at line 31 of file InputLinkMemory.cc.

References stubs_.

31 { stubs_.clear(); }
std::vector< Stub * > stubs_

◆ getStub()

Stub* trklet::InputLinkMemory::getStub ( unsigned int  i)
inline

Definition at line 26 of file InputLinkMemory.h.

References mps_fire::i, and stubs_.

26 { return stubs_[i]; }
std::vector< Stub * > stubs_

◆ nStubs()

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

Definition at line 24 of file InputLinkMemory.h.

References stubs_.

24 { return stubs_.size(); }
std::vector< Stub * > stubs_

◆ writeStubs()

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

Definition at line 19 of file InputLinkMemory.cc.

References dqmdumpme::first, trklet::hexFormat(), trklet::MemoryBase::hexstr(), trklet::MemoryBase::iSector_, dqmiolumiharvest::j, trklet::Settings::memPath(), trklet::MemoryBase::openFile(), trklet::MemoryBase::out_, trklet::MemoryBase::settings_, and stubs_.

19  {
20  iSector_ = iSector;
21  const string dirIS = settings_.memPath() + "InputStubs/";
22  openFile(first, dirIS, "InputStubs_");
23 
24  for (unsigned int j = 0; j < stubs_.size(); j++) {
25  string stub = stubs_[j]->str();
26  out_ << hexstr(j) << " " << stub << " " << trklet::hexFormat(stub) << endl;
27  }
28  out_.close();
29 }
unsigned int iSector_
Definition: MemoryBase.h:47
void openFile(bool first, std::string dirName, std::string filebase)
Definition: MemoryBase.cc:75
std::string hexFormat(const std::string &binary)
Definition: Util.h:19
std::string memPath() const
Definition: Settings.h:202
Settings const & settings_
Definition: MemoryBase.h:53
std::ofstream out_
Definition: MemoryBase.h:49
static std::string hexstr(unsigned int index)
Definition: MemoryBase.cc:111
std::vector< Stub * > stubs_

Member Data Documentation

◆ stubs_

std::vector<Stub*> trklet::InputLinkMemory::stubs_
private

Definition at line 33 of file InputLinkMemory.h.

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