#ifndef TECALChannelMap_hxx #define TECALChannelMap_hxx #include "IChannelMap.hxx" #include "IECALChannelId.hxx" class IECALChannelMap; namespace COMET { class IECALChannelMap; } /// Class for ECAL channel to geometry lookup class COMET::IECALChannelMap : public COMET::IChannelMap { friend class IGeometryDatabase; protected: IECALChannelMap(); public: virtual ~IECALChannelMap(); /// Get the singleton instace of this class static IECALChannelMap& Get(); /// Get geometry id from channel id virtual bool GetGeometryId(COMET::IGeometryId& geomId, COMET::IECALChannelId channelId); ///Get ECAL channel id from geometry id virtual bool GetChannelId(COMET::IECALChannelId& chanelId, COMET::IGeometryId geomId); ///Get ECALTrig channel id from geometry id virtual bool GetChannelId(COMET::IECALTrigChannelId& 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::IECALChannelId BadChanId() const; static IECALChannelMap *fECALChannelMap; }; #endif