EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oncsBuffer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oncsBuffer.h
1 #ifndef __ONCSBUFFER_H
2 #define __ONCSBUFFER_H
3 
4 #include "buffer.h"
5 #include "oncsEvent.h"
6 #include "BufferConstants.h"
7 
8 #include <stdio.h>
9 
10 #include "event_io.h"
11 
12 #ifndef __CINT__
13 
14 #define PRDFBUFFERID 0xffffffc0
15 #define ONCSBUFFERID 0xffffc0c0
16 
18 #else
19  class oncsBuffer : public buffer {
20 #endif
21 
22 public:
23 
24  //** Constructors
25 
26  oncsBuffer( PHDWORD *array, const PHDWORD length);
27 
28  // this creates a new event on the next address
29  Event * getEvent();
30 
31  int buffer_swap();
32 
33  int *getEventData() { return 0;};
34  int isGood() const { return 1;};
35 
36  static int i4swap (const int in);
37  static int i22swap (const int in);
38  static short i2swap (const short in);
39 
40 protected:
41  typedef struct
42  {
43  int Length;
44  unsigned int ID;
45  int Bufseq;
46  int Runnr;
47  int data[];
48  } *buffer_ptr;
49 
50  int *data_ptr;
55 };
56 
57 #endif