]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDefinitions.h
additional boundary checks (Kenneth)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDefinitions.h
1 // XEmacs -*-C++-*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTTPCDEFINITIONS_H
5 #define ALIHLTTPCDEFINITIONS_H
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                               */
9
10 /* AliHLTTPCDefinitions
11  */
12
13 #include "AliHLTDataTypes.h"
14 #include "Rtypes.h"
15
16 class AliHLTTPCDefinitions
17 {
18 public:
19       AliHLTTPCDefinitions();
20       virtual ~AliHLTTPCDefinitions();
21
22         static AliHLTUInt8_t GetMinSliceNr( const AliHLTComponentBlockData& block )
23                 {
24                 return (AliHLTUInt8_t)( (block.fSpecification & 0x00FF0000) >> 16 );
25                 }
26         static AliHLTUInt8_t GetMinSliceNr( ULong_t spec )
27                 {
28                 return (AliHLTUInt8_t)( (spec & 0x00FF0000) >> 16 );
29                 }
30         static AliHLTUInt8_t GetMaxSliceNr( const AliHLTComponentBlockData& block )
31                 {
32                 return (AliHLTUInt8_t)( (block.fSpecification & 0xFF000000) >> 24 );
33                 }
34         static AliHLTUInt8_t GetMaxSliceNr( ULong_t spec )
35                 {
36                 return (AliHLTUInt8_t)( (spec & 0xFF000000) >> 24 );
37                 }
38         static AliHLTUInt8_t GetMinPatchNr( const AliHLTComponentBlockData& block )
39                 {
40                 return (AliHLTUInt8_t)( (block.fSpecification & 0x000000FF) );
41                 }
42         static AliHLTUInt8_t GetMinPatchNr( ULong_t spec )
43                 {
44                 return (AliHLTUInt8_t)( (spec & 0x000000FF) );
45                 }
46         static AliHLTUInt8_t GetMaxPatchNr( const AliHLTComponentBlockData& block )
47                 {
48                 return (AliHLTUInt8_t)( (block.fSpecification & 0x0000FF00) >> 8 );
49                 }
50         static AliHLTUInt8_t GetMaxPatchNr( ULong_t spec )
51                 {
52                 return (AliHLTUInt8_t)( (spec & 0x0000FF00) >> 8 );
53                 }
54         
55         static AliHLTUInt32_t EncodeDataSpecification( AliHLTUInt8_t minSliceNr, 
56                                                 AliHLTUInt8_t maxSliceNr,
57                                                 AliHLTUInt8_t minPatchNr,
58                                                 AliHLTUInt8_t maxPatchNr )
59                 {
60                 return ((maxSliceNr & 0xFF) << 24) | ((minSliceNr & 0xFF) << 16) | ((maxPatchNr & 0xFF) << 8) | ((minPatchNr & 0xFF));
61                 }
62
63   /** DDL packed RAW data */
64   static const AliHLTComponentDataType fgkDDLPackedRawDataType;    // see above
65   /** DDL entropy encoded data */
66   static const AliHLTComponentDataType fgkDDLEncodedEntropyRawDataType; // see above
67   /** packed RAW data */
68   static const AliHLTComponentDataType fgkPackedRawDataType;       // see above
69   /** unpacked RAW data */
70   static const AliHLTComponentDataType fgkUnpackedRawDataType;     // see above
71   /** cluster data */
72   static const AliHLTComponentDataType fgkClustersDataType;        // see above
73   /** track segments in local coordinates */
74   static const AliHLTComponentDataType fgkTrackSegmentsDataType;   // see above
75   /** tracks in global koordinates */
76   static const AliHLTComponentDataType fgkTracksDataType;          // see above
77   /** vertex data structure */
78   static const AliHLTComponentDataType fgkVertexDataType;          // see above
79   /** pedestal calibration data */
80   static const AliHLTComponentDataType fgkCalibPedestalDataType;   // see above
81   /** signal calibration data */
82   static const AliHLTComponentDataType fgkCalibPulserDataType;     // see above
83
84   ClassDef(AliHLTTPCDefinitions, 0);
85
86 };
87
88 #endif