30 memset(&fEventHeader,0,
sizeof(fEventHeader));
32 fEventData = (UShort_t *)NULL;
49 std::cout <<
"Dcc Event Deleted" << std::endl;
57 std::cout <<
"Dcc Event SetHeader "
70 fEventData =
new UShort_t[dlen/
sizeof(UShort_t)];
81 while (frm.
Decode(tmpFrame) )
95 std::cout <<
"---DccEvent Plane " <<
fDet << std::endl;
123 inline UShort_t
iAdcData(UShort_t w) {
return (w & 0xfff); }
126 inline Int_t
iBinIndex(UShort_t w) {
return (w & 0x1ff); }
132 a2 = ( (w & 0x1e00) >> 9 );
151 Int_t rchannel, channel, i;
156 Info(
"UnPackData",
"fEventMap does not exist. Unpacking RAW data");
161 std::list<HarpoDccFrame>::const_iterator frm;
168 if (frm->pkgtype == 0 ) {
169 if ( frm->compress == 0 )
178 if ( frm->size == 1044 ) {
179 rchannel = frm->ChannelNum() ;
184 assert(rchannel >= 0 && rchannel <
NALL);
187 for (i=0 ; i<
NADC;i++)
193 std::cout <<
" No Zero Supperssion frame size " <<
194 frm->size <<
" != 1044" << std::endl;
200 rchannel = frm->ChannelNum();
201 assert(rchannel >= 0 && rchannel <
NALL);
220 Bool_t flag512 =
false;
222 for (samp = frm->dccData, jj= 0; samp != frm->dccTrailer; samp++,jj++)
233 if (iibin >= 0 && iibin < (511 + 10)) {
243 }
else if ( iitype == 1 ) {
246 if ( iibin == 511 ) {
251 }
else if ( iitype == 2 ) {
259 rchannel = frm->ChannelNum(a1,a2);
263 }
else if ( iitype == 4 ) {
267 std::cout <<
"Zero Supperssion frame bad data "
268 << std::hex << iival << std::dec << std::endl;
292 if(
gHarpoDebug>1) std::cout <<
"HarpoDccEvent::GetMap" << std::endl;
296 Info(
"GetMap",
"Returning %p",(
void *)
fEventMap);
Bool_t fZeroSuppr
we will not save it in Tree
Bool_t Decode(HarpoDccFrame &frm)
A generic class for HARPO datectors The class is ....
void iChannelWord(UShort_t w, UShort_t &a1, UShort_t &a2)
unpack args header word into arg1 and arg2
EventHeader_t fEventHeader
void SetHeader(UShort_t *data)
ULong_t GetTimeStamp(Int_t after=0)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
A class which define DCC channel mapping.
Int_t isCtlWord(UShort_t w)
Check if current word are special one : Arguments, Bin index or counter.
void fillIf(HarpoDccMap *m, Int_t row, Int_t col, UShort_t word)
Fill map onnly if index in map range (0..nRaws-1) (0..nCols-1)
std::list< HarpoDccFrame > fFrames
Event data buffer.
Int_t iBinIndex(UShort_t w)
index value
Bool_t IsZeroSuppressed(Int_t after=0)
Int_t decode(Int_t raw, Int_t plane)
Raw address to Strip Number decoding routine.
Decomposition of DCC buffer into DCC frames.
void SetRawData(Int_t i, Int_t j, Double_t val)
void SetData(UShort_t *data, size_t dlen=EVENT_BUFFER_SIZE)
A class store HARPO EVENT : header and row data. Its provide also the methods for access to this data...
UShort_t iAdcData(UShort_t w)
12 bit adc value