Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:24

0001 #include "CalibFormats/SiPixelObjects/interface/PixelChannel.h"
0002 
0003 using namespace pos;
0004 
0005 PixelChannel::PixelChannel(PixelModuleName module, std::string TBMChannel) : module_(module), TBMChannel_(TBMChannel) {}
0006 
0007 PixelChannel::PixelChannel(PixelModuleName module, PixelTBMChannel TBMChannel)
0008     : module_(module), TBMChannel_(TBMChannel) {}
0009 
0010 PixelChannel::PixelChannel(std::string name) {
0011   module_ = PixelModuleName(name);
0012   char TBMChannelString[2] = {0, 0};
0013   TBMChannelString[0] = name[name.size() - 1];  // take the last character of name
0014   TBMChannel_ = PixelTBMChannel(TBMChannelString);
0015 }
0016 
0017 std::ostream& pos::operator<<(std::ostream& s, const PixelChannel& channel) {
0018   s << channel.channelname();
0019   return s;
0020 }
0021 
0022 std::string PixelChannel::channelname() const { return modulename() + "_ch" + TBMChannelString(); }