CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/RecoTracker/RingESSource/src/RingESSource.cc

Go to the documentation of this file.
00001 //
00002 // Package:         RecoTracker/RingESSource
00003 // Class:           RingESSource
00004 // 
00005 // Description:     Reads in ASCII dump of Rings
00006 //                  and provides it to the event.
00007 //
00008 // Original Author: Oliver Gutsche, gutsche@fnal.gov
00009 // Created:         Thu Oct  5 01:35:14 UTC 2006
00010 //
00011 // $Author: gutsche $
00012 // $Date: 2007/03/30 02:49:35 $
00013 // $Revision: 1.4 $
00014 //
00015 
00016 #include "RecoTracker/RingESSource/interface/RingESSource.h"
00017 #include "FWCore/ParameterSet/interface/FileInPath.h"
00018 
00019 RingESSource::RingESSource(const edm::ParameterSet& iConfig) : fileName_((iConfig.getParameter<edm::FileInPath>("InputFileName")).fullPath()) {
00020   
00021   std::string componentName = iConfig.getParameter<std::string>("ComponentName");
00022   setWhatProduced(this, componentName);
00023     
00024   findingRecord<RingRecord>();
00025   
00026   rings_ = 0;
00027 }
00028 
00029 
00030 RingESSource::~RingESSource()
00031 {
00032    
00033 }
00034 
00035 RingESSource::ReturnType
00036 RingESSource::produce(const RingRecord& iRecord)
00037 {
00038   using namespace edm::es;
00039 
00040   rings_ = new Rings(fileName_);
00041   
00042   std::auto_ptr<Rings> rings(rings_);
00043 
00044   return rings ;
00045 }
00046 
00047 void RingESSource::setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &oValidity) {
00048   oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime());
00049 }
00050 
00051 
00052 //define this as a plug-in
00053 DEFINE_FWK_EVENTSETUP_SOURCE(RingESSource);
00054