ATLAS Offline Software
Loading...
Searching...
No Matches
DetStatus.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// DetStatus.cxx - class to hold status of one detector
6// Richard Hawkings, started 19/12/06
8
14
15DetStatus::DetStatus(const int fullcode, const float deadfrac,
16 const float deadthrust) :
17 m_code(fullcode), m_deadfrac(deadfrac), m_deadthrust(deadthrust) {}
18
19std::string DetStatus::colour() const {
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}
std::string colour() const
Definition DetStatus.cxx:19
int m_code
Definition DetStatus.h:29
float m_deadthrust
Definition DetStatus.h:31
float m_deadfrac
Definition DetStatus.h:30
int code() const
Definition DetStatus.h:34