CMS 3D CMS Logo

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

◆ PixelTBMChannel() [1/2]

pos::PixelTBMChannel::PixelTBMChannel ( )
inline

Definition at line 20 of file PixelTBMChannel.h.

20 { ; }

◆ PixelTBMChannel() [2/2]

PixelTBMChannel::PixelTBMChannel ( std::string  TBMChannel)

Definition at line 6 of file PixelTBMChannel.cc.

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 }

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

Member Function Documentation

◆ operator<()

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

Definition at line 27 of file PixelTBMChannel.h.

27  {
28  return (isChannelB_ == false && aTBMChannel.isChannelB_ == true);
29  }

References isChannelB_.

◆ operator==()

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

Definition at line 31 of file PixelTBMChannel.h.

31 { return isChannelB_ == aTBMChannel.isChannelB_; }

References isChannelB_.

◆ string()

std::string PixelTBMChannel::string ( ) const

Definition at line 18 of file PixelTBMChannel.cc.

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

References isChannelB_.

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

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ isChannelB_

bool pos::PixelTBMChannel::isChannelB_
private

Definition at line 34 of file PixelTBMChannel.h.

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

gather_cfg.cout
cout
Definition: gather_cfg.py:144
cms::cuda::assert
assert(be >=bs)
pos::PixelTBMChannel::isChannelB_
bool isChannelB_
Definition: PixelTBMChannel.h:34