#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_ |
bool | iomode_write_ |
const std::string | mode_ |
const edm::ParameterSet | ps_ |
edm::ESGetToken < EcalTPGPhysicsConst, EcalTPGPhysicsConstRcd > | tpgPhysicsConstToken_ |
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) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
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) |
void | resetItemsToGetFrom (BranchType iType) |
Definition at line 19 of file EcalSRCondTools.h.
EcalSRCondTools::EcalSRCondTools | ( | const edm::ParameterSet & | ps | ) |
Constructor
ps | analyser configuration |
Definition at line 55 of file EcalSRCondTools.cc.
References edm::EDConsumerBase::esConsumes(), hSrToken_, iomode_write_, mode_, and tpgPhysicsConstToken_.
|
override |
|
overridevirtual |
Called by CMSSW event loop
evt | the event |
es | events setup |
Implements edm::one::EDAnalyzerBase.
Definition at line 66 of file EcalSRCondTools.cc.
References EcalSRSettings::automaticMasks_, EcalSRSettings::automaticSrpSelect_, EcalSRSettings::bxGlobalOffset_, gather_cfg::cout, EcalCondDB::db, done_, Exception, validate-o2o-wbm::f, alignmentValidation::fname, edm::EventSetup::getHandle(), EcalTPGPhysicsConst::getMap(), edm::ParameterSet::getParameter(), hSrToken_, importParameterSet(), importSrpConfigFile(), iomode_write_, edm::ESHandleBase::isValid(), mode_, edm::ESHandle< class >::product(), ps_, cmsswSequenceInfo::tp, and tpgPhysicsConstToken_.
|
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 140 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 178 of file EcalSRCondTools.cc.
References EcalSRSettings::actions_, cms::cuda::assert(), 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 458 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 466 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 481 of file EcalSRCondTools.cc.
Referenced by importSrpConfigFile().
|
private |
Definition at line 78 of file EcalSRCondTools.h.
Referenced by analyze().
|
private |
Definition at line 80 of file EcalSRCondTools.h.
Referenced by analyze(), and EcalSRCondTools().
|
private |
Definition at line 77 of file EcalSRCondTools.h.
Referenced by analyze(), and EcalSRCondTools().
|
private |
Definition at line 76 of file EcalSRCondTools.h.
Referenced by analyze(), and EcalSRCondTools().
|
private |
Definition at line 74 of file EcalSRCondTools.h.
Referenced by analyze().
|
private |
Definition at line 81 of file EcalSRCondTools.h.
Referenced by analyze(), and EcalSRCondTools().