CMS 3D CMS Logo

AllInnerStubsMemory.cc
Go to the documentation of this file.
4 #include <iomanip>
5 
6 using namespace std;
7 using namespace trklet;
8 
9 AllInnerStubsMemory::AllInnerStubsMemory(string name, Settings const& settings) : MemoryBase(name, settings) {}
10 
11 void AllInnerStubsMemory::writeStubs(bool first, unsigned int iSector) {
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_ << hexstr(j) << " " << stub << " " << hexFormat(stub) << endl;
19  }
20  out_.close();
21 }
void writeStubs(bool first, unsigned int iSector)
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:192
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< const Stub * > stubs_