CMS 3D CMS Logo

SiPixelFakeQualityESSource.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelFakeQualityESSource
4 // Class: SiPixelFakeQualityESSource
5 //
13 //
14 // Original Author: Bernadette Heyburn
15 // Created: Oct 21 2008
16 //
17 //
18 
19 // user include files
20 
26 //
27 // constructors and destructor
28 //
30  : fp_(conf_.getParameter<edm::FileInPath>("file")) {
31  edm::LogInfo("SiPixelFakeQualityESSource::SiPixelFakeQualityESSource");
32  //the following line is needed to tell the framework what
33  // data is being produced
34  setWhatProduced(this);
35  findingRecord<SiPixelQualityFromDbRcd>();
36 }
37 
39  // do anything here that needs to be done at desctruction time
40  // (e.g. close files, deallocate resources etc.)
41 }
42 
43 std::unique_ptr<SiPixelQuality> SiPixelFakeQualityESSource::produce(const SiPixelQualityFromDbRcd&) {
45  // errortype "whole" = int 0 in DB BadRocs = 65535 //
46  // errortype "tbmA" = int 1 in DB BadRocs = 255 //
47  // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 //
48  // errortype "none" = int 3 in DB //
50 
52 
54  BadModule.DetID = 1;
55  BadModule.errorType = 0;
56  BadModule.BadRocs = 65535;
57  obj->addDisabledModule(BadModule);
58 
59  return std::unique_ptr<SiPixelQuality>(obj);
60 }
61 
63  const edm::IOVSyncValue& iosv,
64  edm::ValidityInterval& oValidity) {
66  oValidity = infinity;
67 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
SiPixelFakeQualityESSource(const edm::ParameterSet &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
virtual std::unique_ptr< SiPixelQuality > produce(const SiPixelQualityFromDbRcd &)
const double infinity
Log< level::Info, false > LogInfo
HLT enums.