00001 #ifndef HepPDTESSource_h 00002 #define HepPDTESSource_h 00003 // -*- C++ -*- 00004 // 00005 // Package: HepPDTESSource 00006 // Class: HepPDTESSource 00007 // 00015 // 00016 // Original Author: Luca Lista 00017 // Created: Fri Mar 10 15:58:18 CET 2006 00018 // $Id: HepPDTESSource.h,v 1.3 2007/03/20 09:09:27 llista Exp $ 00019 // 00020 #include <memory> 00021 #include <fstream> 00022 #include "boost/shared_ptr.hpp" 00023 #include "HepPDT/TableBuilder.hh" 00024 #include "HepPDT/ParticleDataTable.hh" 00025 #include "FWCore/Framework/interface/ESProducer.h" 00026 #include "FWCore/Framework/interface/ESHandle.h" 00027 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" 00028 #include "FWCore/Framework/interface/SourceFactory.h" 00029 #include "SimGeneral/HepPDTRecord/interface/PDTRecord.h" 00030 #include <climits> 00031 00032 class HepPDTESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { 00033 public: 00035 HepPDTESSource( const edm::ParameterSet& ); 00037 ~HepPDTESSource(); 00039 typedef HepPDT::ParticleDataTable PDT; 00041 typedef std::auto_ptr<PDT> ReturnType; 00043 ReturnType produce( const PDTRecord & ); 00045 void setIntervalFor( const edm::eventsetup::EventSetupRecordKey &, 00046 const edm::IOVSyncValue &, 00047 edm::ValidityInterval & ); 00048 00049 private: 00050 edm::FileInPath pdtFileName; 00051 }; 00052 #endif