11 if (m_ptr==m_limit)
return *
this;
12 if (m_stepclass==0) m_ptr++;
13 else if (m_stepclass==1) {
14 if (m_microstep==0) { m_ptr++; m_microstep++; }
15 else { m_microstep--; }
17 else if (m_stepclass==2) m_ptr+=2;
19 if (isHeader()) determineMode();
24 if (!isHeader())
return;
27 if (m_flavor==5) { m_stepclass=1; m_microstep=0; }
28 else if ((m_flavor&0x6)==0x2) { m_stepclass=2; }
32 if (m_flavor==0x5 && m_microstep==0)
return ((*m_ptr)>>8)&0x7F;
33 else return (*m_ptr)&0xFF;
37 if (m_flavor==0x5)
return 0x80;
38 else if ((m_flavor&0x6)==0x2)
return (m_ptr[1]&0x3F);
39 else return (((*m_ptr)&0x3F00)>>8);
43 if (m_flavor==0x5)
return false;
44 else if ((m_flavor&0x6)==0x2)
return (m_ptr[0]&0x2000);
45 else return (((*m_ptr)&0x4000));
49 if (m_flavor==0x5 || (m_flavor&0x6)==0x0)
return 0x80;
50 else return ((m_ptr[1]>>6)&0xF);
66 m_baseptr[m_ptr]=0x8000 |
78 if (m_ministep==0) m_baseptr[m_ptr]=adc&0x7F;
79 else m_baseptr[m_ptr]|=((adc&0x7f)<<8);
80 if (m_ministep==1) m_ptr++;
81 m_ministep=(m_ministep+1)%2;
82 }
else if ((m_flavor&0x6)==0x0) {
83 m_baseptr[m_ptr]=(adc&0xFF) | ((retdc&0x3F)<<8);
84 if (soi) m_baseptr[m_ptr]|=0x4000;
86 }
else if ((m_flavor&0x6)==0x1) {
87 m_baseptr[m_ptr]=(adc&0xFF);
88 m_baseptr[m_ptr+1]=0x4000| ((tdcstat&0x3)<<10) | ((fetdc&0xF)<<6) | ((retdc)<<8);
89 if (soi) m_baseptr[m_ptr]|=0x2000;
96 m_baseptr[m_ptr]=tpword&0xFFF;
97 if (soi) m_baseptr[m_ptr]|=0x4000;
int adc(sample_type sample)
get the ADC sample (12 bits)
void addTP(int tpword, bool soi=false)
static const int CHANNELS_PER_FIBER_MAX
void addHeader(int flavor, int errf, int cap0, int channelid)
packer(uint16_t *baseptr)
const_iterator & operator++()
static const int HEADER_LENGTH_16BIT
void addSample(int adc, bool soi=false, int retdc=0, int fetdc=0, int tdcstat=0)
const_iterator begin() const
static const int FIBERS_PER_UHTR
const_iterator(const uint16_t *ptr, const uint16_t *limit=0)
HcalUHTRData & operator=(const HcalUHTRData &)
unsigned long long uint64_t
char data[epos_bytes_allocation]
const_iterator end() const