CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/CalibTracker/SiStripESProducers/src/SiStripGainESSource.cc

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