EventFilter
EcalTBRawToDigi
src
DCCTrailerBlock.cc
Go to the documentation of this file.
1
#include "
DCCTrailerBlock.h
"
2
#include "
DCCDataParser.h
"
3
#include "
DCCDataMapper.h
"
4
DCCTBTrailerBlock::DCCTBTrailerBlock
(
DCCTBDataParser
*
parser
,
5
const
uint32_t*
buffer
,
6
uint32_t numbBytes,
7
uint32_t wToEnd,
8
uint32_t wordEventOffset,
9
uint32_t expectedLength,
10
uint32_t expectedCRC)
11
:
DCCTBBlockPrototype
(
parser
,
"DCCTRAILER"
,
buffer
, numbBytes, wToEnd, wordEventOffset),
12
expectedLength_(expectedLength) {
13
errors_
[
"TRAILER::EVENT LENGTH"
] = 0;
14
errors_
[
"TRAILER::EOE"
] = 0;
15
errors_
[
"TRAILER::CRC"
] = 0;
16
errors_
[
"TRAILER::T"
] = 0;
17
18
// Get data fields from the mapper and retrieve data ///////////////////////////////////////////
19
mapperFields_
=
parser_
->
mapper
()->
trailerFields
();
20
parseData
();
22
23
// check internal data ////
24
dataCheck
();
26
}
27
28
void
DCCTBTrailerBlock::dataCheck
() {
29
std::string
checkErrors(
""
);
30
31
std::pair<bool, std::string>
res
;
32
33
res
=
checkDataField
(
"EVENT LENGTH"
,
expectedLength_
);
34
if
(!
res
.first) {
35
checkErrors +=
res
.second;
36
(
errors_
[
"TRAILER::EVENT LENGTH"
])++;
37
}
38
39
res
=
checkDataField
(
"EOE"
,
EOE
);
40
if
(!
res
.first) {
41
checkErrors +=
res
.second;
42
(
errors_
[
"TRAILER::EOE"
])++;
43
}
44
45
res
=
checkDataField
(
"T"
, 0);
46
if
(!
res
.first) {
47
checkErrors +=
res
.second;
48
(
errors_
[
"TRAILER::T"
])++;
49
}
50
51
//checkErrors += checkDataField("CRC",expectedCRC_);
52
53
if
(!checkErrors.empty()) {
54
errorString_
+=
"\n ======================================================================\n"
;
55
errorString_
+=
std::string
(
" "
) +
name_
+
std::string
(
" data fields checks errors : "
);
56
errorString_
+= checkErrors;
57
errorString_
+=
"\n ======================================================================"
;
58
blockError_
=
true
;
59
}
60
}
DCCTBBlockPrototype::mapperFields_
std::set< DCCTBDataField *, DCCTBDataFieldComparator > * mapperFields_
Definition:
DCCBlockPrototype.h:86
writedatasetfile.parser
parser
Definition:
writedatasetfile.py:7
DCCTBTrailerBlock::EOE
Definition:
DCCTrailerBlock.h:23
DCCTBBlockPrototype::checkDataField
virtual std::pair< bool, std::string > checkDataField(std::string name, uint32_t data)
Definition:
DCCBlockPrototype.cc:173
edmScanValgrind.buffer
buffer
Definition:
edmScanValgrind.py:171
DCCTBTrailerBlock::dataCheck
void dataCheck()
Definition:
DCCTrailerBlock.cc:28
DCCDataParser.h
DCCTBBlockPrototype::errors_
std::map< std::string, uint32_t > errors_
Definition:
DCCBlockPrototype.h:84
DCCTBTrailerBlock::DCCTBTrailerBlock
DCCTBTrailerBlock(DCCTBDataParser *parser, const uint32_t *buffer, uint32_t numbBytes, uint32_t wToEnd, uint32_t wordEventOffset, uint32_t expectedLength, uint32_t expectedCRC)
Definition:
DCCTrailerBlock.cc:4
DCCTBBlockPrototype::parser_
DCCTBDataParser * parser_
Definition:
DCCBlockPrototype.h:81
DCCDataMapper.h
DCCTBTrailerBlock::expectedLength_
uint32_t expectedLength_
Definition:
DCCTrailerBlock.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
DCCTBBlockPrototype::parseData
virtual void parseData()
Definition:
DCCBlockPrototype.cc:38
DCCTBDataMapper::trailerFields
std::set< DCCTBDataField *, DCCTBDataFieldComparator > * trailerFields()
Definition:
DCCDataMapper.h:114
DCCTBBlockPrototype::blockError_
bool blockError_
Definition:
DCCBlockPrototype.h:74
res
Definition:
Electron.h:6
DCCTBBlockPrototype::errorString_
std::string errorString_
Definition:
DCCBlockPrototype.h:77
DCCTrailerBlock.h
DCCTBDataParser::mapper
DCCTBDataMapper * mapper()
Definition:
DCCDataParser.h:172
DCCTBDataParser
Definition:
DCCDataParser.h:25
DCCTBBlockPrototype::name_
std::string name_
Definition:
DCCBlockPrototype.h:76
DCCTBBlockPrototype
Definition:
DCCBlockPrototype.h:21
Generated for CMSSW Reference Manual by
1.8.16