00001 // $ID: $ 00002 00003 #ifndef SIMSVC_SIMULATIONSVC_H 00004 #define SIMSVC_SIMULATIONSVC_H 00005 00006 // Include files 00007 #include "GaudiKernel/Service.h" 00008 00009 #include "SimSvc/ISimulationSvc.h" 00010 00011 #include <map> 00012 00013 // Forward and external declarations 00014 template <class TYPE> class SvcFactory; 00015 00016 00026 class SimulationSvc : public Service, 00027 virtual public ISimulationSvc { 00028 00030 friend class SvcFactory<SimulationSvc>; 00031 00032 public: 00033 00039 SimulationSvc (const std::string& name, ISvcLocator* svc); 00040 00044 virtual ~SimulationSvc(); 00045 00046 // inline void operator delete (void* p) throw() 00047 // { operator delete( const_cast<void*> (p)) ; } 00048 00053 virtual StatusCode initialize(); 00054 00061 virtual StatusCode queryInterface (const InterfaceID& riid, void** ppvInterface); 00062 00064 // implementation of the ISimulationSvc interface // 00066 00074 virtual const PartAttr* simAttribute (const ILVolume* vol) const; 00075 00083 virtual const PartAttr* simAttribute (const std::string volname) const; 00084 00090 virtual const bool hasSimAttribute (const ILVolume* vol) const; 00091 00097 virtual const bool hasSimAttribute (const std::string volname) const; 00098 00104 virtual const std::vector<RegionCuts>* regionsDefs () const; 00105 00109 virtual void reload (); 00110 00114 virtual void clear (); 00115 00116 00117 private: 00118 00122 typedef std::map<std::string, const SimAttribute*> AttributeSet; 00123 00128 typedef std::map<std::string, PartAttr*> Dict; 00129 00131 AttributeSet m_attributeSet; 00132 00134 Dict m_logvol2Sim; 00135 00137 VectOfRegCuts m_regionsDefs; 00138 00140 struct Prcuts 00141 { 00142 double gammacut; 00143 double electroncut; 00144 double positroncut; 00145 double protoncut; 00146 double aprotoncut; 00147 double neutroncut; 00148 double aneutroncut; 00149 }; 00150 00152 std::string m_simDbLocation; 00153 00154 }; 00155 00156 #endif // SIMSVC_SIMULATIONSVC_H 00157