25 { 36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5},
26 { 24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11},
27 { 30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17},
29 { 54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1},
30 { 42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1},
31 { 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1},
33 { 72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1},
34 { 60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1},
35 { 66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1},
37 { 90, 73, 74, 75, 76, 77,108, 91, 92, 93, 94, 95},
38 { 78, 79, 80, 81, 82, 83, 96, 97, 98, 99,100,101},
39 { 84, 85, 86, 87, 88, 89,102,103,104,105,106,107}
43 { 1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1},
44 { 4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1},
45 { 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1},
46 { 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1},
47 { 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1},
48 { 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1},
49 { 28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1},
50 { 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1},
51 { 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1},
52 { 46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1},
53 { 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1},
54 { 52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1}
69 static bool done =
false;
75 const bool iomode_read =
false;
76 const bool iomode_write =
true;
78 if(mode ==
"online_config" || mode ==
"combine_config"){
81 ifstream
f(fname.c_str());
88 if(mode==
"python_config" || mode==
"combine_config"){
89 iomode = iomode_write;
97 if(!(mode==
"python_config" || mode ==
"online_config" || mode ==
"combine_config" || (mode==
"read"))){
98 throw cms::Exception(
"Config") <<
"Invalid value," << mode <<
", for parameter mode. "
99 <<
"Valid values: online_config, python_config, combine_config, read";
102 if(iomode==iomode_write){
108 if( !db.isAvailable() ){
109 throw cms::Exception(
"CondDBAccess") <<
"Failed to connect to PoolDBOutputService\n";
114 db->writeOne(sr,firstSinceTime,
"EcalSRSettingsRcd");
120 cout <<
"ECAL Seletive readout settings:\n";
121 cout << *sr <<
"\n" << endl;
135 const std::vector<double>& w = ps.
getParameter<std::vector<double> >(
"dccNormalizedWeights");
184 const int nValueSets = 6*EcalSRSettings::nSrps_+9;
186 stringstream sErr(
"");
187 while(!f.eof() && sErr.str().empty()){
191 if(line[0] ==
'#' || line.empty()){
196 if(iValueSet>=nValueSets)
break;
201 int nChs[nValueSets] = {
203 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
205 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
207 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
209 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
211 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
213 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
234 while(((sValue =
tokenize(line,
" \t", pos))!=
string(
""))
235 && (iCh<nChs[iValueSet]) && sErr.str().empty()){
236 value = strtoul(sValue.c_str(), 0, 0);
239 assert((
unsigned)iSrp <
sizeof(
tccNum) /
sizeof(
tccNum[0]));
240 assert((
unsigned)iCh <
sizeof(
tccNum[0]) /
sizeof(
tccNum[0][0]));
241 int tcc =
tccNum[iSrp][iCh];
243 if(d)
cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- "
247 }
else if(iValueSet<24){
248 if(d)
cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- "
251 }
else if(iValueSet<36) {
252 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
253 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
254 int dcc =
dccNum[iSrp][iCh];
256 assert((
unsigned)(dcc-1) < sr.
dccMasks_.size());
257 if(d)
cout <<
"dccMasks_[" << (dcc-1) <<
"] <- "
261 }
else if(iValueSet<48){
262 assert((
unsigned)iSrp <
sizeof(
dccNum) /
sizeof(
dccNum[0]));
263 assert((
unsigned)iCh <
sizeof(
dccNum[0]) /
sizeof(
dccNum[0][0]));
264 int dcc =
dccNum[iSrp][iCh];
266 if(d)
cout <<
"srfMasks_[" << (dcc-1) <<
"] <- "
268 assert((
unsigned)(dcc-1) < sr.
srfMasks_.size());
271 }
else if(iValueSet<60){
274 if(d)
cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- "
277 }
else if(iValueSet<72){
281 if(d)
cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- "
287 if(d)
cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- "
293 if(d)
cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- "
299 if(d)
cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- "
304 sErr <<
"Syntax error in SRP system configuration "
305 <<
" line " << iLine <<
".";
307 }
else if(iValueSet<73){
309 if(d)
cout <<
"bxOffset_[" << iCh <<
"] <- "
312 }
else if(iValueSet<74){
322 throw cms::Exception(
"OutOfRange") <<
"Value of parameter algo ," << algo
323 <<
", is invalid. Valid values are 0 and 1.";
326 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
327 }
else if(iValueSet<75){
328 assert((
unsigned)iCh < sr.
actions_.size());
329 if(d)
cout <<
"actions_[" << iCh <<
"] <- "
332 }
else if(iValueSet<76){
336 }
else if(iValueSet<77){
340 }
else if(iValueSet<78){
344 }
else if (iValueSet<79){
348 }
else if (iValueSet<80){
352 }
else if (iValueSet<81){
361 if(iCh!=nChs[iValueSet]){
362 sErr <<
"Syntax error in imported SRP system configuration file "
363 " line " << iLine <<
".";
366 if(sErr.str().empty() && iValueSet!=(nValueSets-1)){
367 sErr <<
"Syntax Error in imported SRP system configuration file "
368 " line " << iLine <<
".";
370 if(sErr.str().size()!=0)
throw cms::Exception(
"SyntaxError") << sErr.str();
376 if(hwWeight & (1<<11)) hwWeight |= ~0xEFF;
377 return hwWeight/1024.;
385 while(pos0<len &&
find(delim.begin(), delim.end(), s[pos0])!=delim.end()){
388 if(pos0==len)
return "";
389 pos = s.find_first_of(delim, pos0);
390 return s.substr(pos0, (pos>0?pos:len)-pos0);
395 if(pos0==string::npos){
399 if(pos1==string::npos){
402 return s.substr(pos0, pos1-pos0);
T getParameter(std::string const &) const
std::vector< short > srfMasks_
std::vector< std::vector< float > > dccNormalizedWeights_
std::vector< int > testerSrpEmuSrpIds_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< float > srpHighInterestChannelZS_
std::vector< int > actions_
unsigned long long Time_t
std::vector< std::vector< short > > substitutionSrfs_
std::vector< int > testerDccTestSrpIds_
std::vector< int > ecalDccZs1stSample_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< short > tccMasksFromConfig_
std::vector< short > bxOffsets_
std::vector< short > dccMasks_
std::vector< int > deltaPhi_
std::vector< int > symetricZS_
T const * product() const
float ebDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EB.
std::vector< int > testerTccEmuSrpIds_
std::vector< float > srpLowInterestChannelZS_
std::vector< int > deltaEta_
std::vector< int > testerSrpTestSrpIds_
float eeDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EE.
std::vector< std::vector< short > > srpMasksFromConfig_