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 namespace pps {
23  class RawDataUnpacker {
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,
46 
48  int processOptoRxFrame(const word *buf,
49  unsigned int frameSize,
50  TotemFEDInfo &fedInfo,
52 
54  int processOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const;
55 
58  unsigned int frameSize,
59  TotemFEDInfo &fedInfo,
61 
64  unsigned int frameSize,
65  TotemFEDInfo &fedInfo,
67 
69  int processVFATDataParallel(const uint16_t *buf,
70  unsigned int maxWords,
71  unsigned int OptoRxId,
73 
74  private:
75  unsigned char verbosity;
76  };
77 } // namespace pps
78 
79 #endif
pps::RawDataUnpacker::VFAT_DIAMOND_HEADER_OF_WORD_3
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_3
Definition: RawDataUnpacker.h:44
pps::RawDataUnpacker::processOptoRxFrameSampic
int processOptoRxFrameSampic(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame that contains SAMPIC frames.
Definition: RawDataUnpacker.cc:414
SimpleVFATFrameCollection.h
VFATFrameCollection.h
pps::RawDataUnpacker::VFAT_DIAMOND_HEADER_OF_WORD_2
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_2
Definition: RawDataUnpacker.h:43
FEDRawData.h
FEDRawData
Definition: FEDRawData.h:19
pps::RawDataUnpacker::processOptoRxFrameParallel
int processOptoRxFrameParallel(const word *buffer, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in parallel (new) format.
Definition: RawDataUnpacker.cc:177
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
pps::RawDataUnpacker::processOptoRxFrame
int processOptoRxFrame(const word *buf, unsigned int frameSize, TotemFEDInfo &fedInfo, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx (or LoneG) frame.
Definition: RawDataUnpacker.cc:37
pps::RawDataUnpacker::processOptoRxFrameSerial
int processOptoRxFrameSerial(const word *buffer, unsigned int frameSize, SimpleVFATFrameCollection *fc) const
Process one Opto-Rx frame in serial (old) format.
Definition: RawDataUnpacker.cc:99
benchmark_cfg.fc
fc
Definition: benchmark_cfg.py:15
pps::RawDataUnpacker::vmCluster
Definition: RawDataUnpacker.h:40
edm::ParameterSet
Definition: ParameterSet.h:36
pps::RawDataUnpacker::vmRaw
Definition: RawDataUnpacker.h:40
pps::RawDataUnpacker::processVFATDataParallel
int processVFATDataParallel(const uint16_t *buf, unsigned int maxWords, unsigned int OptoRxId, SimpleVFATFrameCollection *fc) const
Process data from one VFAT in parallel (new) format.
Definition: RawDataUnpacker.cc:205
SimpleVFATFrameCollection
Definition: SimpleVFATFrameCollection.h:19
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
pps::RawDataUnpacker::verbosity
unsigned char verbosity
Definition: RawDataUnpacker.h:87
pps::RawDataUnpacker::word
uint64_t word
Definition: RawDataUnpacker.h:37
pps
Definition: DiamondVFATFrame.h:20
pps::RawDataUnpacker::RawDataUnpacker
RawDataUnpacker()
Definition: RawDataUnpacker.h:49
pps::RawDataUnpacker::VFAT_DIAMOND_HEADER_OF_WORD_7
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_7
Definition: RawDataUnpacker.h:46
pps::RawDataUnpacker::run
int run(int fedId, const FEDRawData &data, std::vector< TotemFEDInfo > &fedInfoColl, SimpleVFATFrameCollection &coll) const
Unpack data from FED with fedId into ‘coll’ collection.
Definition: RawDataUnpacker.cc:20
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TotemFEDInfo
OptoRx headers and footers.
Definition: TotemFEDInfo.h:16
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
TotemFEDInfo.h
ParameterSet.h
pps::RawDataUnpacker::VFAT_HEADER_OF_EC
static constexpr unsigned int VFAT_HEADER_OF_EC
Definition: RawDataUnpacker.h:47
pps::RawDataUnpacker::vmDiamondCompact
Definition: RawDataUnpacker.h:40
pps::RawDataUnpacker::VFAT_DIAMOND_HEADER_OF_WORD_5
static constexpr unsigned int VFAT_DIAMOND_HEADER_OF_WORD_5
Definition: RawDataUnpacker.h:45