CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AllStubsMemory.cc
Go to the documentation of this file.
4 #include <iomanip>
5 
6 using namespace std;
7 using namespace trklet;
8 
9 AllStubsMemory::AllStubsMemory(string name, Settings const& settings) : MemoryBase(name, settings) {}
10 
11 void AllStubsMemory::writeStubs(bool first, unsigned int iSector) {
12  iSector_ = iSector;
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 }
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_
void writeStubs(bool first, unsigned int iSector)