Protection against deletion of Header.
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCPadArray.h
CommitLineData
01f43166 1// -*- Mode: C++ -*-
2// @(#) $Id$
3
4#ifndef ALIHLTPADARRAY_H
5#define ALIHLTPADARRAY_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 AliHLTTPCPadArray.h
11 @author Kenneth Aamodt
12 @date
13 @brief Class containing arrays of TPC Pads.
14*/
15
16#include "AliHLTLogging.h"
17#include "AliHLTTPCTransform.h"
18#include "AliHLTTPCPad.h"
19#include "AliHLTTPCClusters.h"
20#include <vector>
21
22typedef Int_t AliHLTTPCSignal_t;
23class AliHLTTPCDigitReader;
24
25/**
26 * @class AliHLTTPCPadArray
27 * TODO
28 */
29
30class AliHLTTPCPadArray : public AliHLTLogging {
31
32public:
33
34 /** standard constructor */
35 AliHLTTPCPadArray();
36
37 /**
38 * Constructor
3ab89155 39 * @param patch Patch number, either use this constructor or
40 * use the default constructor and the SetPatch method
41 *
01f43166 42 */
43 AliHLTTPCPadArray(Int_t patch);
44
45 /** not a valid copy constructor, defined according to effective C++ style */
46 AliHLTTPCPadArray(const AliHLTTPCPadArray&);
47 /** not a valid assignment op, but defined according to effective C++ style */
48 AliHLTTPCPadArray& operator=(const AliHLTTPCPadArray&);
49 /** standard destructor */
50 virtual ~AliHLTTPCPadArray();
51
52 /**
53 * Initialize the pad vector for the patch set.
54 */
55 Int_t InitializeVector();
56
57 /**
58 * Deinitialize the pad vector for the patch set.
59 */
60 Int_t DeInitializeVector();
61
62 /**
63 * Loop over all pads setting their data array to -1.
64 */
65 void DataToDefault(){
66 for(Int_t i=0;i<fNumberOfRows;i++){
67 for(Int_t j=0;j<fNumberOfPadsInRow[i];j++){
68 fRowPadVector[i][j]->SetDataToDefault();
69 }
70 }
71 }
72
73 /**
74 * Set the patch number.
75 */
76 void SetPatch(Int_t patch);
77
78 /**
79 * Set the digit reader.
80 */
81 void SetDigitReader(AliHLTTPCDigitReader* digitReader);
82
83 /**
84 * Reads the data, and set it in the Pad objects.
85 */
86 Int_t ReadData();
87
88 /**
89 * Retuns number of pads in this row.
90 */
91 Int_t GetNumberOfPads(Int_t row){return fNumberOfPadsInRow[row];}
92
93 /**
94 * Loop over all pads, checking for clustercandidates.
95 */
96 void FindClusterCandidates(){
97 for(Int_t row=0;row<fNumberOfRows;row++){
98 for(Int_t pad=0;pad<fNumberOfPadsInRow[row];pad++){
99 fRowPadVector[row][pad]->FindClusterCandidates();
100 }
101 }
102 }
103
104 /**
105 *
106 * Loop over all pads looking for clusters, if cluster candidates on two neighbouring
107 * pads have a mean time difference of <match it is said to be a cluster.
108 *
109 */
110 void FindClusters(Int_t match);
111
112 /**
113 * Print the values of the cluster, used for debugging purposes.
114 */
115 void PrintClusters();
116
117 typedef vector<AliHLTTPCPad*> fPadVector;
118
119 vector<fPadVector> fRowPadVector; //! transient
120
121 vector<AliHLTTPCClusters> fClusters; //! transient
122
123private:
124
125 /** The patch number */
126 Int_t fPatch;
127
128 Int_t fFirstRow; //! transient
129
130 Int_t fLastRow; //! transient
131
132 Int_t fThreshold; //! transient
133
134 Int_t* fNumberOfPadsInRow; //! transient
135
136 Int_t fNumberOfRows; //! transient
137
138 AliHLTTPCDigitReader* fDigitReader; //! transient
139
140 ClassDef(AliHLTTPCPadArray, 0);
141};
142#endif