00001
00002 #ifndef ToolSVC_ToolSVC_H
00003 #define ToolSVC_ToolSVC_H
00004
00005
00006 #include "GaudiKernel/Service.h"
00007 #include "GaudiKernel/IObjManager.h"
00008 #include "GaudiKernel/IToolSvc.h"
00009
00010
00011 template <class TYPE> class SvcFactory;
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class ToolSvc : public Service, virtual public IToolSvc {
00032
00033 public:
00034
00035
00036 typedef std::list<IAlgTool*> ListTools;
00037
00038
00039
00040
00041 virtual StatusCode initialize();
00042
00043
00044 virtual StatusCode finalize();
00045
00046
00047
00048
00049
00050
00051 virtual StatusCode queryInterface( const IID& riid, void** ppvInterface );
00052
00053
00054
00055
00056 virtual StatusCode retrieve(const std::string& type, IAlgTool*& tool, const IInterface* parent,
00057 bool createIf);
00058
00059 virtual StatusCode retrieve(const std::string& tooltype, const std::string& toolname,
00060 IAlgTool*& tool, const IInterface* parent, bool createIf);
00061
00062
00063
00064
00065
00066 StatusCode create(const std::string& type, const IInterface* parent,
00067 IAlgTool*& tool);
00068
00069
00070 StatusCode create(const std::string& type, const std::string& name,
00071 const IInterface* parent, IAlgTool*& tool);
00072
00073
00074 bool existsTool( const std::string& toolname) const;
00075
00076
00077 std::string nameTool(const std::string& nameByUser, const IInterface* parent);
00078
00079 protected:
00080
00081
00082
00083
00084 ToolSvc( const std::string& name, ISvcLocator* svc );
00085
00086
00087 virtual ~ToolSvc();
00088
00089 private:
00090
00091 friend class SvcFactory<ToolSvc>;
00092
00093
00094 IObjManager* m_objManager;
00095
00096
00097 ListTools* m_instancesTools;
00098
00099 };
00100
00101 #endif
00102
00103