Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
packet_id2evt.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file packet_id2evt.cc
1 #include "packet_id2evt.h"
2 
4  : Packet_w2 (data){}
5 
6 int *Packet_id2evt::decode ( int *nwout)
7 {
8  int *p,*k;
9  int olength;
10  int temp[MAX_OUTLENGTH];
11  int i;
12  int dlength = getDataLength();
13 
14  int status = decode_id2evt( temp
15  ,(short *) findPacketDataStart(packet)
16  ,dlength
17  ,MAX_OUTLENGTH, &olength);
18 
19  if (status || olength<=0 ) return NULL;
20 
21  p = new int[olength];
22  k = p;
23  for (i =0; i<olength; i++) *k++ = temp[i];
24  *nwout = olength;
25  return p;
26 }
27 
28 
29 
30 
31 
32 
33 
34