Project
Loading...
Searching...
No Matches
RawEventData.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11//
12// DataFormats/Detectors/ZDC/include/DataFormatsZDC/RawEventData.h
13
14#ifndef ALICEO2_ZDC_RAWEVENTDATA_H_
15#define ALICEO2_ZDC_RAWEVENTDATA_H_
18#include "ZDCBase/Constants.h"
19#include <Rtypes.h>
20#include <iostream>
21#include <gsl/span>
22
26
27namespace o2
28{
29namespace zdc
30{
31
32constexpr unsigned short Id_w0 = 0x0;
33constexpr unsigned short Id_w1 = 0x1;
34constexpr unsigned short Id_w2 = 0x2;
35constexpr unsigned short Id_wn = 0x3;
36constexpr int NWPerGBTW = 4; // 4*32bit=128 bit per GBTW
37constexpr int NBPerGBTW = 4 * NWPerGBTW; // 16B=128 bit per GBTW
38constexpr int PayloadPerGBTW = 10; // 80 bit per GBTW
39
40struct __attribute__((__packed__)) ChannelDataV0 {
41 // First GBT word
42 unsigned fixed_0 : 2;
43 unsigned board : 4;
44 unsigned ch : 2;
45 unsigned offset : 16;
46 unsigned hits : 12;
47 unsigned bc : 12;
48 unsigned orbit : 32;
49 unsigned empty_0 : 16;
50 unsigned empty_1 : 32;
51
52 // Second GBT word
53 unsigned fixed_1 : 2;
54 unsigned dLoss : 1;
55 unsigned error : 1;
56 unsigned Alice_0 : 1;
57 unsigned Alice_1 : 1;
58 unsigned Alice_2 : 1;
59 unsigned Alice_3 : 1;
60 unsigned s00 : 12;
61 unsigned s01 : 12;
62 unsigned s02 : 12;
63 unsigned s03 : 12;
64 unsigned s04 : 12;
65 unsigned s05 : 12;
66 unsigned empty_2 : 16;
67 unsigned empty_3 : 32;
68
69 // Third GBT word
70 unsigned fixed_2 : 2;
71 unsigned Hit : 1;
72 unsigned Auto_m : 1;
73 unsigned Auto_0 : 1;
74 unsigned Auto_1 : 1;
75 unsigned Auto_2 : 1;
76 unsigned Auto_3 : 1;
77 unsigned s06 : 12;
78 unsigned s07 : 12;
79 unsigned s08 : 12;
80 unsigned s09 : 12;
81 unsigned s10 : 12;
82 unsigned s11 : 12;
83 unsigned empty_4 : 16;
84 unsigned empty_5 : 32;
85};
86
89 struct ChannelDataV0 f;
90 void reset();
91};
92
93struct EventData {
95 void print() const;
96 void reset();
98};
99
100} // namespace zdc
101} // namespace o2
102#endif
uint64_t orbit
Definition RawEventData.h:6
uint64_t bc
Definition RawEventData.h:5
Class to refer to the 1st entry and N elements of some group in the continuous container.
GLdouble f
Definition glcorearb.h:310
GLboolean * data
Definition glcorearb.h:298
GLintptr offset
Definition glcorearb.h:660
GLubyte GLubyte GLubyte GLubyte w
Definition glcorearb.h:852
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
constexpr int NModules
Definition Constants.h:68
constexpr unsigned short Id_wn
constexpr int NChPerModule
Definition Constants.h:69
constexpr int NWPerGBTW
constexpr int NBPerGBTW
constexpr unsigned short Id_w1
constexpr int PayloadPerGBTW
constexpr int NWPerBc
Definition Constants.h:72
constexpr unsigned short Id_w2
constexpr unsigned short Id_w0
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ClassDefNV(EventData, 1)