Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef __ONCSSUBEVENT_H__
0002 #define __ONCSSUBEVENT_H__
0003 // -*- c++ -*-
0004 
0005 
0006 #include "packet.h"
0007 #include "decoding_routines.h"
0008 #include "oncsStructures.h"
0009 #include "oncsSubConstants.h"
0010 
0011 #include <stddef.h>
0012 
0013 
0014 #ifndef __CINT__
0015 class WINDOWSEXPORT oncsSubevent : public Packet {
0016 #else
0017 class  oncsSubevent : public Packet {
0018 #endif
0019 
0020 public:
0021 
0022   oncsSubevent(subevtdata_ptr data);
0023   virtual ~oncsSubevent();
0024 
0025   // access to information 
0026   int   getLength() const;
0027   int   getIdentifier() const;
0028   int   getHitFormat() const;
0029   int   getPadding() const;
0030 
0031   int   getDataLength() const;
0032   int   getStructure() const { return 0;};
0033   int   getDebugLength() const { return 0;};
0034   int   getErrorLength() const { return 0;};
0035   int   getStatus() const { return 0;};
0036 
0037   // debugging-type information
0038   void  identify( OSTREAM& =COUT) const;
0039 
0040   int setIdentifier(const int newid);
0041   
0042   // getting decoded values
0043   int    iValue(const int);
0044   int    iValue(const int,const char *);
0045   int    iValue(const int,const int);
0046 
0047   int    iValue(const int,const int, const char *){return 0;};
0048   int    iValue(const int channel,const int iy, const int iz) {return 0;};
0049 
0050   int    iValue(const int channel,const int iy, const int iz, const char *what) {return 0;};
0051 
0052   float  rValue(const int);
0053   float  rValue(const int,const char *);
0054   float  rValue(const int,const int);
0055 
0056   int    getArraylength(const char *);
0057   int    fillIntArray (int [], const int, int *,const char *what="");
0058   int    fillFloatArray (float [], const int, int *,const char *what="");
0059   int*   getIntArray (int *,const char *what="");
0060   float* getFloatArray (int *,const char *what="");
0061 
0062   // pointer or data based handling
0063   int is_pointer_type() const;
0064   int convert();
0065   int   copyMe(int [],  const int maxlength) const;
0066 
0067   int setInternalParameter ( const int p1=0, const int p2=0, const char *what = "") {return 0;};
0068 
0069 protected:
0070 
0071   virtual int *decode(int *) =0;
0072 
0073 
0074   subevtdata_ptr SubeventHdr;
0075   int data1_length;
0076   int data2_length;
0077   int data3_length;
0078   int data4_length;
0079 
0080   int *decoded_data1;
0081   int *decoded_data2;
0082   int *decoded_data3;
0083   int *decoded_data4;
0084   int is_data_type;
0085 };
0086 
0087 // --------------------------------------------------------------------------
0088 #ifndef __CINT__
0089 class WINDOWSEXPORT oncsSubevent_w1 : public oncsSubevent {
0090 #else
0091 class  oncsSubevent_w1 : public oncsSubevent {
0092 #endif
0093 public:
0094   oncsSubevent_w1(subevtdata_ptr);
0095 
0096   virtual void  dump ( OSTREAM& os = COUT) ;
0097 
0098   virtual void  gdump (const int how=EVT_HEXADECIMAL, OSTREAM& os = COUT) const;
0099 
0100 protected:
0101   inline virtual int *decode (int *) {return 0;};
0102 
0103 };
0104 
0105 // ----------------------------------------------------
0106 
0107 #ifndef __CINT__
0108 class WINDOWSEXPORT oncsSubevent_w2 : public oncsSubevent {
0109 #else
0110 class  oncsSubevent_w2 : public oncsSubevent {
0111 #endif
0112 public:
0113   oncsSubevent_w2(subevtdata_ptr);
0114 
0115   virtual void  dump ( OSTREAM& os = COUT) ;
0116 
0117   virtual void  gdump (const int how=EVT_HEXADECIMAL, OSTREAM& os = COUT) const;
0118 
0119 protected:
0120   inline virtual int *decode (int *) {return 0;};
0121 
0122 };
0123 
0124 // ----------------------------------------------------
0125 
0126 
0127 #ifndef __CINT__
0128 class WINDOWSEXPORT oncsSubevent_w4 : public oncsSubevent {
0129 #else
0130 class  oncsSubevent_w4 : public oncsSubevent {
0131 #endif
0132 public:
0133   oncsSubevent_w4(subevtdata_ptr);
0134 
0135   virtual void  dump ( OSTREAM& os = COUT) ;
0136 
0137   virtual void  gdump (const int how=EVT_HEXADECIMAL, OSTREAM& os = COUT) const;
0138 
0139 protected:
0140   inline virtual int *decode (int *) {return 0;};
0141 
0142 };
0143 
0144 
0145 #endif /* __ONCSSUBEVENT_H__ */