19 string subname =
name_.substr(
pos, 2);
23 if (subname.substr(0, 1) ==
"L")
24 layer = stoi(subname.substr(1, 1));
25 else if (subname.substr(0, 1) ==
"D")
26 disk = stoi(subname.substr(1, 1));
28 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" name = " <<
name_ <<
" subname = " << subname
29 <<
" " <<
layer <<
" " << disk;
48 static const std::set<char> overlapset = {
49 'X',
'Y',
'W',
'Q',
'R',
'S',
'T',
'Z',
'x',
'y',
'w',
'q',
'r',
's',
't',
'z'};
50 overlap = overlapset.find(subname) != overlapset.end();
52 static const std::set<char> extraset = {
'I',
'J',
'K',
'L'};
53 extra = extraset.find(subname) != extraset.end();
55 static const std::set<char> extendedset = {
56 'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'x',
'y',
'z',
'w',
'q',
'r',
's',
't'};
57 extended = extendedset.find(subname) != extendedset.end();
62 size_t pos =
data.find(toSearch);
65 while (
pos != std::string::npos) {
67 data.replace(
pos, toSearch.size(), replaceStr);
69 pos =
data.find(toSearch,
pos + replaceStr.size());
74 if (not std::filesystem::exists(
dirName)) {
75 int fail = system((
string(
"mkdir -p ") +
dirName).c_str());
77 throw cms::Exception(
"BadDir") << __FILE__ <<
" " << __LINE__ <<
" could not create directory " <<
dirName;
104 throw cms::Exception(
"BadFile") << __FILE__ <<
" " << __LINE__ <<
" could not create file " <<
fname;
110 out_ <<
"BX = " << (bitset<3>)
bx_ <<
" Event : " <<
event_ << endl;
119 size_t found_pos = haystack.find(needle,
pos);
120 if (0 == nth || string::npos == found_pos)
122 return find_nth(haystack, found_pos + 1, needle, nth - 1);