Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
packet_A.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file packet_A.h
1 #ifndef __PACKET_A_H__
2 #define __PACKET_A_H__
3 
4 
5 #include "packet.h"
6 #include "packetPublic.h"
7 #include "packetConstants.h"
8 #include "packetRoutines.h"
9 #include "decoding_routines.h"
10 
11 const char *get_mnemonic (const int structure,const int format);
12 const char *get_type_mnemonic (const int id);
13 
20 #ifndef __CINT__
22 #else
23 class Packet_A : public Packet
24 #endif
25 {
26 
27 public:
28 
29  Packet_A(PACKET_ptr packet_ptr);
30  Packet_A();
31  ~Packet_A();
32 
33  // access to envelope information
34  int getLength() const;
35  // int getType() const;
36  // int getDecoding() const;
37 
38  // some more header fields which are not yet implemented, marked "//*"
39  //* int gethdrVersion() const; // Version of header definition
40  //* int getHdrLength() const; // inclusive of alignment data
41  //* int getStatus() const; // Status bits describe frame errors/other
42  int getErrorLength() const; // Length of error block in Dwords
43  int getDebugLength() const;// Length of debug block in Dwords
44 
45  int getIdentifier() const; // Identifier
46  //* int getEndianism() const; // Big/little endian indicator
47  int getPadding() const; // number of padding units
48 
49  int getStructure() const; // Structure of packet
50  //* int getWordSize() const; // "Word" size used to store packet data
51  //* int getAddrLength() const; // number of bytes used for channel address
52  //* int getHitLength() const; // Length of a single "hit" in bytes
53 
54  int getHitFormat() const; // Format of a single hit
55  //* int getNumEntries() const; // Number of "objects" stored in packet
56 
57  int getDataLength() const; // Format of a single hit
58 
59 
60  // debugging-type information
61 
62 
63  void identify( OSTREAM& =COUT) const;
64  void fullIdentify( OSTREAM& =COUT) const;
65 
66  void dumpErrorBlock ( OSTREAM& =COUT ) ;
67  void dumpDebugBlock ( OSTREAM& =COUT ) ;
68 
69  int setIdentifier(const int newid);
70 
71  // getting decoded values
72  int iValue(const int);
73  int iValue(const int,const char *);
74  int iValue(const int,const int);
75  int iValue(const int, const int, const char *){return 0;};
76  int iValue(const int channel, const int iy, const int iz) {return 0;};
77  int iValue(const int channel, const int iy, const int iz, const char *what) {return 0;};
78 
79  float rValue(const int);
80  float rValue(const int,const char *);
81  float rValue(const int,const int);
82 
83  int getArraylength(const char *);
84  int fillIntArray (int [], const int, int *,const char * what="");
85  int fillFloatArray (float [], const int, int *,const char * what="");
86  int* getIntArray (int *,const char * what="");
87  float* getFloatArray (int *,const char *what="");
88 
89  // pointer or data based handling
90  virtual int is_pointer_type() const;
91  virtual int convert();
92 
93  int getCheckSumStatus() const;
94 
95  int copyMe(int dest [], const int maxlength) const;
96 
97  int setInternalParameter ( const int p1=0, const int p2=0, const char *what = "") {return 0;};
98 
99  protected:
100 
101  // PACKETHDR_ptr packetHdr;
102 
103  int standardIntArray (int [], const int, int *,const char * what="");
104 
105  PACKET_ptr packet; // storage for the packet
106 
107 
108  int is_data_type; // 0 is pointer based -- 1 is data based
109 
120 
131 
132  virtual int *decode(int *) =0;
133 
134 #ifdef LVL2_WINNT
135  static void fix_endianess ( LONGLONG *x);
136 #else
137  static void fix_endianess ( long long *x);
138 #endif
139 
140  static void fix_endianess ( double *x);
141  static void fix_endianess ( char *str, const int length);
142 
143 };
144 
145 
146 
148 {
149  char m_irState[256];
151  double m_irVacuum;
164  double m_polarPerBunchBlueX[360];
165  double m_polarPerBunchBlueY[360];
166  double m_polarPerBunchBlueZ[360];
180  unsigned int m_datavalidMask;
181 
182 };
183 
185 {
186 
187  char m_ringState[256]; // ejd91801
188  char m_ionSpecies[1024] ;
189  double m_beamEnergy ;
190  double m_gamma;
210  unsigned int m_datavalidMask; // bit mask for data validity
211 
212 };
213 
214 
215 
217 {
218 
219  char m_ringState[256]; // ejd91801
220  char m_ionSpecies[1024] ;
221  double m_beamEnergy ;
222  double m_gamma;
235  unsigned int m_datavalidMask; // bit mask for data validity
236 
237 };
238 
240 {
247  unsigned int m_datavalidMask; // bit mask for data validity
248 };
249 
251 {
252  char m_ringState[256]; // ejd91801
253  char m_ionSpecies[1024] ;
254  double m_beamEnergy ;
255  double m_gamma;
274  unsigned int m_datavalidMask; // bit mask for data validity
275 };
276 
278 {
280  //int dummy; //?
281  double beamcurrent;
282  float bunchcurrent[360];
283 
284 };
285 
287 {
288  double beamCurrent;
289  double beamLifeTime;
290 };
291 
293 {
297  float avgOrbStat;
299 };
300 
302 {
303  int cdevCaptureTimeStamp; //ejd 4/30/03 long to int
304  double current;
305 };
306 
308 {
309  int counts;
310  struct cdevWCMData reading[1];
311 
312 };
313 
315 {
316 
319 
320 };
321 
323 {
326 };
327 
329 {
330 
332  double runIdS; // FILL.XXX --- where XXX is the run number
333  int startTimeS; // Unix time
334  int stopTimeS; // Unix time
335  char daqVersionS[80];
336  char cutIdS[80];
337  char targetIdS[80]; // "Horz.tagret3" or "Vert.target6" etc.
339  int statusS; // bit pattern if <0 data is not usable
340  char statusStringS[80];
345  int countsUpLeftS[360];
346  int countsLeftS[360];
347  int countsDownLeftS[360];
349  int countsRightS[360];
350  int countsUpRightS[360];
351  float avgAsymXS;
352  float avgAsymX45S;
353  float avgAsymX90S;
354  float avgAsymYS;
359  float bunchAsymXS[360];
360  float bunchAsymYS[360];
361  float bunchAsymErrorXS[360];
362  float bunchAsymErrorYS[360];
363  float beamEnergyS; // the same as ringSpec.color:beamEnergyM just for reference
366  int numberEventsS; // provided by MCR before measurement
367  int maxTimeS;
369 };
370 
371 
372 
374 {
375 
377  double runIdS; // FILL.XXX --- where XXX is the run number
378  int startTimeS; // Unix time
379  int stopTimeS; // Unix time
380  char daqVersionS[80];
381  char cutIdS[80];
382  char targetIdS[80]; // "Horz.tagret3" or "Vert.target6" etc.
384  int statusS; // bit pattern if <0 data is not usable
385  char statusStringS[80];
390  int countsUpLeftS[360];
391  int countsLeftS[360];
392  int countsDownLeftS[360];
394  int countsRightS[360];
395  int countsUpRightS[360];
396  float avgAsymXS;
397  float avgAsymX45S;
398  float avgAsymX90S;
399  float avgAsymYS;
404  float bunchAsymXS[360];
405  float bunchAsymYS[360];
406  float bunchAsymErrorXS[360];
407  float bunchAsymErrorYS[360];
408  float beamEnergyS; // the same as ringSpec.color:beamEnergyM just for reference
411  int numberEventsS; // provided by MCR before measurement
412  int maxTimeS;
414 };
415 #endif /* __PACKET_A_H__ */
416 
417