CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::TripletEngine Class Reference

#include <TripletEngine.h>

Inheritance diagram for trklet::TripletEngine:
trklet::ProcessBase

Public Member Functions

void addInput (MemoryBase *memory, std::string input) override
 
void addOutput (MemoryBase *memory, std::string output) override
 
void execute ()
 
void readTables ()
 
 TripletEngine (std::string name, Settings const &settings, Globals *global, unsigned int iSector)
 
void writeTables ()
 
 ~TripletEngine () override
 
- Public Member Functions inherited from trklet::ProcessBase
unsigned int getISeed (const std::string &name)
 
std::string const & getName () const
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk, int &layerdisk)
 
void initLayerDisksandISeed (unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
 
unsigned int nbits (unsigned int power)
 
 ProcessBase (std::string name, Settings const &settings, Globals *global, unsigned int iSector)
 
virtual ~ProcessBase ()=default
 

Private Attributes

int count_
 
int dct1_
 
int dct2_
 
int dct3_
 
int disk1_
 
int disk2_
 
int disk3_
 
int iSeed_
 
int layer1_
 
int layer2_
 
int layer3_
 
int phi1_
 
int phi2_
 
int phi3_
 
int r1_
 
int r2_
 
int r3_
 
int secondphibits_
 
std::map< std::string, std::vector< std::map< std::string, unsigned > > > spTable_
 
std::vector< StubPairsMemory * > stubpairs_
 
StubTripletsMemorystubtriplets_
 
std::vector< bool > table_
 
int thirdphibits_
 
std::vector< VMStubsTEMemory * > thirdvmstubs_
 
std::map< std::string, std::vector< std::vector< std::string > > > tmpSPTable_
 
int z1_
 
int z2_
 
int z3_
 

Additional Inherited Members

- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
unsigned int iSector_
 
std::string name_
 
double phimax_
 
double phimin_
 
Settings const & settings_
 

Detailed Description

Definition at line 18 of file TripletEngine.h.

Constructor & Destructor Documentation

◆ TripletEngine()

TripletEngine::TripletEngine ( std::string  name,
Settings const &  settings,
Globals global,
unsigned int  iSector 
)

Definition at line 13 of file TripletEngine.cc.

14  : ProcessBase(name, settings, global, iSector) {
15  stubpairs_.clear();
16  thirdvmstubs_.clear();
17  layer1_ = 0;
18  layer2_ = 0;
19  layer3_ = 0;
20  disk1_ = 0;
21  disk2_ = 0;
22  disk3_ = 0;
23  dct1_ = 0;
24  dct2_ = 0;
25  dct3_ = 0;
26  phi1_ = 0;
27  phi2_ = 0;
28  phi3_ = 0;
29  z1_ = 0;
30  z2_ = 0;
31  z3_ = 0;
32  r1_ = 0;
33  r2_ = 0;
34  r3_ = 0;
35 
36  if (name_[4] == 'L')
37  layer1_ = name_[5] - '0';
38  if (name_[4] == 'D')
39  disk1_ = name_[5] - '0';
40  if (name_[7] == 'L')
41  layer2_ = name_[8] - '0';
42  if (name_[7] == 'D')
43  disk2_ = name_[8] - '0';
44 
45  if (layer1_ == 3 && layer2_ == 4) {
46  layer3_ = 2;
47  iSeed_ = 8;
48  } else if (layer1_ == 5 && layer2_ == 6) {
49  layer3_ = 4;
50  iSeed_ = 9;
51  } else if (layer1_ == 2 && layer2_ == 3) {
52  disk3_ = 1;
53  iSeed_ = 10;
54  } else if (disk1_ == 1 && disk2_ == 2) {
55  layer3_ = 2;
56  iSeed_ = 11;
57  } else
58  throw cms::Exception("LogicError") << __FILE__ << " " << __LINE__ << " Invalid seeding!";
59 
60  if ((layer2_ == 4 && layer3_ == 2) || (layer2_ == 6 && layer3_ == 4)) {
63  }
64  if ((layer2_ == 3 && disk3_ == 1) || (disk2_ == 2 && layer3_ == 2)) {
67  }
69  readTables();
70 }

References dct1_, dct2_, dct3_, disk1_, disk2_, disk3_, trklet::Settings::enableTripletTables(), Exception, iSeed_, layer1_, layer2_, layer3_, trklet::ProcessBase::name_, trklet::Settings::nfinephi(), phi1_, phi2_, phi3_, r1_, r2_, r3_, readTables(), secondphibits_, trklet::ProcessBase::settings_, stubpairs_, thirdphibits_, thirdvmstubs_, trklet::Settings::writeTripletTables(), z1_, z2_, and z3_.

◆ ~TripletEngine()

TripletEngine::~TripletEngine ( )
override

Member Function Documentation

◆ addInput()

void TripletEngine::addInput ( MemoryBase memory,
std::string  input 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 91 of file TripletEngine.cc.

91  {
92  if (settings_.writetrace()) {
93  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding input from " << memory->getName() << " to input "
94  << input;
95  }
96  if (input == "thirdvmstubin") {
97  auto *tmp = dynamic_cast<VMStubsTEMemory *>(memory);
98  assert(tmp != nullptr);
99  thirdvmstubs_.push_back(tmp);
100  return;
101  }
102  if (input.substr(0, 8) == "stubpair") {
103  auto *tmp = dynamic_cast<StubPairsMemory *>(memory);
104  assert(tmp != nullptr);
105  stubpairs_.push_back(tmp);
106  return;
107  }
108  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find input : " << input;
109 }

References cms::cuda::assert(), Exception, input, trklet::ProcessBase::name_, trklet::ProcessBase::settings_, stubpairs_, thirdvmstubs_, createJobs::tmp, and trklet::Settings::writetrace().

◆ addOutput()

void TripletEngine::addOutput ( MemoryBase memory,
std::string  output 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 77 of file TripletEngine.cc.

77  {
78  if (settings_.writetrace()) {
79  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding output to " << memory->getName() << " to output "
80  << output;
81  }
82  if (output == "stubtripout") {
83  auto *tmp = dynamic_cast<StubTripletsMemory *>(memory);
84  assert(tmp != nullptr);
86  return;
87  }
88  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find output : " << output;
89 }

References cms::cuda::assert(), Exception, trklet::ProcessBase::name_, convertSQLitetoXML_cfg::output, trklet::ProcessBase::settings_, stubtriplets_, createJobs::tmp, and trklet::Settings::writetrace().

◆ execute()

void TripletEngine::execute ( void  )

Definition at line 111 of file TripletEngine.cc.

111  {
112  unsigned int countall = 0;
113  unsigned int countpass = 0;
114  unsigned int nThirdStubs = 0;
115  count_ = 0;
116 
117  for (unsigned int iThirdMem = 0; iThirdMem < thirdvmstubs_.size();
118  nThirdStubs += thirdvmstubs_.at(iThirdMem)->nVMStubs(), iThirdMem++)
119  ;
120 
121  assert(!thirdvmstubs_.empty());
122  assert(!stubpairs_.empty());
123 
124  bool print = false && (getName().substr(0, 10) == "TRE_L2cL3c");
125 
126  print = print && nThirdStubs > 0;
127 
128  int hacksum = 0;
129  if (print) {
130  edm::LogVerbatim("Tracklet") << "In TripletEngine::execute : " << getName() << " " << nThirdStubs << ":";
131  for (unsigned int i = 0; i < thirdvmstubs_.size(); ++i) {
132  edm::LogVerbatim("Tracklet") << thirdvmstubs_.at(i)->getName() << " " << thirdvmstubs_.at(i)->nVMStubs();
133  }
134  int s = 0;
135  std::string oss = "";
136  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
137  oss += std::to_string(stubpairs_.at(i)->nStubPairs());
138  oss += " ";
139  s += stubpairs_.at(i)->nStubPairs();
140  }
141  hacksum += nThirdStubs * s;
142  edm::LogVerbatim("Tracklet") << oss;
143  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
144  edm::LogVerbatim("Tracklet") << " " << stubpairs_.at(i)->getName();
145  }
146  }
147 
148  tmpSPTable_.clear();
149 
150  for (unsigned int i = 0; i < stubpairs_.size(); ++i) {
151  for (unsigned int j = 0; j < stubpairs_.at(i)->nStubPairs(); ++j) {
152  if (print)
153  edm::LogVerbatim("Tracklet") << " ***** " << stubpairs_.at(i)->getName() << " "
154  << stubpairs_.at(i)->nStubPairs();
155 
156  auto firstvmstub = stubpairs_.at(i)->getVMStub1(j);
157  auto secondvmstub = stubpairs_.at(i)->getVMStub2(j);
158 
159  if ((layer2_ == 4 && layer3_ == 2) || (layer2_ == 6 && layer3_ == 4)) {
160  constexpr unsigned int vmbitshift = 10;
161  int lookupbits = (int)((firstvmstub.vmbits().value() >> vmbitshift) & 1023); //1023=2^vmbitshift-1
162  int newbin = (lookupbits & 127);
163  int bin = newbin / 8;
164 
165  int start = (bin >> 1);
166  int last = start + (bin & 1);
167 
168  for (int ibin = start; ibin <= last; ibin++) {
169  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
170  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
171  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
172  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
173  continue;
174  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
175  if (settings_.debugTracklet()) {
176  edm::LogVerbatim("Tracklet") << "In " << getName() << " have third stub";
177  }
178 
179  if (countall >= settings_.maxStep("TRE"))
180  break;
181  countall++;
182 
183  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
184 
185  assert(secondphibits_ != -1);
186  assert(thirdphibits_ != -1);
187 
188  unsigned int nvmsecond = settings_.nallstubs(layer2_ - 1) * settings_.nvmte(1, iSeed_);
189  unsigned int nvmbitssecond = nbits(nvmsecond);
190 
191  FPGAWord iphisecondbin = secondvmstub.stub()->iphivmFineBins(nvmbitssecond, secondphibits_);
192 
193  //currently not using same number of bits as in the TED
194  //assert(iphisecondbin==(int)secondvmstub.finephi());
195  FPGAWord iphithirdbin = thirdvmstub.finephi();
196 
197  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
198 
199  FPGAWord secondbend = secondvmstub.bend();
200  FPGAWord thirdbend = thirdvmstub.bend();
201 
202  index = (index << secondbend.nbits()) + secondbend.value();
203  index = (index << thirdbend.nbits()) + thirdbend.value();
204 
206  (index >= table_.size() || !table_[index])) {
207  if (settings_.debugTracklet()) {
208  edm::LogVerbatim("Tracklet")
209  << "Stub pair rejected because of stub pt cut bends : "
210  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
211  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
212  }
213  continue;
214  }
216  if (index >= table_.size())
217  table_.resize(index + 1, false);
218  table_[index] = true;
219 
220  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
221  const string &tedName = stubpairs_.at(i)->getTEDName(j);
222  if (!tmpSPTable_.count(tedName))
223  tmpSPTable_[tedName];
224  if (spIndex >= tmpSPTable_.at(tedName).size())
225  tmpSPTable_.at(tedName).resize(spIndex + 1);
226  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
227  }
228 
229  if (settings_.debugTracklet())
230  edm::LogVerbatim("Tracklet") << "Adding layer-layer pair in " << getName();
231  if (settings_.writeMonitorData("Seeds")) {
232  ofstream fout("seeds.txt", ofstream::app);
233  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
234  fout.close();
235  }
236  stubtriplets_->addStubs(thirdvmstub.stub(),
237  (stubpairs_.at(i))->getVMStub1(j).stub(),
238  (stubpairs_.at(i))->getVMStub2(j).stub());
239 
240  countpass++;
241  }
242  }
243  }
244 
245  }
246 
247  else if (disk2_ == 2 && layer3_ == 2) {
248  int lookupbits = (int)((firstvmstub.vmbits().value() >> 10) & 1023);
249  int newbin = (lookupbits & 127);
250  int bin = newbin / 8;
251 
252  int start = (bin >> 1);
253  int last = start + (bin & 1);
254 
255  if (firstvmstub.stub()->disk().value() < 0) { //TODO - negative disk should come from memory
256  start = settings_.NLONGVMBINS() - last - 1;
257  last = settings_.NLONGVMBINS() - start - 1;
258  }
259 
260  for (int ibin = start; ibin <= last; ibin++) {
261  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
262  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
263  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
264  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
265  continue;
266 
267  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
268  if (countall >= settings_.maxStep("TRE"))
269  break;
270  countall++;
271 
272  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
273 
274  assert(secondphibits_ != -1);
275  assert(thirdphibits_ != -1);
276 
277  FPGAWord iphisecondbin = secondvmstub.finephi();
278  FPGAWord iphithirdbin = thirdvmstub.finephi();
279 
280  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
281 
282  FPGAWord secondbend = secondvmstub.bend();
283  FPGAWord thirdbend = thirdvmstub.bend();
284 
285  index = (index << secondbend.nbits()) + secondbend.value();
286  index = (index << thirdbend.nbits()) + thirdbend.value();
287 
289  (index >= table_.size() || !table_[index])) {
290  if (settings_.debugTracklet()) {
291  edm::LogVerbatim("Tracklet")
292  << "Stub triplet rejected because of stub pt cut bends : "
293  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
294  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
295  }
296  continue;
297  }
299  if (index >= table_.size())
300  table_.resize(index + 1, false);
301  table_[index] = true;
302 
303  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
304  const string &tedName = stubpairs_.at(i)->getTEDName(j);
305  if (!tmpSPTable_.count(tedName))
306  tmpSPTable_[tedName];
307  if (spIndex >= tmpSPTable_.at(tedName).size())
308  tmpSPTable_.at(tedName).resize(spIndex + 1);
309  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
310  }
311 
312  if (settings_.debugTracklet())
313  edm::LogVerbatim("Tracklet") << "Adding layer-disk pair in " << getName();
314  if (settings_.writeMonitorData("Seeds")) {
315  ofstream fout("seeds.txt", ofstream::app);
316  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
317  fout.close();
318  }
319  stubtriplets_->addStubs(thirdvmstub.stub(),
320  (stubpairs_.at(i))->getVMStub1(j).stub(),
321  (stubpairs_.at(i))->getVMStub2(j).stub());
322  countpass++;
323  }
324  }
325  }
326  }
327 
328  else if (layer2_ == 3 && disk3_ == 1) {
329  int lookupbits = (int)((firstvmstub.vmbits().value() >> 10) & 1023);
330 
331  int newbin = (lookupbits & 127);
332  int bin = newbin / 8;
333 
334  int start = (bin >> 1);
335  int last = start + (bin & 1);
336 
337  for (int ibin = start; ibin <= last; ibin++) {
338  for (unsigned int k = 0; k < thirdvmstubs_.size(); k++) {
339  string vmsteSuffix = thirdvmstubs_.at(k)->getLastPartOfName();
340  vmsteSuffix = vmsteSuffix.substr(0, vmsteSuffix.find_last_of('n'));
341  if (stubpairs_.at(i)->getLastPartOfName() != vmsteSuffix)
342  continue;
343  for (unsigned int l = 0; l < thirdvmstubs_.at(k)->nVMStubsBinned(ibin); l++) {
344  if (countall >= settings_.maxStep("TRE"))
345  break;
346  countall++;
347 
348  const VMStubTE &thirdvmstub = thirdvmstubs_.at(k)->getVMStubTEBinned(ibin, l);
349 
350  assert(secondphibits_ != -1);
351  assert(thirdphibits_ != -1);
352 
353  unsigned int nvmsecond;
354 
355  nvmsecond = settings_.nallstubs(layer2_ - 1) * settings_.nvmte(1, iSeed_);
356  unsigned int nvmbitssecond = nbits(nvmsecond);
357 
358  FPGAWord iphisecondbin = secondvmstub.stub()->iphivmFineBins(nvmbitssecond, secondphibits_);
359 
360  //currentlty not using same number of bits as in the TED
361  //assert(iphisecondbin==(int)secondvmstub.finephi());
362  FPGAWord iphithirdbin = thirdvmstub.finephi();
363 
364  unsigned int index = (iphisecondbin.value() << thirdphibits_) + iphithirdbin.value();
365 
366  FPGAWord secondbend = secondvmstub.bend();
367  FPGAWord thirdbend = thirdvmstub.bend();
368 
369  index = (index << secondbend.nbits()) + secondbend.value();
370  index = (index << thirdbend.nbits()) + thirdbend.value();
371 
373  (index >= table_.size() || !table_[index])) {
374  if (settings_.debugTracklet()) {
375  edm::LogVerbatim("Tracklet")
376  << "Stub pair rejected because of stub pt cut bends : "
377  << benddecode(secondvmstub.bend().value(), secondvmstub.isPSmodule()) << " "
378  << benddecode(thirdvmstub.bend().value(), thirdvmstub.isPSmodule());
379  }
380  continue;
381  }
383  if (index >= table_.size())
384  table_.resize(index + 1, false);
385  table_[index] = true;
386 
387  const unsigned spIndex = stubpairs_.at(i)->getIndex(j);
388  const string &tedName = stubpairs_.at(i)->getTEDName(j);
389  if (!tmpSPTable_.count(tedName))
390  tmpSPTable_[tedName];
391  if (spIndex >= tmpSPTable_.at(tedName).size())
392  tmpSPTable_.at(tedName).resize(spIndex + 1);
393  tmpSPTable_.at(tedName).at(spIndex).push_back(stubpairs_.at(i)->getName());
394  }
395 
396  if (settings_.debugTracklet())
397  edm::LogVerbatim("Tracklet") << "Adding layer-disk pair in " << getName();
398  if (settings_.writeMonitorData("Seeds")) {
399  ofstream fout("seeds.txt", ofstream::app);
400  fout << __FILE__ << ":" << __LINE__ << " " << name_ << "_" << iSector_ << " " << iSeed_ << endl;
401  fout.close();
402  }
403  stubtriplets_->addStubs(thirdvmstub.stub(),
404  (stubpairs_.at(i))->getVMStub1(j).stub(),
405  (stubpairs_.at(i))->getVMStub2(j).stub());
406  countpass++;
407  }
408  }
409  }
410  }
411  }
412  }
413 
414  for (const auto &tedName : tmpSPTable_) {
415  for (unsigned spIndex = 0; spIndex < tedName.second.size(); spIndex++) {
416  if (tedName.second.at(spIndex).empty())
417  continue;
418  vector<string> entry(tedName.second.at(spIndex));
419  sort(entry.begin(), entry.end());
420  entry.erase(unique(entry.begin(), entry.end()), entry.end());
421  const string &spName = entry.at(0);
422 
423  if (!spTable_.count(tedName.first))
424  spTable_[tedName.first];
425  if (spIndex >= spTable_.at(tedName.first).size())
426  spTable_.at(tedName.first).resize(spIndex + 1);
427  if (!spTable_.at(tedName.first).at(spIndex).count(spName))
428  spTable_.at(tedName.first).at(spIndex)[spName] = 0;
429  spTable_.at(tedName.first).at(spIndex)[spName]++;
430  }
431  }
432 
433  if (settings_.writeMonitorData("TRE")) {
434  globals_->ofstream("tripletengine.txt") << getName() << " " << countall << " " << countpass << endl;
435  }
436 }

References trklet::StubTripletsMemory::addStubs(), cms::cuda::assert(), trklet::VMStubTE::bend(), trklet::benddecode(), newFWLiteAna::bin, count_, trklet::Settings::debugTracklet(), disk2_, disk3_, trklet::Settings::enableTripletTables(), mps_splice::entry, trklet::VMStubTE::finephi(), groupFilesInBlocks::fout, trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, mps_fire::i, if(), createfilelist::int, trklet::ProcessBase::iSector_, iSeed_, trklet::VMStubTE::isPSmodule(), dqmiolumiharvest::j, dqmdumpme::k, cmsLHEtoEOSManager::l, dqmdumpme::last, layer2_, layer3_, trklet::Settings::maxStep(), trklet::Settings::nallstubs(), trklet::ProcessBase::name_, trklet::ProcessBase::nbits(), trklet::FPGAWord::nbits(), trklet::Settings::NLONGVMBINS(), trklet::Settings::nvmte(), trklet::Globals::ofstream(), print(), alignCSCRings::s, secondphibits_, trklet::ProcessBase::settings_, jetUpdater_cfi::sort, spTable_, AlCaHLTBitMon_QueryRunRegistry::string, trklet::VMStubTE::stub(), stubpairs_, stubtriplets_, table_, thirdphibits_, thirdvmstubs_, tmpSPTable_, tier0::unique(), trklet::FPGAWord::value(), trklet::Settings::writeMonitorData(), and trklet::Settings::writeTripletTables().

◆ readTables()

void TripletEngine::readTables ( )

Definition at line 438 of file TripletEngine.cc.

438  {
439  ifstream fin;
440  string tableName, word;
441  unsigned num;
442 
443  string tablePath = settings_.tableTREFile();
444  unsigned int finddir = tablePath.find("table_TRE_");
445  tableName = tablePath.substr(0, finddir) + "table_" + name_ + ".txt";
446 
447  fin.open(tableName, ifstream::in);
448  if (!fin) {
449  throw cms::Exception("BadConfig") << "TripletEngine::readTables, file " << tableName << " not known";
450  }
451  while (!fin.eof()) {
452  fin >> word;
453  num = atoi(word.c_str());
454  table_.push_back(num > 0 ? true : false);
455  }
456  fin.close();
457 }

References Exception, groupFilesInBlocks::fin, recoMuon::in, trklet::ProcessBase::name_, EgammaValidation_cff::num, trklet::ProcessBase::settings_, table_, HLT_Fake1_cff::tableName, and trklet::Settings::tableTREFile().

Referenced by TripletEngine().

◆ writeTables()

void TripletEngine::writeTables ( )

Definition at line 459 of file TripletEngine.cc.

459  {
460  ofstream fout;
461  stringstream tableName;
462 
463  tableName << "table/table_" << name_ << "_" << iSector_ << ".txt";
464 
465  fout.open(tableName.str(), ofstream::out);
466  for (const auto &entry : table_)
467  fout << entry << endl;
468  fout.close();
469 
470  for (const auto &tedName : spTable_) {
471  tableName.str("");
472  tableName << "table/table_" << tedName.first << "_" << name_ << "_" << iSector_ << ".txt";
473 
474  fout.open(tableName.str(), ofstream::out);
475  for (const auto &entry : tedName.second) {
476  for (const auto &spName : entry)
477  fout << spName.first << ":" << spName.second << " ";
478  fout << endl;
479  }
480  fout.close();
481  }
482 }

References mps_splice::entry, groupFilesInBlocks::fout, trklet::ProcessBase::iSector_, trklet::ProcessBase::name_, MillePedeFileConverter_cfg::out, spTable_, table_, and HLT_Fake1_cff::tableName.

Referenced by ~TripletEngine().

Member Data Documentation

◆ count_

int trklet::TripletEngine::count_
private

Definition at line 33 of file TripletEngine.h.

Referenced by execute().

◆ dct1_

int trklet::TripletEngine::dct1_
private

Definition at line 41 of file TripletEngine.h.

Referenced by TripletEngine().

◆ dct2_

int trklet::TripletEngine::dct2_
private

Definition at line 42 of file TripletEngine.h.

Referenced by TripletEngine().

◆ dct3_

int trklet::TripletEngine::dct3_
private

Definition at line 43 of file TripletEngine.h.

Referenced by TripletEngine().

◆ disk1_

int trklet::TripletEngine::disk1_
private

Definition at line 38 of file TripletEngine.h.

Referenced by TripletEngine().

◆ disk2_

int trklet::TripletEngine::disk2_
private

Definition at line 39 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ disk3_

int trklet::TripletEngine::disk3_
private

Definition at line 40 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ iSeed_

int trklet::TripletEngine::iSeed_
private

Definition at line 66 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ layer1_

int trklet::TripletEngine::layer1_
private

Definition at line 35 of file TripletEngine.h.

Referenced by TripletEngine().

◆ layer2_

int trklet::TripletEngine::layer2_
private

Definition at line 36 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ layer3_

int trklet::TripletEngine::layer3_
private

Definition at line 37 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ phi1_

int trklet::TripletEngine::phi1_
private

Definition at line 44 of file TripletEngine.h.

Referenced by TripletEngine().

◆ phi2_

int trklet::TripletEngine::phi2_
private

Definition at line 45 of file TripletEngine.h.

Referenced by TripletEngine().

◆ phi3_

int trklet::TripletEngine::phi3_
private

Definition at line 46 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r1_

int trklet::TripletEngine::r1_
private

Definition at line 50 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r2_

int trklet::TripletEngine::r2_
private

Definition at line 51 of file TripletEngine.h.

Referenced by TripletEngine().

◆ r3_

int trklet::TripletEngine::r3_
private

Definition at line 52 of file TripletEngine.h.

Referenced by TripletEngine().

◆ secondphibits_

int trklet::TripletEngine::secondphibits_
private

Definition at line 63 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ spTable_

std::map<std::string, std::vector<std::map<std::string, unsigned> > > trklet::TripletEngine::spTable_
private

Definition at line 60 of file TripletEngine.h.

Referenced by execute(), and writeTables().

◆ stubpairs_

std::vector<StubPairsMemory*> trklet::TripletEngine::stubpairs_
private

Definition at line 55 of file TripletEngine.h.

Referenced by addInput(), execute(), and TripletEngine().

◆ stubtriplets_

StubTripletsMemory* trklet::TripletEngine::stubtriplets_
private

Definition at line 57 of file TripletEngine.h.

Referenced by addOutput(), and execute().

◆ table_

std::vector<bool> trklet::TripletEngine::table_
private

Definition at line 61 of file TripletEngine.h.

Referenced by execute(), readTables(), and writeTables().

◆ thirdphibits_

int trklet::TripletEngine::thirdphibits_
private

Definition at line 64 of file TripletEngine.h.

Referenced by execute(), and TripletEngine().

◆ thirdvmstubs_

std::vector<VMStubsTEMemory*> trklet::TripletEngine::thirdvmstubs_
private

Definition at line 54 of file TripletEngine.h.

Referenced by addInput(), execute(), and TripletEngine().

◆ tmpSPTable_

std::map<std::string, std::vector<std::vector<std::string> > > trklet::TripletEngine::tmpSPTable_
private

Definition at line 59 of file TripletEngine.h.

Referenced by execute().

◆ z1_

int trklet::TripletEngine::z1_
private

Definition at line 47 of file TripletEngine.h.

Referenced by TripletEngine().

◆ z2_

int trklet::TripletEngine::z2_
private

Definition at line 48 of file TripletEngine.h.

Referenced by TripletEngine().

◆ z3_

int trklet::TripletEngine::z3_
private

Definition at line 49 of file TripletEngine.h.

Referenced by TripletEngine().

mps_fire.i
i
Definition: mps_fire.py:428
trklet::TripletEngine::secondphibits_
int secondphibits_
Definition: TripletEngine.h:63
trklet::Settings::writetrace
bool writetrace() const
Definition: Settings.h:162
start
Definition: start.py:1
input
static const std::string input
Definition: EdmProvDump.cc:48
trklet::TripletEngine::tmpSPTable_
std::map< std::string, std::vector< std::vector< std::string > > > tmpSPTable_
Definition: TripletEngine.h:59
trklet::Settings::writeTripletTables
bool writeTripletTables() const
Definition: Settings.h:180
trklet::VMStubTE
Definition: VMStubTE.h:15
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
mps_splice.entry
entry
Definition: mps_splice.py:68
trklet::TripletEngine::dct3_
int dct3_
Definition: TripletEngine.h:43
memory
Definition: HGCRecHitSoA.h:20
trklet::TripletEngine::disk1_
int disk1_
Definition: TripletEngine.h:38
if
if(0==first)
Definition: CAHitNtupletGeneratorKernelsImpl.h:48
cms::cuda::assert
assert(be >=bs)
trklet::TripletEngine::phi2_
int phi2_
Definition: TripletEngine.h:45
trklet::ProcessBase::nbits
unsigned int nbits(unsigned int power)
Definition: ProcessBase.cc:29
trklet::ProcessBase::settings_
Settings const & settings_
Definition: ProcessBase.h:44
trklet::TripletEngine::layer1_
int layer1_
Definition: TripletEngine.h:35
trklet::TripletEngine::r3_
int r3_
Definition: TripletEngine.h:52
trklet::FPGAWord::nbits
int nbits() const
Definition: FPGAWord.h:25
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
trklet::TripletEngine::z1_
int z1_
Definition: TripletEngine.h:47
trklet::VMStubTE::isPSmodule
bool isPSmodule() const
Definition: VMStubTE.h:31
HLT_Fake1_cff.tableName
tableName
Definition: HLT_Fake1_cff.py:10
trklet::TripletEngine::thirdphibits_
int thirdphibits_
Definition: TripletEngine.h:64
trklet::VMStubTE::bend
const FPGAWord & bend() const
Definition: VMStubTE.h:25
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
alignCSCRings.s
s
Definition: alignCSCRings.py:92
dqmdumpme.last
last
Definition: dqmdumpme.py:56
trklet::Settings::enableTripletTables
bool enableTripletTables() const
Definition: Settings.h:179
trklet::TripletEngine::disk2_
int disk2_
Definition: TripletEngine.h:39
trklet::Settings::tableTREFile
std::string const & tableTREFile() const
Definition: Settings.h:53
groupFilesInBlocks.fin
fin
Definition: groupFilesInBlocks.py:94
dqmdumpme.k
k
Definition: dqmdumpme.py:60
trklet::TripletEngine::layer3_
int layer3_
Definition: TripletEngine.h:37
trklet::FPGAWord
Definition: FPGAWord.h:9
trklet::TripletEngine::r2_
int r2_
Definition: TripletEngine.h:51
trklet::TripletEngine::r1_
int r1_
Definition: TripletEngine.h:50
trklet::TripletEngine::table_
std::vector< bool > table_
Definition: TripletEngine.h:61
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::TripletEngine::thirdvmstubs_
std::vector< VMStubsTEMemory * > thirdvmstubs_
Definition: TripletEngine.h:54
trklet::Settings::nfinephi
int nfinephi(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:122
trklet::Settings::NLONGVMBINS
unsigned int NLONGVMBINS() const
Definition: Settings.h:295
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
trklet::VMStubTE::stub
const Stub * stub() const
Definition: VMStubTE.h:29
recoMuon::in
Definition: RecoMuonEnumerators.h:6
trklet::TripletEngine::spTable_
std::map< std::string, std::vector< std::map< std::string, unsigned > > > spTable_
Definition: TripletEngine.h:60
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
trklet::TripletEngine::count_
int count_
Definition: TripletEngine.h:33
createfilelist.int
int
Definition: createfilelist.py:10
trklet::TripletEngine::stubtriplets_
StubTripletsMemory * stubtriplets_
Definition: TripletEngine.h:57
trklet::TripletEngine::readTables
void readTables()
Definition: TripletEngine.cc:438
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
trklet::TripletEngine::phi1_
int phi1_
Definition: TripletEngine.h:44
trklet::TripletEngine::phi3_
int phi3_
Definition: TripletEngine.h:46
trklet::Settings::writeMonitorData
bool writeMonitorData(std::string module) const
Definition: Settings.h:96
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
trklet::Globals::ofstream
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Exception
Definition: hltDiff.cc:245
trklet::TripletEngine::disk3_
int disk3_
Definition: TripletEngine.h:40
trklet::ProcessBase::getName
std::string const & getName() const
Definition: ProcessBase.h:22
trklet::TripletEngine::z2_
int z2_
Definition: TripletEngine.h:48
trklet::TripletEngine::writeTables
void writeTables()
Definition: TripletEngine.cc:459
trklet::Settings::nvmte
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
Definition: Settings.h:88
trklet::ProcessBase::name_
std::string name_
Definition: ProcessBase.h:38
trklet::Settings::nallstubs
unsigned int nallstubs(unsigned int layerdisk) const
Definition: Settings.h:94
trklet::VMStubTE::finephi
const FPGAWord & finephi() const
Definition: VMStubTE.h:23
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
trklet::ProcessBase::iSector_
unsigned int iSector_
Definition: ProcessBase.h:39
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:161
trklet::TripletEngine::dct1_
int dct1_
Definition: TripletEngine.h:41
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
trklet::Settings::maxStep
unsigned int maxStep(std::string module) const
Definition: Settings.h:103
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
trklet::benddecode
double benddecode(int ibend, bool isPS)
Definition: Util.h:106
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
trklet::TripletEngine::stubpairs_
std::vector< StubPairsMemory * > stubpairs_
Definition: TripletEngine.h:55
trklet::ProcessBase::globals_
Globals * globals_
Definition: ProcessBase.h:45
trklet::ProcessBase::ProcessBase
ProcessBase(std::string name, Settings const &settings, Globals *global, unsigned int iSector)
Definition: ProcessBase.cc:14
trklet::StubTripletsMemory::addStubs
void addStubs(const Stub *stub1, const Stub *stub2, const Stub *stub3)
Definition: StubTripletsMemory.h:20
trklet::TripletEngine::dct2_
int dct2_
Definition: TripletEngine.h:42
edm::Log
Definition: MessageLogger.h:70
trklet::TripletEngine::iSeed_
int iSeed_
Definition: TripletEngine.h:66
trklet::TripletEngine::z3_
int z3_
Definition: TripletEngine.h:49
trklet::TripletEngine::layer2_
int layer2_
Definition: TripletEngine.h:36