Imports an SRP configuration file (stored in database "CLOB") into a Selective readout setting object.
217 stringstream sErr(
"");
218 while(!
f.eof() && sErr.str().empty()){
227 if(iValueSet>=nValueSets)
break;
232 int nChs[nValueSets] = {
234 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
236 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
238 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
240 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
242 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
244 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
265 while(((sValue =
tokenize(
line,
" \t", pos))!=
string(
""))
266 && (iCh<nChs[iValueSet]) && sErr.str().empty()){
267 value = strtoul(sValue.c_str(), 0, 0);
270 assert((
unsigned)iSrp <
sizeof(
tccNum) /
sizeof(
tccNum[0]));
271 assert((
unsigned)iCh <
sizeof(
tccNum[0]) /
sizeof(
tccNum[0][0]));
272 int tcc =
tccNum[iSrp][iCh];
274 if(d)
cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- "
278 }
else if(iValueSet<24){
279 if(d)
cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- "
282 }
else if(iValueSet<36) {
283 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
284 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
285 int dcc =
dccNum[iSrp][iCh];
287 assert((
unsigned)(dcc-1) < sr.
dccMasks_.size());
288 if(d)
cout <<
"dccMasks_[" << (dcc-1) <<
"] <- "
292 }
else if(iValueSet<48){
293 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
294 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
295 int dcc =
dccNum[iSrp][iCh];
297 if(d)
cout <<
"srfMasks_[" << (dcc-1) <<
"] <- "
299 assert((
unsigned)(dcc-1) < sr.
srfMasks_.size());
302 }
else if(iValueSet<60){
305 if(d)
cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- "
308 }
else if(iValueSet<72){
312 if(d)
cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- "
318 if(d)
cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- "
324 if(d)
cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- "
330 if(d)
cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- "
335 sErr <<
"Syntax error in SRP system configuration "
336 <<
" line " << iLine <<
".";
338 }
else if(iValueSet<73){
340 if(d)
cout <<
"bxOffset_[" << iCh <<
"] <- "
343 }
else if(iValueSet<74){
353 throw cms::Exception(
"OutOfRange") <<
"Value of parameter algo ," << algo
354 <<
", is invalid. Valid values are 0 and 1.";
357 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
358 }
else if(iValueSet<75){
359 assert((
unsigned)iCh < sr.
actions_.size());
360 if(d)
cout <<
"actions_[" << iCh <<
"] <- "
363 }
else if(iValueSet<76){
367 }
else if(iValueSet<77){
371 }
else if(iValueSet<78){
375 }
else if (iValueSet<79){
379 }
else if (iValueSet<80){
383 }
else if (iValueSet<81){
392 if(iCh!=nChs[iValueSet]){
393 sErr <<
"Syntax error in imported SRP system configuration file "
394 " line " << iLine <<
".";
397 if(sErr.str().empty() && iValueSet!=(nValueSets-1)){
398 sErr <<
"Syntax Error in imported SRP system configuration file "
399 " line " << iLine <<
".";
401 if(sErr.str().size()!=0)
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_