CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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< 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 ( std::string  name,
Settings const &  settings 
)

Definition at line 9 of file AllInnerStubsMemory.cc.

9 : MemoryBase(name, settings) {}
MemoryBase(std::string name, Settings const &settings)
Definition: MemoryBase.cc:13
trklet::AllInnerStubsMemory::~AllInnerStubsMemory ( )
overridedefault

Member Function Documentation

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

Definition at line 22 of file AllInnerStubsMemory.h.

References stubs_.

22 { stubs_.push_back(stub); }
std::vector< const Stub * > stubs_
void trklet::AllInnerStubsMemory::clean ( )
inlineoverridevirtual

Implements trklet::MemoryBase.

Definition at line 28 of file AllInnerStubsMemory.h.

References stubs_.

28 { stubs_.clear(); }
std::vector< const Stub * > stubs_
const Stub* trklet::AllInnerStubsMemory::getStub ( unsigned int  i) const
inline

Definition at line 26 of file AllInnerStubsMemory.h.

References mps_fire::i, and stubs_.

26 { return stubs_[i]; }
std::vector< const Stub * > stubs_
unsigned int trklet::AllInnerStubsMemory::nStubs ( ) const
inline

Definition at line 24 of file AllInnerStubsMemory.h.

References stubs_.

24 { return stubs_.size(); }
std::vector< const Stub * > stubs_
void AllInnerStubsMemory::writeStubs ( bool  first,
unsigned int  iSector 
)

Definition at line 11 of file AllInnerStubsMemory.cc.

References TauDecayModes::dec, trklet::hexFormat(), trklet::MemoryBase::iSector_, dqmiolumiharvest::j, trklet::Settings::memPath(), trklet::MemoryBase::openFile(), trklet::MemoryBase::out_, trklet::MemoryBase::settings_, and stubs_.

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 }
std::string memPath() const
Definition: Settings.h:192
unsigned int iSector_
Definition: MemoryBase.h:44
void openFile(bool first, std::string dirName, std::string filebase)
Definition: MemoryBase.cc:74
std::string hexFormat(const std::string &binary)
Definition: Util.h:19
Settings const & settings_
Definition: MemoryBase.h:50
std::ofstream out_
Definition: MemoryBase.h:46
std::vector< const Stub * > stubs_

Member Data Documentation

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

Definition at line 33 of file AllInnerStubsMemory.h.

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