DataFormats
GEMDigi
interface
GEMOHStatus.h
Go to the documentation of this file.
1
#ifndef DataFormats_GEMDigi_GEMOHStatus_h
2
#define DataFormats_GEMDigi_GEMOHStatus_h
3
#include "
GEBdata.h
"
4
#include <bitset>
5
#include <ostream>
6
7
// GEM OptoHybrid status
8
class
GEMOHStatus
{
9
public
:
10
union
Errors
{
11
uint16_t
codes
;
12
struct
{
13
uint16_t
EvtF
: 1;
// Event FIFO full
14
uint16_t
InF
: 1;
// Input FIFO full
15
uint16_t
L1aF
: 1;
// L1A FIFO full
16
uint16_t
EvtSzOFW
: 1;
// Event size overflow
17
uint16_t
Inv
: 1;
// Invalid event
18
uint16_t
OOScAvV
: 1;
// Out of Sync (EC mismatch) AMC vs VFAT
19
uint16_t
OOScVvV
: 1;
// Out of Sync (EC mismatch) VFAT vs VFAT
20
uint16_t
BxmAvV
: 1;
// BX mismatch AMC vs VFAT
21
uint16_t
BxmVvV
: 1;
// 1st bit BX mismatch VFAT vs VFAT
22
uint16_t
InUfw
: 1;
// Input FIFO underflow
23
uint16_t
badVFatCount
: 1;
24
};
25
};
26
union
Warnings
{
27
uint8_t
wcodes
;
28
struct
{
29
uint8_t
EvtNF
: 1;
// Event FIFO near full
30
uint8_t
InNF
: 1;
// Input FIFO near full
31
uint8_t
L1aNF
: 1;
// L1A FIFO near full
32
uint8_t
EvtSzW
: 1;
// Event size warning
33
uint8_t
InValidVFAT
: 1;
34
};
35
};
36
37
GEMOHStatus
() {}
38
GEMOHStatus
(
const
gem::GEBdata
& oh) {
39
Errors
error
{0};
40
error
.EvtF = oh.
evtF
();
41
error
.InF = oh.
inF
();
42
error
.L1aF = oh.
l1aF
();
43
error
.EvtSzOFW = oh.
evtSzOFW
();
44
error
.Inv = oh.
inv
();
45
error
.OOScAvV = oh.
oOScAvV
();
46
error
.OOScVvV = oh.
oOScVvV
();
47
error
.BxmAvV = oh.
bxmAvV
();
48
error
.BxmVvV = oh.
bxmVvV
();
49
error
.InUfw = oh.
inUfw
();
50
error
.badVFatCount = oh.
vfatWordCnt
() != oh.
vfatWordCntT
();
51
errors_
=
error
.codes;
52
53
Warnings
warn
{0};
54
warn
.EvtNF = oh.
evtNF
();
55
warn
.InNF = oh.
inNF
();
56
warn
.L1aNF = oh.
l1aNF
();
57
warn
.EvtSzW = oh.
evtSzW
();
58
warnings_
=
warn
.wcodes;
59
}
60
61
void
inValidVFAT
() {
62
Warnings
warn
{
warnings_
};
63
warn
.InValidVFAT = 1;
64
warnings_
=
warn
.wcodes;
65
}
66
67
bool
isBad
()
const
{
return
errors_
!= 0; }
68
uint16_t
errors
()
const
{
return
errors_
; }
69
uint8_t
warnings
()
const
{
return
warnings_
; }
70
71
private
:
72
uint16_t
errors_
;
73
uint8_t
warnings_
;
74
};
75
76
inline
std::ostream&
operator<<
(std::ostream&
out
,
const
GEMOHStatus
&
status
) {
77
out
<<
"GEMOHStatus errors "
<< std::bitset<16>(
status
.errors()) <<
" warnings "
<< std::bitset<8>(
status
.warnings());
78
return
out
;
79
}
80
81
#endif
gem::GEBdata::oOScAvV
bool oOScAvV() const
Definition:
GEBdata.h:78
gem::GEBdata::inv
bool inv() const
Definition:
GEBdata.h:79
GEMOHStatus::Warnings
Definition:
GEMOHStatus.h:26
gem::GEBdata::bxmAvV
bool bxmAvV() const
Definition:
GEBdata.h:76
GEMOHStatus::Warnings::InNF
uint8_t InNF
Definition:
GEMOHStatus.h:30
gem::GEBdata
Definition:
GEBdata.h:45
mps_update.status
status
Definition:
mps_update.py:68
GEMOHStatus::Errors::BxmVvV
uint16_t BxmVvV
Definition:
GEMOHStatus.h:21
GEMOHStatus::Errors::codes
uint16_t codes
Definition:
GEMOHStatus.h:11
GEMOHStatus::Errors::badVFatCount
uint16_t badVFatCount
Definition:
GEMOHStatus.h:23
GEMOHStatus::inValidVFAT
void inValidVFAT()
Definition:
GEMOHStatus.h:61
GEMOHStatus::Warnings::InValidVFAT
uint8_t InValidVFAT
Definition:
GEMOHStatus.h:33
GEMOHStatus::GEMOHStatus
GEMOHStatus()
Definition:
GEMOHStatus.h:37
relativeConstraints.error
error
Definition:
relativeConstraints.py:53
GEMOHStatus::Errors::BxmAvV
uint16_t BxmAvV
Definition:
GEMOHStatus.h:20
GEMOHStatus::Errors
Definition:
GEMOHStatus.h:10
operator<<
std::ostream & operator<<(std::ostream &out, const GEMOHStatus &status)
Definition:
GEMOHStatus.h:76
gem::GEBdata::inF
bool inF() const
Definition:
GEBdata.h:86
gem::GEBdata::vfatWordCnt
uint16_t vfatWordCnt() const
Definition:
GEBdata.h:71
gem::GEBdata::oOScVvV
bool oOScVvV() const
Definition:
GEBdata.h:77
GEMOHStatus::Warnings::EvtNF
uint8_t EvtNF
Definition:
GEMOHStatus.h:29
GEMOHStatus::Errors::OOScAvV
uint16_t OOScAvV
Definition:
GEMOHStatus.h:18
GEMOHStatus::Errors::InF
uint16_t InF
Definition:
GEMOHStatus.h:14
gem::GEBdata::evtF
bool evtF() const
Definition:
GEBdata.h:87
gem::GEBdata::evtSzOFW
bool evtSzOFW() const
Definition:
GEBdata.h:84
python.warn
def warn(*args, **kwargs)
Definition:
__init__.py:21
gem::GEBdata::l1aF
bool l1aF() const
Definition:
GEBdata.h:85
gem::GEBdata::evtSzW
bool evtSzW() const
Definition:
GEBdata.h:80
gem::GEBdata::vfatWordCntT
uint16_t vfatWordCntT() const
Definition:
GEBdata.h:73
GEMOHStatus::Errors::L1aF
uint16_t L1aF
Definition:
GEMOHStatus.h:15
gem::GEBdata::evtNF
bool evtNF() const
Definition:
GEBdata.h:83
gem::GEBdata::inNF
bool inNF() const
Definition:
GEBdata.h:82
GEMOHStatus::Errors::InUfw
uint16_t InUfw
Definition:
GEMOHStatus.h:22
gem::GEBdata::inUfw
bool inUfw() const
Definition:
GEBdata.h:88
GEMOHStatus::Warnings::wcodes
uint8_t wcodes
Definition:
GEMOHStatus.h:27
GEMOHStatus::Warnings::L1aNF
uint8_t L1aNF
Definition:
GEMOHStatus.h:31
GEMOHStatus::isBad
bool isBad() const
Definition:
GEMOHStatus.h:67
gem::GEBdata::l1aNF
bool l1aNF() const
Definition:
GEBdata.h:81
GEMOHStatus::Warnings::EvtSzW
uint8_t EvtSzW
Definition:
GEMOHStatus.h:32
GEMOHStatus::errors_
uint16_t errors_
Definition:
GEMOHStatus.h:72
GEMOHStatus::Errors::EvtSzOFW
uint16_t EvtSzOFW
Definition:
GEMOHStatus.h:16
gem::GEBdata::bxmVvV
bool bxmVvV() const
Definition:
GEBdata.h:75
GEBdata.h
GEMOHStatus::Errors::EvtF
uint16_t EvtF
Definition:
GEMOHStatus.h:13
GEMOHStatus::GEMOHStatus
GEMOHStatus(const gem::GEBdata &oh)
Definition:
GEMOHStatus.h:38
GEMOHStatus::Errors::Inv
uint16_t Inv
Definition:
GEMOHStatus.h:17
GEMOHStatus::warnings
uint8_t warnings() const
Definition:
GEMOHStatus.h:69
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
GEMOHStatus::errors
uint16_t errors() const
Definition:
GEMOHStatus.h:68
GEMOHStatus
Definition:
GEMOHStatus.h:8
GEMOHStatus::Errors::OOScVvV
uint16_t OOScVvV
Definition:
GEMOHStatus.h:19
GEMOHStatus::warnings_
uint8_t warnings_
Definition:
GEMOHStatus.h:73
Generated for CMSSW Reference Manual by
1.8.16