00001 #include "CalibFormats/SiPixelObjects/interface/PixelChannel.h" 00002 00003 using namespace pos; 00004 00005 PixelChannel::PixelChannel(PixelModuleName module, std::string TBMChannel): 00006 module_(module), TBMChannel_(TBMChannel) 00007 {} 00008 00009 PixelChannel::PixelChannel(PixelModuleName module, PixelTBMChannel TBMChannel): 00010 module_(module), TBMChannel_(TBMChannel) 00011 {} 00012 00013 PixelChannel::PixelChannel(std::string name) 00014 { 00015 module_ = PixelModuleName(name); 00016 char TBMChannelString[2] = {0,0}; 00017 TBMChannelString[0] = name[name.size()-1]; // take the last character of name 00018 TBMChannel_ = PixelTBMChannel(TBMChannelString); 00019 } 00020 00021 std::ostream& pos::operator<<(std::ostream& s, const PixelChannel& channel) 00022 { 00023 s << channel.channelname(); 00024 return s; 00025 } 00026 00027 std::string PixelChannel::channelname() const 00028 { 00029 return modulename() + "_ch" + TBMChannelString(); 00030 }