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 (const std::string &statName)
 
void set (ROCstatus stat)
 
void set (ROCstatus stat, bool mode)
 
std::string statusName () const
 
std::string statusName (ROCstatus stat) 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

◆ ROCstatus

Enumerator
off 
noHits 
noInit 
noAnalogSignal 
nStatus 

Definition at line 26 of file PixelROCStatus.h.

Constructor & Destructor Documentation

◆ PixelROCStatus() [1/2]

PixelROCStatus::PixelROCStatus ( )

Definition at line 19 of file PixelROCStatus.cc.

19 : bits_(0) {}

◆ PixelROCStatus() [2/2]

PixelROCStatus::PixelROCStatus ( const std::set< ROCstatus > &  stat)

Definition at line 22 of file PixelROCStatus.cc.

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

References mps_fire::i, set(), and hgcalPlots::stat.

◆ ~PixelROCStatus()

PixelROCStatus::~PixelROCStatus ( )
virtual

Definition at line 31 of file PixelROCStatus.cc.

31 {}

Member Function Documentation

◆ clear()

void PixelROCStatus::clear ( ROCstatus  stat)

Definition at line 40 of file PixelROCStatus.cc.

40 { bits_ = bits_ & (0 << stat); }

References bits_, and hgcalPlots::stat.

Referenced by pos::PixelCalibConfiguration::buildROCAndModuleLists(), set(), and BeautifulSoup.Tag::setString().

◆ get()

bool PixelROCStatus::get ( ROCstatus  stat) const

◆ reset()

void PixelROCStatus::reset ( void  )

◆ set() [1/3]

void pos::PixelROCStatus::set ( const std::string &  statName)

◆ set() [2/3]

void PixelROCStatus::set ( ROCstatus  stat)

Definition at line 34 of file PixelROCStatus.cc.

34  {
35  reset();
36  bits_ = bits_ | (1 << stat);
37 }

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

Referenced by pos::PixelDetectorConfig::PixelDetectorConfig(), PixelROCStatus(), pos::PixelDetectorConfig::removeROC(), and set().

◆ set() [3/3]

void PixelROCStatus::set ( ROCstatus  stat,
bool  mode 
)

Definition at line 47 of file PixelROCStatus.cc.

47  {
48  reset();
49  if (mode) {
50  set(stat);
51  } else {
52  clear(stat);
53  }
54 }

References clear(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, reset(), set(), and hgcalPlots::stat.

◆ statusName() [1/2]

string PixelROCStatus::statusName ( ) const

Definition at line 75 of file PixelROCStatus.cc.

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 }

References get(), nStatus, off, and mps_fire::result.

◆ statusName() [2/2]

string PixelROCStatus::statusName ( ROCstatus  stat) const

Definition at line 60 of file PixelROCStatus.cc.

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 }

References cms::cuda::assert(), noAnalogSignal, noHits, noInit, off, and hgcalPlots::stat.

Member Data Documentation

◆ bits_

uint32_t pos::PixelROCStatus::bits_
private

Definition at line 22 of file PixelROCStatus.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
pos::PixelROCStatus::noInit
Definition: PixelROCStatus.h:26
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
cms::cuda::assert
assert(be >=bs)
pos::PixelROCStatus::bits_
uint32_t bits_
Definition: PixelROCStatus.h:22
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
pos::PixelROCStatus::nStatus
Definition: PixelROCStatus.h:26
pos::PixelROCStatus::statusName
std::string statusName() const
Definition: PixelROCStatus.cc:75
pos::PixelROCStatus::reset
void reset(void)
Definition: PixelROCStatus.cc:44
pos::PixelROCStatus::noAnalogSignal
Definition: PixelROCStatus.h:26
pos::PixelROCStatus::clear
void clear(ROCstatus stat)
Definition: PixelROCStatus.cc:40
pos::PixelROCStatus::off
Definition: PixelROCStatus.h:26
mps_fire.result
result
Definition: mps_fire.py:311
pos::PixelROCStatus::ROCstatus
ROCstatus
Definition: PixelROCStatus.h:26
pos::PixelROCStatus::set
void set(ROCstatus stat)
Definition: PixelROCStatus.cc:34
pos::PixelROCStatus::get
bool get(ROCstatus stat) const
Definition: PixelROCStatus.cc:57
pos::PixelROCStatus::noHits
Definition: PixelROCStatus.h:26