CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CastorChannelStatus Class Reference

#include <CastorChannelStatus.h>

List of all members.

Public Types

enum  StatusBit {
  UNKNOWN = 0, BAD = 1, GOOD = 2, HOT = 3,
  DEAD = 4, END = 5
}

Public Member Functions

 CastorChannelStatus ()
 CastorChannelStatus (unsigned long fid, uint32_t status)
 CastorChannelStatus (unsigned long fid, std::string status)
uint32_t getValue () const
bool isBitSet (unsigned int bitnumber) const
uint32_t rawId () const
void setBit (unsigned int bitnumber)
void setValue (uint32_t value)
void unsetBit (unsigned int bitnumber)

Private Attributes

uint32_t mId
uint32_t mStatus

Detailed Description

Definition at line 13 of file CastorChannelStatus.h.


Member Enumeration Documentation

Enumerator:
UNKNOWN 
BAD 
GOOD 
HOT 
DEAD 
END 

Definition at line 26 of file CastorChannelStatus.h.

                 {
    UNKNOWN = 0,
    BAD = 1,
    GOOD = 2,
    HOT = 3,
    DEAD = 4,
    END = 5
  };

Constructor & Destructor Documentation

CastorChannelStatus::CastorChannelStatus ( ) [inline]

Definition at line 35 of file CastorChannelStatus.h.

: mId(0), mStatus(0) {}
CastorChannelStatus::CastorChannelStatus ( unsigned long  fid,
uint32_t  status 
) [inline]

Definition at line 36 of file CastorChannelStatus.h.

CastorChannelStatus::CastorChannelStatus ( unsigned long  fid,
std::string  status 
) [inline]

Definition at line 37 of file CastorChannelStatus.h.

References BAD, DEAD, END, GOOD, HOT, mStatus, and UNKNOWN.

                                                          : mId(fid)
                     {
                        if      (status=="BAD")    mStatus = BAD;
                        else if (status=="GOOD")   mStatus = GOOD;
                        else if (status=="HOT")    mStatus = HOT;
                        else if (status=="DEAD")   mStatus = DEAD;
                        else if (status=="END")    mStatus = END;
                        else                       mStatus = UNKNOWN;
                     }

Member Function Documentation

uint32_t CastorChannelStatus::getValue ( ) const [inline]

Definition at line 72 of file CastorChannelStatus.h.

References mStatus.

Referenced by RecHitCorrector::produce().

{return mStatus;}
bool CastorChannelStatus::isBitSet ( unsigned int  bitnumber) const [inline]

Definition at line 64 of file CastorChannelStatus.h.

References mStatus.

  {
    uint32_t statadd = 0x1<<(bitnumber);
    return (mStatus&statadd)?(true):(false);
  }
uint32_t CastorChannelStatus::rawId ( ) const [inline]

Definition at line 70 of file CastorChannelStatus.h.

References mId.

{return mId;}
void CastorChannelStatus::setBit ( unsigned int  bitnumber) [inline]

Definition at line 52 of file CastorChannelStatus.h.

References mStatus.

  {
    uint32_t statadd = 0x1<<(bitnumber);
    mStatus = mStatus|statadd;
  }
void CastorChannelStatus::setValue ( uint32_t  value) [inline]

Definition at line 48 of file CastorChannelStatus.h.

References mStatus, and relativeConstraints::value.

void CastorChannelStatus::unsetBit ( unsigned int  bitnumber) [inline]

Definition at line 57 of file CastorChannelStatus.h.

References mStatus.

  {
    uint32_t statadd = 0x1<<(bitnumber);
    statadd = ~statadd;
    mStatus = mStatus&statadd;
  }

Member Data Documentation

uint32_t CastorChannelStatus::mId [private]

Definition at line 75 of file CastorChannelStatus.h.

Referenced by rawId().

uint32_t CastorChannelStatus::mStatus [private]