ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArRecConditions
LArRecConditions
LArBadFeb.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 LArBadFeb_H
6
#define LArBadFeb_H
7
8
#include "
LArRecConditions/LArBadFebEnum.h
"
9
10
class
LArBadFeb
:
public
LArBadFebEnum
{
11
public
:
12
13
LArBadFeb
() :
m_word
(0) {}
14
15
explicit
LArBadFeb
(
BitWord
rawStatus) :
m_word
(rawStatus) {}
16
18
bool
statusBad
(
ProblemType
pb)
const
{
19
BitWord
mask = 1 <<
bitPosition
(pb);
20
return
((
m_word
& mask) != 0);
21
}
22
24
bool
statusOK
(
ProblemType
pb)
const
{
return
!
statusBad
(pb);}
25
27
bool
good
()
const
{
return
(
m_word
<< 16) == 0;}
// only use the lower 16 bits
28
30
bool
deadAll
()
const
{
return
statusBad
(
deadAllBit
);}
31
33
bool
deadReadout
()
const
{
return
statusBad
(
deadReadoutBit
);}
34
36
bool
inError
()
const
{
return
statusBad
(
inErrorBit
);}
37
39
bool
deactivatedInOKS
()
const
{
return
statusBad
(
deactivatedInOKSBit
);}
40
41
unsigned
int
ignoreErrors
()
const
;
42
43
static
PosType
bitPosition
(
ProblemType
pb) {
return
static_cast<
PosType
>
(pb);}
44
45
bool
operator!=
(
BitWord
other) {
return
m_word
!= other;}
46
bool
operator!=
(
LArBadFeb
other) {
return
m_word
!= other.packedData();}
47
bool
operator==
(
BitWord
other) {
return
m_word
== other;}
48
bool
operator==
(
LArBadFeb
other) {
return
m_word
== other.packedData();}
49
50
LArBadFeb
&
operator|=
(
LArBadFeb
other) {
m_word
|=other.m_word;
return
*
this
;}
51
52
BitWord
packedData
()
const
{
return
m_word
;}
53
54
private
:
55
56
BitWord
m_word
;
57
58
BitWord
&
packedDataRef
() {
return
m_word
;}
59
60
friend
class
LArBadFebBitPacking
;
61
62
};
63
64
65
inline
unsigned
int
LArBadFeb::ignoreErrors
()
const
66
{
67
return
(
m_word
>> 16);
// return the most significant 16 bits
68
}
69
70
#endif
LArBadFebEnum.h
LArBadFebEnum
Definition
LArBadFebEnum.h:8
LArBadFebEnum::PosType
unsigned int PosType
Definition
LArBadFebEnum.h:12
LArBadFebEnum::ProblemType
ProblemType
Definition
LArBadFebEnum.h:15
LArBadFebEnum::deadAllBit
@ deadAllBit
Definition
LArBadFebEnum.h:16
LArBadFebEnum::inErrorBit
@ inErrorBit
Definition
LArBadFebEnum.h:18
LArBadFebEnum::deactivatedInOKSBit
@ deactivatedInOKSBit
Definition
LArBadFebEnum.h:19
LArBadFebEnum::deadReadoutBit
@ deadReadoutBit
Definition
LArBadFebEnum.h:17
LArBadFebEnum::BitWord
unsigned int BitWord
Definition
LArBadFebEnum.h:13
LArBadFeb::bitPosition
static PosType bitPosition(ProblemType pb)
Definition
LArBadFeb.h:43
LArBadFeb::LArBadFeb
LArBadFeb(BitWord rawStatus)
Definition
LArBadFeb.h:15
LArBadFeb::operator==
bool operator==(BitWord other)
Definition
LArBadFeb.h:47
LArBadFeb::ignoreErrors
unsigned int ignoreErrors() const
Definition
LArBadFeb.h:65
LArBadFeb::deadAll
bool deadAll() const
FEB is completely missing, e.g. powered off.
Definition
LArBadFeb.h:30
LArBadFeb::packedData
BitWord packedData() const
Definition
LArBadFeb.h:52
LArBadFeb::operator==
bool operator==(LArBadFeb other)
Definition
LArBadFeb.h:48
LArBadFeb::deactivatedInOKS
bool deactivatedInOKS() const
Deactivated in OKS.
Definition
LArBadFeb.h:39
LArBadFeb::operator!=
bool operator!=(BitWord other)
Definition
LArBadFeb.h:45
LArBadFeb::LArBadFebBitPacking
friend class LArBadFebBitPacking
Definition
LArBadFeb.h:60
LArBadFeb::packedDataRef
BitWord & packedDataRef()
Definition
LArBadFeb.h:58
LArBadFeb::operator|=
LArBadFeb & operator|=(LArBadFeb other)
Definition
LArBadFeb.h:50
LArBadFeb::statusOK
bool statusOK(ProblemType pb) const
Returns true if there is no problem in corresponding status bit.
Definition
LArBadFeb.h:24
LArBadFeb::statusBad
bool statusBad(ProblemType pb) const
Returns true if corresponding status bit its set.
Definition
LArBadFeb.h:18
LArBadFeb::inError
bool inError() const
FEB has readout errors, cannot be used.
Definition
LArBadFeb.h:36
LArBadFeb::deadReadout
bool deadReadout() const
FEB is not sending readout data, but the L1 trigger path is working.
Definition
LArBadFeb.h:33
LArBadFeb::operator!=
bool operator!=(LArBadFeb other)
Definition
LArBadFeb.h:46
LArBadFeb::m_word
BitWord m_word
Definition
LArBadFeb.h:56
LArBadFeb::LArBadFeb
LArBadFeb()
Definition
LArBadFeb.h:13
LArBadFeb::good
bool good() const
Returns true if no problems at all (all bits at zero).
Definition
LArBadFeb.h:27
Generated on
for ATLAS Offline Software by
1.17.0