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 processOptoRxFrameSampic(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const;
59 
61  int processVFATDataParallel(const uint16_t *buf, unsigned int maxWords, unsigned int OptoRxId, SimpleVFATFrameCollection *fc) const;
62 
63  private:
64  unsigned char verbosity;
65  };
66 }
67 
68 #endif
OptoRx headers and footers.
Definition: TotemFEDInfo.h:17
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.
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.
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
int processOptoRxFrameSampic(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame that contains SAMPIC frames.
static constexpr unsigned int VFAT_HEADER_OF_EC
#define constexpr
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3
int processOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in serial (old) format.
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5
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