CMS 3D CMS Logo

TrackFitMemory.cc
Go to the documentation of this file.
4 #include <iomanip>
5 
6 using namespace std;
7 using namespace trklet;
8 
9 TrackFitMemory::TrackFitMemory(string name, Settings const& settings, unsigned int iSector, double phimin, double phimax)
10  : MemoryBase(name, settings, iSector) {
11  phimin_ = phimin;
12  phimax_ = phimax;
13 }
14 
16  std::ostringstream oss;
17  oss << "../data/MemPrints/FitTrack/TrackFit_" << getName() << "_" << std::setfill('0') << std::setw(2)
18  << (iSector_ + 1) << ".dat";
19  auto const& fname = oss.str();
20 
21  if (first) {
22  bx_ = 0;
23  event_ = 1;
24  out_.open(fname.c_str());
25  } else
26  out_.open(fname.c_str(), std::ofstream::app);
27 
28  out_ << "BX = " << (bitset<3>)bx_ << " Event : " << event_ << endl;
29 
30  for (unsigned int j = 0; j < tracks_.size(); j++) {
31  out_ << "0x";
32  out_ << std::setfill('0') << std::setw(2);
33  out_ << hex << j << dec << " ";
34  out_ << tracks_[j]->trackfitstr() << " " << trklet::hexFormat(tracks_[j]->trackfitstr());
35  out_ << "\n";
36  }
37  out_.close();
38 
39  bx_++;
40  event_++;
41  if (bx_ > 7)
42  bx_ = 0;
43 }
trklet::TrackFitMemory::phimax_
double phimax_
Definition: TrackFitMemory.h:43
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
trklet::Settings
Definition: Settings.h:26
trklet::MemoryBase::event_
int event_
Definition: MemoryBase.h:48
TrackFitMemory.h
trklet::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
trklet::TrackFitMemory::writeTF
void writeTF(bool first)
Definition: TrackFitMemory.cc:15
trklet::MemoryBase::bx_
int bx_
Definition: MemoryBase.h:47
dqmdumpme.first
first
Definition: dqmdumpme.py:55
trklet::MemoryBase::getName
std::string const & getName() const
Definition: MemoryBase.h:19
trklet::TrackFitMemory::phimin_
double phimin_
Definition: TrackFitMemory.h:42
SLHCEvent.h
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet
Definition: AllProjectionsMemory.h:9
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
alignmentValidation.fname
string fname
main script
Definition: alignmentValidation.py:959
std
Definition: JetResolutionObject.h:76
trklet::TrackFitMemory::tracks_
std::vector< Tracklet * > tracks_
Definition: TrackFitMemory.h:44
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition: Util.h:14
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
Tracklet.h
trklet::MemoryBase::iSector_
unsigned int iSector_
Definition: MemoryBase.h:44