This class is designed to unpack raw data from HGCal, formatted as S-Links, capture blocks, and ECON-Ds, to HGCROC channel data. More...
#include <HGCalUnpacker.h>
Public Types | |
enum | CaptureBlockHeaderShift { kCaptureBlockReservedShift = 26 } |
enum | CaptureBlockMask { kCaptureBlockReservedMask = 0b111111, kCaptureBlockECONDStatusMask = 0b111 } |
enum | ECONDHeaderMask { kHeaderMask = 0b111111111, kPayloadLengthMask = 0b111111111, kPassThroughMask = 0b1, kHTMask = 0b11, kEBOMask = 0b11, kMatchMask = 0b1, kTruncatedMask = 0b1 } |
enum | ECONDHeaderShift { kHeaderShift = 23, kPayloadLengthShift = 14, kPassThroughShift = 13, kHTShift = 10, kEBOShift = 8, kMatchShift = 7, kTruncatedShift = 6 } |
enum | ERXHeaderMask { kFormatMask = 0b1, kCommonmode0Mask = 0b1111111111, kCommonmode1Mask = 0b1111111111 } |
enum | ERXHeaderShift { kFormatShift = 25, kCommonmode0Shift = 15, kCommonmode1Shift = 5 } |
enum | SLinkHeaderMask { kSLinkBOEMask = 0b11111111 } |
enum | SLinkHeaderShift { kSLinkBOEShift = 24 } |
Public Member Functions | |
const std::vector< uint32_t > & | badECOND () const |
const std::vector< HGCROCChannelDataFrame< D > > & | channelData () const |
const std::vector< uint16_t > & | commonModeData () const |
const std::vector< uint32_t > & | commonModeIndex () const |
HGCalUnpacker (HGCalUnpackerConfig config) | |
void | parseCaptureBlock (const std::vector< uint32_t > &inputArray, const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> &enabledERXMapping, const std::function< D(HGCalElectronicsId elecID)> &logicalMapping) |
void | parseECOND (const std::vector< uint32_t > &inputArray, const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> &enabledERXMapping, const std::function< D(HGCalElectronicsId elecID)> &logicalMapping) |
void | parseSLink (const std::vector< uint32_t > &inputArray, const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> &enabledERXMapping, const std::function< D(HGCalElectronicsId elecID)> &logicalMapping) |
Private Attributes | |
std::vector< uint32_t > | badECOND_ |
Array of indices of bad ECON-Ds. More... | |
std::vector< HGCROCChannelDataFrame< D > > | channelData_ |
Array for unpacked channels. More... | |
size_t | channelDataSize_ {0} |
Size of unpacked channels. More... | |
std::vector< uint16_t > | commonModeData_ |
Array for unpacked common modes. More... | |
size_t | commonModeDataSize_ {0} |
Size of unpacked common modes. More... | |
std::vector< uint32_t > | commonModeIndex_ |
Array for logicalMapping between unpacked channels to first common mode. More... | |
HGCalUnpackerConfig | config_ |
const uint32_t | erxBodyBits_ [16] = {24, 16, 24, 24, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32} |
const uint32_t | erxBodyLeftShift_ [16] = {2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
const uint32_t | erxBodyMask_ [16] |
const uint32_t | erxBodyRightShift_ [16] = {0, 8, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
This class is designed to unpack raw data from HGCal, formatted as S-Links, capture blocks, and ECON-Ds, to HGCROC channel data.
Definition at line 36 of file HGCalUnpacker.h.
enum HGCalUnpacker::CaptureBlockHeaderShift |
enum HGCalUnpacker::CaptureBlockMask |
Enumerator | |
---|---|
kCaptureBlockReservedMask | |
kCaptureBlockECONDStatusMask |
Definition at line 47 of file HGCalUnpacker.h.
enum HGCalUnpacker::ECONDHeaderMask |
Enumerator | |
---|---|
kHeaderMask | |
kPayloadLengthMask | |
kPassThroughMask | |
kHTMask | |
kEBOMask | |
kMatchMask | |
kTruncatedMask |
Definition at line 60 of file HGCalUnpacker.h.
enum HGCalUnpacker::ECONDHeaderShift |
Enumerator | |
---|---|
kHeaderShift | |
kPayloadLengthShift | |
kPassThroughShift | |
kHTShift | |
kEBOShift | |
kMatchShift | |
kTruncatedShift |
Definition at line 51 of file HGCalUnpacker.h.
enum HGCalUnpacker::ERXHeaderMask |
Enumerator | |
---|---|
kFormatMask | |
kCommonmode0Mask | |
kCommonmode1Mask |
Definition at line 74 of file HGCalUnpacker.h.
enum HGCalUnpacker::ERXHeaderShift |
Enumerator | |
---|---|
kFormatShift | |
kCommonmode0Shift | |
kCommonmode1Shift |
Definition at line 69 of file HGCalUnpacker.h.
enum HGCalUnpacker::SLinkHeaderMask |
Enumerator | |
---|---|
kSLinkBOEMask |
Definition at line 41 of file HGCalUnpacker.h.
enum HGCalUnpacker::SLinkHeaderShift |
Enumerator | |
---|---|
kSLinkBOEShift |
Definition at line 38 of file HGCalUnpacker.h.
|
explicit |
Definition at line 17 of file HGCalUnpacker.cc.
|
inline |
Definition at line 111 of file HGCalUnpacker.h.
References HGCalUnpacker< D >::badECOND_.
|
inline |
Definition at line 106 of file HGCalUnpacker.h.
References HGCalUnpacker< D >::channelData_.
|
inline |
Definition at line 110 of file HGCalUnpacker.h.
References HGCalUnpacker< D >::commonModeData_.
|
inline |
Definition at line 108 of file HGCalUnpacker.h.
References HGCalUnpacker< D >::commonModeIndex_.
void HGCalUnpacker< D >::parseCaptureBlock | ( | const std::vector< uint32_t > & | inputArray, |
const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> & | enabledERXMapping, | ||
const std::function< D(HGCalElectronicsId elecID)> & | logicalMapping | ||
) |
parse input in capture block format
[in] | inputArray | input as 32-bits words vector. |
[in] | enabledERXMapping | map from capture block indices to enabled eRx in this ECON-D |
[in] | logicalMapping | logical mapping from HGCalElectronicsId to class D as ID |
Definition at line 279 of file HGCalUnpacker.cc.
References TauDecayModes::dec, Exception, l1ctLayer2EG_cff::id, createfilelist::int, LogDebug, and groupFilesInBlocks::temp.
void HGCalUnpacker< D >::parseECOND | ( | const std::vector< uint32_t > & | inputArray, |
const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> & | enabledERXMapping, | ||
const std::function< D(HGCalElectronicsId elecID)> & | logicalMapping | ||
) |
parse input in ECON-D format
[in] | inputArray | input as 32-bits words vector. |
[in] | enabledERXMapping | map from ECON-D indices to enabled eRx in this ECON-D |
[in] | logicalMapping | logical mapping from HGCalElectronicsId to class D as ID |
Definition at line 510 of file HGCalUnpacker.cc.
References TauDecayModes::dec, Exception, l1ctLayer2EG_cff::id, createfilelist::int, LogDebug, and groupFilesInBlocks::temp.
void HGCalUnpacker< D >::parseSLink | ( | const std::vector< uint32_t > & | inputArray, |
const std::function< uint16_t(uint16_t sLink, uint8_t captureBlock, uint8_t econd)> & | enabledERXMapping, | ||
const std::function< D(HGCalElectronicsId elecID)> & | logicalMapping | ||
) |
parse input in S-Link format
[in] | inputArray | input as 32-bits words vector. |
[in] | enabledERXMapping | map from S-Link indices to enabled eRx in this ECON-D |
[in] | logicalMapping | logical mapping from HGCalElectronicsId to class D as ID |
Definition at line 24 of file HGCalUnpacker.cc.
References TauDecayModes::dec, Exception, l1ctLayer2EG_cff::id, createfilelist::int, LogDebug, and groupFilesInBlocks::temp.
|
private |
Array of indices of bad ECON-Ds.
Definition at line 139 of file HGCalUnpacker.h.
Referenced by HGCalUnpacker< D >::badECOND().
|
private |
Array for unpacked channels.
Definition at line 136 of file HGCalUnpacker.h.
Referenced by HGCalUnpacker< D >::channelData().
|
private |
Size of unpacked channels.
Definition at line 134 of file HGCalUnpacker.h.
|
private |
Array for unpacked common modes.
Definition at line 138 of file HGCalUnpacker.h.
Referenced by HGCalUnpacker< D >::commonModeData().
|
private |
Size of unpacked common modes.
Definition at line 135 of file HGCalUnpacker.h.
|
private |
Array for logicalMapping between unpacked channels to first common mode.
Definition at line 137 of file HGCalUnpacker.h.
Referenced by HGCalUnpacker< D >::commonModeIndex().
|
private |
Definition at line 133 of file HGCalUnpacker.h.
|
private |
Definition at line 132 of file HGCalUnpacker.h.
|
private |
Definition at line 114 of file HGCalUnpacker.h.
|
private |
Definition at line 116 of file HGCalUnpacker.h.
|
private |
Definition at line 115 of file HGCalUnpacker.h.