Modified AddTracks. Should be backward compatible
[u/mrichter/AliRoot.git] / HLT / src / AliL3TrackArray.h
CommitLineData
108615fc 1#ifndef ALIL3TRACKARRAY_H
2#define ALIL3TRACKARRAY_H
3
4#include "AliL3RootTypes.h"
5class AliL3ConfMapTrack;
6class AliL3Track;
7class AliL3TrackSegmentData;
8class AliL3Transform;
9
10class AliL3TrackArray{
11 private:
12 void DeleteArray();
13
14 Char_t fTrackType;
15 Int_t fSize;
16 Bool_t *fIsPresent;//!
17 Int_t fNAbsent;
18
19 AliL3Track **fTrack;//!
20 Int_t fNTracks;
21
22 UInt_t WriteConfMapTracks(AliL3TrackSegmentData* tr);
23
24 public:
25 AliL3TrackArray();
26 AliL3TrackArray(Int_t ntrack);
27 AliL3TrackArray(char* tracktype,Int_t ntrack);
28 AliL3TrackArray(char* tracktype);
29 virtual ~AliL3TrackArray();
30 Int_t GetTrackType(){return fTrackType;}
31 Int_t GetSize(){return fSize;}
32 Bool_t SetSize(Int_t newsize=2000);
33
34 Int_t GetNPresent(){return (fNTracks- fNAbsent);}
35
36 Int_t GetNTracks(){return fNTracks;}
37 AliL3Track *NextTrack();
38 AliL3Track *GetCheckedTrack(Int_t t){if(fIsPresent[t]) return fTrack[t]; return 0;}
39 AliL3Track *GetTrack(Int_t t){return fTrack[t];}
40
41 void Remove(Int_t track);
42 void RemoveLast() {fNTracks--;}
43 void Compress();
44 void Reset();
45 void QSort();
46 void QSort( AliL3Track **a, Int_t first, Int_t last);
47 Int_t TrackCompare(AliL3Track *a, AliL3Track *b);
48
49
50 void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice,
51 AliL3Transform* trans); //Fill tracks and transform
52 void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr); //Fill tracks
53 UInt_t WriteTracks(AliL3TrackSegmentData* tr); //Write tracks
54 UInt_t WriteTracks(UInt_t & ntracks,AliL3TrackSegmentData* tr); //Write tracks
55 UInt_t GetOutSize();
56 UInt_t GetOutCount(){return (UInt_t) GetNPresent();}
15846008 57 void AddTracks(AliL3TrackArray *newtrack,Bool_t remove_old=kTRUE);//add all Tracks to this
2e843b99 58 void AddLast(AliL3Track *track);
59
108615fc 60 ClassDef(AliL3TrackArray,1)
61};
62
63#endif