#include <EcalSRCondTools.h>
Public Member Functions | |
void | analyze (const edm::Event &evt, const edm::EventSetup &es) override |
EcalSRCondTools (const edm::ParameterSet &) | |
~EcalSRCondTools () override | |
Public Member Functions inherited from edm::one::EDAnalyzer<> | |
EDAnalyzer ()=default | |
Public Member Functions inherited from edm::one::EDAnalyzerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
EDAnalyzerBase () | |
ModuleDescription const & | moduleDescription () const |
~EDAnalyzerBase () override | |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
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::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 | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
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 ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
Definition at line 14 of file EcalSRCondTools.h.
EcalSRCondTools::EcalSRCondTools | ( | const edm::ParameterSet & | ps | ) |
|
override |
|
override |
Called by CMSSW event loop
evt | the event |
es | events setup |
Definition at line 70 of file EcalSRCondTools.cc.
References EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxGlobalOffset_, gather_cfg::cout, done_, Exception, f, alignmentValidation::fname, edm::EventSetup::get(), EcalTPGPhysicsConst::getMap(), edm::ParameterSet::getParameter(), importParameterSet(), importSrpConfigFile(), edm::ESHandleBase::isValid(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, edm::ESHandle< T >::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 153 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, popcon2dropbox::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 191 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, patPFMETCorrections_cff::algo, EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxOffsets_, gather_cfg::cout, EcalSRSettings::dccMasks_, dccNum, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, Exception, geometryCSVtoXML::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 401 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 408 of file EcalSRCondTools.cc.
References spr::find().
Referenced by importSrpConfigFile().
|
staticprivate |
Help function to trim spaces at beginning and end of a string
s | string to trim |
Definition at line 421 of file EcalSRCondTools.cc.
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().