wrapper for a 32b data word from a single channel and its detid The format is always the same: |1b|1b|10b|10b|10b| The filling depends on the operation mode (normal or characterization) and on the value of the Tc (TOT-complete) and Tp (TOT-in-progress) flags See EDMS CMS-CE-ES-0004 for details More...
#include <HGCROCChannelDataFrame.h>
Public Types | |
enum | HGCROCChannelDataFrameMask { kFlagMask = 0x1, kPacketMask = 0x3ff } |
enum | HGCROCChannelDataFrameShift { kFlag2Shift = 31, kFlag1Shift = 30, kPacket3Shift = 20, kPacket2Shift = 10, kPacket1Shift = 0 } |
typedef D | key_type |
Public Member Functions | |
uint16_t | adc (bool charMode=false) const |
uint16_t | adcm1 (bool charMode=false) const |
uint16_t | compressToT (uint16_t totraw) |
the 12-bit TOT is compressed to a 10bit word truncating the first two bits when the value is above 0x1ff=2^8-1. The MSB is set to 1 in case truncation occurs. More... | |
uint16_t | decompressToT (uint16_t totraw) const |
the 10-bit TOT word is decompressed back to 12 bit word In case truncation occurred the word is shifted by 2 bit More... | |
void | fill (bool charMode, bool tc, bool tp, uint16_t adcm1, uint16_t adc, uint16_t tot, uint16_t toa) |
fills the 32b word characterization mode : tc|tp|adc|tot|toa normal mode: tc|tp|adcm1|*|toa with *=tot if tc==True else adc More... | |
void | fillFlag1 (bool flag) |
void | fillFlag2 (bool flag) |
setters More... | |
void | fillPacket1 (int word) |
void | fillPacket2 (int word) |
void | fillPacket3 (int word) |
void | fillRaw (bool flag2, bool flag1, uint16_t word3, uint16_t word2, uint16_t word1) |
bool | flag1 () const |
bool | flag2 () const |
HGCROCChannelDataFrame () | |
CTOR. More... | |
HGCROCChannelDataFrame (const D &id) | |
HGCROCChannelDataFrame (uint32_t value) | |
HGCROCChannelDataFrame (const D &id, uint32_t value) | |
HGCROCChannelDataFrame (const HGCROCChannelDataFrame &o) | |
const D & | id () const |
det id More... | |
uint32_t | operator() () const |
getters More... | |
uint16_t | packet1 () const |
uint16_t | packet2 () const |
uint16_t | packet3 () const |
void | print (std::ostream &out=std::cout) const |
uint32_t | raw () const |
uint16_t | rawtot (bool charMode=false) const |
bool | tc () const |
uint16_t | tctp () const |
uint16_t | toa () const |
uint16_t | tot (bool charMode=false) const |
bool | tp () const |
Private Member Functions | |
void | fillPacket (uint16_t word, HGCROCChannelDataFrameMask mask, HGCROCChannelDataFrameShift shift) |
wrapper to reset words at a given position More... | |
uint32_t | readPacket (HGCROCChannelDataFrameMask mask, HGCROCChannelDataFrameShift shift) const |
wrapper to get packet at a given position More... | |
Private Attributes | |
D | id_ |
uint32_t | value_ |
wrapper for a 32b data word from a single channel and its detid The format is always the same: |1b|1b|10b|10b|10b| The filling depends on the operation mode (normal or characterization) and on the value of the Tc (TOT-complete) and Tp (TOT-in-progress) flags See EDMS CMS-CE-ES-0004 for details
Definition at line 18 of file HGCROCChannelDataFrame.h.
typedef D HGCROCChannelDataFrame< D >::key_type |
Definition at line 21 of file HGCROCChannelDataFrame.h.
enum HGCROCChannelDataFrame::HGCROCChannelDataFrameMask |
enum HGCROCChannelDataFrame::HGCROCChannelDataFrameShift |
Enumerator | |
---|---|
kFlag2Shift | |
kFlag1Shift | |
kPacket3Shift | |
kPacket2Shift | |
kPacket1Shift |
Definition at line 25 of file HGCROCChannelDataFrame.h.
|
inline |
|
inline |
Definition at line 37 of file HGCROCChannelDataFrame.h.
|
inline |
Definition at line 38 of file HGCROCChannelDataFrame.h.
|
inline |
Definition at line 39 of file HGCROCChannelDataFrame.h.
|
inline |
Definition at line 40 of file HGCROCChannelDataFrame.h.
|
inline |
Definition at line 105 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::packet2(), HGCROCChannelDataFrame< D >::packet3(), and HGCROCChannelDataFrame< D >::tc().
Referenced by HGCROCChannelDataFrame< D >::fill(), and HGCROCChannelDataFrame< D >::print().
|
inline |
Definition at line 106 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::packet3().
Referenced by HGCROCChannelDataFrame< D >::fill(), and HGCROCChannelDataFrame< D >::print().
|
inline |
the 12-bit TOT is compressed to a 10bit word truncating the first two bits when the value is above 0x1ff=2^8-1. The MSB is set to 1 in case truncation occurs.
Definition at line 78 of file HGCROCChannelDataFrame.h.
Referenced by HGCROCChannelDataFrame< D >::fill().
|
inline |
the 10-bit TOT word is decompressed back to 12 bit word In case truncation occurred the word is shifted by 2 bit
Definition at line 88 of file HGCROCChannelDataFrame.h.
Referenced by HGCROCChannelDataFrame< D >::tot().
|
inline |
fills the 32b word characterization mode : tc|tp|adc|tot|toa normal mode: tc|tp|adcm1|*|toa with *=tot if tc==True else adc
Definition at line 52 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::adc(), HGCROCChannelDataFrame< D >::adcm1(), HGCROCChannelDataFrame< D >::compressToT(), HGCROCChannelDataFrame< D >::fillRaw(), HGCROCChannelDataFrame< D >::tc(), HGCROCChannelDataFrame< D >::toa(), HGCROCChannelDataFrame< D >::tot(), and HGCROCChannelDataFrame< D >::tp().
|
inline |
Definition at line 62 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillPacket(), RemoveAddSevLevel::flag, HGCROCChannelDataFrame< D >::kFlag1Shift, and HGCROCChannelDataFrame< D >::kFlagMask.
Referenced by HGCROCChannelDataFrame< D >::fillRaw().
|
inline |
setters
Definition at line 61 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillPacket(), RemoveAddSevLevel::flag, HGCROCChannelDataFrame< D >::kFlag2Shift, and HGCROCChannelDataFrame< D >::kFlagMask.
Referenced by HGCROCChannelDataFrame< D >::fillRaw().
|
inlineprivate |
wrapper to reset words at a given position
Definition at line 133 of file HGCROCChannelDataFrame.h.
References gpuClustering::pixelStatus::mask, edm::shift, and HGCROCChannelDataFrame< D >::value_.
Referenced by HGCROCChannelDataFrame< D >::fillFlag1(), HGCROCChannelDataFrame< D >::fillFlag2(), HGCROCChannelDataFrame< D >::fillPacket1(), HGCROCChannelDataFrame< D >::fillPacket2(), and HGCROCChannelDataFrame< D >::fillPacket3().
|
inline |
Definition at line 65 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillPacket(), HGCROCChannelDataFrame< D >::kPacket1Shift, and HGCROCChannelDataFrame< D >::kPacketMask.
Referenced by HGCROCChannelDataFrame< D >::fillRaw().
|
inline |
Definition at line 64 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillPacket(), HGCROCChannelDataFrame< D >::kPacket2Shift, and HGCROCChannelDataFrame< D >::kPacketMask.
Referenced by HGCROCChannelDataFrame< D >::fillRaw().
|
inline |
Definition at line 63 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillPacket(), HGCROCChannelDataFrame< D >::kPacket3Shift, and HGCROCChannelDataFrame< D >::kPacketMask.
Referenced by HGCROCChannelDataFrame< D >::fillRaw().
|
inline |
Definition at line 66 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::fillFlag1(), HGCROCChannelDataFrame< D >::fillFlag2(), HGCROCChannelDataFrame< D >::fillPacket1(), HGCROCChannelDataFrame< D >::fillPacket2(), HGCROCChannelDataFrame< D >::fillPacket3(), HGCROCChannelDataFrame< D >::flag1(), and HGCROCChannelDataFrame< D >::flag2().
Referenced by HGCROCChannelDataFrame< D >::fill().
|
inline |
Definition at line 114 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::kFlag1Shift, HGCROCChannelDataFrame< D >::kFlagMask, and HGCROCChannelDataFrame< D >::readPacket().
Referenced by HGCROCChannelDataFrame< D >::fillRaw(), HGCROCChannelDataFrame< D >::print(), and HGCROCChannelDataFrame< D >::tp().
|
inline |
Definition at line 113 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::kFlag2Shift, HGCROCChannelDataFrame< D >::kFlagMask, and HGCROCChannelDataFrame< D >::readPacket().
Referenced by HGCROCChannelDataFrame< D >::fillRaw(), HGCROCChannelDataFrame< D >::print(), and HGCROCChannelDataFrame< D >::tc().
|
inline |
det id
Definition at line 45 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::id_.
|
inline |
getters
Definition at line 100 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::value_.
|
inline |
Definition at line 117 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::kPacket1Shift, HGCROCChannelDataFrame< D >::kPacketMask, and HGCROCChannelDataFrame< D >::readPacket().
Referenced by HGCROCChannelDataFrame< D >::print(), and HGCROCChannelDataFrame< D >::toa().
|
inline |
Definition at line 116 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::kPacket2Shift, HGCROCChannelDataFrame< D >::kPacketMask, and HGCROCChannelDataFrame< D >::readPacket().
Referenced by HGCROCChannelDataFrame< D >::adc(), HGCROCChannelDataFrame< D >::print(), HGCROCChannelDataFrame< D >::rawtot(), and HGCROCChannelDataFrame< D >::tot().
|
inline |
Definition at line 115 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::kPacket3Shift, HGCROCChannelDataFrame< D >::kPacketMask, and HGCROCChannelDataFrame< D >::readPacket().
Referenced by HGCROCChannelDataFrame< D >::adc(), HGCROCChannelDataFrame< D >::adcm1(), and HGCROCChannelDataFrame< D >::print().
|
inline |
Definition at line 119 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::adc(), HGCROCChannelDataFrame< D >::adcm1(), TauDecayModes::dec, HGCROCChannelDataFrame< D >::flag1(), HGCROCChannelDataFrame< D >::flag2(), MillePedeFileConverter_cfg::out, HGCROCChannelDataFrame< D >::packet1(), HGCROCChannelDataFrame< D >::packet2(), HGCROCChannelDataFrame< D >::packet3(), HGCROCChannelDataFrame< D >::raw(), HGCROCChannelDataFrame< D >::tc(), HGCROCChannelDataFrame< D >::toa(), HGCROCChannelDataFrame< D >::tot(), and HGCROCChannelDataFrame< D >::tp().
|
inline |
Definition at line 101 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::value_.
Referenced by HGCROCChannelDataFrame< D >::print().
|
inline |
Definition at line 111 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::packet2(), and HGCROCChannelDataFrame< D >::tc().
|
inlineprivate |
wrapper to get packet at a given position
Definition at line 147 of file HGCROCChannelDataFrame.h.
References gpuClustering::pixelStatus::mask, edm::shift, and HGCROCChannelDataFrame< D >::value_.
Referenced by HGCROCChannelDataFrame< D >::flag1(), HGCROCChannelDataFrame< D >::flag2(), HGCROCChannelDataFrame< D >::packet1(), HGCROCChannelDataFrame< D >::packet2(), and HGCROCChannelDataFrame< D >::packet3().
|
inline |
Definition at line 102 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::flag2().
Referenced by HGCROCChannelDataFrame< D >::adc(), HGCROCChannelDataFrame< D >::fill(), HGCROCChannelDataFrame< D >::print(), HGCROCChannelDataFrame< D >::rawtot(), HGCROCChannelDataFrame< D >::tctp(), and HGCROCChannelDataFrame< D >::tot().
|
inline |
Definition at line 104 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::tc(), and HGCROCChannelDataFrame< D >::tp().
|
inline |
Definition at line 112 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::packet1().
Referenced by HGCROCChannelDataFrame< D >::fill(), and HGCROCChannelDataFrame< D >::print().
|
inline |
Definition at line 107 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::decompressToT(), HGCROCChannelDataFrame< D >::packet2(), and HGCROCChannelDataFrame< D >::tc().
Referenced by HGCROCChannelDataFrame< D >::fill(), and HGCROCChannelDataFrame< D >::print().
|
inline |
Definition at line 103 of file HGCROCChannelDataFrame.h.
References HGCROCChannelDataFrame< D >::flag1().
Referenced by HGCROCChannelDataFrame< D >::fill(), HGCROCChannelDataFrame< D >::print(), and HGCROCChannelDataFrame< D >::tctp().
|
private |
Definition at line 152 of file HGCROCChannelDataFrame.h.
Referenced by HGCROCChannelDataFrame< D >::id().
|
private |
Definition at line 155 of file HGCROCChannelDataFrame.h.
Referenced by HGCROCChannelDataFrame< D >::fillPacket(), HGCROCChannelDataFrame< D >::operator()(), HGCROCChannelDataFrame< D >::raw(), and HGCROCChannelDataFrame< D >::readPacket().