00001
00015 #ifndef RPCGEOMINFOSVC_H
00016 #define RPCGEOMINFOSVC_H
00017
00018 #include "DetHelpers/IRpcGeomInfoSvc.h"
00019 #include "GaudiKernel/Service.h"
00020 #include "GaudiKernel/IDataProviderSvc.h"
00021
00022 #include <map>
00023 #include <string>
00024 #include <vector>
00025
00026 class RpcGeomInfoTHResolver;
00027
00028 class RpcGeomInfoSvc : public Service,
00029 virtual public IRpcGeomInfoSvc
00030 {
00031 public:
00032
00033 RpcGeomInfoSvc(const std::string& name, ISvcLocator *svc);
00034 ~RpcGeomInfoSvc();
00035 virtual StatusCode initialize();
00036 virtual StatusCode reinitialize();
00037 virtual StatusCode finalize();
00038 virtual StatusCode queryInterface(const InterfaceID& riid,
00039 void** ppvInterface);
00040
00042
00044 IRpcGeomInfo* get(std::string structure_path);
00045
00047 IRpcGeomInfo* get(IDetectorElement* rpcde);
00048
00050 IRpcGeomInfo* get(unsigned int rpcid);
00051
00052 private:
00053
00057 std::vector<std::string> m_StreamItems;
00058 std::vector<IDetectorElement*> m_topDEs;
00059
00063 std::string m_SiteIdUserParameter;
00067 std::string m_DetectorIdUserParameter;
00071 std::string m_RpcIdUserParameter;
00072
00073
00074 IRpcGeomInfo* add(unsigned int rpcid, const std::string& path,
00075 IDetectorElement* de);
00076
00077
00078 IRpcGeomInfo* find(unsigned int rpcid, IDetectorElement* de);
00079
00080 IDetectorElement* findParent(unsigned int rpcid,
00081 IDetectorElement* currentDE);
00082
00083 typedef std::map<unsigned int,IRpcGeomInfo*> MapByInt;
00084 MapByInt m_byId;
00085 typedef std::map<std::string,IRpcGeomInfo*> MapByString;
00086 MapByString m_byPath;
00087 typedef std::map<IDetectorElement*,IRpcGeomInfo*> MapByDE;
00088 MapByDE m_byDE;
00089
00090 IDataProviderSvc* m_detSvc;
00091
00092
00093 IDetectorElement* m_detector;
00094
00095 };
00096
00097 #endif // RPCGEOMINFOSVC_H