StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AliHLTTPCCASliceOutput.h
1 //-*- Mode: C++ -*-
2 // ************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project *
4 // ALICE Experiment at CERN, All rights reserved. *
5 // See cxx source for full Copyright notice *
6 // *
7 //*************************************************************************
8 
9 
10 #ifndef ALIHLTTPCCASLICEOUTPUT_H
11 #define ALIHLTTPCCASLICEOUTPUT_H
12 
13 #include "AliHLTTPCCADef.h"
14 
15 #include "AliHLTTPCCASliceTrack.h"
16 #include "AliHLTTPCCADataCompressor.h"
17 
30 {
31  public:
32 
33  inline AliHLTTPCCASliceOutput(): fNTracks( 0 ), fNTrackClusters( 0 ), fTracks( 0 ), fClusterIDrc( 0 ), fClusterPackedYZ( 0 ), fClusterUnpackedYZ( 0 ), fClusterUnpackedX( 0 ), fClusterPackedAmp( 0 ) {}
34  int NTracks() const { return fNTracks; }
35  int NTrackClusters() const { return fNTrackClusters; }
36 
37  const AliHLTTPCCASliceTrack &Track( int i ) const { return fTracks[i]; }
38  const DataCompressor::RowCluster &ClusterIDrc( int i ) const { return fClusterIDrc[i]; }
39  unsigned short ClusterPackedYZ ( int i ) const { return fClusterPackedYZ[i]; }
40  UChar_t ClusterPackedAmp( int i ) const { return fClusterPackedAmp[i]; }
41  float2 ClusterUnpackedYZ ( int i ) const { return fClusterUnpackedYZ[i]; }
42  float ClusterUnpackedX ( int i ) const { return fClusterUnpackedX[i]; }
43 
44  static int EstimateSize( int nOfTracks, int nOfTrackClusters );
45  void SetPointers();
46 
47  void SetNTracks ( int v ) { fNTracks = v; }
48  void SetNTrackClusters( int v ) { fNTrackClusters = v; }
49 
50  void SetTrack( int i, const AliHLTTPCCASliceTrack &v ) { fTracks[i] = v; }
51  void SetClusterIDrc( int i, const DataCompressor::RowCluster &v ) { fClusterIDrc[i] = v; }
52  void SetClusterPackedYZ( int i, unsigned short v ) { fClusterPackedYZ[i] = v; }
53  void SetClusterPackedAmp( int i, UChar_t v ) { fClusterPackedAmp[i] = v; }
54  void SetClusterUnpackedYZ( int i, float2 v ) { fClusterUnpackedYZ[i] = v; }
55  void SetClusterUnpackedX( int i, float v ) { fClusterUnpackedX[i] = v; }
56 
57  void SortTracks() {if(!fTracks) return; std::sort(fTracks,fTracks+fNTracks,CompareTrackLength);}
58 
59  static bool CompareTrackLength (const AliHLTTPCCASliceTrack &st1, const AliHLTTPCCASliceTrack &st2) {
60  return (st1.NClusters() > st2.NClusters());
61  }
62  private:
63 
65  : fNTracks( 0 ), fNTrackClusters( 0 ), fTracks( 0 ), fClusterIDrc( 0 ), fClusterPackedYZ( 0 ), fClusterUnpackedYZ( 0 ), fClusterUnpackedX( 0 ), fClusterPackedAmp( 0 ) {}
66 
67  const AliHLTTPCCASliceOutput& operator=( const AliHLTTPCCASliceOutput& ) const { return *this; }
68 
69  int fNTracks; // number of reconstructed tracks
70  int fNTrackClusters; // total number of track clusters
71  AliHLTTPCCASliceTrack *fTracks; // pointer to reconstructed tracks
72  DataCompressor::RowCluster *fClusterIDrc; // pointer to cluster IDs ( packed IRow and ICluster)
73  unsigned short *fClusterPackedYZ; // pointer to packed cluster YZ coordinates
74  float2 *fClusterUnpackedYZ; // pointer to cluster coordinates (temporary data, for debug proposes)
75  float *fClusterUnpackedX; // pointer to cluster coordinates (temporary data, for debug proposes)
76  UChar_t *fClusterPackedAmp; // pointer to packed cluster amplitudes
77  char fMemory[1]; // the memory where the pointers above point into
78 };
79 
80 #endif
C++ STL includes.
Definition: AgUStep.h:47