21 {36, 19, 20, 21, 22, 23, 18, 1, 2, 3, 4, 5},
22 {24, 25, 26, 27, 28, 29, 6, 7, 8, 9, 10, 11},
23 {30, 31, 32, 33, 34, 35, 12, 13, 14, 15, 16, 17},
25 {54, 37, 38, 39, 40, 41, -1, -1, -1, -1, -1, -1},
26 {42, 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, -1},
27 {48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1, -1},
29 {72, 55, 56, 57, 58, 59, -1, -1, -1, -1, -1, -1},
30 {60, 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, -1},
31 {66, 67, 68, 69, 70, 71, -1, -1, -1, -1, -1, -1},
33 {90, 73, 74, 75, 76, 77, 108, 91, 92, 93, 94, 95},
34 {78, 79, 80, 81, 82, 83, 96, 97, 98, 99, 100, 101},
35 {84, 85, 86, 87, 88, 89, 102, 103, 104, 105, 106, 107}
39 {1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1},
40 {4, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1},
41 {7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1},
42 {10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1},
43 {16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1},
44 {22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1},
45 {28, 29, 30, 31, 32, 33, -1, -1, -1, -1, -1, -1},
46 {34, 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, -1},
47 {40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1},
48 {46, 47, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1},
49 {49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1},
50 {52, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1}
56 : ps_(ps), mode_(ps.getParameter<
string>(
"mode")), iomode_write_(
true), done_(
false) {
57 if (
mode_ ==
"read") {
71 if (
mode_ ==
"online_config" ||
mode_ ==
"combine_config") {
80 if (
mode_ ==
"python_config" ||
mode_ ==
"combine_config") {
84 if (!(
mode_ ==
"python_config" ||
mode_ ==
"online_config" ||
mode_ ==
"combine_config" || (
mode_ ==
"read"))) {
86 <<
"Valid values: online_config, python_config, combine_config, read";
95 if (!
db.isAvailable()) {
96 throw cms::Exception(
"CondDBAccess") <<
"Failed to connect to PoolDBOutputService\n";
101 db->writeOneIOV(sr, firstSinceTime,
"EcalSRSettingsRcd");
106 cout <<
"EcalSRSettings record not found. Check the Cond DB Global tag.\n";
109 cout <<
"ECAL Seletive readout settings:\n";
110 cout << *ssr <<
"\n" << endl;
116 cout <<
"EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
120 if (mymap.size() != 2) {
121 cout <<
"Error: TPG physics record is of unexpected size: " << mymap.size()
122 <<
" elements instead of two (one for EB, one for EE)\n";
124 EcalTPGPhysicsConstMap::const_iterator it = mymap.begin();
125 cout <<
"----------------------------------------------------------------------\n" 126 "Trigger tower Et thresholds extracted from TPG configuration \n" 127 "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
129 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV " 130 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
133 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV " 134 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
150 const std::vector<double>&
w = ps.
getParameter<std::vector<double> >(
"dccNormalizedWeights");
201 stringstream sErr(
"");
202 while (!
f.eof() && sErr.str().empty()) {
206 if (
line[0] ==
'#' ||
line.empty()) {
211 if (iValueSet >= nValueSets)
217 int nChs[nValueSets] = {
316 while (((sValue =
tokenize(
line,
" \t",
pos)) !=
string(
"")) && (iCh <
nChs[iValueSet]) && sErr.str().empty()) {
317 value = strtoul(sValue.c_str(),
nullptr, 0);
319 if (iValueSet < 12) {
322 int tcc =
tccNum[iSrp][iCh];
325 cout <<
"tccMasksFromConfig_[" << tcc <<
"] <- " <<
value <<
"\n";
328 }
else if (iValueSet < 24) {
330 cout <<
"srpMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
332 }
else if (iValueSet < 36) {
335 int dcc =
dccNum[iSrp][iCh];
339 cout <<
"dccMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
342 }
else if (iValueSet < 48) {
345 int dcc =
dccNum[iSrp][iCh];
348 cout <<
"srfMasks_[" << (dcc - 1) <<
"] <- " <<
value <<
"\n";
352 }
else if (iValueSet < 60) {
356 cout <<
"substitutionMasks_[" << iSrp <<
"][" << iCh <<
"] <- " <<
value <<
"\n";
358 }
else if (iValueSet < 72) {
363 cout <<
"testerTccEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
369 cout <<
"testerSrpEmuSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
375 cout <<
"testerDccTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
381 cout <<
"testerSrpTestSrpIds_[" << iSrp <<
"] <- " <<
value <<
"\n";
385 sErr <<
"Syntax error in SRP system configuration " 386 <<
" line " << iLine <<
".";
388 }
else if (iValueSet < 73) {
391 cout <<
"bxOffset_[" << iCh <<
"] <- " <<
value <<
"\n";
393 }
else if (iValueSet < 74) {
404 <<
"Value of parameter algo ," <<
algo <<
", is invalid. Valid values are 0 and 1.";
408 <<
"deltaPhi_[0] <- " << sr.
deltaPhi_[0] <<
"\n";
409 }
else if (iValueSet < 75) {
412 cout <<
"actions_[" << iCh <<
"] <- " <<
value <<
"\n";
414 }
else if (iValueSet < 76) {
418 }
else if (iValueSet < 77) {
422 }
else if (iValueSet < 78) {
426 }
else if (iValueSet < 79) {
430 }
else if (iValueSet < 80) {
434 }
else if (iValueSet < 81) {
443 if (iCh !=
nChs[iValueSet]) {
444 sErr <<
"Syntax error in imported SRP system configuration file " 449 if (sErr.str().empty() && iValueSet != (nValueSets - 1)) {
450 sErr <<
"Syntax Error in imported SRP system configuration file " 454 if (!sErr.str().empty())
461 if (hwWeight & (1 << 11))
463 return hwWeight / 1024.;
472 while (pos0 < len &&
find(delim.begin(), delim.end(),
s[pos0]) != delim.end()) {
477 pos =
s.find_first_of(delim, pos0);
478 return s.substr(pos0, (
pos > 0 ?
pos : len) - pos0);
483 if (pos0 == string::npos) {
487 if (pos1 == string::npos) {
490 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_
T const * product() const
unsigned long long Time_t
std::vector< std::vector< short > > substitutionSrfs_
std::vector< int > testerDccTestSrpIds_
std::vector< int > ecalDccZs1stSample_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::vector< short > tccMasksFromConfig_
std::vector< short > bxOffsets_
std::vector< short > dccMasks_
std::vector< int > deltaPhi_
std::vector< int > symetricZS_
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_