CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CalibTracker/SiPixelESProducers/plugins/SiPixelFakeCPEGenericErrorParmESSource.cc

Go to the documentation of this file.
00001 #include "CalibTracker/SiPixelESProducers/interface/SiPixelFakeCPEGenericErrorParmESSource.h"
00002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00003 
00004 SiPixelFakeCPEGenericErrorParmESSource::SiPixelFakeCPEGenericErrorParmESSource(const edm::ParameterSet& conf_) : fp_(conf_.getParameter<edm::FileInPath>("file")), version_(conf_.getParameter<double>("version"))
00005 {
00006         edm::LogInfo("SiPixelFakeCPEGenericErrorParmESSource::SiPixelFakeCPEGenericErrorParmESSource");
00007         //the following line is needed to tell the framework what
00008         // data is being produced
00009         setWhatProduced(this);
00010         findingRecord<SiPixelCPEGenericErrorParmRcd>();
00011 }
00012 
00013 SiPixelFakeCPEGenericErrorParmESSource::~SiPixelFakeCPEGenericErrorParmESSource()
00014 {
00015 }
00016 
00017 std::auto_ptr<SiPixelCPEGenericErrorParm> SiPixelFakeCPEGenericErrorParmESSource::produce(const SiPixelCPEGenericErrorParmRcd & )
00018 {
00019         using namespace edm::es;
00020         SiPixelCPEGenericErrorParm * obj = new SiPixelCPEGenericErrorParm();
00021         obj->fillCPEGenericErrorParm(version_, fp_.fullPath());
00022         //std::cout << *obj << std::endl;
00023 
00024         return std::auto_ptr<SiPixelCPEGenericErrorParm>(obj);
00025 }
00026 
00027 void SiPixelFakeCPEGenericErrorParmESSource::setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, 
00028                                                 const edm::IOVSyncValue& iosv, 
00029                                                 edm::ValidityInterval& oValidity ) {
00030   edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() );
00031   oValidity = infinity;  
00032 }