CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RawDataUnpacker.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of the TOTEM offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@gmail.com)
6 * Nicola Minafra
7 *
8 ****************************************************************************/
9 
10 #ifndef EventFilter_CTPPSRawToDigi_RawDataUnpacker
11 #define EventFilter_CTPPSRawToDigi_RawDataUnpacker
12 
14 
17 
20 
21 namespace pps {
24  public:
25  typedef uint64_t word;
26 
28  enum { vmCluster = 0x80, vmRaw = 0x90, vmDiamondCompact = 0xB0 };
29 
30  // list of headers for all words encountered in diamond data frames
31  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_2 = 0x7800;
32  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3 = 0x7000;
33  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5 = 0x6800;
34  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_7 = 0x6000;
35  static constexpr unsigned int VFAT_HEADER_OF_EC = 0xC000;
36 
38 
40 
42  int run(int fedId,
43  const FEDRawData &data,
44  std::vector<TotemFEDInfo> &fedInfoColl,
45  SimpleVFATFrameCollection &coll) const;
46 
48  int processOptoRxFrame(const word *buf,
49  unsigned int frameSize,
50  TotemFEDInfo &fedInfo,
51  SimpleVFATFrameCollection *fc) const;
52 
54  int processOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const;
55 
58  unsigned int frameSize,
59  TotemFEDInfo &fedInfo,
60  SimpleVFATFrameCollection *fc) const;
61 
64  unsigned int frameSize,
65  TotemFEDInfo &fedInfo,
66  SimpleVFATFrameCollection *fc) const;
67 
69  int processVFATDataParallel(const uint16_t *buf,
70  unsigned int maxWords,
71  unsigned int OptoRxId,
72  SimpleVFATFrameCollection *fc) const;
73 
74  private:
75  unsigned char verbosity;
76  };
77 } // namespace pps
78 
79 #endif
OptoRx headers and footers.
Definition: TotemFEDInfo.h:17
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_7
static constexpr unsigned int VFAT_HEADER_OF_EC
int processOptoRxFrame(const word *buf, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx (or LoneG) frame.
int processOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in serial (old) format.
int processVFATDataParallel(const uint16_t *buf, unsigned int maxWords, unsigned int OptoRxId, SimpleVFATFrameCollection *fc) const
Process data from one VFAT in parallel (new) format.
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5
uint64_t word
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3
int processOptoRxFrameSampic(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame that contains SAMPIC frames.
int run(int fedId, const FEDRawData &data, std::vector< TotemFEDInfo > &fedInfoColl, SimpleVFATFrameCollection &coll) const
Unpack data from FED with fedId into `coll&#39; collection.
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_2
unsigned char verbosity
unsigned long long uint64_t
Definition: Time.h:13
Collection of code for unpacking of TOTEM raw-data.
int processOptoRxFrameParallel(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in parallel (new) format.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79