27 { 36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5},
28 { 24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11},
29 { 30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17},
31 { 54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1},
32 { 42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1},
33 { 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1},
35 { 72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1},
36 { 60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1},
37 { 66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1},
39 { 90, 73, 74, 75, 76, 77,108, 91, 92, 93, 94, 95},
40 { 78, 79, 80, 81, 82, 83, 96, 97, 98, 99,100,101},
41 { 84, 85, 86, 87, 88, 89,102,103,104,105,106,107}
45 { 1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1},
46 { 4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1},
47 { 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1},
48 { 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1},
49 { 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1},
50 { 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1},
51 { 28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1},
52 { 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1},
53 { 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1},
54 { 46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1},
55 { 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1},
56 { 52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1}
71 static bool done =
false;
77 const bool iomode_read =
false;
78 const bool iomode_write =
true;
80 if(mode ==
"online_config" || mode ==
"combine_config"){
83 ifstream
f(fname.c_str());
90 if(mode==
"python_config" || mode==
"combine_config"){
91 iomode = iomode_write;
99 if(!(mode==
"python_config" || mode ==
"online_config" || mode ==
"combine_config" || (mode==
"read"))){
100 throw cms::Exception(
"Config") <<
"Invalid value," << mode <<
", for parameter mode. "
101 <<
"Valid values: online_config, python_config, combine_config, read";
104 if(iomode==iomode_write){
110 if( !db.isAvailable() ){
111 throw cms::Exception(
"CondDBAccess") <<
"Failed to connect to PoolDBOutputService\n";
116 db->writeOne(sr,firstSinceTime,
"EcalSRSettingsRcd");
122 cout <<
"EcalSRSettings record not found. Check the Cond DB Global tag.\n";
125 cout <<
"ECAL Seletive readout settings:\n";
126 cout << *sr <<
"\n" << endl;
133 cout <<
"EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
138 cout <<
"Error: TPG physics record is of unexpected size: "
139 << mymap.size() <<
" elements instead of two (one for EB, one for EE)\n";
141 EcalTPGPhysicsConstMap::const_iterator it=mymap.begin();
142 cout <<
"----------------------------------------------------------------------\n"
143 "Trigger tower Et thresholds extracted from TPG configuration \n"
144 "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
145 cout<<
"EB: " <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
146 <<
"HT = "<< it->second.ttf_threshold_High <<
" GeV\n";
148 cout<<
"EE: " <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV "
149 <<
"HT = "<< it->second.ttf_threshold_High <<
" GeV\n";
166 const std::vector<double>&
w = ps.
getParameter<std::vector<double> >(
"dccNormalizedWeights");
215 const int nValueSets = 6*EcalSRSettings::nSrps_+9;
217 stringstream sErr(
"");
218 while(!f.eof() && sErr.str().empty()){
222 if(line[0] ==
'#' || line.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();
407 if(hwWeight & (1<<11)) hwWeight |= ~0xEFF;
408 return hwWeight/1024.;
416 while(pos0<len &&
find(delim.begin(), delim.end(), s[pos0])!=delim.end()){
419 if(pos0==len)
return "";
420 pos = s.find_first_of(delim, pos0);
421 return s.substr(pos0, (pos>0?pos:len)-pos0);
426 if(pos0==string::npos){
430 if(pos1==string::npos){
433 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_
const std::map< uint32_t, Item > & getMap() const
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_
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap
float eeDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EE.
std::vector< std::vector< short > > srpMasksFromConfig_