CMS 3D CMS Logo

DiamondVFATFrame.h
Go to the documentation of this file.
1 /**********************************************************
2 *
3 * Seyed Mohsen Etesami (setesami@cern.ch)
4 *
5 **********************************************************/
6 
7 #ifndef EventFilter_CTPPSRawToDigi_DiamondVFATFrame
8 #define EventFilter_CTPPSRawToDigi_DiamondVFATFrame
9 
10 #include <vector>
11 #include <cstddef>
12 #include <stdint.h>
13 
15 
16 
21 {
22 
23  public:
25  {}
26  virtual ~DiamondVFATFrame() {}
27 
29  uint32_t getLeadingEdgeTime() const
30  {
31  uint32_t time = ((data[5]&0x1f)<<16)+data[6];
32  time = (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; //HPTDC inperpolation bits are MSB but should be LSB.... ask HPTDC designers...
33  return time;
34  }
35 
36  uint32_t getTrailingEdgeTime() const
37  {
38  uint32_t time = ((data[7]&0x1f)<<16)+data[8];
39  time = (time & 0xFFE7FFFF) << 2 | (time & 0x00180000) >> 19; //HPTDC inperpolation bits are MSB but should be LSB.... ask HPTDC designers...
40  return time;
41  }
42 
43  uint32_t getThresholdVoltage() const
44  {
45  return ((data[3]&0x7ff)<<16)+data[4];
46  }
47 
49  {
50  return data[2] & 0x01;
51  }
52 
54  {
55  return data[1] & 0xFFFF;
56  }
57 
58 };
59 
60 #endif
word data[12]
Definition: VFATFrame.h:168
virtual ~DiamondVFATFrame()
uint32_t getLeadingEdgeTime() const
get timing infromation
uint16_t word
Definition: VFATFrame.h:22
#define NULL
Definition: scimark2.h:8
uint32_t getThresholdVoltage() const
VFATFrame::word getMultihit() const
DiamondVFATFrame(const word *inputData=NULL)
uint32_t getTrailingEdgeTime() const
VFATFrame::word getHptdcErrorFlag() const