File indexing completed on 2024-04-06 12:21:59
0001 #include "L1Trigger/TrackFindingTracklet/interface/InputLinkMemory.h"
0002 #include "L1Trigger/TrackFindingTracklet/interface/Stub.h"
0003 #include "L1Trigger/TrackFindingTracklet/interface/Globals.h"
0004
0005 #include <iomanip>
0006 #include <cmath>
0007 #include <sstream>
0008 #include <cctype>
0009
0010 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0011
0012 using namespace trklet;
0013 using namespace std;
0014
0015 InputLinkMemory::InputLinkMemory(string name, Settings const& settings, double, double) : MemoryBase(name, settings) {}
0016
0017 void InputLinkMemory::addStub(Stub* stub) { stubs_.push_back(stub); }
0018
0019 void InputLinkMemory::writeStubs(bool first, unsigned int iSector) {
0020 iSector_ = iSector;
0021 const string dirIS = settings_.memPath() + "InputStubs/";
0022 openFile(first, dirIS, "InputStubs_");
0023
0024 for (unsigned int j = 0; j < stubs_.size(); j++) {
0025 string stub = stubs_[j]->str();
0026 out_ << hexstr(j) << " " << stub << " " << trklet::hexFormat(stub) << endl;
0027 }
0028 out_.close();
0029 }
0030
0031 void InputLinkMemory::clean() { stubs_.clear(); }