#include <EcalSRCondTools.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &evt, const edm::EventSetup &es) |
EcalSRCondTools (const edm::ParameterSet &) | |
~EcalSRCondTools () | |
Public Member Functions inherited from edm::EDAnalyzer | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
EDAnalyzer () | |
ModuleDescription const & | moduleDescription () const |
std::string | workerType () const |
virtual | ~EDAnalyzer () |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
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::EDAnalyzer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &) |
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 |
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 | ) |
EcalSRCondTools::~EcalSRCondTools | ( | ) |
|
virtual |
Called by CMSSW event loop
evt | the event |
es | events setup |
Implements edm::EDAnalyzer.
Definition at line 70 of file EcalSRCondTools.cc.
References EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxGlobalOffset_, gather_cfg::cout, EcalCondDB::db, run_regression::done, edm::hlt::Exception, f, alignmentValidation::fname, edm::EventSetup::get(), EcalTPGPhysicsConst::getMap(), edm::ParameterSet::getParameter(), importParameterSet(), importSrpConfigFile(), edm::ESHandleBase::isValid(), alignBH_cfg::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 156 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 194 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, ecalcalib_dqm_sourceclient-live_cfg::algo, assert(), 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_, 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 404 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 411 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 424 of file EcalSRCondTools.cc.
Referenced by importSrpConfigFile().
|
private |
Definition at line 72 of file EcalSRCondTools.h.
Referenced by analyze().