24 digi.setReadoutIds(eid);
25 int flavor, error_flags, capid0, channelid;
28 bool isCapRotating=!(error_flags&0x1);
29 bool fiberErr=(error_flags&0x2);
30 bool dataValid=!(error_flags&0x2);
31 int fiberchan=channelid&0x3;
32 int fiber=((channelid>>2)&0x7)+1;
43 const unsigned short* qie_work=startPoint;
47 int capidn=(isCapRotating)?((capid0+ncurr)%4):(capid0);
48 int capidn1=(isCapRotating)?((capid0+ncurr+1)%4):(capid0);
50 HcalQIESample s0((*qie_work)&0x7F,capidn,fiber,fiberchan,dataValid,fiberErr);
51 HcalQIESample s1(((*qie_work)>>8)&0x7F,capidn1,fiber,fiberchan,dataValid,fiberErr);
53 if (ncurr>=startSample && ncurr<=endSample) {
54 digi.setSample(ntaken,s0);
58 if (ncurr>=startSample && ncurr<=endSample) {
59 digi.setSample(ntaken,s1);
65 }
else if (flavor==6) {
67 if (ncurr>=startSample && ncurr<=endSample) {
68 HcalQIESample sample((*qie_work)&0x7F,((*qie_work)>>8)&0x3,fiber,fiberchan,((*qie_work)>>10)&0
x1,((*qie_work)>>11)&0
x1);
69 digi.setSample(ntaken,
sample);
bool wasMarkAndPassZS(int fiber, int fiberchan) const
Was this channel passed as part of Mark&Pass ZS?
unsigned int getFibOrbMsgBCN(int fiber) const
Get the BCN of the Fiber Orbit Messages.
static bool unpack_per_channel_header(unsigned short, int &flav, int &error_flags, int &capid0, int &channelid)
Unpack a per-channel header word (compact format)
bool isUnsuppressed() const
Is this event an unsuppresed event?
static bool is_channel_header(unsigned short value)
check top bit to see if this is a compact format channel header word
uint32_t zsBunchMask() const
ZS Bunch Mask (if available)