#include #include "ICOMETLog.hxx" #include "ICDCChannelId.hxx" ClassImp(COMET::ICDCChannelId); //---------------------------------------------------------------------- COMET::ICDCChannelId::ICDCChannelId(UInt_t id): IChannelId(id) {} //---------------------------------------------------------------------- COMET::ICDCChannelId::ICDCChannelId(const COMET::IChannelId& src) : IChannelId(src) {} //---------------------------------------------------------------------- COMET::ICDCChannelId::~ICDCChannelId() {} //---------------------------------------------------------------------- COMET::ICDCChannelId::ICDCChannelId(UInt_t subDet, UInt_t Channel) { if (subDet != COMET::IChannelId::kCDC) { COMETSevere("Invalid sub-detector field: " << subDet); } SetGuardBit(); SetSubDetector(COMET::IChannelId::kCDC); SetChannel(Channel); } //---------------------------------------------------------------------- std::string COMET::ICDCChannelId::AsString() const { return GetAsString("CDC", this->GetChannel()); } //---------------------------------------------------------------------- const UInt_t COMET::ICDCChannelId::GetChannel() const { return GetField(kChanMSB, kChanLSB); } //---------------------------------------------------------------------- bool COMET::ICDCChannelId::GetGeometryInfo(UInt_t& layer, UInt_t& wire) const { // TODO ICDCChannelId::GetGeometryInfo NOT IMPLIMENTED!! COMETError("ICDCChannelId::GetGeometryInfo NOT IMPLIMENTED!!"); return false; //UInt_t channel = GetChannel(); //wire = channel; //layer = 0; //// layer = GetLayer(wire) <-- to be implemented? //if (wire<0 || layer<0) return false; //return true; } //---------------------------------------------------------------------- void COMET::ICDCChannelId::SetChannel(int val) { SetField(val, kChanMSB, kChanLSB); }