Main Page
Namespaces
Classes
Package Documentation
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
9
unsigned
int
where
= (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
{
16
//return static_cast<ReadoutErrorType>(theError&0xf);
17
return
ReadoutErrorType
(
theError
& 0xf);
18
}
19
20
LinkBoardElectronicIndex
ReadoutError::where
()
const
21
{
22
unsigned
int
data
= (
theError
>>4);
23
LinkBoardElectronicIndex
ele;
24
ele.
dccId
= (data >> 13);
25
ele.
dccInputChannelNum
= (data >> 7) & 63;
26
ele.
tbLinkInputNum
= (data >> 2) & 31;
27
ele.
lbNumInLink
= data & 3;
28
return
ele;
29
}
30
31
std::string
ReadoutError::name
(
const
ReadoutErrorType
& code)
32
{
33
std::string
result
;
34
switch
(code) {
35
case
(
HeaderCheckFail
) : { result =
"HeaderCheckFail"
;
break
; }
36
case
(
InconsitentFedId
) : { result =
"InconsitentFedId"
;
break
; }
37
case
(
TrailerCheckFail
) : { result =
"TrailerCheckFail"
;
break
; }
38
case
(
InconsistentDataSize
) : { result =
"InconsistentDataSize"
;
break
; }
39
case
(
InvalidLB
) : { result =
"InvalidLB"
;
break
; }
40
case
(
EmptyPackedStrips
) : { result =
"EmptyPackedStrips"
;
break
; }
41
case
(
InvalidDetId
) : { result =
"InvalidDetId"
;
break
; }
42
case
(
InvalidStrip
) : { result =
"InvalidStrip"
;
break
; }
43
case
(
EOD
) : { result =
"EOD"
;
break
; }
44
default
: { result =
"NoProblem"
; }
45
}
46
return
result
;
47
}
48
LinkBoardElectronicIndex::dccInputChannelNum
int dccInputChannelNum
Definition:
LinkBoardElectronicIndex.h:12
rpcrawtodigi::ReadoutError::where
LinkBoardElectronicIndex where() const
Definition:
ReadoutError.cc:20
type
type
Definition:
HCALResponse.h:21
callgraph.path
path
Definition:
callgraph.py:38
rpcrawtodigi::ReadoutError::ReadoutError
ReadoutError(unsigned int rawCode=0)
Definition:
ReadoutError.h:24
mps_fire.result
result
Definition:
mps_fire.py:113
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
LinkBoardElectronicIndex::tbLinkInputNum
int tbLinkInputNum
Definition:
LinkBoardElectronicIndex.h:13
rpcrawtodigi::ReadoutError::name
std::string name() const
Definition:
ReadoutError.h:33
LinkBoardElectronicIndex::lbNumInLink
int lbNumInLink
Definition:
LinkBoardElectronicIndex.h:14
rpcrawtodigi::ReadoutError::type
ReadoutErrorType type() const
Definition:
ReadoutError.cc:14
LinkBoardElectronicIndex
Definition:
LinkBoardElectronicIndex.h:10
rpcrawtodigi::ReadoutError::EmptyPackedStrips
Definition:
ReadoutError.h:18
rpcrawtodigi::ReadoutError::EOD
Definition:
ReadoutError.h:21
rpcrawtodigi::ReadoutError::InconsistentDataSize
Definition:
ReadoutError.h:16
rpcrawtodigi::ReadoutError::InvalidLB
Definition:
ReadoutError.h:17
LinkBoardElectronicIndex::dccId
int dccId
Definition:
LinkBoardElectronicIndex.h:11
rpcrawtodigi::ReadoutError::InconsitentFedId
Definition:
ReadoutError.h:14
ReadoutError.h
rpcrawtodigi::ReadoutError::theError
unsigned int theError
Definition:
ReadoutError.h:38
rpcrawtodigi::ReadoutError::InvalidDetId
Definition:
ReadoutError.h:19
rpcrawtodigi::ReadoutError::TrailerCheckFail
Definition:
ReadoutError.h:15
rpcrawtodigi::ReadoutError::HeaderCheckFail
Definition:
ReadoutError.h:13
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
rpcrawtodigi::ReadoutError::InvalidStrip
Definition:
ReadoutError.h:20
rpcrawtodigi::ReadoutError::ReadoutErrorType
ReadoutErrorType
Definition:
ReadoutError.h:11
rpcrawtodigi
Definition:
DataRecord.h:9
Generated for CMSSW Reference Manual by
1.8.11