1 #ifndef DataFormats_HGCalDigis_HGCROCChannelDataFrame_h 2 #define DataFormats_HGCalDigis_HGCROCChannelDataFrame_h 53 uint16_t word3(charMode ?
adc :
adcm1);
80 return (0x200 | (totraw >> 3));
81 return (totraw & 0x1ff);
89 uint16_t totout(totraw & 0x1ff);
91 totout = ((totraw & 0x1ff) << 3);
105 uint16_t
adcm1(
bool charMode =
false) {
return charMode ? 0 :
packet3(); }
106 uint16_t
tot(
bool charMode =
false) {
108 return charMode ||
tc() ? tot12b : 0;
120 <<
" p1: " <<
packet1() << std::endl
121 <<
"\ttc: " <<
tc() <<
" tp: " <<
tp() <<
" adcm1: " <<
adcm1() <<
" (" <<
adcm1(
false) <<
") " 122 <<
" adc: " <<
adc() <<
" (" <<
adc(
false) <<
") " 123 <<
" tot: " <<
tot() <<
" (" <<
tot(
false) <<
") " 124 <<
" toa: " <<
toa() << std::endl;
void print(std::ostream &out=std::cout)
void fillPacket1(int word)
uint16_t adc(bool charMode=false)
HGCROCChannelDataFrame(const D &id)
HGCROCChannelDataFrame(const D &id, uint32_t value)
uint16_t tot(bool charMode=false)
const D & id() const
det id
uint32_t readPacket(HGCROCChannelDataFrameMask mask, HGCROCChannelDataFrameShift shift) const
wrapper to get packet at a given position
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 *=to...
uint32_t operator()()
getters
uint16_t decompressToT(uint16_t totraw)
the 10-bit TOT word is decompressed back to 12 bit word In case truncation occurred the word is shift...
void fillFlag1(bool flag)
HGCROCChannelDataFrame(uint32_t value)
HGCROCChannelDataFrame()
CTOR.
void fillFlag2(bool flag)
setters
HGCROCChannelDataFrameShift
DecomposeProduct< arg, typename Div::arg > D
void fillPacket(uint16_t word, HGCROCChannelDataFrameMask mask, HGCROCChannelDataFrameShift shift)
wrapper to reset words at a given position
HGCROCChannelDataFrameMask
static unsigned int const shift
wrapper for a 32b data word from a single channel and its detid The format is always the same: |1b|1b...
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 0x...
void fillPacket3(int word)
void fillPacket2(int word)
HGCROCChannelDataFrame(const HGCROCChannelDataFrame &o)
uint16_t adcm1(bool charMode=false)
void fillRaw(bool flag2, bool flag1, uint16_t word3, uint16_t word2, uint16_t word1)