CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 20 of file PixelTBMChannel.h.

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

Definition at line 6 of file PixelTBMChannel.cc.

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

6  {
7  if (TBMChannel == "A")
8  isChannelB_ = false;
9  else if (TBMChannel == "B")
10  isChannelB_ = true;
11  else {
12  std::cout << "ERROR in PixelTBMChannel: TBM channel must be A or B, but input value was " << TBMChannel
13  << std::endl;
14  assert(0);
15  }
16 }
assert(be >=bs)
tuple cout
Definition: gather_cfg.py:144

Member Function Documentation

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

Definition at line 27 of file PixelTBMChannel.h.

References isChannelB_.

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

Definition at line 31 of file PixelTBMChannel.h.

References isChannelB_.

31 { return isChannelB_ == aTBMChannel.isChannelB_; }
std::string PixelTBMChannel::string ( ) const

Definition at line 18 of file PixelTBMChannel.cc.

References isChannelB_.

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

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

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 34 of file PixelTBMChannel.h.

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