File indexing completed on 2024-04-06 12:30:36
0001 #ifndef HepPDTESSource_h
0002 #define HepPDTESSource_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "FWCore/Framework/interface/ESProducer.h"
0021 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
0022 #include "FWCore/Framework/interface/SourceFactory.h"
0023 #include "HepPDT/ParticleDataTable.hh"
0024 #include "HepPDT/TableBuilder.hh"
0025 #include "SimGeneral/HepPDTRecord/interface/PDTRecord.h"
0026 #include <climits>
0027 #include <fstream>
0028 #include <memory>
0029
0030 class HepPDTESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
0031 public:
0032
0033 HepPDTESSource(const edm::ParameterSet &);
0034
0035 ~HepPDTESSource() override;
0036
0037 typedef HepPDT::ParticleDataTable PDT;
0038
0039 typedef std::unique_ptr<PDT> ReturnType;
0040
0041 ReturnType produce(const PDTRecord &);
0042
0043 void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0044 const edm::IOVSyncValue &,
0045 edm::ValidityInterval &) override;
0046
0047 private:
0048 edm::FileInPath pdtFileName;
0049 };
0050 #endif