#include <EcalSRCondTools.h>
Static Public Member Functions | |
static void | importParameterSet (EcalSRSettings &sr, const edm::ParameterSet &ps) |
static void | importSrpConfigFile (EcalSRSettings &sr, std::istream &f, bool debug=false) |
static double | normalizeWeights (int hwWeight) |
Static Public Member Functions inherited from edm::one::EDAnalyzerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (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 | |
bool | done_ |
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd > | hSrToken_ |
edm::ParameterSet | ps_ |
Additional Inherited Members | |
Public Types inherited from edm::one::EDAnalyzerBase | |
typedef EDAnalyzerBase | ModuleType |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Protected Member Functions inherited from edm::EDConsumerBase | |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () noexcept |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) noexcept |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
Definition at line 16 of file EcalSRCondTools.h.
EcalSRCondTools::EcalSRCondTools | ( | const edm::ParameterSet & | ps | ) |
|
override |
|
overridevirtual |
Called by CMSSW event loop
evt | the event |
es | events setup |
Implements edm::one::EDAnalyzerBase.
Definition at line 65 of file EcalSRCondTools.cc.
References EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxGlobalOffset_, gather_cfg::cout, dqmiodatasetharvest::db, done_, Exception, f, alignmentValidation::fname, edm::EventSetup::get(), get, edm::EventSetup::getHandle(), edm::ParameterSet::getParameter(), hSrToken_, importParameterSet(), importSrpConfigFile(), edm::ESHandleBase::isValid(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, edm::ESHandle< T >::product(), ps_, and cmsswSequenceInfo::tp.
|
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 148 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 analyze(), and EcalSelectiveReadoutProducer::EcalSelectiveReadoutProducer().
|
static |
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 186 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, cms::cuda::assert(), EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxOffsets_, gather_cfg::cout, ztail::d, 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 analyze(), and popcon::EcalSRPHandler::getNewObjects().
|
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 466 of file EcalSRCondTools.cc.
|
staticprivate |
Help function to tokenize a string
s | string to parse @delim token delimiters @pos internal string position pointer. Must be set to zero before the first call |
Definition at line 474 of file EcalSRCondTools.cc.
References spr::find(), and alignCSCRings::s.
Referenced by importSrpConfigFile().
|
staticprivate |
Help function to trim spaces at beginning and end of a string
s | string to trim |
Definition at line 489 of file EcalSRCondTools.cc.
References alignCSCRings::s.
Referenced by importSrpConfigFile().
|
private |
Definition at line 74 of file EcalSRCondTools.h.
Referenced by analyze().
|
private |
Definition at line 72 of file EcalSRCondTools.h.
Referenced by analyze().
|
private |
Definition at line 71 of file EcalSRCondTools.h.
Referenced by analyze().