00001 #ifndef __PARTPROPSVC_H__ 00002 #define __PARTPROPSVC_H__ 00003 00004 #include "GaudiKernel/Service.h" 00005 #include "GaudiKernel/IPartPropSvc.h" 00006 #include "HepPDT/ParticleDataTable.hh" 00007 00008 #include <vector> 00009 #include <string> 00010 00011 // Forward declarations 00012 template <class TYPE> class SvcFactory; 00013 00014 //------------------------------------------------------------------ 00015 // 00016 // ClassName: PartPropSvc 00017 // 00018 // Description: This service provides access to particle properties. 00019 // Uses HepPDT as the underlying layer 00020 // 00021 // Author: Charles Leggett 00022 // 00023 // Date: 3-8-2001 00024 // 00025 //------------------------------------------------------------------ 00026 00027 class PartPropSvc: public Service, virtual public IPartPropSvc { 00028 00029 public: 00030 00031 virtual StatusCode initialize(); 00032 virtual StatusCode finalize(); 00033 00034 // Query the interfaces. 00035 virtual StatusCode queryInterface( const InterfaceID& riid, 00036 void** ppvInterface ); 00037 00038 // Service type. 00039 virtual const InterfaceID& type() const; 00040 00041 // The table 00042 HepPDT::ParticleDataTable *PDT() { return m_pdt; }; 00043 00044 protected: 00045 00046 PartPropSvc( const std::string& name, ISvcLocator* svc ); 00047 00048 // Destructor. 00049 virtual ~PartPropSvc(); 00050 00051 private: 00052 00053 // Allow SvcFactory to instantiate the service. 00054 friend class SvcFactory<PartPropSvc>; 00055 00056 std::string m_inputType; 00057 std::vector<std::string> m_pdtFiles; 00058 00059 HepPDT::ParticleDataTable *m_pdt; 00060 00061 00062 }; 00063 00064 #endif