9 StubPairsMemory::StubPairsMemory(
string name,
Settings const& settings,
unsigned int iSector)
15 std::ostringstream oss;
16 oss << dirSP <<
"StubPairs_" <<
getName() <<
"_" << std::setfill(
'0') << std::setw(2) << (
iSector_ + 1) <<
".dat";
17 auto const&
fname = oss.str();
23 if (not std::filesystem::exists(dirSP)) {
24 int fail = system((
string(
"mkdir -p ") + dirSP).c_str());
26 throw cms::Exception(
"BadDir") << __FILE__ <<
" " << __LINE__ <<
" could not create directory " << dirSP;
30 throw cms::Exception(
"BadFile") << __FILE__ <<
" " << __LINE__ <<
" could not create file " <<
fname;
35 out_ <<
"BX = " << (bitset<3>)
bx_ <<
" Event : " <<
event_ << endl;
37 for (
unsigned int j = 0;
j <
stubs_.size();
j++) {
38 string stub1index =
stubs_[
j].first.stub()->stubindex().str();
39 string stub2index =
stubs_[
j].second.stub()->stubindex().str();
41 out_ << std::setfill(
'0') << std::setw(2);
43 out_ <<
" " << stub1index <<
"|" << stub2index <<
" " <<
trklet::hexFormat(stub1index + stub2index) << endl;