CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends
EcalChannelStatusCode Class Reference

#include <EcalChannelStatusCode.h>

Public Types

enum  Bits {
  kHV = 0, kLV, kDAQ, kTP,
  kTrigger, kTemperature, kNextToDead
}
 
enum  Code {
  kOk = 0, kDAC, kNoLaser, kNoisy,
  kNNoisy, kNNNoisy, kNNNNoisy, kNNNNNoisy,
  kFixedG6, kFixedG1, kFixedG0, kNonRespondingIsolated,
  kDeadVFE, kDeadFE, kNoDataNoTP
}
 

Public Member Functions

bool checkBit (Bits bit)
 Check status of desired bit. More...
 
 EcalChannelStatusCode ()
 
 EcalChannelStatusCode (const uint16_t &encodedStatus)
 
uint16_t getEncodedStatusCode () const
 Return the encoded raw status. More...
 
Code getStatusCode () const
 return decoded status More...
 
void print (std::ostream &s) const
 

Static Public Attributes

static const int chStatusMask = 0x1F
 

Private Member Functions

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

Private Attributes

uint16_t status_
 

Static Private Attributes

static const int kBitsOffset = 5
 

Friends

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

Detailed Description

Author: Paolo Meridiani Created: 14 Nov 2006

Definition at line 18 of file EcalChannelStatusCode.h.

Member Enumeration Documentation

◆ Bits

Enumerator
kHV 
kLV 
kDAQ 
kTP 
kTrigger 
kTemperature 
kNextToDead 

Definition at line 38 of file EcalChannelStatusCode.h.

◆ Code

Enumerator
kOk 
kDAC 
kNoLaser 
kNoisy 
kNNoisy 
kNNNoisy 
kNNNNoisy 
kNNNNNoisy 
kFixedG6 
kFixedG1 
kFixedG0 
kNonRespondingIsolated 
kDeadVFE 
kDeadFE 
kNoDataNoTP 

Definition at line 20 of file EcalChannelStatusCode.h.

20  {
21  kOk = 0,
22  kDAC,
23  kNoLaser,
24  kNoisy,
25  kNNoisy,
26  kNNNoisy,
27  kNNNNoisy,
28  kNNNNNoisy,
29  kFixedG6,
30  kFixedG1,
31  kFixedG0,
33  kDeadVFE,
34  kDeadFE,
36  };

Constructor & Destructor Documentation

◆ EcalChannelStatusCode() [1/2]

EcalChannelStatusCode::EcalChannelStatusCode ( )
inline

Definition at line 41 of file EcalChannelStatusCode.h.

41 : status_(0) {}

◆ EcalChannelStatusCode() [2/2]

EcalChannelStatusCode::EcalChannelStatusCode ( const uint16_t &  encodedStatus)
inline

Definition at line 42 of file EcalChannelStatusCode.h.

42 : status_(encodedStatus){};

Member Function Documentation

◆ checkBit()

bool EcalChannelStatusCode::checkBit ( Bits  bit)
inline

Check status of desired bit.

Definition at line 53 of file EcalChannelStatusCode.h.

53 { return status_ & (0x1 << (bit + kBitsOffset)); }

References kBitsOffset, and status_.

◆ getEncodedStatusCode()

uint16_t EcalChannelStatusCode::getEncodedStatusCode ( ) const
inline

Return the encoded raw status.

Definition at line 50 of file EcalChannelStatusCode.h.

50 { return status_; }

References status_.

◆ getStatusCode()

Code EcalChannelStatusCode::getStatusCode ( ) const
inline

return decoded status

Definition at line 47 of file EcalChannelStatusCode.h.

47 { return Code(status_ & chStatusMask); }

References chStatusMask, and status_.

Referenced by EcalTrivialObjectAnalyzer::analyze(), and EcalRecHitProducer::produce().

◆ print()

void EcalChannelStatusCode::print ( std::ostream &  s) const
inline

Definition at line 44 of file EcalChannelStatusCode.h.

44 { s << "status is: " << status_; }

References alignCSCRings::s, and status_.

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 85 of file EcalChannelStatusCode.h.

◆ cond::serialization::access

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

Definition at line 85 of file EcalChannelStatusCode.h.

Member Data Documentation

◆ chStatusMask

const int EcalChannelStatusCode::chStatusMask = 0x1F
static

Definition at line 55 of file EcalChannelStatusCode.h.

Referenced by getStatusCode().

◆ kBitsOffset

const int EcalChannelStatusCode::kBitsOffset = 5
staticprivate

Definition at line 58 of file EcalChannelStatusCode.h.

Referenced by checkBit().

◆ status_

uint16_t EcalChannelStatusCode::status_
private

Definition at line 83 of file EcalChannelStatusCode.h.

Referenced by checkBit(), getEncodedStatusCode(), getStatusCode(), and print().

EcalChannelStatusCode::kNNNNoisy
Definition: EcalChannelStatusCode.h:27
EcalChannelStatusCode::kNextToDead
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::chStatusMask
static const int chStatusMask
Definition: EcalChannelStatusCode.h:55
EcalChannelStatusCode::kDAC
Definition: EcalChannelStatusCode.h:22
EcalChannelStatusCode::kNoLaser
Definition: EcalChannelStatusCode.h:23
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalChannelStatusCode::kFixedG1
Definition: EcalChannelStatusCode.h:30
EcalChannelStatusCode::kDAQ
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::kFixedG6
Definition: EcalChannelStatusCode.h:29
EcalChannelStatusCode::kDeadFE
Definition: EcalChannelStatusCode.h:34
EcalChannelStatusCode::kNoDataNoTP
Definition: EcalChannelStatusCode.h:35
EcalChannelStatusCode::kTP
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::kNonRespondingIsolated
Definition: EcalChannelStatusCode.h:32
EcalChannelStatusCode::kOk
Definition: EcalChannelStatusCode.h:21
EcalChannelStatusCode::kTrigger
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::kNNoisy
Definition: EcalChannelStatusCode.h:25
EcalChannelStatusCode::kTemperature
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::Code
Code
Definition: EcalChannelStatusCode.h:20
EcalChannelStatusCode::kNNNoisy
Definition: EcalChannelStatusCode.h:26
EcalChannelStatusCode::kDeadVFE
Definition: EcalChannelStatusCode.h:33
EcalChannelStatusCode::kBitsOffset
static const int kBitsOffset
Definition: EcalChannelStatusCode.h:58
EcalChannelStatusCode::kNoisy
Definition: EcalChannelStatusCode.h:24
EcalChannelStatusCode::kLV
Definition: EcalChannelStatusCode.h:38
EcalChannelStatusCode::kNNNNNoisy
Definition: EcalChannelStatusCode.h:28
EcalChannelStatusCode::kFixedG0
Definition: EcalChannelStatusCode.h:31
EcalChannelStatusCode::status_
uint16_t status_
Definition: EcalChannelStatusCode.h:83
EcalChannelStatusCode::kHV
Definition: EcalChannelStatusCode.h:38