9 #include <unordered_map> 15 : name_(
name), settings_(settings), globals_(global) {}
29 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
"nbits: power = " <<
power;
34 string subname =
name_.substr(
pos, 2);
37 if (subname.substr(0, 1) ==
"L")
38 layer = stoi(subname.substr(1, 1));
39 else if (subname.substr(0, 1) ==
"D")
40 disk = stoi(subname.substr(1, 1));
42 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" " <<
name_ <<
" subname = " << subname <<
" " 43 << layer <<
" " << disk;
49 layerdisk = layer - 1;
67 if (
name_.substr(0, 3) ==
"TE_") {
68 if (
name_[3] ==
'L') {
69 layerdisk1 =
name_[4] -
'1';
70 }
else if (
name_[3] ==
'D') {
73 if (
name_[11] ==
'L') {
74 layerdisk2 =
name_[12] -
'1';
75 }
else if (
name_[11] ==
'D') {
77 }
else if (
name_[12] ==
'L') {
78 layerdisk2 =
name_[13] -
'1';
79 }
else if (
name_[12] ==
'D') {
84 if ((
name_.substr(0, 3) ==
"TC_") || (
name_.substr(0, 3) ==
"TP_")) {
85 if (
name_[3] ==
'L') {
86 layerdisk1 =
name_[4] -
'1';
87 }
else if (
name_[3] ==
'D') {
90 if (
name_[5] ==
'L') {
91 layerdisk2 =
name_[6] -
'1';
92 }
else if (
name_[5] ==
'D') {
114 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
" layerdisk1 " << layerdisk1 <<
" layerdisk2 " 120 std::size_t
pos =
name.find(
'_');
122 pos = name1.find(
'_');
125 unordered_map<string, unsigned int> seedmap = {
126 {
"L1L2", 0}, {
"L2L3", 1}, {
"L3L4", 2}, {
"L5L6", 3}, {
"D1D2", 4}, {
"D3D4", 5}, {
"L1D1", 6},
127 {
"L2D1", 7}, {
"L1L2XX", 0}, {
"L2L3XX", 1}, {
"L3L4XX", 2}, {
"L5L6XX", 3}, {
"D1D2XX", 4}, {
"D3D4XX", 5},
128 {
"L1D1XX", 6}, {
"L2D1XX", 7}, {
"L3L4L2", 8}, {
"L5L6L4", 9}, {
"L2L3D1", 10}, {
"D1D2L2", 11}};
130 if (
found != seedmap.end())
131 return found->second;
134 <<
" - " << name1 <<
" - " <<
name2;
void initLayerDisksandISeed(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
ProcessBase(std::string name, Settings const &settings, Globals *global)
unsigned int nbits(unsigned int power)
void initLayerDisk(unsigned int pos, int &layer, int &disk)
unsigned int getISeed(const std::string &name)
std::string const & getName() const