27 {36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5},
28 {24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11},
29 {30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17},
31 {54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1},
32 {42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1},
33 {48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1},
35 {72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1},
36 {60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1},
37 {66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1},
39 {90, 73, 74, 75, 76, 77, 108, 91, 92, 93, 94, 95},
40 {78, 79, 80, 81, 82, 83, 96, 97, 98, 99, 100, 101},
41 {84, 85, 86, 87, 88, 89, 102, 103, 104, 105, 106, 107}
45 {1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1},
46 {4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1},
47 {7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1},
48 {10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1},
49 {16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1},
50 {22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1},
51 {28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1},
52 {34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1},
53 {40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1},
54 {46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1},
55 {49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1},
56 {52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1}
72 bool iomode_write =
true;
73 if (
mode ==
"online_config" ||
mode ==
"combine_config") {
82 if (
mode ==
"python_config" ||
mode ==
"combine_config") {
90 if (!(
mode ==
"python_config" ||
mode ==
"online_config" ||
mode ==
"combine_config" || (
mode ==
"read"))) {
92 <<
"Valid values: online_config, python_config, combine_config, read";
101 if (!
db.isAvailable()) {
102 throw cms::Exception(
"CondDBAccess") <<
"Failed to connect to PoolDBOutputService\n";
107 db->writeOne(sr, firstSinceTime,
"EcalSRSettingsRcd");
113 cout <<
"EcalSRSettings record not found. Check the Cond DB Global tag.\n";
116 cout <<
"ECAL Seletive readout settings:\n";
117 cout << *ssr <<
"\n" << endl;
124 cout <<
"EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
128 if (mymap.size() != 2) {
129 cout <<
"Error: TPG physics record is of unexpected size: " << mymap.size()
130 <<
" elements instead of two (one for EB, one for EE)\n";
132 EcalTPGPhysicsConstMap::const_iterator it = mymap.begin();
133 cout <<
"----------------------------------------------------------------------\n"
134 "Trigger tower Et thresholds extracted from TPG configuration \n"
135 "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
137 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
138 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
141 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
142 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
159 const std::vector<double>&
w = ps.
getParameter<std::vector<double> >(
"dccNormalizedWeights");
210 stringstream sErr(
"");
211 while (!
f.eof() && sErr.str().empty()) {
215 if (
line[0] ==
'#' ||
line.empty()) {
220 if (iValueSet >= nValueSets)
226 int nChs[nValueSets] = {
325 while (((sValue =
tokenize(
line,
" \t",
pos)) !=
string(
"")) && (iCh <
nChs[iValueSet]) && sErr.str().empty()) {
326 value = strtoul(sValue.c_str(),
nullptr, 0);
328 if (iValueSet < 12) {
331 int tcc =
tccNum[iSrp][iCh];
334 cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- " <<
value <<
"\n";
337 }
else if (iValueSet < 24) {
339 cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
341 }
else if (iValueSet < 36) {
344 int dcc =
dccNum[iSrp][iCh];
348 cout <<
"dccMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
351 }
else if (iValueSet < 48) {
354 int dcc =
dccNum[iSrp][iCh];
357 cout <<
"srfMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
361 }
else if (iValueSet < 60) {
365 cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
367 }
else if (iValueSet < 72) {
372 cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
378 cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
384 cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
390 cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
394 sErr <<
"Syntax error in SRP system configuration "
395 <<
" line " << iLine <<
".";
397 }
else if (iValueSet < 73) {
400 cout <<
"bxOffset_[" << iCh <<
"] <- " <<
value <<
"\n";
402 }
else if (iValueSet < 74) {
413 <<
"Value of parameter algo ," <<
algo <<
", is invalid. Valid values are 0 and 1.";
417 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
418 }
else if (iValueSet < 75) {
421 cout <<
"actions_[" << iCh <<
"] <- " <<
value <<
"\n";
423 }
else if (iValueSet < 76) {
427 }
else if (iValueSet < 77) {
431 }
else if (iValueSet < 78) {
435 }
else if (iValueSet < 79) {
439 }
else if (iValueSet < 80) {
443 }
else if (iValueSet < 81) {
452 if (iCh !=
nChs[iValueSet]) {
453 sErr <<
"Syntax error in imported SRP system configuration file "
458 if (sErr.str().empty() && iValueSet != (nValueSets - 1)) {
459 sErr <<
"Syntax Error in imported SRP system configuration file "
463 if (!sErr.str().empty())
470 if (hwWeight & (1 << 11))
472 return hwWeight / 1024.;
481 while (pos0 < len &&
find(delim.begin(), delim.end(),
s[pos0]) != delim.end()) {
486 pos =
s.find_first_of(delim, pos0);
487 return s.substr(pos0, (
pos > 0 ?
pos : len) - pos0);
492 if (pos0 == string::npos) {
496 if (pos1 == string::npos) {
499 return s.substr(pos0, pos1 - pos0);