Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-07 22:33:32

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_ << std::setfill('0') << std::setw(2);
0027     out_ << hex << j << dec;
0028     out_ << " " << stub << " " << trklet::hexFormat(stub) << endl;
0029   }
0030   out_.close();
0031 }
0032 
0033 void InputLinkMemory::clean() { stubs_.clear(); }