26 {36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5},
27 {24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11},
28 {30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17},
30 {54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1},
31 {42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1},
32 {48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1},
34 {72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1},
35 {60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1},
36 {66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1},
38 {90, 73, 74, 75, 76, 77, 108, 91, 92, 93, 94, 95},
39 {78, 79, 80, 81, 82, 83, 96, 97, 98, 99, 100, 101},
40 {84, 85, 86, 87, 88, 89, 102, 103, 104, 105, 106, 107}
44 {1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1},
45 {4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1},
46 {7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1},
47 {10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1},
48 {16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1},
49 {22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1},
50 {28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1},
51 {34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1},
52 {40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1},
53 {46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1},
54 {49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1},
55 {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");
112 cout <<
"EcalSRSettings record not found. Check the Cond DB Global tag.\n";
115 cout <<
"ECAL Seletive readout settings:\n";
116 cout << *ssr <<
"\n" << endl;
123 cout <<
"EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
127 if (mymap.size() != 2) {
128 cout <<
"Error: TPG physics record is of unexpected size: " << mymap.size()
129 <<
" elements instead of two (one for EB, one for EE)\n";
131 EcalTPGPhysicsConstMap::const_iterator it = mymap.begin();
132 cout <<
"----------------------------------------------------------------------\n"
133 "Trigger tower Et thresholds extracted from TPG configuration \n"
134 "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
136 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
137 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
140 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
141 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
158 const std::vector<double>&
w = ps.
getParameter<std::vector<double> >(
"dccNormalizedWeights");
209 stringstream sErr(
"");
210 while (!
f.eof() && sErr.str().empty()) {
214 if (
line[0] ==
'#' ||
line.empty()) {
219 if (iValueSet >= nValueSets)
225 int nChs[nValueSets] = {
324 while (((sValue =
tokenize(
line,
" \t",
pos)) !=
string(
"")) && (iCh <
nChs[iValueSet]) && sErr.str().empty()) {
325 value = strtoul(sValue.c_str(),
nullptr, 0);
327 if (iValueSet < 12) {
330 int tcc =
tccNum[iSrp][iCh];
333 cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- " <<
value <<
"\n";
336 }
else if (iValueSet < 24) {
338 cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
340 }
else if (iValueSet < 36) {
343 int dcc =
dccNum[iSrp][iCh];
347 cout <<
"dccMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
350 }
else if (iValueSet < 48) {
353 int dcc =
dccNum[iSrp][iCh];
356 cout <<
"srfMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
360 }
else if (iValueSet < 60) {
364 cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
366 }
else if (iValueSet < 72) {
371 cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
377 cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
383 cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
389 cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
393 sErr <<
"Syntax error in SRP system configuration "
394 <<
" line " << iLine <<
".";
396 }
else if (iValueSet < 73) {
399 cout <<
"bxOffset_[" << iCh <<
"] <- " <<
value <<
"\n";
401 }
else if (iValueSet < 74) {
412 <<
"Value of parameter algo ," <<
algo <<
", is invalid. Valid values are 0 and 1.";
416 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
417 }
else if (iValueSet < 75) {
420 cout <<
"actions_[" << iCh <<
"] <- " <<
value <<
"\n";
422 }
else if (iValueSet < 76) {
426 }
else if (iValueSet < 77) {
430 }
else if (iValueSet < 78) {
434 }
else if (iValueSet < 79) {
438 }
else if (iValueSet < 80) {
442 }
else if (iValueSet < 81) {
451 if (iCh !=
nChs[iValueSet]) {
452 sErr <<
"Syntax error in imported SRP system configuration file "
457 if (sErr.str().empty() && iValueSet != (nValueSets - 1)) {
458 sErr <<
"Syntax Error in imported SRP system configuration file "
462 if (!sErr.str().empty())
469 if (hwWeight & (1 << 11))
471 return hwWeight / 1024.;
480 while (pos0 < len &&
find(delim.begin(), delim.end(),
s[pos0]) != delim.end()) {
485 pos =
s.find_first_of(delim, pos0);
486 return s.substr(pos0, (
pos > 0 ?
pos : len) - pos0);
491 if (pos0 == string::npos) {
495 if (pos1 == string::npos) {
498 return s.substr(pos0, pos1 - pos0);