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 //
29 SiPixelFakeQualityESSource::SiPixelFakeQualityESSource(const edm::ParameterSet& conf_) : fp_(conf_.getParameter<edm::FileInPath>("file"))
30 {
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 {
40 
41  // do anything here that needs to be done at desctruction time
42  // (e.g. close files, deallocate resources etc.)
43 
44 }
45 
46 std::unique_ptr<SiPixelQuality> SiPixelFakeQualityESSource::produce(const SiPixelQualityFromDbRcd & )
47 {
48 
49 
51  // errortype "whole" = int 0 in DB BadRocs = 65535 //
52  // errortype "tbmA" = int 1 in DB BadRocs = 255 //
53  // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 //
54  // errortype "none" = int 3 in DB //
56 
58 
60  BadModule.DetID = 1; BadModule.errorType = 0; BadModule.BadRocs = 65535; obj->addDisabledModule(BadModule);
61 
62  return std::unique_ptr<SiPixelQuality>(obj);
63 
64 }
65 
67  const edm::IOVSyncValue& iosv,
68  edm::ValidityInterval& oValidity ) {
70  oValidity = infinity;
71 }
void addDisabledModule(disabledModuleType module)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
SiPixelFakeQualityESSource(const edm::ParameterSet &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static const IOVSyncValue & beginOfTime()
virtual std::unique_ptr< SiPixelQuality > produce(const SiPixelQualityFromDbRcd &)
const double infinity
HLT enums.