CMS 3D CMS Logo

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>

List of all members.

Public Member Functions

const bool operator< (const PixelTBMChannel &aTBMChannel) const
const bool operator== (const PixelTBMChannel &aTBMChannel) const
 PixelTBMChannel (std::string TBMChannel)
 PixelTBMChannel ()
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.

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

Definition at line 6 of file PixelTBMChannel.cc.

References gather_cfg::cout, and isChannelB_.

{
        if      ( TBMChannel=="A" ) isChannelB_ = false;
        else if ( TBMChannel=="B" ) isChannelB_ = true;
        else
        {
                std::cout << "ERROR in PixelTBMChannel: TBM channel must be A or B, but input value was "<<TBMChannel<<std::endl;
                assert(0);
        }
}

Member Function Documentation

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

Definition at line 29 of file PixelTBMChannel.h.

References isChannelB_.

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

Definition at line 33 of file PixelTBMChannel.h.

References isChannelB_.

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

Definition at line 17 of file PixelTBMChannel.cc.

References isChannelB_.

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

{
        if ( isChannelB_ ) return "B";
        else              return "A";
}

Friends And Related Function Documentation

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

Member Data Documentation

Definition at line 38 of file PixelTBMChannel.h.

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