#ifndef TCDCChannelId_hxx_seen #define TCDCChannelId_hxx_seen #include "IChannelId.hxx" namespace COMET { class ICDCChannelId; } ///Channel ID class for Channels using the CDC ///electronics hierachy. Can answer detailed questions about its ///elements. This should be used for constructing ICDCChannelIds from ///the information available. class COMET::ICDCChannelId : public COMET::IChannelId { public: ///Construct a CDC channel ID from a raw UInt_t explicit ICDCChannelId(UInt_t id =0); ///Constructor to specialise a Channel ID as a CDC channel ID explicit ICDCChannelId(const COMET::IChannelId& src); ///Construct a CDC channel ID from its electronics-space ///co-ordinates. The sub-detector ID should be ///COMET::IChannelId::kCDC(=1), but is explicitly required. ICDCChannelId(UInt_t subDet, UInt_t Channel); virtual ~ICDCChannelId(); ///Format as a human readable string virtual std::string AsString() const; /// Get the channel. virtual const UInt_t GetChannel() const; /// Get the geometry information of CDC bool GetGeometryInfo(UInt_t& layer, UInt_t& wire) const; protected: /// @{ Define the sub-detector specific part of the channel id. The /// sub-detector specific part of the channel id is a 25 bit field with /// bits number from 0 (lsb) to 24 (msb). The sub-fields are defined /// /// cccccccccccccccccccccccc /// /// - c(25) Bits 0-24: A twentyfive bit field indicating which channel. /// /// Note: The shift and the least significant bit (lsb) must be the same. enum BitDefinitions { kChanMSB=24, kChanLSB=0 }; /// @} private: /// Set the channel. virtual void SetChannel(int val); ClassDef(ICDCChannelId, 0) }; #endif //TCDCChannelId_hxx_seen