00001 #include "CalibFormats/SiPixelObjects/interface/PixelTBMChannel.h" 00002 #include <cassert> 00003 00004 using namespace pos; 00005 00006 PixelTBMChannel::PixelTBMChannel(std::string TBMChannel) 00007 { 00008 if ( TBMChannel=="A" ) isChannelB_ = false; 00009 else if ( TBMChannel=="B" ) isChannelB_ = true; 00010 else 00011 { 00012 std::cout << "ERROR in PixelTBMChannel: TBM channel must be A or B, but input value was "<<TBMChannel<<std::endl; 00013 assert(0); 00014 } 00015 } 00016 00017 std::string PixelTBMChannel::string() const 00018 { 00019 if ( isChannelB_ ) return "B"; 00020 else return "A"; 00021 } 00022 00023 std::ostream& pos::operator<<(std::ostream& s, const PixelTBMChannel& TBMChannel) 00024 { 00025 s << TBMChannel.string(); 00026 return s; 00027 }