00001 #ifndef FWCore_Sources_RawInputSource_h 00002 #define FWCore_Sources_RawInputSource_h 00003 00004 /*---------------------------------------------------------------------- 00005 $Id: RawInputSource.h,v 1.11 2008/07/31 23:11:12 wmtan Exp $ 00006 ----------------------------------------------------------------------*/ 00007 00008 #include <memory> 00009 #include "boost/shared_ptr.hpp" 00010 00011 #include "DataFormats/Provenance/interface/EventID.h" 00012 #include "FWCore/Framework/interface/InputSource.h" 00013 #include "FWCore/Framework/interface/Frameworkfwd.h" 00014 00015 namespace edm { 00016 class ParameterSet; 00017 class Timestamp; 00018 class RawInputSource : public InputSource { 00019 public: 00020 explicit RawInputSource(ParameterSet const& pset, InputSourceDescription const& desc); 00021 virtual ~RawInputSource(); 00022 00023 protected: 00024 std::auto_ptr<Event> makeEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, Timestamp const& tstamp); 00025 virtual std::auto_ptr<Event> readOneEvent() = 0; 00026 00027 private: 00028 virtual std::auto_ptr<EventPrincipal> readEvent_(); 00029 virtual boost::shared_ptr<LuminosityBlockPrincipal> readLuminosityBlock_(); 00030 virtual boost::shared_ptr<RunPrincipal> readRun_(); 00031 virtual std::auto_ptr<EventPrincipal> readIt(EventID const& eventID); 00032 virtual void skip(int offset); 00033 virtual ItemType getNextItemType(); 00034 00035 RunNumber_t runNumber_; 00036 LuminosityBlockNumber_t luminosityBlockNumber_; 00037 bool newRun_; 00038 bool newLumi_; 00039 std::auto_ptr<EventPrincipal> ep_; 00040 }; 00041 } 00042 #endif