CMS 3D CMS Logo

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 //----------------------------------------------------------------------------------------------------
22 
23 namespace ctpps
24 {
27  {
28  public:
29  typedef uint64_t word;
30 
32  enum { vmCluster = 0x80, vmRaw = 0x90, vmDiamondCompact = 0xB0 };
33 
34  // list of headers for all words encountered in diamond data frames
35  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_2 = 0x7800;
36  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3 = 0x7000;
37  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5 = 0x6800;
38  static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_7 = 0x6000;
39  static constexpr unsigned int VFAT_HEADER_OF_EC = 0xC000;
40 
42 
44 
46  int Run(int fedId, const FEDRawData &data, std::vector<TotemFEDInfo> &fedInfoColl, SimpleVFATFrameCollection &coll) const;
47 
49  int ProcessOptoRxFrame(const word *buf, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const;
50 
52  int ProcessOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const;
53 
55  int ProcessOptoRxFrameParallel(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const;
56 
58  int ProcessVFATDataParallel(const uint16_t *buf, unsigned int maxWords, unsigned int OptoRxId, SimpleVFATFrameCollection *fc) const;
59 
60  private:
61  unsigned char verbosity;
62  };
63 }
64 
65 #endif
OptoRx headers and footers.
Definition: TotemFEDInfo.h:17
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_7
Collection of code for unpacking of TOTEM raw-data.
int ProcessOptoRxFrame(const word *buf, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx (or LoneG) frame.
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_2
static constexpr unsigned int VFAT_HEADER_OF_EC
#define constexpr
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5
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.
int ProcessOptoRxFrameParallel(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in parallel (new) format.
JetCorrectorParametersCollection coll
Definition: classes.h:10
unsigned long long uint64_t
Definition: Time.h:15
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int Run(int fedId, const FEDRawData &data, std::vector< TotemFEDInfo > &fedInfoColl, SimpleVFATFrameCollection &coll) const
Unpack data from FED with fedId into `coll&#39; collection.