CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
pos::PixelROCStatus Class Reference

This class implements.. More...

#include "interface/PixelROCStatus.h"

Public Types

enum  ROCstatus {
  off = 0, noHits, noInit, noAnalogSignal,
  nStatus
}
 

Public Member Functions

void clear (ROCstatus stat)
 
bool get (ROCstatus stat) const
 
 PixelROCStatus ()
 
 PixelROCStatus (const std::set< ROCstatus > &stat)
 
void reset (void)
 
void set (ROCstatus stat)
 
void set (ROCstatus stat, bool mode)
 
void set (const std::string &statName)
 
std::string statusName (ROCstatus stat) const
 
std::string statusName () const
 
virtual ~PixelROCStatus ()
 

Private Attributes

uint32_t bits_
 

Detailed Description

This class implements..

A longer explanation will be placed here later

Definition at line 20 of file PixelROCStatus.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PixelROCStatus::PixelROCStatus ( )

Definition at line 19 of file PixelROCStatus.cc.

19 : bits_(0) {}
PixelROCStatus::PixelROCStatus ( const std::set< ROCstatus > &  stat)

Definition at line 22 of file PixelROCStatus.cc.

References mps_fire::i.

22  {
23  std::set<ROCstatus>::const_iterator i = stat.begin();
24 
25  for (; i != stat.end(); ++i) {
26  set(*i);
27  }
28 }
PixelROCStatus::~PixelROCStatus ( )
virtual

Definition at line 31 of file PixelROCStatus.cc.

31 {}

Member Function Documentation

void PixelROCStatus::clear ( ROCstatus  stat)
bool PixelROCStatus::get ( ROCstatus  stat) const
void PixelROCStatus::reset ( void  )
void PixelROCStatus::set ( ROCstatus  stat)
void PixelROCStatus::set ( ROCstatus  stat,
bool  mode 
)

Definition at line 47 of file PixelROCStatus.cc.

References clear(), reset(), and hgcalPlots::stat.

47  {
48  reset();
49  if (mode) {
50  set(stat);
51  } else {
52  clear(stat);
53  }
54 }
void clear(ROCstatus stat)
void pos::PixelROCStatus::set ( const std::string &  statName)
string PixelROCStatus::statusName ( ROCstatus  stat) const

Definition at line 60 of file PixelROCStatus.cc.

References noAnalogSignal, noHits, noInit, and off.

60  {
61  if (stat == off)
62  return "off";
63  if (stat == noHits)
64  return "noHits";
65  if (stat == noInit)
66  return "noInit";
67  if (stat == noAnalogSignal)
68  return "noAnalogSignal";
69  assert(0);
70  return "";
71 }
string PixelROCStatus::statusName ( ) const

Definition at line 75 of file PixelROCStatus.cc.

References gather_cfg::cout, nStatus, off, reset(), mps_fire::result, and set().

75  {
76  string result = "";
77  for (ROCstatus istat = off; istat != nStatus; istat = ROCstatus(istat + 1)) {
78  if (get(istat)) {
79  result += statusName(istat);
80  }
81  }
82  return result;
83 }
std::string statusName() const

Member Data Documentation

uint32_t pos::PixelROCStatus::bits_
private

Definition at line 22 of file PixelROCStatus.h.

Referenced by clear(), get(), reset(), and set().