CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
pos::PixelTBMChannel Class Reference

Simple class to hold either "A" or "B" for the TBM channel. More...

#include "interface/PixelTBMChannel.h"

Public Member Functions

const bool operator< (const PixelTBMChannel &aTBMChannel) const
 
const bool operator== (const PixelTBMChannel &aTBMChannel) const
 
 PixelTBMChannel ()
 
 PixelTBMChannel (std::string TBMChannel)
 
std::string string () const
 

Private Attributes

bool isChannelB_
 

Friends

std::ostream & operator<< (std::ostream &s, const PixelTBMChannel &TBMChannel)
 

Detailed Description

Simple class to hold either "A" or "B" for the TBM channel.

A longer explanation will be placed here later

Definition at line 18 of file PixelTBMChannel.h.

Constructor & Destructor Documentation

pos::PixelTBMChannel::PixelTBMChannel ( )
inline

Definition at line 22 of file PixelTBMChannel.h.

22 {;}
PixelTBMChannel::PixelTBMChannel ( std::string  TBMChannel)

Definition at line 6 of file PixelTBMChannel.cc.

References assert(), gather_cfg::cout, and isChannelB_.

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 }
assert(m_qm.get())
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

const bool pos::PixelTBMChannel::operator< ( const PixelTBMChannel aTBMChannel) const
inline

Definition at line 29 of file PixelTBMChannel.h.

References isChannelB_.

29  {
30  return ( isChannelB_ == false && aTBMChannel.isChannelB_ == true );
31  }
const bool pos::PixelTBMChannel::operator== ( const PixelTBMChannel aTBMChannel) const
inline

Definition at line 33 of file PixelTBMChannel.h.

References isChannelB_.

33  {
34  return isChannelB_==aTBMChannel.isChannelB_;
35  }
std::string PixelTBMChannel::string ( ) const

Definition at line 17 of file PixelTBMChannel.cc.

References isChannelB_.

Referenced by pos::operator<<(), and pos::PixelChannel::TBMChannelString().

18 {
19  if ( isChannelB_ ) return "B";
20  else return "A";
21 }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const PixelTBMChannel TBMChannel 
)
friend

Member Data Documentation

bool pos::PixelTBMChannel::isChannelB_
private

Definition at line 38 of file PixelTBMChannel.h.

Referenced by operator<(), operator==(), PixelTBMChannel(), and string().