ATLAS Offline Software
DetStatus.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DETDESCRCOND_DETSTATUS_H
6 #define DETDESCRCOND_DETSTATUS_H
7 // DetStatus.h - class to hold details of a subdetector status
8 // Richard Hawkings, started 19/12/06
9 
10 #include<string>
11 
12 class DetStatus final {
13  public:
14  DetStatus();
15  // constructor with parameters
16  DetStatus(const int fullcode,
17  const float deadfrac, const float deadthrust);
18 
19  ~DetStatus() = default;
20 
21  // access functions
22  int code() const;
23  int fullCode() const;
24  float deadFrac() const;
25  float deadThrust() const;
26  std::string colour() const;
27 
28  private:
29  int m_code;
30  float m_deadfrac;
31  float m_deadthrust;
32 };
33 
34 inline int DetStatus::code() const { return m_code<0 ? m_code : m_code & 3; }
35 inline int DetStatus::fullCode() const { return m_code; }
36 inline float DetStatus::deadFrac() const { return m_deadfrac;}
37 inline float DetStatus::deadThrust() const { return m_deadthrust;}
38 
39 #endif // DETDESCRCOND_DETSTATUS_H
DetStatus::~DetStatus
~DetStatus()=default
DetStatus::DetStatus
DetStatus()
Definition: DetStatus.cxx:9
DetStatus::deadFrac
float deadFrac() const
Definition: DetStatus.h:36
DetStatus::fullCode
int fullCode() const
Definition: DetStatus.h:35
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::colour
std::string colour() const
Definition: DetStatus.cxx:19
DetStatus
Definition: DetStatus.h:12
DetStatus::code
int code() const
Definition: DetStatus.h:34
DetStatus::deadThrust
float deadThrust() const
Definition: DetStatus.h:37