CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

pos::PixelROCStatus Class Reference

This class implements.. More...

#include <interface/PixelROCStatus.h>

List of all members.

Public Types

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

Public Member Functions

void clear (ROCstatus stat)
bool get (ROCstatus stat) const
 PixelROCStatus (const std::set< ROCstatus > &stat)
 PixelROCStatus ()
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

Enumerator:
off 
noHits 
noInit 
noAnalogSignal 
nStatus 

Definition at line 30 of file PixelROCStatus.h.


Constructor & Destructor Documentation

PixelROCStatus::PixelROCStatus ( )

Definition at line 19 of file PixelROCStatus.cc.

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

Definition at line 25 of file PixelROCStatus.cc.

References i.

                                                           {

  std::set<ROCstatus>::const_iterator i=stat.begin();
  
  for(;i!=stat.end();++i){
    set(*i);
  }

}
PixelROCStatus::~PixelROCStatus ( ) [virtual]

Definition at line 36 of file PixelROCStatus.cc.

{}

Member Function Documentation

void PixelROCStatus::clear ( ROCstatus  stat)

Definition at line 45 of file PixelROCStatus.cc.

References bits_.

Referenced by set().

                                        {
  bits_=bits_&(0<<stat);
}
bool PixelROCStatus::get ( ROCstatus  stat) const
void PixelROCStatus::reset ( void  )

Definition at line 51 of file PixelROCStatus.cc.

References bits_.

Referenced by pos::PixelDetectorConfig::addROC(), and set().

                              {
  bits_=0;
}
void PixelROCStatus::set ( ROCstatus  stat)

Definition at line 39 of file PixelROCStatus.cc.

References bits_, and reset().

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

                                      {
  reset() ;
  bits_=bits_|(1<<stat);
}
void PixelROCStatus::set ( ROCstatus  stat,
bool  mode 
)

Definition at line 56 of file PixelROCStatus.cc.

References clear(), and reset().

                                                 {
  reset() ;
  if (mode) {
    set(stat);
  }
  else{
    clear(stat);
  }
}
void pos::PixelROCStatus::set ( const std::string &  statName)
string PixelROCStatus::statusName ( ) const

Definition at line 83 of file PixelROCStatus.cc.

References nStatus, off, and query::result.

                                        {
  string result = "" ;
  for (ROCstatus istat=off; istat!=nStatus; istat=ROCstatus(istat+1))
    {
      if (get(istat))
        {
          result += statusName(istat) ;
        }
    }
  return result ;
}
string PixelROCStatus::statusName ( ROCstatus  stat) const

Definition at line 72 of file PixelROCStatus.cc.

References noAnalogSignal, noHits, noInit, and off.

                                                     {
  if (stat==off) return "off";
  if (stat==noHits) return "noHits";
  if (stat==noInit) return "noInit";
  if (stat==noAnalogSignal) return "noAnalogSignal";
  assert(0);
  return "";
}

Member Data Documentation

uint32_t pos::PixelROCStatus::bits_ [private]

Definition at line 25 of file PixelROCStatus.h.

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