Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:40

0001 #ifndef __PACKET_GL1P_H__
0002 #define __PACKET_GL1P_H__
0003 
0004 /*  
0005     GL1P Accepted Event Data - 
0006 
0007     This header file defines a standard structure that can be 
0008     used to map GL1P accepted event data into something a 
0009     bit more "useful".
0010 */
0011 
0012 /* Each GL1P will have an output packet in the data stream */
0013 
0014 #define GL1P_HEADER 0
0015 #define GL1P_EVNUMBER 1
0016 #define GL1P_MODEBIT 2
0017 #define GL1P_CLOCK 3
0018 #define GL1P_SCALER 4
0019 /* A structure for the GL1P accepted event data */
0020 
0021 typedef struct{
0022   unsigned char  header; //GL1P header word. Depend on GL1P number. First is 7a, second - 8a, ...
0023   unsigned char  ev_number; //1-byte event number counter. 
0024   unsigned short  modebit; //GL1 mode bit 
0025   unsigned char  clock[4]; //Beam Crossing Counters for all 4 scalers
0026   unsigned int   scaler[4]; //Values of scalers A, B, C, D.
0027 } GL1P_DATA;
0028 
0029 
0030 #include <packet_w124.h>
0031 
0032 /**
0033    This is the packet which deals with data in GL1 format.
0034    It inherits from Packet\_w4 because the data are 32bit entities.
0035 */
0036 #ifndef __CINT__
0037 class WINDOWSEXPORT Packet_gl1p : public Packet_w4 {
0038 #else
0039 class  Packet_gl1p : public Packet_w4 {
0040 #endif
0041 public:
0042   Packet_gl1p(PACKET_ptr);
0043   ~Packet_gl1p();
0044  virtual int  iValue(const int channel, const char *what);
0045  virtual int  iValue(const int channel, const int what);
0046  virtual void dump ( OSTREAM& );
0047   virtual int    fillIntArray (int destination[],    // the data go here 
0048                    const int length,      // space we have in destination
0049                    int * nw,              // words actually used
0050                    const char * what=""); // type of data (see above)
0051 
0052 
0053 protected:
0054   virtual void demangle ();
0055   virtual int *decode (int *);
0056   GL1P_DATA* sgl1p;
0057   int nGL1Pboards;
0058 };
0059 
0060 #endif /* __PACKET_GL1P_H__ */