10 using namespace trklet;
20 string subname =
name_.substr(pos, 2);
24 if (subname.substr(0, 1) ==
"L")
25 layer = stoi(subname.substr(1, 1));
26 else if (subname.substr(0, 1) ==
"D")
27 disk = stoi(subname.substr(1, 1));
29 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" name = " <<
name_ <<
" subname = " << subname
30 <<
" " << layer <<
" " << disk;
47 char subname =
name_[pos];
49 static const std::set<char> overlapset = {
50 'X',
'Y',
'W',
'Q',
'R',
'S',
'T',
'Z',
'x',
'y',
'w',
'q',
'r',
's',
't',
'z'};
51 overlap = overlapset.find(subname) != overlapset.end();
53 static const std::set<char> extraset = {
'I',
'J',
'K',
'L'};
54 extra = extraset.find(subname) != extraset.end();
56 static const std::set<char> extendedset = {
57 'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'x',
'y',
'z',
'w',
'q',
'r',
's',
't'};
58 extended = extendedset.find(subname) != extendedset.end();
63 size_t pos = data.find(toSearch);
66 while (pos != std::string::npos) {
68 data.replace(pos, toSearch.size(), replaceStr);
70 pos = data.find(toSearch, pos + replaceStr.size());
90 fname += std::to_string(
iSector_ + 1);
93 openfile(
out_, first, dirName, dirName + fname, __FILE__, __LINE__);
95 out_ <<
"BX = " << (bitset<3>)
bx_ <<
" Event : " <<
event_ << endl;
104 size_t found_pos = haystack.find(needle, pos);
105 if (0 == nth || string::npos == found_pos)
107 return find_nth(haystack, found_pos + 1, needle, nth - 1);
static size_t find_nth(const std::string &haystack, size_t pos, const std::string &needle, size_t nth)
void initSpecialSeeding(unsigned int pos, bool &overlap, bool &extra, bool &extended)
MemoryBase(std::string name, Settings const &settings)
void openFile(bool first, std::string dirName, std::string filebase)
constexpr std::array< uint8_t, layerIndexSize > layer
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
std::string const & getName() const
void findAndReplaceAll(std::string &data, std::string toSearch, std::string replaceStr)
char data[epos_bytes_allocation]
void initLayerDisk(unsigned int pos, int &layer, int &disk)
std::ofstream openfile(const std::string &dir, const std::string &fname, const char *file, int line)