CMS 3D CMS Logo

SiStripBadStripFromQualityDBWriter.cc
Go to the documentation of this file.
10 
12 public:
15 
16  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
17 
18  void endRun(edm::Run const&, edm::EventSetup const&) override;
20 
21 private:
23  uint32_t openIOVAtTime_;
25 };
26 
28  : rcdName_{iConfig.getParameter<std::string>("record")},
29  openIOVAt_{iConfig.getUntrackedParameter<std::string>("OpenIovAt", "beginOfTime")},
30  openIOVAtTime_{iConfig.getUntrackedParameter<uint32_t>("OpenIovAtTime", 1)},
31  withFedErrHelper_{iConfig, consumesCollector(), true} {}
32 
35  desc.add<std::string>("record", "");
36  desc.addUntracked<std::string>("OpenIovAt", "beginOfTime");
37  desc.addUntracked<uint32_t>("OpenIovAtTime", 1);
39  descriptions.add("siStripBadStripFromQualityDBWriter", desc);
40 }
41 
43  withFedErrHelper_.endRun(iSetup);
44 }
45 
47  auto payload = std::make_unique<SiStripBadStrip>(withFedErrHelper_.getMergedQuality(getter));
50  if (dbservice.isAvailable()) {
51  if (openIOVAt_ == "beginOfTime")
52  time = dbservice->beginOfTime();
53  else if (openIOVAt_ == "currentTime")
54  time = dbservice->currentTime();
55  else
57 
58  dbservice->writeOne(payload.release(), time, rcdName_);
59  } else {
60  edm::LogError("SiStripBadStripFromQualityDBWriter") << "Service is unavailable" << std::endl;
61  }
62 }
63 
SiStripQualityWithFromFedErrorsHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &desc)
Definition: SiStripQualityWithFromFedErrorsHelper.h:62
ConfigurationDescriptions.h
SiStripBadStripFromQualityDBWriter::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: SiStripBadStripFromQualityDBWriter.cc:42
DQMEDHarvester.h
SiStripQualityWithFromFedErrorsHelper::getMergedQuality
const SiStripQuality & getMergedQuality(dqm::harvesting::DQMStore::IGetter &getter)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:201
SiStripQualityWithFromFedErrorsHelper
Definition: SiStripQualityWithFromFedErrorsHelper.h:42
MessageLogger.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
edm::Run
Definition: Run.h:45
SiStripBadStripFromQualityDBWriter::rcdName_
std::string rcdName_
Definition: SiStripBadStripFromQualityDBWriter.cc:22
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SiStripBadStripFromQualityDBWriter::withFedErrHelper_
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
Definition: SiStripBadStripFromQualityDBWriter.cc:24
protons_cff.time
time
Definition: protons_cff.py:35
SiStripBadStrip.h
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
SiStripBadStripFromQualityDBWriter::~SiStripBadStripFromQualityDBWriter
~SiStripBadStripFromQualityDBWriter() override
Definition: SiStripBadStripFromQualityDBWriter.cc:14
SiStripBadStripFromQualityDBWriter::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: SiStripBadStripFromQualityDBWriter.cc:46
SiStripBadStripFromQualityDBWriter
Definition: SiStripBadStripFromQualityDBWriter.cc:11
MakerMacros.h
PoolDBOutputService.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
Service.h
SiStripQualityWithFromFedErrorsHelper.h
jets_cff.payload
payload
Definition: jets_cff.py:32
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
SiStripBadStripFromQualityDBWriter::openIOVAt_
std::string openIOVAt_
Definition: SiStripBadStripFromQualityDBWriter.cc:22
edm::ParameterSet
Definition: ParameterSet.h:47
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
edm::Service< cond::service::PoolDBOutputService >
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripBadStripFromQualityDBWriter::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SiStripBadStripFromQualityDBWriter.cc:33
DQMEDHarvester
Definition: DQMEDHarvester.py:1
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiStripBadStripFromQualityDBWriter::openIOVAtTime_
uint32_t openIOVAtTime_
Definition: SiStripBadStripFromQualityDBWriter.cc:23
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripBadStripFromQualityDBWriter::SiStripBadStripFromQualityDBWriter
SiStripBadStripFromQualityDBWriter(const edm::ParameterSet &)
Definition: SiStripBadStripFromQualityDBWriter.cc:27
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:217
SiStripQualityWithFromFedErrorsHelper::endRun
bool endRun(const edm::EventSetup &)
Definition: SiStripQualityWithFromFedErrorsHelper.cc:186