#include <EcalSRCondTools.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &evt, const edm::EventSetup &es) |
EcalSRCondTools (const edm::ParameterSet &) | |
void | importSrpConfigFile (EcalSRSettings &sr, std::istream &f, bool debug=false) |
~EcalSRCondTools () | |
Public Member Functions inherited from edm::EDAnalyzer | |
EDAnalyzer () | |
std::string | workerType () const |
virtual | ~EDAnalyzer () |
Static Public Member Functions | |
static void | importParameterSet (EcalSRSettings &sr, const edm::ParameterSet &ps) |
static double | normalizeWeights (int hwWeight) |
Static Public Member Functions inherited from edm::EDAnalyzer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Static Private Member Functions | |
static std::string | tokenize (const std::string &s, const std::string &delim, int &pos) |
static std::string | trim (std::string s) |
Private Attributes | |
edm::ParameterSet | ps_ |
Additional Inherited Members | |
Public Types inherited from edm::EDAnalyzer | |
typedef EDAnalyzer | ModuleType |
typedef WorkerT< EDAnalyzer > | WorkerType |
Protected Member Functions inherited from edm::EDAnalyzer | |
CurrentProcessingContext const * | currentContext () const |
Definition at line 15 of file EcalSRCondTools.h.
EcalSRCondTools::EcalSRCondTools | ( | const edm::ParameterSet & | ps | ) |
EcalSRCondTools::~EcalSRCondTools | ( | ) |
|
virtual |
Called by CMSSW event loop
evt | the event |
es | events setup |
Implements edm::EDAnalyzer.
Definition at line 68 of file EcalSRCondTools.cc.
References EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxGlobalOffset_, gather_cfg::cout, EcalCondDB::db, generateEDF::done, edm::hlt::Exception, f, alignmentValidation::fname, edm::EventSetup::get(), edm::ParameterSet::getParameter(), importParameterSet(), importSrpConfigFile(), mode, edm::ESHandle< class >::product(), and ps_.
|
static |
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 125 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_, and EcalSRSettings::symetricZS_.
Referenced by 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 163 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxOffsets_, gather_cfg::cout, EcalSRSettings::dccMasks_, dccNum, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, edm::hlt::Exception, geometryCSVtoXML::line, nChs, EcalSRSettings::nDccs_, EcalSRSettings::nSrps_, EcalSRSettings::nTccs_, pos, EcalSRSettings::srfMasks_, EcalSRSettings::srpMasksFromConfig_, EcalSRSettings::substitutionSrfs_, EcalSRSettings::tccMasksFromConfig_, tccNum, EcalSRSettings::testerDccTestSrpIds_, EcalSRSettings::testerSrpEmuSrpIds_, EcalSRSettings::testerSrpTestSrpIds_, EcalSRSettings::testerTccEmuSrpIds_, tokenize(), trim(), and relativeConstraints::value.
Referenced by analyze().
|
static |
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 373 of file EcalSRCondTools.cc.
|
staticprivate |
Help function to tokenize a string
s | string to parse token delimiters internal string position pointer. Must be set to zero before the first call |
Definition at line 380 of file EcalSRCondTools.cc.
References spr::find(), and pos.
Referenced by importSrpConfigFile().
|
staticprivate |
Help function to trim spaces at beginning and end of a string
s | string to trim |
Definition at line 393 of file EcalSRCondTools.cc.
Referenced by importSrpConfigFile().
|
private |
Definition at line 73 of file EcalSRCondTools.h.
Referenced by analyze().