CMS 3D CMS Logo

StubTripletsMemory.cc
Go to the documentation of this file.
4 #include <iomanip>
5 
6 using namespace std;
7 using namespace trklet;
8 
9 StubTripletsMemory::StubTripletsMemory(string name, Settings const& settings, unsigned int iSector)
10  : MemoryBase(name, settings, iSector) {}
11 
13  std::ostringstream oss;
14  oss << "../data/MemPrints/StubPairs/StubTriplets_" << getName() << "_" << std::setfill('0') << std::setw(2)
15  << (iSector_ + 1) << ".dat";
16  auto const& fname = oss.str();
17 
18  if (first) {
19  bx_ = 0;
20  event_ = 1;
21  out_.open(fname.c_str());
22  } else
23  out_.open(fname.c_str(), std::ofstream::app);
24 
25  out_ << "BX = " << (bitset<3>)bx_ << " Event : " << event_ << endl;
26 
27  for (unsigned int j = 0; j < stubs1_.size(); j++) {
28  string stub1index = stubs1_[j]->stubindex().str();
29  string stub2index = stubs2_[j]->stubindex().str();
30  string stub3index = stubs3_[j]->stubindex().str();
31  out_ << std::setfill('0') << std::setw(2);
32  out_ << hex << j << dec;
33  out_ << " " << stub1index << "|" << stub2index << "|" << stub3index << endl;
34  }
35  out_.close();
36 
37  bx_++;
38  event_++;
39  if (bx_ > 7)
40  bx_ = 0;
41 }
L1TStub.h
trklet::StubTripletsMemory::writeST
void writeST(bool first)
Definition: StubTripletsMemory.cc:12
trklet::Settings
Definition: Settings.h:26
trklet::MemoryBase::event_
int event_
Definition: MemoryBase.h:48
trklet::MemoryBase::out_
std::ofstream out_
Definition: MemoryBase.h:46
trklet::MemoryBase::bx_
int bx_
Definition: MemoryBase.h:47
trklet::StubTripletsMemory::stubs3_
std::vector< const Stub * > stubs3_
Definition: StubTripletsMemory.h:43
dqmdumpme.first
first
Definition: dqmdumpme.py:55
StubTripletsMemory.h
trklet::MemoryBase::getName
std::string const & getName() const
Definition: MemoryBase.h:19
trklet::MemoryBase
Definition: MemoryBase.h:13
trklet::StubTripletsMemory::stubs1_
std::vector< const Stub * > stubs1_
Definition: StubTripletsMemory.h:41
trklet
Definition: AllProjectionsMemory.h:9
alignmentValidation.fname
string fname
main script
Definition: alignmentValidation.py:959
std
Definition: JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Stub.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
trklet::StubTripletsMemory::stubs2_
std::vector< const Stub * > stubs2_
Definition: StubTripletsMemory.h:42
trklet::MemoryBase::iSector_
unsigned int iSector_
Definition: MemoryBase.h:44