CMS 3D CMS Logo

SiStripQualityWithFromFedErrorsHelper.h
Go to the documentation of this file.
1 #ifndef CALIBTRACKER_SISTRIPESPRODUCERS_INTERFACE_SISTRIPQUALITYHELPERS_H
2 #define CALIBTRACKER_SISTRIPESPRODUCERS_INTERFACE_SISTRIPQUALITYHELPERS_H
3 
4 #include <memory>
13 
15 
16 namespace sistrip {
21  std::unique_ptr<SiStripQuality> badStripFromFedErr(dqm::harvesting::DQMStore::IGetter& dqmStore,
22  const SiStripFedCabling& fedCabling,
23  float cutoff);
24 
30  std::unique_ptr<SiStripQuality> badStripFromFedErrLegacyDQMFile(const std::string& fileName,
31  unsigned int runNumber,
32  const SiStripFedCabling& fedCabling,
33  float cutoff);
34 
40 } // namespace sistrip
41 
43 public:
46  bool keepCopy = false) {
47  const auto& fedErrConfig = iConfig.getParameter<edm::ParameterSet>("BadComponentsFromFedErrors");
48  addBadCompFromFedErr_ = fedErrConfig.getParameter<bool>("Add");
49  fedErrCutoff_ = float(fedErrConfig.getParameter<double>("Cutoff"));
50  fedErrLegacyFile_ = fedErrConfig.getParameter<std::string>("LegacyDQMFile");
51  fedErrFileRunNumber_ = fedErrConfig.getParameter<unsigned int>("FileRunNumber");
53  edm::ESInputTag{"", iConfig.getParameter<std::string>("StripQualityLabel")});
56  }
57  // can be set if a copy should be made even if BadComponentsFromFedErrors is false
58  // (e.g. for producing a new payloads)
59  keepCopy_ = keepCopy || addBadCompFromFedErr_;
60  }
61 
63  desc.add<std::string>("StripQualityLabel", "");
65  descFedErr.add<bool>("Add", false);
66  descFedErr.add<double>("Cutoff", 0.8);
67  descFedErr.add<std::string>("LegacyDQMFile", "");
68  descFedErr.add<unsigned int>("FileRunNumber", -1);
69  desc.add<edm::ParameterSetDescription>("BadComponentsFromFedErrors", descFedErr);
70  }
71 
72  bool endRun(const edm::EventSetup&);
74 
77 
78 private:
79  bool addBadCompFromFedErr_ = false;
82  unsigned int fedErrFileRunNumber_;
86  std::unique_ptr<SiStripFedCabling> fedCabling_;
87  std::unique_ptr<SiStripQuality> mergedQuality_;
88  bool merged_ = false;
89  bool keepCopy_;
90 };
91 
92 #endif // CALIBTRACKER_SISTRIPESPRODUCERS_INTERFACE_SISTRIPQUALITYHELPERS_H
SiStripQualityWithFromFedErrorsHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &desc)
Definition: SiStripQualityWithFromFedErrorsHelper.h:62
SiStripQualityWithFromFedErrorsHelper::getMergedQuality
const SiStripQuality & getMergedQuality(dqm::harvesting::DQMStore::IGetter &getter)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:201
SiStripQualityWithFromFedErrorsHelper::stripQualityToken_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
Definition: SiStripQualityWithFromFedErrorsHelper.h:83
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
SiStripQualityWithFromFedErrorsHelper
Definition: SiStripQualityWithFromFedErrorsHelper.h:42
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
edm::ESWatcher< SiStripQualityRcd >
SiStripQualityWithFromFedErrorsHelper::fedErrCutoff_
float fedErrCutoff_
Definition: SiStripQualityWithFromFedErrorsHelper.h:80
sistrip::badStripFromFedErr
std::unique_ptr< SiStripQuality > badStripFromFedErr(dqm::harvesting::DQMStore::IGetter &dqmStore, const SiStripFedCabling &fedCabling, float cutoff)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:152
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SiStripFedCabling.h
DQMStore.h
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
SiStripQualityWithFromFedErrorsHelper::fedCabling_
std::unique_ptr< SiStripFedCabling > fedCabling_
Definition: SiStripQualityWithFromFedErrorsHelper.h:86
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
SiStripQualityWithFromFedErrorsHelper::merged_
bool merged_
Definition: SiStripQualityWithFromFedErrorsHelper.h:88
ParameterSetDescription.h
SiStripQualityWithFromFedErrorsHelper::keepCopy_
bool keepCopy_
Definition: SiStripQualityWithFromFedErrorsHelper.h:89
SiStripQualityWithFromFedErrorsHelper::SiStripQualityWithFromFedErrorsHelper
SiStripQualityWithFromFedErrorsHelper(const edm::ParameterSet &iConfig, edm::ConsumesCollector iC, bool keepCopy=false)
Definition: SiStripQualityWithFromFedErrorsHelper.h:44
L1TBPTX_cfi.dqmStore
dqmStore
Definition: L1TBPTX_cfi.py:6
SiStripQualityWithFromFedErrorsHelper::addBadCompFromFedErr_
bool addBadCompFromFedErr_
Definition: SiStripQualityWithFromFedErrorsHelper.h:79
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripQualityWithFromFedErrorsHelper::mergedQuality_
std::unique_ptr< SiStripQuality > mergedQuality_
Definition: SiStripQualityWithFromFedErrorsHelper.h:87
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< SiStripQuality, SiStripQualityRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripQualityWithFromFedErrorsHelper::fedErrLegacyFile_
std::string fedErrLegacyFile_
Definition: SiStripQualityWithFromFedErrorsHelper.h:81
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
SiStripQualityWithFromFedErrorsHelper::fedErrFileRunNumber_
unsigned int fedErrFileRunNumber_
Definition: SiStripQualityWithFromFedErrorsHelper.h:82
EcalSCDynamicDPhiParametersESProducer_cfi.cutoff
cutoff
Definition: EcalSCDynamicDPhiParametersESProducer_cfi.py:15
ESWatcher.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiStripQuality.h
SiStripQualityWithFromFedErrorsHelper::stripQualityWatcher_
edm::ESWatcher< SiStripQualityRcd > stripQualityWatcher_
Definition: SiStripQualityWithFromFedErrorsHelper.h:85
SiStripQualityRcd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripQualityWithFromFedErrorsHelper::fedCablingToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
Definition: SiStripQualityWithFromFedErrorsHelper.h:84
ConsumesCollector.h
ParameterSet.h
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10
SiStripQualityWithFromFedErrorsHelper::addBadCompFromFedErr
bool addBadCompFromFedErr() const
Definition: SiStripQualityWithFromFedErrorsHelper.h:75
edm::Transition::EndRun
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
SiStripQualityWithFromFedErrorsHelper::qualityToken
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > & qualityToken() const
Definition: SiStripQualityWithFromFedErrorsHelper.h:76
SiStripQualityWithFromFedErrorsHelper::endRun
bool endRun(const edm::EventSetup &)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:186
sistrip::badStripFromFedErrLegacyDQMFile
std::unique_ptr< SiStripQuality > badStripFromFedErrLegacyDQMFile(const std::string &fileName, unsigned int runNumber, const SiStripFedCabling &fedCabling, float cutoff)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:168
SiStripQuality
Definition: SiStripQuality.h:32