ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oncsSub_id2evt.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oncsSub_id2evt.cc
1 #include "oncsSub_id2evt.h"
2 
4  :oncsSubevent_w2 (data){}
5 
6 
7 int *oncsSub_id2evt::decode ( int *nwout)
8 {
9  int *p,*k;
10  int olength;
11  int temp[MAX_OUTLENGTH];
12  int dlength = ( getLength()-4)*2 - getPadding();
13  int i;
14  short *SubeventData = (short * ) &SubeventHdr->data;
15 
16  int status = decode_id2evt( temp, SubeventData, dlength
17  ,MAX_OUTLENGTH, &olength);
18  if (status) return NULL;
19 
20  p = new int[olength];
21  k = p;
22  for (i =0; i<olength; i++) *k++ = temp[i];
23  *nwout = olength;
24  return p;
25 }
26