#ifndef TTOFChannelMap_hxx #define TTOFChannelMap_hxx #include "IChannelMap.hxx" #include "ITOFChannelId.hxx" class ITOFChannelMap; namespace COMET { class ITOFChannelMap; } /// Class for TOF channel to geometry lookup class COMET::ITOFChannelMap : public COMET::IChannelMap { friend class IGeometryDatabase; protected: ITOFChannelMap(); public: virtual ~ITOFChannelMap(); /// Get the singleton instace of this class static ITOFChannelMap& Get(); /// Get geometry id from channel id virtual bool GetGeometryId(COMET::IGeometryId& geomId, COMET::ITOFChannelId channelId); ///Get channel id from geometry id virtual bool GetChannelId(COMET::ITOFChannelId& chanelId, COMET::IGeometryId geomId); private: ///Return a bad GeometryId that is invalid for any sensible test ///Note that the exact value meaningless and should not be relied upon. inline const COMET::IGeometryId BadGeomId() const; ///Return a bad ChannelId that is invalid for any sensible test ///Note that the exact value meaningless and should not be relied upon. inline const COMET::ITOFChannelId BadChanId() const; static ITOFChannelMap *fTOFChannelMap; }; #endif