]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDefinitions.h
2c2bc2dfdca2dcf88b7899940a327e079d00f9a2
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDefinitions.h
1 // XEmacs -*-C++-*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTTPCDEFINITIONS_H
5 #define ALIHLTTPCDEFINITIONS_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8
9 /* AliHLTTPCDefinitions
10  */
11
12 #include "AliHLTDataTypes.h"
13 #include "TObject.h"
14
15 class AliHLTTPCDefinitions
16     {
17     public:
18       AliHLTTPCDefinitions();
19       virtual ~AliHLTTPCDefinitions();
20
21         static AliHLTUInt8_t GetMinSliceNr( const AliHLTComponentBlockData& block )
22                 {
23                 return (AliHLTUInt8_t)( (block.fSpecification & 0x00FF0000) >> 16 );
24                 }
25         static AliHLTUInt8_t GetMinSliceNr( ULong_t spec )
26                 {
27                 return (AliHLTUInt8_t)( (spec & 0x00FF0000) >> 16 );
28                 }
29         static AliHLTUInt8_t GetMaxSliceNr( const AliHLTComponentBlockData& block )
30                 {
31                 return (AliHLTUInt8_t)( (block.fSpecification & 0xFF000000) >> 24 );
32                 }
33         static AliHLTUInt8_t GetMaxSliceNr( ULong_t spec )
34                 {
35                 return (AliHLTUInt8_t)( (spec & 0xFF000000) >> 24 );
36                 }
37         static AliHLTUInt8_t GetMinPatchNr( const AliHLTComponentBlockData& block )
38                 {
39                 return (AliHLTUInt8_t)( (block.fSpecification & 0x000000FF) );
40                 }
41         static AliHLTUInt8_t GetMinPatchNr( ULong_t spec )
42                 {
43                 return (AliHLTUInt8_t)( (spec & 0x000000FF) );
44                 }
45         static AliHLTUInt8_t GetMaxPatchNr( const AliHLTComponentBlockData& block )
46                 {
47                 return (AliHLTUInt8_t)( (block.fSpecification & 0x0000FF00) >> 8 );
48                 }
49         static AliHLTUInt8_t GetMaxPatchNr( ULong_t spec )
50                 {
51                 return (AliHLTUInt8_t)( (spec & 0x0000FF00) >> 8 );
52                 }
53         
54         static AliHLTUInt32_t EncodeDataSpecification( AliHLTUInt8_t minSliceNr, 
55                                                 AliHLTUInt8_t maxSliceNr,
56                                                 AliHLTUInt8_t minPatchNr,
57                                                 AliHLTUInt8_t maxPatchNr )
58                 {
59                 return ((maxSliceNr & 0xFF) << 24) | ((minSliceNr & 0xFF) << 16) | ((maxPatchNr & 0xFF) << 8) | ((minPatchNr & 0xFF));
60                 }
61
62         static const AliHLTComponentDataType gkDDLPackedRawDataType;
63         static const AliHLTComponentDataType gkPackedRawDataType;
64         static const AliHLTComponentDataType gkUnpackedRawDataType;
65         static const AliHLTComponentDataType gkClustersDataType;
66       /** track segments in local coordinates */
67         static const AliHLTComponentDataType gkTrackSegmentsDataType;
68       /** tracks in global koordinates */
69         static const AliHLTComponentDataType gkTracksDataType;
70         static const AliHLTComponentDataType gkVertexDataType;
71
72         ClassDef(AliHLTTPCDefinitions, 0)
73
74     };
75
76 #endif