CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
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 Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

uint32_t mId
 
uint32_t mStatus
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 15 of file CastorChannelStatus.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
BAD 
GOOD 
HOT 
DEAD 
END 

Definition at line 28 of file CastorChannelStatus.h.

Constructor & Destructor Documentation

CastorChannelStatus::CastorChannelStatus ( )
inline

Definition at line 37 of file CastorChannelStatus.h.

CastorChannelStatus::CastorChannelStatus ( unsigned long  fid,
uint32_t  status 
)
inline

Definition at line 38 of file CastorChannelStatus.h.

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

Definition at line 39 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 74 of file CastorChannelStatus.h.

References mStatus.

Referenced by CastorDbASCIIIO::dumpObject(), and RecHitCorrector::produce().

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

Definition at line 66 of file CastorChannelStatus.h.

References mStatus.

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

Definition at line 72 of file CastorChannelStatus.h.

References mId.

72 {return mId;}
template<class Archive >
void CastorChannelStatus::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void CastorChannelStatus::setBit ( unsigned int  bitnumber)
inline

Definition at line 54 of file CastorChannelStatus.h.

References mStatus.

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

Definition at line 59 of file CastorChannelStatus.h.

References mStatus.

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 81 of file CastorChannelStatus.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 81 of file CastorChannelStatus.h.

Member Data Documentation

uint32_t CastorChannelStatus::mId
private

Definition at line 77 of file CastorChannelStatus.h.

Referenced by rawId().

uint32_t CastorChannelStatus::mStatus
private