File indexing completed on 2023-10-25 09:56:27
0001 #include "L1Trigger/TrackFindingTracklet/interface/TrackFitMemory.h"
0002 #include "L1Trigger/TrackFindingTracklet/interface/SLHCEvent.h"
0003 #include "L1Trigger/TrackFindingTracklet/interface/Tracklet.h"
0004 #include <iomanip>
0005 #include <filesystem>
0006
0007 using namespace std;
0008 using namespace trklet;
0009
0010 TrackFitMemory::TrackFitMemory(string name, Settings const& settings, double phimin, double phimax)
0011 : MemoryBase(name, settings) {
0012 phimin_ = phimin;
0013 phimax_ = phimax;
0014 }
0015
0016 void TrackFitMemory::writeTF(bool first, unsigned int iSector) {
0017 iSector_ = iSector;
0018 const string dirFT = settings_.memPath() + "FitTrack/";
0019
0020 std::ostringstream oss;
0021 oss << dirFT << "TrackFit_" << getName() << "_" << std::setfill('0') << std::setw(2) << (iSector_ + 1) << ".dat";
0022 auto const& fname = oss.str();
0023
0024 openfile(out_, first, dirFT, fname, __FILE__, __LINE__);
0025
0026 out_ << "BX = " << (bitset<3>)bx_ << " Event : " << event_ << endl;
0027
0028 for (unsigned int j = 0; j < tracks_.size(); j++) {
0029 out_ << hexstr(j) << " " << tracks_[j]->trackfitstr() << " " << trklet::hexFormat(tracks_[j]->trackfitstr());
0030 out_ << "\n";
0031 }
0032 out_.close();
0033
0034 bx_++;
0035 event_++;
0036 if (bx_ > 7)
0037 bx_ = 0;
0038 }