Functions | |
void | importParameterSet (EcalSRSettings &sr, const edm::ParameterSet &ps) |
void | importSrpConfigFile (EcalSRSettings &sr, std::istream &f, bool debug=false) |
double | normalizeWeights (int hwWeight) |
string | tokenize (const string &s, const string &delim, int &pos) |
std::string | trim (std::string s) |
void ecalsrcondtools::importParameterSet | ( | EcalSRSettings & | sr, |
const edm::ParameterSet & | ps | ||
) |
Converts CMSSW python file selective readout setting ("parameter set") into a condition database object. Configuration from parameter set covers only part of the config, mainly the configuration needed for SR emulation in the MC. The parameters not supported by python configuration are left untouched in the sr object.
sr | [in] ECAL selective readout setting object to set |
ps | CMSSW parameter set containing the SR parameters to set |
Definition at line 80 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, filterCSVwithJSON::copy, EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, EcalSRSettings::ebDccAdcToGeV_, EcalSRSettings::ecalDccZs1stSample_, EcalSRSettings::eeDccAdcToGeV_, edm::ParameterSet::getParameter(), EcalSRSettings::srpHighInterestChannelZS_, EcalSRSettings::srpLowInterestChannelZS_, EcalSRSettings::symetricZS_, and w().
Referenced by module::EcalSRCondTools::analyze(), and EcalSelectiveReadoutProducer::EcalSelectiveReadoutProducer().
void ecalsrcondtools::importSrpConfigFile | ( | EcalSRSettings & | sr, |
std::istream & | f, | ||
bool | debug = false |
||
) |
Imports an SRP configuration file (stored in database "CLOB") into a Selective readout setting object.
sr | [in] ECAL selective readout setting object to set |
f | configuration file stream. A stringstream can be used if the configuration is available as an stl string of a c-string: stringstream buf; buf << s; |
debug | verbosity flag. If true, imported parameter are displayed on stdout. |
Definition at line 118 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, cms::cuda::assert(), EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxOffsets_, gather_cfg::cout, ztail::d, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::dcc(), EcalSRSettings::dccMasks_, dccNum, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, Exception, f, mps_splice::line, nChs, EcalSRSettings::nDccs_, EcalSRSettings::nSrps_, EcalSRSettings::nTccs_, EcalSRSettings::srfMasks_, EcalSRSettings::srpMasksFromConfig_, EcalSRSettings::substitutionSrfs_, EcalSRSettings::tccMasksFromConfig_, tccNum, EcalSRSettings::testerDccTestSrpIds_, EcalSRSettings::testerSrpEmuSrpIds_, EcalSRSettings::testerSrpTestSrpIds_, EcalSRSettings::testerTccEmuSrpIds_, tokenize(), trim(), and relativeConstraints::value.
Referenced by module::EcalSRCondTools::analyze(), and popcon::EcalSRPHandler::getNewObjects().
double ecalsrcondtools::normalizeWeights | ( | int | hwWeight | ) |
convert hardware weights (interger weights) into normalized weights. The former reprensentation is used in DCC firmware and in online databaser, while the later is used in offline software.
Definition at line 398 of file EcalSRCondTools.cc.
string ecalsrcondtools::tokenize | ( | const string & | s, |
const string & | delim, | ||
int & | pos | ||
) |
Definition at line 53 of file EcalSRCondTools.cc.
References spr::find(), and alignCSCRings::s.
Referenced by importSrpConfigFile().
std::string ecalsrcondtools::trim | ( | std::string | s | ) |