| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cca0470 commit 0cca232
50 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,4 +23,6 @@ o2_target_root_dictionary(DataFormatsTOF | |||
| 23 | 23 | include/DataFormatsTOF/CalibInfoTOF.h | |
| 24 | 24 | include/DataFormatsTOF/CalibLHCphaseTOF.h | |
| 25 | 25 | include/DataFormatsTOF/CalibTimeSlewingParamTOF.h | |
| 26 | - include/DataFormatsTOF/DataFormat.h) | ||
| 26 | + include/DataFormatsTOF/RawDataFormat.h | ||
| 27 | + include/DataFormatsTOF/CompressedDataFormat.h | ||
| 28 | + ) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,112 @@ | |||
| 1 | + // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| 2 | + // distributed under the terms of the GNU General Public License v3 (GPL | ||
| 3 | + // Version 3), copied verbatim in the file "COPYING". | ||
| 4 | + // | ||
| 5 | + // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| 6 | + // | ||
| 7 | + // In applying this license CERN does not waive the privileges and immunities | ||
| 8 | + // granted to it by virtue of its status as an Intergovernmental Organization | ||
| 9 | + // or submit itself to any jurisdiction. | ||
| 10 | + | ||
| 11 | + /// @file CmpDataFormat.h | ||
| 12 | + /// @author Roberto Preghenella | ||
| 13 | + /// @since 2019-12-18 | ||
| 14 | + /// @brief TOF compressed data format | ||
| 15 | + | ||
| 16 | + #ifndef O2_TOF_COMPRESSEDDATAFORMAT | ||
| 17 | + #define O2_TOF_COMPRESSEDDATAFORMAT | ||
| 18 | + | ||
| 19 | + #include <stdint.h> | ||
| 20 | + | ||
| 21 | + namespace o2 | ||
| 22 | + { | ||
| 23 | + namespace tof | ||
| 24 | + { | ||
| 25 | + namespace compressed | ||
| 26 | + { | ||
| 27 | + | ||
| 28 | + struct Word_t { | ||
| 29 | + uint32_t undefined : 31; | ||
| 30 | + uint32_t wordType : 1; | ||
| 31 | + }; | ||
| 32 | + | ||
| 33 | + struct CrateHeader_t { | ||
| 34 | + uint32_t bunchID : 12; | ||
| 35 | + uint32_t slotEnableMask : 11; | ||
| 36 | + uint32_t undefined : 1; | ||
| 37 | + uint32_t drmID : 7; | ||
| 38 | + uint32_t mustBeOne : 1; | ||
| 39 | + }; | ||
| 40 | + | ||
| 41 | + struct CrateOrbit_t { | ||
| 42 | + uint32_t orbitID : 32; | ||
| 43 | + }; | ||
| 44 | + | ||
| 45 | + struct FrameHeader_t { | ||
| 46 | + uint32_t numberOfHits : 16; | ||
| 47 | + uint32_t frameID : 8; | ||
| 48 | + uint32_t trmID : 4; | ||
| 49 | + uint32_t deltaBC : 3; | ||
| 50 | + uint32_t mustBeZero : 1; | ||
| 51 | + }; | ||
| 52 | + | ||
| 53 | + struct PackedHit_t { | ||
| 54 | + uint32_t tot : 11; | ||
| 55 | + uint32_t time : 13; | ||
| 56 | + uint32_t channel : 3; | ||
| 57 | + uint32_t tdcID : 4; | ||
| 58 | + uint32_t chain : 1; | ||
| 59 | + }; | ||
| 60 | + | ||
| 61 | + struct CrateTrailer_t { | ||
| 62 | + uint32_t numberOfDiagnostics : 4; | ||
| 63 | + uint32_t eventCounter : 12; | ||
| 64 | + uint32_t undefined : 3; | ||
| 65 | + uint32_t mustBeOne : 1; | ||
| 66 | + }; | ||
| 67 | + | ||
| 68 | + struct Diagnostic_t { | ||
| 69 | + uint32_t slotID : 4; | ||
| 70 | + uint32_t faultBits : 28; | ||
| 71 | + }; | ||
| 72 | + | ||
| 73 | + /** union **/ | ||
| 74 | + | ||
| 75 | + union Union_t { | ||
| 76 | + uint32_t data; | ||
| 77 | + Word_t word; | ||
| 78 | + CrateHeader_t crateHeader; | ||
| 79 | + CrateOrbit_t crateOrbit; | ||
| 80 | + FrameHeader_t frameHeader; | ||
| 81 | + PackedHit_t packedHit; | ||
| 82 | + CrateTrailer_t crateTrailer; | ||
| 83 | + }; | ||
| 84 | + | ||
| 85 | + } // namespace compressed | ||
| 86 | + } // namespace tof | ||
| 87 | + } // namespace o2 | ||
| 88 | + | ||
| 89 | + #define DIAGNOSTIC_DRM_HEADER 0x80000000 | ||
| 90 | + #define DIAGNOSTIC_DRM_TRAILER 0x40000000 | ||
| 91 | + #define DIAGNOSTIC_DRM_CRC 0x20000000 | ||
| 92 | + #define DIAGNOSTIC_DRM_ENABLEMASK 0x08000000 | ||
| 93 | + #define DIAGNOSTIC_DRM_CBIT 0x04000000 | ||
| 94 | + #define DIAGNOSTIC_DRM_FAULTID 0x02000000 | ||
| 95 | + #define DIAGNOSTIC_DRM_RTOBIT 0x01000000 | ||
| 96 | + | ||
| 97 | + #define DIAGNOSTIC_TRM_HEADER 0x80000000 | ||
| 98 | + #define DIAGNOSTIC_TRM_TRAILER 0x40000000 | ||
| 99 | + #define DIAGNOSTIC_TRM_CRC 0x20000000 | ||
| 100 | + #define DIAGNOSTIC_TRM_UNEXPECTED 0x20000000 | ||
| 101 | + #define DIAGNOSTIC_TRM_EVENTCOUNTER 0x08000000 | ||
| 102 | + #define DIAGNOSTIC_TRM_EBIT 0x06000000 | ||
| 103 | + #define DIAGNOSTIC_TRM_LBIT 0x02000000 | ||
| 104 | + | ||
| 105 | + #define DIAGNOSTIC_TRMCHAIN_HEADER(x) (0x00080000 << (8 * x)) | ||
| 106 | + #define DIAGNOSTIC_TRMCHAIN_TRAILER(x) (0x00040000 << (8 * x)) | ||
| 107 | + #define DIAGNOSTIC_TRMCHAIN_STATUS(x) (0x00020000 << (8 * x)) | ||
| 108 | + #define DIAGNOSTIC_TRMCHAIN_EVENTCOUNTER(x) (0x00008000 << (8 * x)) | ||
| 109 | + #define DIAGNOSTIC_TRMCHAIN_TDCERRORS(x) (0x00004000 << (8 * x)) | ||
| 110 | + #define DIAGNOSTIC_TRMCHAIN_BUNCHID(x) (0x00002000 << (8 * x)) | ||
| 111 | + | ||
| 112 | + #endif /** O2_TOF_CMPDATAFORMAT **/ | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments