ChannelStatus.h
Go to the documentation of this file.
1 /**
2  * \file ChannelStatus.h
3  *
4  * \ingroup IOVData
5  *
6  * \brief Class def header for a class ChannelStatus
7  *
8  * @author eberly@slac.stanford.edu
9  */
10 
11 /** \addtogroup IOVData
12 
13  @{*/
14 #ifndef IOVDATA_CHANNELSTATUS_H
15 #define IOVDATA_CHANNELSTATUS_H 1
16 
17 #include "ChData.h"
18 
19 namespace lariov {
20 
22 
23  /**
24  \class ChannelStatus
25  */
26  class ChannelStatus : public ChData {
27 
28  public:
29 
30  /// Constructor
31  ChannelStatus(unsigned int ch) : ChData(ch) {}
32 
33  /// Default destructor
34  ~ChannelStatus() = default;
35 
36  bool IsDead() const { return fStatus == kDEAD ? true : false; }
37  bool IsLowNoise() const { return fStatus == kLOWNOISE ? true : false; }
38  bool IsNoisy() const { return fStatus == kNOISY ? true : false; }
39  bool IsPresent() const { return fStatus == kDISCONNECTED ? false : true; }
40  bool IsGood() const { return fStatus == kGOOD ? true : false; }
41  chStatus Status() const { return fStatus; }
42 
44 
46  switch(status)
47  {
48  case kDISCONNECTED : return kDISCONNECTED;
49  break;
50  case kDEAD : return kDEAD;
51  break;
52  case kLOWNOISE : return kLOWNOISE;
53  break;
54  case kNOISY : return kNOISY;
55  break;
56  case kGOOD : return kGOOD;
57  break;
58  default : return kUNKNOWN;
59  };
60 
61  return kUNKNOWN;
62  }
63 
64  private:
66  }; //end class
67 } //end namespace lariov
68 
69 #endif
70 /** @} */ //end doxygen group
bool IsNoisy() const
Definition: ChannelStatus.h:38
bool IsPresent() const
Definition: ChannelStatus.h:39
chStatus Status() const
Definition: ChannelStatus.h:41
bool IsLowNoise() const
Definition: ChannelStatus.h:37
static chStatus GetStatusFromInt(int status)
Definition: ChannelStatus.h:45
bool IsDead() const
Definition: ChannelStatus.h:36
bool IsGood() const
Definition: ChannelStatus.h:40
Filters for channels, events, etc.
ChannelStatus(unsigned int ch)
Constructor.
Definition: ChannelStatus.h:31
Class def header for a class ChData.
~ChannelStatus()=default
Default destructor.
void SetStatus(chStatus status)
Definition: ChannelStatus.h:43