Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:36

0001 #ifndef HepPDTESSource_h
0002 #define HepPDTESSource_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    HepPDTESSource
0006 // Class:      HepPDTESSource
0007 //
0008 /**\class HepPDTESSource HepPDTESSource.h
0009  PhysicsTools/HepPDTESSource/interface/HepPDTESSource.h
0010 
0011  Description: HepPDT particle data table ESSource
0012 
0013  Implementation:
0014     <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Luca Lista
0018 //         Created:  Fri Mar 10 15:58:18 CET 2006
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   /// constructor from parameter set
0033   HepPDTESSource(const edm::ParameterSet &);
0034   /// destructor
0035   ~HepPDTESSource() override;
0036   /// define the particle data table type
0037   typedef HepPDT::ParticleDataTable PDT;
0038   /// define the return type
0039   typedef std::unique_ptr<PDT> ReturnType;
0040   /// return the particle table
0041   ReturnType produce(const PDTRecord &);
0042   /// set validity interval
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