Imports an SRP configuration file (stored in database "CLOB") into a Selective readout setting object.
- Parameters
-
sr | [in] ECAL selective readout setting object to set |
f | configuration file stream. A stringstream can be used if the configuration is available as an stl string of a c-string: stringstream buf; buf << s; |
debug | verbosity flag. If true, imported parameter are displayed on stdout. |
Definition at line 187 of file EcalSRCondTools.cc.
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())
References EcalSRSettings::actions_, cms::cuda::assert(), EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxOffsets_, gather_cfg::cout, ztail::d, EcalSRSettings::dccMasks_, dccNum, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, Exception, f, mps_splice::line, nChs, EcalSRSettings::nDccs_, EcalSRSettings::nSrps_, EcalSRSettings::nTccs_, EcalSRSettings::srfMasks_, EcalSRSettings::srpMasksFromConfig_, EcalSRSettings::substitutionSrfs_, EcalSRSettings::tccMasksFromConfig_, tccNum, EcalSRSettings::testerDccTestSrpIds_, EcalSRSettings::testerSrpEmuSrpIds_, EcalSRSettings::testerSrpTestSrpIds_, EcalSRSettings::testerTccEmuSrpIds_, tokenize(), trim(), and relativeConstraints::value.
Referenced by analyze(), and popcon::EcalSRPHandler::getNewObjects().