Imports an SRP configuration file (stored in database "CLOB") into a Selective readout setting object.
214 stringstream sErr(
"");
215 while(!
f.eof() && sErr.str().empty()){
224 if(iValueSet>=nValueSets)
break;
229 int nChs[nValueSets] = {
231 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
233 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
235 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
237 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
239 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
241 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
262 while(((sValue =
tokenize(
line,
" \t", pos))!=
string(
""))
263 && (iCh<nChs[iValueSet]) && sErr.str().empty()){
264 value = strtoul(sValue.c_str(),
nullptr, 0);
267 assert((
unsigned)iSrp <
sizeof(
tccNum) /
sizeof(
tccNum[0]));
268 assert((
unsigned)iCh <
sizeof(
tccNum[0]) /
sizeof(
tccNum[0][0]));
269 int tcc =
tccNum[iSrp][iCh];
271 if(
d)
cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- " 275 }
else if(iValueSet<24){
276 if(
d)
cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- " 279 }
else if(iValueSet<36) {
280 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
281 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
282 int dcc =
dccNum[iSrp][iCh];
284 assert((
unsigned)(dcc-1) < sr.
dccMasks_.size());
285 if(
d)
cout <<
"dccMasks_[" << (dcc-1) <<
"] <- " 289 }
else if(iValueSet<48){
290 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
291 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
292 int dcc =
dccNum[iSrp][iCh];
294 if(
d)
cout <<
"srfMasks_[" << (dcc-1) <<
"] <- " 296 assert((
unsigned)(dcc-1) < sr.
srfMasks_.size());
299 }
else if(iValueSet<60){
302 if(
d)
cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- " 305 }
else if(iValueSet<72){
309 if(
d)
cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- " 315 if(
d)
cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- " 321 if(
d)
cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- " 327 if(
d)
cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- " 332 sErr <<
"Syntax error in SRP system configuration " 333 <<
" line " << iLine <<
".";
335 }
else if(iValueSet<73){
337 if(
d)
cout <<
"bxOffset_[" << iCh <<
"] <- " 340 }
else if(iValueSet<74){
350 throw cms::Exception(
"OutOfRange") <<
"Value of parameter algo ," << algo
351 <<
", is invalid. Valid values are 0 and 1.";
354 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
355 }
else if(iValueSet<75){
356 assert((
unsigned)iCh < sr.
actions_.size());
357 if(
d)
cout <<
"actions_[" << iCh <<
"] <- " 360 }
else if(iValueSet<76){
364 }
else if(iValueSet<77){
368 }
else if(iValueSet<78){
372 }
else if (iValueSet<79){
376 }
else if (iValueSet<80){
380 }
else if (iValueSet<81){
389 if(iCh!=nChs[iValueSet]){
390 sErr <<
"Syntax error in imported SRP system configuration file " 391 " line " << iLine <<
".";
394 if(sErr.str().empty() && iValueSet!=(nValueSets-1)){
395 sErr <<
"Syntax Error in imported SRP system configuration file " 396 " line " << iLine <<
".";
398 if(!sErr.str().empty())
throw cms::Exception(
"SyntaxError") << sErr.str();
std::vector< short > srfMasks_
std::vector< int > testerSrpEmuSrpIds_
std::vector< int > actions_
std::vector< std::vector< short > > substitutionSrfs_
std::vector< int > testerDccTestSrpIds_
std::vector< short > tccMasksFromConfig_
std::vector< short > bxOffsets_
std::vector< short > dccMasks_
std::vector< int > deltaPhi_
std::vector< int > testerTccEmuSrpIds_
std::vector< int > deltaEta_
std::vector< int > testerSrpTestSrpIds_
std::vector< std::vector< short > > srpMasksFromConfig_