00001 #ifndef RECOTRACKER_ROADMAPESSOURCE_H 00002 #define RECOTRACKER_ROADMAPESSOURCE_H 00003 00004 // 00005 // Package: RecoTracker/RoadMapESSource 00006 // Class: RoadMapESSource 00007 // 00008 // Description: Reads in ASCII dump of Roads object 00009 // and provides it to the event. 00010 // 00011 // Original Author: Oliver Gutsche, gutsche@fnal.gov 00012 // Created: Thu Jan 12 21:00:00 UTC 2006 00013 // 00014 // $Author: gutsche $ 00015 // $Date: 2007/03/15 20:17:09 $ 00016 // $Revision: 1.5 $ 00017 // 00018 00019 // system include files 00020 #include <memory> 00021 #include <string> 00022 00023 // user include files 00024 #include "FWCore/Framework/interface/SourceFactory.h" 00025 #include "FWCore/Framework/interface/ESProducer.h" 00026 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" 00027 00028 #include "FWCore/Framework/interface/ESHandle.h" 00029 00030 #include "RecoTracker/RoadMapRecord/interface/RoadMapRecord.h" 00031 #include "RecoTracker/RoadMapRecord/interface/Roads.h" 00032 00033 class RoadMapESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { 00034 00035 public: 00036 00037 RoadMapESSource(const edm::ParameterSet&); 00038 ~RoadMapESSource(); 00039 00040 typedef std::auto_ptr<Roads> ReturnType; 00041 00042 ReturnType produce(const RoadMapRecord&); 00043 00044 protected: 00045 00046 virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &); 00047 00048 private: 00049 00050 std::string fileName_; 00051 00052 std::string ringsLabel_; 00053 00054 Roads *roads_; 00055 00056 }; 00057 00058 #endif