Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
packet_gl1p.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file packet_gl1p.h
1 #ifndef __PACKET_GL1P_H__
2 #define __PACKET_GL1P_H__
3 
4 /*
5  GL1P Accepted Event Data -
6 
7  This header file defines a standard structure that can be
8  used to map GL1P accepted event data into something a
9  bit more "useful".
10 */
11 
12 /* Each GL1P will have an output packet in the data stream */
13 
14 #define GL1P_HEADER 0
15 #define GL1P_EVNUMBER 1
16 #define GL1P_MODEBIT 2
17 #define GL1P_CLOCK 3
18 #define GL1P_SCALER 4
19 /* A structure for the GL1P accepted event data */
20 
21 typedef struct{
22  unsigned char header; //GL1P header word. Depend on GL1P number. First is 7a, second - 8a, ...
23  unsigned char ev_number; //1-byte event number counter.
24  unsigned short modebit; //GL1 mode bit
25  unsigned char clock[4]; //Beam Crossing Counters for all 4 scalers
26  unsigned int scaler[4]; //Values of scalers A, B, C, D.
27 } GL1P_DATA;
28 
29 
30 #include <packet_w124.h>
31 
36 #ifndef __CINT__
38 #else
39 class Packet_gl1p : public Packet_w4 {
40 #endif
41 public:
43  ~Packet_gl1p();
44  virtual int iValue(const int channel, const char *what);
45  virtual int iValue(const int channel, const int what);
46  virtual void dump ( OSTREAM& );
47  virtual int fillIntArray (int destination[], // the data go here
48  const int length, // space we have in destination
49  int * nw, // words actually used
50  const char * what=""); // type of data (see above)
51 
52 
53 protected:
54  virtual void demangle ();
55  virtual int *decode (int *);
58 };
59 
60 #endif /* __PACKET_GL1P_H__ */