CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Constructor & Destructor Documentation

CastorChannelStatus::CastorChannelStatus ( )
inline

Definition at line 29 of file CastorChannelStatus.h.

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

Definition at line 30 of file CastorChannelStatus.h.

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

Definition at line 31 of file CastorChannelStatus.h.

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

31  : mId(fid) {
32  if (status == "BAD")
33  mStatus = BAD;
34  else if (status == "GOOD")
35  mStatus = GOOD;
36  else if (status == "HOT")
37  mStatus = HOT;
38  else if (status == "DEAD")
39  mStatus = DEAD;
40  else if (status == "END")
41  mStatus = END;
42  else
43  mStatus = UNKNOWN;
44  }
list status
Definition: mps_update.py:107

Member Function Documentation

uint32_t CastorChannelStatus::getValue ( ) const
inline

Definition at line 68 of file CastorChannelStatus.h.

References mStatus.

Referenced by CastorDigiMonitor::getDbData(), and RecHitCorrector::produce().

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

Definition at line 61 of file CastorChannelStatus.h.

References mStatus.

61  {
62  uint32_t statadd = 0x1 << (bitnumber);
63  return (mStatus & statadd) ? (true) : (false);
64  }
uint32_t CastorChannelStatus::rawId ( ) const
inline

Definition at line 66 of file CastorChannelStatus.h.

References mId.

Referenced by CastorDigiMonitor::getDbData().

66 { 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 51 of file CastorChannelStatus.h.

References mStatus.

51  {
52  uint32_t statadd = 0x1 << (bitnumber);
53  mStatus = mStatus | statadd;
54  }
void CastorChannelStatus::setValue ( uint32_t  value)
inline

Definition at line 47 of file CastorChannelStatus.h.

References mStatus, and relativeConstraints::value.

void CastorChannelStatus::unsetBit ( unsigned int  bitnumber)
inline

Definition at line 55 of file CastorChannelStatus.h.

References mStatus.

55  {
56  uint32_t statadd = 0x1 << (bitnumber);
57  statadd = ~statadd;
58  mStatus = mStatus & statadd;
59  }

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 74 of file CastorChannelStatus.h.

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

Definition at line 74 of file CastorChannelStatus.h.

Member Data Documentation

uint32_t CastorChannelStatus::mId
private

Definition at line 71 of file CastorChannelStatus.h.

Referenced by rawId().

uint32_t CastorChannelStatus::mStatus
private