ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DetStatus Class Referencefinal

#include <DetStatus.h>

Collaboration diagram for DetStatus:

Public Member Functions

 DetStatus ()
 
 DetStatus (const int fullcode, const float deadfrac, const float deadthrust)
 
 ~DetStatus ()=default
 
int code () const
 
int fullCode () const
 
float deadFrac () const
 
float deadThrust () const
 
std::string colour () const
 

Private Attributes

int m_code
 
float m_deadfrac
 
float m_deadthrust
 

Detailed Description

Definition at line 12 of file DetStatus.h.

Constructor & Destructor Documentation

◆ DetStatus() [1/2]

DetStatus::DetStatus ( )

Definition at line 9 of file DetStatus.cxx.

9  :
10  m_code(0),
11  m_deadfrac(0),
12  m_deadthrust(0)
13 {}

◆ DetStatus() [2/2]

DetStatus::DetStatus ( const int  fullcode,
const float  deadfrac,
const float  deadthrust 
)

Definition at line 15 of file DetStatus.cxx.

16  :
17  m_code(fullcode), m_deadfrac(deadfrac), m_deadthrust(deadthrust) {}

◆ ~DetStatus()

DetStatus::~DetStatus ( )
default

Member Function Documentation

◆ code()

int DetStatus::code ( ) const
inline

Definition at line 34 of file DetStatus.h.

34 { return m_code<0 ? m_code : m_code & 3; }

◆ colour()

std::string DetStatus::colour ( ) const

Definition at line 19 of file DetStatus.cxx.

19  {
20  // endcoding of colours here 0=unknown, 1=RED, 2=YELLOW, 3=GREEN
21  // only lowest two bits are used - rest is free for subdetector use
22  // unless code is -1, indicating BLACK (absent)
23  if (m_code<0) return "BLACK";
24  int code=m_code & 3;
25  if (code==1) return "RED";
26  if (code==2) return "YELLOW";
27  if (code==3) return "GREEN";
28  return "UNKNOWN";
29 }

◆ deadFrac()

float DetStatus::deadFrac ( ) const
inline

Definition at line 36 of file DetStatus.h.

36 { return m_deadfrac;}

◆ deadThrust()

float DetStatus::deadThrust ( ) const
inline

Definition at line 37 of file DetStatus.h.

37 { return m_deadthrust;}

◆ fullCode()

int DetStatus::fullCode ( ) const
inline

Definition at line 35 of file DetStatus.h.

35 { return m_code; }

Member Data Documentation

◆ m_code

int DetStatus::m_code
private

Definition at line 29 of file DetStatus.h.

◆ m_deadfrac

float DetStatus::m_deadfrac
private

Definition at line 30 of file DetStatus.h.

◆ m_deadthrust

float DetStatus::m_deadthrust
private

Definition at line 31 of file DetStatus.h.


The documentation for this class was generated from the following files:
DetStatus::m_deadthrust
float m_deadthrust
Definition: DetStatus.h:31
DetStatus::m_code
int m_code
Definition: DetStatus.h:29
DetStatus::m_deadfrac
float m_deadfrac
Definition: DetStatus.h:30
DetStatus::code
int code() const
Definition: DetStatus.h:34