Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DataFormats
RPCDigi
src
ReadoutError.cc
Go to the documentation of this file.
1
#include "
DataFormats/RPCDigi/interface/ReadoutError.h
"
2
#include <bitset>
3
#include <iostream>
4
5
using namespace
rpcrawtodigi;
6
7
ReadoutError::ReadoutError
(
const
LinkBoardElectronicIndex
&
path
,
const
ReadoutErrorType
&
type
) {
8
unsigned
int
where
=
9
(path.
dccId
<< 13) | (path.
dccInputChannelNum
<< 7) | (path.
tbLinkInputNum
<< 2) | path.
lbNumInLink
;
10
unsigned
int
what = type;
11
theError
= (where << 4) | (what & 0xf);
12
}
13
14
ReadoutError::ReadoutErrorType
ReadoutError::type
()
const
{
15
//return static_cast<ReadoutErrorType>(theError&0xf);
16
return
ReadoutErrorType
(
theError
& 0xf);
17
}
18
19
LinkBoardElectronicIndex
ReadoutError::where
()
const
{
20
unsigned
int
data
= (
theError
>> 4);
21
LinkBoardElectronicIndex
ele;
22
ele.
dccId
= (data >> 13);
23
ele.
dccInputChannelNum
= (data >> 7) & 63;
24
ele.
tbLinkInputNum
= (data >> 2) & 31;
25
ele.
lbNumInLink
= data & 3;
26
return
ele;
27
}
28
29
std::string
ReadoutError::name
(
const
ReadoutErrorType
&code) {
30
std::string
result
;
31
switch
(code) {
32
case
(
HeaderCheckFail
): {
33
result =
"HeaderCheckFail"
;
34
break
;
35
}
36
case
(
InconsitentFedId
): {
37
result =
"InconsitentFedId"
;
38
break
;
39
}
40
case
(
TrailerCheckFail
): {
41
result =
"TrailerCheckFail"
;
42
break
;
43
}
44
case
(
InconsistentDataSize
): {
45
result =
"InconsistentDataSize"
;
46
break
;
47
}
48
case
(
InvalidLB
): {
49
result =
"InvalidLB"
;
50
break
;
51
}
52
case
(
EmptyPackedStrips
): {
53
result =
"EmptyPackedStrips"
;
54
break
;
55
}
56
case
(
InvalidDetId
): {
57
result =
"InvalidDetId"
;
58
break
;
59
}
60
case
(
InvalidStrip
): {
61
result =
"InvalidStrip"
;
62
break
;
63
}
64
case
(
EOD
): {
65
result =
"EOD"
;
66
break
;
67
}
68
default
: {
69
result =
"NoProblem"
;
70
}
71
}
72
return
result
;
73
}
LinkBoardElectronicIndex::dccInputChannelNum
int dccInputChannelNum
Definition:
LinkBoardElectronicIndex.h:12
rpcrawtodigi::ReadoutError::where
LinkBoardElectronicIndex where() const
Definition:
ReadoutError.cc:19
rpcrawtodigi::ReadoutError::ReadoutError
ReadoutError(unsigned int rawCode=0)
Definition:
ReadoutError.h:23
LinkBoardElectronicIndex::tbLinkInputNum
int tbLinkInputNum
Definition:
LinkBoardElectronicIndex.h:13
rpcrawtodigi::ReadoutError::name
std::string name() const
Definition:
ReadoutError.h:32
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:39
LinkBoardElectronicIndex::lbNumInLink
int lbNumInLink
Definition:
LinkBoardElectronicIndex.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
rpcrawtodigi::ReadoutError::type
ReadoutErrorType type() const
Definition:
ReadoutError.cc:14
mps_fire.result
tuple result
Definition:
mps_fire.py:311
LinkBoardElectronicIndex
Definition:
LinkBoardElectronicIndex.h:10
rpcrawtodigi::ReadoutError::EmptyPackedStrips
Definition:
ReadoutError.h:17
rpcrawtodigi::ReadoutError::EOD
Definition:
ReadoutError.h:20
rpcrawtodigi::ReadoutError::InconsistentDataSize
Definition:
ReadoutError.h:15
rpcrawtodigi::ReadoutError::InvalidLB
Definition:
ReadoutError.h:16
LinkBoardElectronicIndex::dccId
int dccId
Definition:
LinkBoardElectronicIndex.h:11
rpcrawtodigi::ReadoutError::InconsitentFedId
Definition:
ReadoutError.h:13
ReadoutError.h
rpcrawtodigi::ReadoutError::theError
unsigned int theError
Definition:
ReadoutError.h:37
rpcrawtodigi::ReadoutError::InvalidDetId
Definition:
ReadoutError.h:18
rpcrawtodigi::ReadoutError::TrailerCheckFail
Definition:
ReadoutError.h:14
fed_dqm_sourceclient-live_cfg.path
string path
Definition:
fed_dqm_sourceclient-live_cfg.py:47
rpcrawtodigi::ReadoutError::HeaderCheckFail
Definition:
ReadoutError.h:12
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
rpcrawtodigi::ReadoutError::InvalidStrip
Definition:
ReadoutError.h:19
rpcrawtodigi::ReadoutError::ReadoutErrorType
ReadoutErrorType
Definition:
ReadoutError.h:10
Generated for CMSSW Reference Manual by
1.8.5