00001 // Last commit: $Id: SiStripPedestalsESSource.cc,v 1.1 2008/05/14 10:00:02 giordano Exp $ 00002 // Latest tag: $Name: V01-00-04 $ 00003 // Location: $Source: /cvs_server/repositories/CMSSW/CMSSW/CalibTracker/SiStripESProducers/src/SiStripPedestalsESSource.cc,v $ 00004 00005 #include "CalibTracker/SiStripESProducers/interface/SiStripPedestalsESSource.h" 00006 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00007 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" 00008 #include "CondFormats/SiStripObjects/interface/SiStripPedestals.h" 00009 #include "CondFormats/DataRecord/interface/SiStripPedestalsRcd.h" 00010 #include <iostream> 00011 00012 using namespace std; 00013 using namespace sistrip; 00014 00015 // ----------------------------------------------------------------------------- 00016 // 00017 SiStripPedestalsESSource::SiStripPedestalsESSource( const edm::ParameterSet& pset ) { 00018 setWhatProduced( this ); 00019 findingRecord<SiStripPedestalsRcd>(); 00020 } 00021 00022 // ----------------------------------------------------------------------------- 00023 // 00024 auto_ptr<SiStripPedestals> SiStripPedestalsESSource::produce( const SiStripPedestalsRcd& ) { 00025 00026 SiStripPedestals* peds = makePedestals(); 00027 00028 if ( !peds ) { 00029 edm::LogWarning(mlESSources_) 00030 << "[SiStripPedestalsESSource::" << __func__ << "]" 00031 << " Null pointer to SiStripPedestals object!"; 00032 } 00033 00034 auto_ptr<SiStripPedestals> ptr(peds); 00035 return ptr; 00036 00037 } 00038 00039 // ----------------------------------------------------------------------------- 00040 // 00041 void SiStripPedestalsESSource::setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, 00042 const edm::IOVSyncValue& iosv, 00043 edm::ValidityInterval& oValidity ) { 00044 00045 edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() ); 00046 oValidity = infinity; 00047 00048 }