HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoDccFrame.h
Go to the documentation of this file.
1 #ifndef HARPODCCFRAME_H
2 #define HARPODCCFRAME_H
3 
4 #include "Rtypes.h"
5 
7 {
8  public:
9  // HarpoDccFrame() {}
10  //virtual ~HarpoDccFrame() {}
11 
12  HarpoDccFrame();
13  // HarpoDccFrame(const HarpoDccFrame &rhs);
14 
15  virtual ~HarpoDccFrame();
16 
17  //HarpoDccFrame& operator=(const HarpoDccFrame &rhs);
18 
19  void reset();
20 
21  UInt_t size; // Paket data size (one channel)
22  /* DCCHEADER word (p.29) */
23  UInt_t swversion;// 00 - V1.x 01 V2.x
24  UInt_t pkgtype; //DCC Flag * 4 + Reply type
25  UInt_t dccindex; // DCC Index (6 bit)
26  UInt_t femindex; // Fem Index ( 4 bit )
27  /* FEM Header6 short int word */
28  UInt_t msgtype; //Message Type(adc_data 00,slow_ctrl 01,Histo 02,Histo STAT 03)*/
29  UInt_t femecnt; // Fem evnt counter
30 
31  UInt_t fecerror; // ???? ignore ???
32  UInt_t synchfail; // U flag , adc not gain sync
33  UInt_t lostsynch; // L flag , ads lost synchronization
34 
35  UInt_t readmode; // Read Out Mode ( only mode = 0 supported)
36  UInt_t compress; // #1 data with zero suppression
37  /* argument words */
38  UInt_t arg1; // First Argument word for palse #0
39  UInt_t arg2; // Second Argument word for pulse #0
40  /* dcc time stamp */
41  UInt_t timestamp; // Relative Event time stamp in FEM frequense units
42  /* EvTy and Event Counter */
43  UInt_t evttype; // FEM Type of Event ( 2bits )
44  UInt_t evtcnt; // Count of This kind of events
45  /* Word Count */
46  UInt_t chwdcnt; // Channal zero word count
47  /* pointers to raw unpacked header, pulse data and trailer
48  in raw data buffer */
49  UShort_t *dccHeader;
50  UShort_t *dccData;
51  UShort_t *dccTrailer;
52  //-----------------------
53  void print() const;
54 
55  UShort_t GetFecPerFem() const { return FecPerFem; }
56  void SetFecPerFem(UShort_t fpm ) { FecPerFem = fpm; }
57 
58  Int_t ChannelNum(UShort_t a1, UShort_t a2) const;
59  Int_t ChannelNum() const {
60  return ChannelNum((UShort_t)arg1,(UShort_t)arg2);
61  }
62  private:
63  Int_t Arg12ToFecAsicChannel(UShort_t fec_per_fem,UShort_t arg1,UShort_t arg2,
64  UShort_t *fec,UShort_t *asic,
65  UShort_t *channel) const;
66 
67  static UShort_t FecPerFem;
68 
69  ClassDef(HarpoDccFrame,1) //Event structure
70 };
71 
72 #endif
73 
Int_t Arg12ToFecAsicChannel(UShort_t fec_per_fem, UShort_t arg1, UShort_t arg2, UShort_t *fec, UShort_t *asic, UShort_t *channel) const
UInt_t lostsynch
Definition: HarpoDccFrame.h:33
UShort_t GetFecPerFem() const
Definition: HarpoDccFrame.h:55
A generic class for HARPO datectors The class is ....
Definition: HarpoDccFrame.h:6
UInt_t swversion
Definition: HarpoDccFrame.h:23
void SetFecPerFem(UShort_t fpm)
Definition: HarpoDccFrame.h:56
UInt_t timestamp
Definition: HarpoDccFrame.h:41
void reset()
reset - clear all fields
UShort_t * dccHeader
Definition: HarpoDccFrame.h:49
UShort_t * dccTrailer
Definition: HarpoDccFrame.h:51
UShort_t * dccData
Definition: HarpoDccFrame.h:50
void print() const
Int_t ChannelNum() const
Definition: HarpoDccFrame.h:59
static UShort_t FecPerFem
Definition: HarpoDccFrame.h:67
UInt_t size
reset - clear all fields
Definition: HarpoDccFrame.h:21
virtual ~HarpoDccFrame()
UInt_t synchfail
Definition: HarpoDccFrame.h:32