]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/comp/AliHLTTPCCompModelConverter.h
1979644fc5b522d9b20f7676b9819de88c617d61
[u/mrichter/AliRoot.git] / HLT / TPCLib / comp / AliHLTTPCCompModelConverter.h
1 // XEmacs -*-C++-*-
2 // $Id$
3
4 #ifndef ALIHLTTPCCOMPMODELCONVERTER_H
5 #define ALIHLTTPCCOMPMODELCONVERTER_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 /** @file   AliHLTTPCCompModelConverter.h
11     @author Timm Steinbeck
12     @date   
13     @brief  Declaration of a copy component. */
14
15 #include "AliHLTTPCTrackArray.h"
16 #include "AliHLTTPCTrackletDataFormat.h"
17 #include "AliHLTTPCClusterDataFormat.h"
18 #include "AliHLTTPCCompModelAnalysis.h"
19 #include "AliHLTLogging.h"
20
21 /**
22  * @class AliHLTTPCCompModelConverter
23  * @brief A dummy HLT processing component. 
24  *
25  * An implementiation of a copy component that just copies its input data
26  * to debug a components input data
27  * @ingroup alihlt_tpc
28  */
29 class AliHLTTPCCompModelConverter: public AliHLTLogging
30     {
31     public:
32       /** standard constructor */
33       AliHLTTPCCompModelConverter();
34
35       /** constructor including model/track analysis */
36       AliHLTTPCCompModelConverter(AliHLTTPCCompModelAnalysis* modelanalysis);
37
38       /** standard destructor */
39       virtual ~AliHLTTPCCompModelConverter();
40       
41       /** initialisation function 
42        * @return zero upon success
43        */
44       int Init();
45       
46       /** function to set input tracks
47        * @param tracklets pointer to AliHLTTPCTrackletData
48        * @return zero upon success
49        */
50       int SetInputTracks( AliHLTTPCTrackletData* tracklets );
51
52       /** function to set input tracks
53        * @param clusters pointer to AliHLTTPCClusterData
54        * @param slice UInt_t slice number
55        * @param patch UInt_t patch number
56        * @return zero upon success
57        */
58       int SetInputClusters( AliHLTTPCClusterData* clusters, UInt_t slice, UInt_t patch );
59       
60       /** function to convert input to Vestbo-model (-> compression can then follow) */
61       void Convert();
62       
63       /** function to get output model data size
64        * @return unsigned long value of output model data size
65        */
66       unsigned long GetOutputModelDataSize();
67       
68       /** function to output model data
69        * @param data AliHLTUInt8_t* pointer to ouptut data
70        * @return zero upon success
71        */
72       int OutputModelData( AliHLTUInt8_t* data );
73       
74       /** function to select remaining clusters */
75       void SelectRemainingClusters();
76       
77       /** function to get remaining clusters output data size
78        * @return unsigned long value = size
79        */
80       unsigned long GetRemainingClustersOutputDataSize();
81
82       /** function to get remaining clusters
83        * @param data     AliHLTUInt8_t* const
84        * @param dataSize unsigned long& 
85        */
86       int GetRemainingClusters( AliHLTUInt8_t* const data, unsigned long& dataSize );
87       
88       /** function to define minimal hits for one track
89        * @param minHits unsigned
90        */
91       void SetMinHits( unsigned minHits )
92       {
93         fMinHits = minHits;
94       }
95
96     protected:
97
98       /** function to expand track data */
99       void ExpandTrackData();
100
101       /** member variable input track array */
102       AliHLTTPCTrackArray fInputTrackArray;
103       /** member variable output track array */
104       AliHLTTPCTrackArray fOutputTrackArray;
105       
106       /** pointer to instance of analysis model class */
107       AliHLTTPCCompModelAnalysis* fModelAnalysisInstance; // pointer to instance of analysis model class
108
109       /** array of cluster data */
110       AliHLTTPCClusterData* fClusters[36][6];
111
112       /** temporary array how of used cluster sizes */
113       unsigned long fClusterUsedSizes[36][6]; //! temporary, how many entries do we have in the following clusters used arrays
114       /** array to determine the used clusters in tracking */
115       bool* fClusterUsed[36][6]; //! keep track of which clusters have been used, can be transient.
116       /** number of minimal hit for one track */
117       unsigned fMinHits;
118       
119     private:
120       /** copy constructor prohibited */
121       AliHLTTPCCompModelConverter(const AliHLTTPCCompModelConverter&);
122       /** assignment operator prohibited */
123       AliHLTTPCCompModelConverter& operator=(const AliHLTTPCCompModelConverter&);
124      
125       ClassDef(AliHLTTPCCompModelConverter, 1)
126
127     };
128 #endif