00001 #include "CalibTracker/SiStripESProducers/interface/SiStripNoiseESSource.h" 00002 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00003 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" 00004 #include "CondFormats/SiStripObjects/interface/SiStripNoises.h" 00005 #include "CondFormats/DataRecord/interface/SiStripNoisesRcd.h" 00006 #include <iostream> 00007 00008 using namespace sistrip; 00009 00010 // ----------------------------------------------------------------------------- 00011 // 00012 SiStripNoiseESSource::SiStripNoiseESSource( const edm::ParameterSet& pset ) { 00013 setWhatProduced( this ); 00014 findingRecord<SiStripNoisesRcd>(); 00015 } 00016 00017 // ----------------------------------------------------------------------------- 00018 // 00019 std::auto_ptr<SiStripNoises> SiStripNoiseESSource::produce( const SiStripNoisesRcd& ) { 00020 00021 SiStripNoises* noise = makeNoise(); 00022 00023 if ( !noise ) { 00024 edm::LogWarning(mlESSources_) 00025 << "[SiStripNoiseESSource::" << __func__ << "]" 00026 << " Null pointer to SiStripNoises object!"; 00027 } 00028 00029 std::auto_ptr<SiStripNoises> ptr(noise); 00030 return ptr; 00031 00032 } 00033 00034 // ----------------------------------------------------------------------------- 00035 // 00036 void SiStripNoiseESSource::setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, 00037 const edm::IOVSyncValue& iosv, 00038 edm::ValidityInterval& oValidity ) { 00039 00040 edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() ); 00041 oValidity = infinity; 00042 00043 }