]>
Commit | Line | Data |
---|---|---|
71d7c760 | 1 | // XEmacs -*-C++-*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTTPCDEFINITIONS_H | |
5 | #define ALIHLTTPCDEFINITIONS_H | |
13398559 | 6 | //* This file is property of and copyright by the ALICE HLT Project * |
7 | //* ALICE Experiment at CERN, All rights reserved. * | |
8 | //* See cxx source for full Copyright notice * | |
71d7c760 | 9 | |
10 | #include "AliHLTDataTypes.h" | |
96bda103 | 11 | #include "Rtypes.h" |
71d7c760 | 12 | |
13398559 | 13 | /** |
14 | * @class AliHLTTPCDefinitions | |
15 | * Data type definitions for the libAliHLTTPC library. | |
297174de | 16 | * |
17 | * @ingroup alihlt_tpc | |
13398559 | 18 | */ |
71d7c760 | 19 | class AliHLTTPCDefinitions |
96bda103 | 20 | { |
21 | public: | |
71d7c760 | 22 | |
8ede8717 | 23 | static AliHLTUInt8_t GetMinSliceNr( const AliHLTComponentBlockData& block ) |
71d7c760 | 24 | { |
25 | return (AliHLTUInt8_t)( (block.fSpecification & 0x00FF0000) >> 16 ); | |
26 | } | |
a6c02c85 | 27 | static AliHLTUInt8_t GetMinSliceNr( ULong_t spec ) |
28 | { | |
29 | return (AliHLTUInt8_t)( (spec & 0x00FF0000) >> 16 ); | |
30 | } | |
8ede8717 | 31 | static AliHLTUInt8_t GetMaxSliceNr( const AliHLTComponentBlockData& block ) |
71d7c760 | 32 | { |
33 | return (AliHLTUInt8_t)( (block.fSpecification & 0xFF000000) >> 24 ); | |
34 | } | |
a6c02c85 | 35 | static AliHLTUInt8_t GetMaxSliceNr( ULong_t spec ) |
36 | { | |
37 | return (AliHLTUInt8_t)( (spec & 0xFF000000) >> 24 ); | |
38 | } | |
8ede8717 | 39 | static AliHLTUInt8_t GetMinPatchNr( const AliHLTComponentBlockData& block ) |
71d7c760 | 40 | { |
41 | return (AliHLTUInt8_t)( (block.fSpecification & 0x000000FF) ); | |
42 | } | |
a6c02c85 | 43 | static AliHLTUInt8_t GetMinPatchNr( ULong_t spec ) |
44 | { | |
45 | return (AliHLTUInt8_t)( (spec & 0x000000FF) ); | |
46 | } | |
8ede8717 | 47 | static AliHLTUInt8_t GetMaxPatchNr( const AliHLTComponentBlockData& block ) |
71d7c760 | 48 | { |
49 | return (AliHLTUInt8_t)( (block.fSpecification & 0x0000FF00) >> 8 ); | |
50 | } | |
a6c02c85 | 51 | static AliHLTUInt8_t GetMaxPatchNr( ULong_t spec ) |
52 | { | |
53 | return (AliHLTUInt8_t)( (spec & 0x0000FF00) >> 8 ); | |
54 | } | |
71d7c760 | 55 | |
56 | static AliHLTUInt32_t EncodeDataSpecification( AliHLTUInt8_t minSliceNr, | |
57 | AliHLTUInt8_t maxSliceNr, | |
58 | AliHLTUInt8_t minPatchNr, | |
59 | AliHLTUInt8_t maxPatchNr ) | |
60 | { | |
61 | return ((maxSliceNr & 0xFF) << 24) | ((minSliceNr & 0xFF) << 16) | ((maxPatchNr & 0xFF) << 8) | ((minPatchNr & 0xFF)); | |
62 | } | |
625b072f | 63 | |
64 | /** | |
65 | * Converts a slice and patch number to a DDL ID number for TPC. | |
66 | * \param slice The slice number in the range [0..35] (0..17 for A side and 18..35 for C side). | |
67 | * \param patch The patch number in the range [0..5]. | |
68 | * \returns the DDL ID number of TPC or -1 if the slice or patch was invalid. | |
69 | * \note A side is in the -z axis direction (same side as the muon spectrometer) | |
70 | * and C side is in the +z axis direction. | |
71 | */ | |
72 | static AliHLTInt32_t SlicePatchToDDLId(AliHLTUInt8_t slice, AliHLTUInt8_t patch) | |
73 | { | |
74 | if (slice > 35 or patch > 5) return -1; | |
75 | return 768 + (patch > 1 ? 72 + 4*slice + patch - 2 : 2*slice + patch); | |
76 | } | |
77 | ||
78 | /** | |
79 | * Converts a DDL ID number for the TPC to a slice and patch number. | |
80 | * [in] \param ddlid The DDL ID number to convert. | |
81 | * [out] \param slice The resultant slice number in the range [0..35]. | |
82 | * [out] \param patch The resultant patch number in the range [0..5]. | |
83 | * \returns true if the DDL ID number was valid and slice and patch were set, | |
84 | * otherwise false for an invalid DDL ID. | |
85 | */ | |
86 | static bool DDLIdToSlicePatch(AliHLTInt32_t ddlid, AliHLTUInt8_t& slice, AliHLTUInt8_t& patch); | |
71d7c760 | 87 | |
96bda103 | 88 | /** DDL packed RAW data */ |
28355ac2 | 89 | static const AliHLTComponentDataType fgkDDLPackedRawDataType; // see above |
9ae1d7d8 | 90 | /** DDL entropy encoded data */ |
91 | static const AliHLTComponentDataType fgkDDLEncodedEntropyRawDataType; // see above | |
96bda103 | 92 | /** packed RAW data */ |
28355ac2 | 93 | static const AliHLTComponentDataType fgkPackedRawDataType; // see above |
96bda103 | 94 | /** unpacked RAW data */ |
28355ac2 | 95 | static const AliHLTComponentDataType fgkUnpackedRawDataType; // see above |
96bda103 | 96 | /** cluster data */ |
28355ac2 | 97 | static const AliHLTComponentDataType fgkClustersDataType; // see above |
6af4f584 | 98 | /** HW cluster data */ |
99 | static const AliHLTComponentDataType fgkHWClustersDataType; // see above | |
491d6af5 | 100 | /** HW alternative output cluster data */ |
101 | static const AliHLTComponentDataType fgkAlterClustersDataType; // see above | |
96bda103 | 102 | /** track segments in local coordinates */ |
28355ac2 | 103 | static const AliHLTComponentDataType fgkTrackSegmentsDataType; // see above |
96bda103 | 104 | /** tracks in global koordinates */ |
28355ac2 | 105 | static const AliHLTComponentDataType fgkTracksDataType; // see above |
96bda103 | 106 | /** vertex data structure */ |
28355ac2 | 107 | static const AliHLTComponentDataType fgkVertexDataType; // see above |
ff2f0f94 | 108 | |
109 | // Cluster & Tracks model data | |
110 | /** cluster tracks model data type */ | |
28355ac2 | 111 | static const AliHLTComponentDataType fgkClusterTracksModelDataType; // see above |
ff2f0f94 | 112 | /** remaining clusters model data type */ |
28355ac2 | 113 | static const AliHLTComponentDataType fgkRemainingClustersModelDataType; // see above |
ff2f0f94 | 114 | /** cluster tracks compressed data type */ |
28355ac2 | 115 | static const AliHLTComponentDataType fgkClusterTracksCompressedDataType; // see above |
ff2f0f94 | 116 | /** remaining clusters compressed data type */ |
117 | static const AliHLTComponentDataType fgkRemainingClustersCompressedDataType; // see above | |
118 | ||
119 | // Calibration data | |
02d01bbf | 120 | /** pedestal calibration data */ |
121 | static const AliHLTComponentDataType fgkCalibPedestalDataType; // see above | |
122 | /** signal calibration data */ | |
9d9ffd37 | 123 | static const AliHLTComponentDataType fgkCalibPulserDataType; // see above |
28355ac2 | 124 | /** central electrode calibration data */ |
125 | static const AliHLTComponentDataType fgkCalibCEDataType; // see above | |
71d7c760 | 126 | |
e642ae99 | 127 | // offline calbration components |
128 | ||
129 | /** alignment calibration data */ | |
130 | static const AliHLTComponentDataType fgkOfflineCalibAlignDataType; // see above | |
131 | /** track calibration data */ | |
132 | static const AliHLTComponentDataType fgkOfflineCalibTracksDataType; // see above | |
133 | /** gain calibration data */ | |
134 | static const AliHLTComponentDataType fgkOfflineCalibTracksGainDataType; // see above | |
deba5d85 | 135 | /** cluster monte carlo information */ |
136 | static const AliHLTComponentDataType fgkAliHLTDataTypeClusterMCInfo; // see above | |
e642ae99 | 137 | |
625b072f | 138 | private: |
139 | ||
140 | /// Do not allow creation of this class since everything is static. | |
141 | AliHLTTPCDefinitions(); | |
142 | virtual ~AliHLTTPCDefinitions(); | |
143 | ||
144 | ClassDef(AliHLTTPCDefinitions, 0) // Useful static definitions and methods for TPC | |
96bda103 | 145 | }; |
71d7c760 | 146 | |
147 | #endif |