CondFormats
HcalObjects
interface
HcalChannelStatus.h
Go to the documentation of this file.
1
#ifndef HcalChannelStatus_h
2
#define HcalChannelStatus_h
3
4
/*
5
\class HcalChannelStatus
6
\author Radek Ofierzynski
7
contains one channel status and corresponding DetId
8
*/
9
10
#include "
CondFormats/Serialization/interface/Serializable.h
"
11
#include <cstdint>
12
13
class
HcalChannelStatus
{
14
public
:
15
// contains the defined bits for easy access, see https://twiki.cern.ch/twiki/bin/view/CMS/HcalDataValidationWorkflow
16
enum
StatusBit
{
17
HcalCellOff
= 0,
// 1=Hcal cell is off
18
HcalCellMask
= 1,
// 1=Hcal cell is masked/to be masked at RecHit Level
19
// Quality Bits
20
HcalCellDead
= 5,
// 1=Hcal cell is dead (from DQM algo)
21
HcalCellHot
= 6,
// 1=Hcal cell is hot (from DQM algo)
22
HcalCellStabErr
= 7,
// 1=Hcal cell has stability error
23
HcalCellTimErr
= 8,
// 1=Hcal cell has timing error
24
HcalCellExcludeFromHBHENoiseSummary
= 9,
//1=cell is completely excluded from all HBHENoiseSummary computations
25
HcalCellExcludeFromHBHENoiseSummaryR45
=
26
10,
//1=cell's rechit is excluded when calculating the TS4TS5 ratio only in the HBHE Noise Summary
27
HcalBadLaserSignal
= 11,
//1 = channel does not receive good laser calibration signal
28
// Trigger Bits
29
HcalCellTrigMask
= 15,
// 1=cell is masked from the Trigger
30
// CaloTower Bits
31
HcalCellCaloTowerMask
= 18,
// 1=cell is always excluded from the CaloTower, regardless of other bit settings.
32
HcalCellCaloTowerProb
= 19
// 1=cell is counted as problematic within the tower.
33
};
34
35
HcalChannelStatus
() :
mId
(0),
mStatus
(0) {}
36
HcalChannelStatus
(
unsigned
long
fid, uint32_t
status
) :
mId
(fid),
mStatus
(
status
) {}
37
38
// void setDetId(unsigned long fid) {mId = fid;}
39
void
setValue
(uint32_t
value
) {
mStatus
=
value
; }
40
41
// for the following, one can use unsigned int values or HcalChannelStatus::StatusBit values
42
// e.g. 5 or HcalChannelStatus::HcalCellDead
43
void
setBit
(
unsigned
int
bitnumber) {
44
uint32_t statadd = 0x1 << (bitnumber);
45
mStatus
=
mStatus
| statadd;
46
}
47
void
unsetBit
(
unsigned
int
bitnumber) {
48
uint32_t statadd = 0x1 << (bitnumber);
49
statadd = ~statadd;
50
mStatus
=
mStatus
& statadd;
51
}
52
53
bool
isBitSet
(
unsigned
int
bitnumber)
const
{
54
uint32_t statadd = 0x1 << (bitnumber);
55
return
(
mStatus
& statadd) ? (
true
) : (
false
);
56
}
57
58
uint32_t
rawId
()
const
{
return
mId
; }
59
60
uint32_t
getValue
()
const
{
return
mStatus
; }
61
62
private
:
63
uint32_t
mId
;
64
uint32_t
mStatus
;
65
66
COND_SERIALIZABLE
;
67
};
68
#endif
mps_update.status
status
Definition:
mps_update.py:69
HcalChannelStatus::HcalCellCaloTowerProb
Definition:
HcalChannelStatus.h:32
HcalChannelStatus::HcalChannelStatus
HcalChannelStatus(unsigned long fid, uint32_t status)
Definition:
HcalChannelStatus.h:36
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition:
Serializable.h:39
HcalChannelStatus::unsetBit
void unsetBit(unsigned int bitnumber)
Definition:
HcalChannelStatus.h:47
HcalChannelStatus::setBit
void setBit(unsigned int bitnumber)
Definition:
HcalChannelStatus.h:43
HcalChannelStatus::rawId
uint32_t rawId() const
Definition:
HcalChannelStatus.h:58
HcalChannelStatus::HcalCellMask
Definition:
HcalChannelStatus.h:18
HcalChannelStatus::HcalBadLaserSignal
Definition:
HcalChannelStatus.h:27
HcalChannelStatus::HcalCellTimErr
Definition:
HcalChannelStatus.h:23
HcalChannelStatus::HcalCellOff
Definition:
HcalChannelStatus.h:17
HcalChannelStatus::HcalCellHot
Definition:
HcalChannelStatus.h:21
HcalChannelStatus
Definition:
HcalChannelStatus.h:13
HcalChannelStatus::HcalChannelStatus
HcalChannelStatus()
Definition:
HcalChannelStatus.h:35
HcalChannelStatus::HcalCellStabErr
Definition:
HcalChannelStatus.h:22
HcalChannelStatus::getValue
uint32_t getValue() const
Definition:
HcalChannelStatus.h:60
HcalChannelStatus::mId
uint32_t mId
Definition:
HcalChannelStatus.h:63
Serializable.h
value
Definition:
value.py:1
HcalChannelStatus::HcalCellCaloTowerMask
Definition:
HcalChannelStatus.h:31
HcalChannelStatus::HcalCellDead
Definition:
HcalChannelStatus.h:20
HcalChannelStatus::HcalCellTrigMask
Definition:
HcalChannelStatus.h:29
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
HcalChannelStatus::isBitSet
bool isBitSet(unsigned int bitnumber) const
Definition:
HcalChannelStatus.h:53
HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummaryR45
Definition:
HcalChannelStatus.h:25
HcalChannelStatus::StatusBit
StatusBit
Definition:
HcalChannelStatus.h:16
HcalChannelStatus::HcalCellExcludeFromHBHENoiseSummary
Definition:
HcalChannelStatus.h:24
HcalChannelStatus::setValue
void setValue(uint32_t value)
Definition:
HcalChannelStatus.h:39
HcalChannelStatus::mStatus
uint32_t mStatus
Definition:
HcalChannelStatus.h:64
Generated for CMSSW Reference Manual by
1.8.16