CMS 3D CMS Logo

InputLinkMemory.cc
Go to the documentation of this file.
4 
5 #include <iomanip>
6 #include <cmath>
7 #include <sstream>
8 #include <cctype>
9 
11 
12 using namespace trklet;
13 using namespace std;
14 
15 InputLinkMemory::InputLinkMemory(string name, Settings const& settings, double, double) : MemoryBase(name, settings) {}
16 
17 void InputLinkMemory::addStub(Stub* stub) { stubs_.push_back(stub); }
18 
19 void InputLinkMemory::writeStubs(bool first, unsigned int iSector) {
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_ << std::setfill('0') << std::setw(2);
27  out_ << hex << j << dec;
28  out_ << " " << stub << " " << trklet::hexFormat(stub) << endl;
29  }
30  out_.close();
31 }
32 
33 void InputLinkMemory::clean() { stubs_.clear(); }
trklet::MemoryBase::settings_
Settings const & settings_
Definition: MemoryBase.h:50
MessageLogger.h
trklet::InputLinkMemory::clean
void clean() override
Definition: InputLinkMemory.cc:33
trklet::Settings
Definition: Settings.h:52
trklet::InputLinkMemory::stubs_
std::vector< Stub * > stubs_
Definition: InputLinkMemory.h:33
trklet::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
InputLinkMemory.h
trklet::MemoryBase::openFile
void openFile(bool first, std::string dirName, std::string filebase)
Definition: MemoryBase.cc:74
trklet::Stub
Definition: Stub.h:18
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
trklet::InputLinkMemory::addStub
void addStub(Stub *stub)
Definition: InputLinkMemory.cc:17
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::InputLinkMemory::writeStubs
void writeStubs(bool first, unsigned int iSector)
Definition: InputLinkMemory.cc:19
trklet::Settings::memPath
std::string memPath() const
Definition: Settings.h:192
Globals.h
trklet
Definition: AllInnerStubsMemory.h:10
std
Definition: JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:19
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
trklet::InputLinkMemory::InputLinkMemory
InputLinkMemory(std::string name, Settings const &settings, double, double)
Definition: InputLinkMemory.cc:15
Stub.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
trklet::MemoryBase::iSector_
unsigned int iSector_
Definition: MemoryBase.h:44