CMS 3D CMS Logo

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

#include <CastorChannelStatus.h>

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.

Constructor & Destructor Documentation

CastorChannelStatus::CastorChannelStatus ( )
inline

Definition at line 35 of file CastorChannelStatus.h.

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.

Member Function Documentation

uint32_t CastorChannelStatus::getValue ( ) const
inline

Definition at line 72 of file CastorChannelStatus.h.

References mStatus.

Referenced by RecHitCorrector::produce().

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

Definition at line 64 of file CastorChannelStatus.h.

References mStatus.

65  {
66  uint32_t statadd = 0x1<<(bitnumber);
67  return (mStatus&statadd)?(true):(false);
68  }
uint32_t CastorChannelStatus::rawId ( ) const
inline

Definition at line 70 of file CastorChannelStatus.h.

References mId.

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

Definition at line 52 of file CastorChannelStatus.h.

References mStatus.

53  {
54  uint32_t statadd = 0x1<<(bitnumber);
55  mStatus = mStatus|statadd;
56  }
void CastorChannelStatus::setValue ( uint32_t  value)
inline
void CastorChannelStatus::unsetBit ( unsigned int  bitnumber)
inline

Definition at line 57 of file CastorChannelStatus.h.

References mStatus.

58  {
59  uint32_t statadd = 0x1<<(bitnumber);
60  statadd = ~statadd;
61  mStatus = mStatus&statadd;
62  }

Member Data Documentation

uint32_t CastorChannelStatus::mId
private

Definition at line 75 of file CastorChannelStatus.h.

Referenced by rawId().

uint32_t CastorChannelStatus::mStatus
private