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, std::string status)
 
 CastorChannelStatus (unsigned long fid, uint32_t 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

◆ StatusBit

Enumerator
UNKNOWN 
BAD 
GOOD 
HOT 
DEAD 
END 

Definition at line 27 of file CastorChannelStatus.h.

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

Constructor & Destructor Documentation

◆ CastorChannelStatus() [1/3]

CastorChannelStatus::CastorChannelStatus ( )
inline

Definition at line 29 of file CastorChannelStatus.h.

29 : mId(0), mStatus(0) {}

◆ CastorChannelStatus() [2/3]

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

Definition at line 30 of file CastorChannelStatus.h.

30 : mId(fid), mStatus(status) {}

◆ CastorChannelStatus() [3/3]

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

Definition at line 31 of file CastorChannelStatus.h.

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  }

References BAD, DEAD, END, GOOD, HOT, mStatus, mps_update::status, and UNKNOWN.

Member Function Documentation

◆ getValue()

uint32_t CastorChannelStatus::getValue ( ) const
inline

Definition at line 68 of file CastorChannelStatus.h.

68 { return mStatus; }

References mStatus.

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

◆ isBitSet()

bool CastorChannelStatus::isBitSet ( unsigned int  bitnumber) const
inline

Definition at line 61 of file CastorChannelStatus.h.

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

References mStatus.

◆ rawId()

uint32_t CastorChannelStatus::rawId ( ) const
inline

Definition at line 66 of file CastorChannelStatus.h.

66 { return mId; }

References mId.

◆ serialize()

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

◆ setBit()

void CastorChannelStatus::setBit ( unsigned int  bitnumber)
inline

Definition at line 51 of file CastorChannelStatus.h.

51  {
52  uint32_t statadd = 0x1 << (bitnumber);
53  mStatus = mStatus | statadd;
54  }

References mStatus.

◆ setValue()

void CastorChannelStatus::setValue ( uint32_t  value)
inline

Definition at line 47 of file CastorChannelStatus.h.

47 { mStatus = value; }

References mStatus, and relativeConstraints::value.

◆ unsetBit()

void CastorChannelStatus::unsetBit ( unsigned int  bitnumber)
inline

Definition at line 55 of file CastorChannelStatus.h.

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

References mStatus.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 74 of file CastorChannelStatus.h.

◆ cond::serialization::access

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

Definition at line 74 of file CastorChannelStatus.h.

Member Data Documentation

◆ mId

uint32_t CastorChannelStatus::mId
private

Definition at line 71 of file CastorChannelStatus.h.

Referenced by rawId().

◆ mStatus

uint32_t CastorChannelStatus::mStatus
private
CastorChannelStatus::mId
uint32_t mId
Definition: CastorChannelStatus.h:71
mps_update.status
status
Definition: mps_update.py:69
CastorChannelStatus::DEAD
Definition: CastorChannelStatus.h:27
CastorChannelStatus::BAD
Definition: CastorChannelStatus.h:27
CastorChannelStatus::GOOD
Definition: CastorChannelStatus.h:27
CastorChannelStatus::END
Definition: CastorChannelStatus.h:27
CastorChannelStatus::mStatus
uint32_t mStatus
Definition: CastorChannelStatus.h:72
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CastorChannelStatus::HOT
Definition: CastorChannelStatus.h:27
CastorChannelStatus::UNKNOWN
Definition: CastorChannelStatus.h:27