CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelTBMChannel.cc
Go to the documentation of this file.
2 #include <cassert>
3 
4 using namespace pos;
5 
6 PixelTBMChannel::PixelTBMChannel(std::string TBMChannel)
7 {
8  if ( TBMChannel=="A" ) isChannelB_ = false;
9  else if ( TBMChannel=="B" ) isChannelB_ = true;
10  else
11  {
12  std::cout << "ERROR in PixelTBMChannel: TBM channel must be A or B, but input value was "<<TBMChannel<<std::endl;
13  assert(0);
14  }
15 }
16 
17 std::string PixelTBMChannel::string() const
18 {
19  if ( isChannelB_ ) return "B";
20  else return "A";
21 }
22 
23 std::ostream& pos::operator<<(std::ostream& s, const PixelTBMChannel& TBMChannel)
24 {
25  s << TBMChannel.string();
26  return s;
27 }
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
std::string string() const
Simple class to hold either &quot;A&quot; or &quot;B&quot; for the TBM channel.
tuple cout
Definition: gather_cfg.py:121