EIC 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 
70  // getting decoded values
71  int iValue(const int);
72  int iValue(const int,const char *);
73  int iValue(const int,const int);
74  int iValue(const int, const int, const char *){return 0;};
75  int iValue(const int channel, const int iy, const int iz) {return 0;};
76  int iValue(const int channel, const int iy, const int iz, const char *what) {return 0;};
77 
78  float rValue(const int);
79  float rValue(const int,const char *);
80  float rValue(const int,const int);
81 
82  int getArraylength(const char *);
83  int fillIntArray (int [], const int, int *,const char * what="");
84  int fillFloatArray (float [], const int, int *,const char * what="");
85  int* getIntArray (int *,const char * what="");
86  float* getFloatArray (int *,const char *what="");
87 
88  // pointer or data based handling
89  virtual int is_pointer_type() const;
90  virtual int convert();
91 
92  int getCheckSumStatus() const;
93 
94  int copyMe(int dest [], const int maxlength) const;
95 
96  int setInternalParameter ( const int p1=0, const int p2=0, const char *what = "") {return 0;};
97 
98  protected:
99 
100  // PACKETHDR_ptr packetHdr;
101 
102  int standardIntArray (int [], const int, int *,const char * what="");
103 
104  PACKET_ptr packet; // storage for the packet
105 
106 
107  int is_data_type; // 0 is pointer based -- 1 is data based
108 
119 
130 
131  virtual int *decode(int *) =0;
132 
133 #ifdef LVL2_WINNT
134  static void fix_endianess ( LONGLONG *x);
135 #else
136  static void fix_endianess ( long long *x);
137 #endif
138 
139  static void fix_endianess ( double *x);
140  static void fix_endianess ( char *str, const int length);
141 
142 };
143 
144 
145 
147 {
148  char m_irState[256];
150  double m_irVacuum;
163  double m_polarPerBunchBlueX[360];
164  double m_polarPerBunchBlueY[360];
165  double m_polarPerBunchBlueZ[360];
179  unsigned int m_datavalidMask;
180 
181 };
182 
184 {
185 
186  char m_ringState[256]; // ejd91801
187  char m_ionSpecies[1024] ;
188  double m_beamEnergy ;
189  double m_gamma;
209  unsigned int m_datavalidMask; // bit mask for data validity
210 
211 };
212 
213 
214 
216 {
217 
218  char m_ringState[256]; // ejd91801
219  char m_ionSpecies[1024] ;
220  double m_beamEnergy ;
221  double m_gamma;
234  unsigned int m_datavalidMask; // bit mask for data validity
235 
236 };
237 
239 {
246  unsigned int m_datavalidMask; // bit mask for data validity
247 };
248 
250 {
251  char m_ringState[256]; // ejd91801
252  char m_ionSpecies[1024] ;
253  double m_beamEnergy ;
254  double m_gamma;
273  unsigned int m_datavalidMask; // bit mask for data validity
274 };
275 
277 {
279  //int dummy; //?
280  double beamcurrent;
281  float bunchcurrent[360];
282 
283 };
284 
286 {
287  double beamCurrent;
288  double beamLifeTime;
289 };
290 
292 {
296  float avgOrbStat;
298 };
299 
301 {
302  int cdevCaptureTimeStamp; //ejd 4/30/03 long to int
303  double current;
304 };
305 
307 {
308  int counts;
309  struct cdevWCMData reading[1];
310 
311 };
312 
314 {
315 
318 
319 };
320 
322 {
325 };
326 
328 {
329 
331  double runIdS; // FILL.XXX --- where XXX is the run number
332  int startTimeS; // Unix time
333  int stopTimeS; // Unix time
334  char daqVersionS[80];
335  char cutIdS[80];
336  char targetIdS[80]; // "Horz.tagret3" or "Vert.target6" etc.
338  int statusS; // bit pattern if <0 data is not usable
339  char statusStringS[80];
344  int countsUpLeftS[360];
345  int countsLeftS[360];
346  int countsDownLeftS[360];
348  int countsRightS[360];
349  int countsUpRightS[360];
350  float avgAsymXS;
351  float avgAsymX45S;
352  float avgAsymX90S;
353  float avgAsymYS;
358  float bunchAsymXS[360];
359  float bunchAsymYS[360];
360  float bunchAsymErrorXS[360];
361  float bunchAsymErrorYS[360];
362  float beamEnergyS; // the same as ringSpec.color:beamEnergyM just for reference
365  int numberEventsS; // provided by MCR before measurement
366  int maxTimeS;
368 };
369 
370 
371 
373 {
374 
376  double runIdS; // FILL.XXX --- where XXX is the run number
377  int startTimeS; // Unix time
378  int stopTimeS; // Unix time
379  char daqVersionS[80];
380  char cutIdS[80];
381  char targetIdS[80]; // "Horz.tagret3" or "Vert.target6" etc.
383  int statusS; // bit pattern if <0 data is not usable
384  char statusStringS[80];
389  int countsUpLeftS[360];
390  int countsLeftS[360];
391  int countsDownLeftS[360];
393  int countsRightS[360];
394  int countsUpRightS[360];
395  float avgAsymXS;
396  float avgAsymX45S;
397  float avgAsymX90S;
398  float avgAsymYS;
403  float bunchAsymXS[360];
404  float bunchAsymYS[360];
405  float bunchAsymErrorXS[360];
406  float bunchAsymErrorYS[360];
407  float beamEnergyS; // the same as ringSpec.color:beamEnergyM just for reference
410  int numberEventsS; // provided by MCR before measurement
411  int maxTimeS;
413 };
414 #endif /* __PACKET_A_H__ */
415 
416