]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCAMergerOutput.h
Fix coding convention violations.
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAMergerOutput.h
CommitLineData
63d8b79d 1//-*- Mode: C++ -*-
2// ************************************************************************
fbb9b71b 3// This file is property of and copyright by the ALICE HLT Project *
63d8b79d 4// ALICE Experiment at CERN, All rights reserved. *
5// See cxx source for full Copyright notice *
6// *
7//*************************************************************************
8
9
10#ifndef ALIHLTTPCCAMERGEROUTPUT_H
11#define ALIHLTTPCCAMERGEROUTPUT_H
12
13#include "AliHLTTPCCADef.h"
14#include "AliHLTTPCCAMergedTrack.h"
15
16/**
17 * @class AliHLTTPCCAMergerOutput
18 *
19 * AliHLTTPCCAMergerOutput class is used to store the output of AliHLTTPCCATracker{Component}
20 * and transport the output to AliHLTTPCCAMerger{Component}
21 *
22 * The class contains all the necessary information about TPC tracks, reconstructed in one slice.
fbb9b71b 23 * This includes the reconstructed track parameters and some compressed information
63d8b79d 24 * about the assigned clusters: clusterId, position and amplitude.
25 *
26 */
27class AliHLTTPCCAMergerOutput
28{
fbb9b71b 29 public:
63d8b79d 30
fbb9b71b 31 AliHLTTPCCAMergerOutput()
32 : fNTracks( 0 ), fNTrackClusters( 0 ), fTracks( 0 ), fClusterIDsrc( 0 ), fClusterPackedAmp( 0 ) {}
63d8b79d 33
fbb9b71b 34 AliHLTTPCCAMergerOutput( const AliHLTTPCCAMergerOutput & )
35 : fNTracks( 0 ), fNTrackClusters( 0 ), fTracks( 0 ), fClusterIDsrc( 0 ), fClusterPackedAmp( 0 ) {}
63d8b79d 36
fbb9b71b 37 const AliHLTTPCCAMergerOutput& operator=( const AliHLTTPCCAMergerOutput &/*v*/ ) const {
38 return *this;
39 }
63d8b79d 40
fbb9b71b 41 ~AliHLTTPCCAMergerOutput() {}
63d8b79d 42
63d8b79d 43
fbb9b71b 44 GPUhd() int NTracks() const { return fNTracks; }
45 GPUhd() int NTrackClusters() const { return fNTrackClusters; }
63d8b79d 46
fbb9b71b 47 GPUhd() const AliHLTTPCCAMergedTrack &Track( int i ) const { return fTracks[i]; }
48 GPUhd() unsigned int ClusterIDsrc ( int i ) const { return fClusterIDsrc[i]; }
16b802c5 49 GPUhd() int ClusterHltID ( int i ) const { return fClusterHltID[i]; }
fbb9b71b 50 GPUhd() UChar_t ClusterPackedAmp( int i ) const { return fClusterPackedAmp[i]; }
63d8b79d 51
fbb9b71b 52 GPUhd() static int EstimateSize( int nOfTracks, int nOfTrackClusters );
53 GPUhd() void SetPointers();
63d8b79d 54
fbb9b71b 55 GPUhd() void SetNTracks ( int v ) { fNTracks = v; }
56 GPUhd() void SetNTrackClusters( int v ) { fNTrackClusters = v; }
63d8b79d 57
fbb9b71b 58 GPUhd() void SetTrack( int i, const AliHLTTPCCAMergedTrack &v ) { fTracks[i] = v; }
59 GPUhd() void SetClusterIDsrc( int i, unsigned int v ) { fClusterIDsrc[i] = v; }
16b802c5 60 GPUhd() void SetClusterHltID( int i, int v ) { fClusterHltID[i] = v; }
fbb9b71b 61 GPUhd() void SetClusterPackedAmp( int i, UChar_t v ) { fClusterPackedAmp[i] = v; }
62
63 private:
64
65 int fNTracks; // number of reconstructed tracks
66 int fNTrackClusters; // total number of track clusters
67 AliHLTTPCCAMergedTrack *fTracks; // pointer to reconstructed tracks
68 unsigned int *fClusterIDsrc; // pointer to cluster IDs ( packed IRow and ICluster)
16b802c5 69 int *fClusterHltID; // pointer to cluster IDs ( packed IRow and ICluster)
fbb9b71b 70 UChar_t *fClusterPackedAmp; // pointer to packed cluster amplitudes
63d8b79d 71
72};
73
74
75
fbb9b71b 76GPUhd() inline int AliHLTTPCCAMergerOutput::EstimateSize( int nOfTracks, int nOfTrackClusters )
63d8b79d 77{
78 // calculate the amount of memory [bytes] needed for the event
79
16b802c5 80 const int kClusterDataSize = sizeof( unsigned int ) + sizeof( int ) + sizeof( UChar_t );
63d8b79d 81
fbb9b71b 82 return sizeof( AliHLTTPCCAMergerOutput ) + sizeof( AliHLTTPCCAMergedTrack )*nOfTracks + kClusterDataSize*nOfTrackClusters;
63d8b79d 83}
84
85
86GPUhd() inline void AliHLTTPCCAMergerOutput::SetPointers()
87{
88 // set all pointers
89
fbb9b71b 90 fTracks = ( AliHLTTPCCAMergedTrack* )( ( &fClusterPackedAmp ) + 1 );
91 fClusterIDsrc = ( unsigned int* ) ( fTracks + fNTracks );
16b802c5 92 fClusterHltID = ( int* ) ( fClusterIDsrc + fNTrackClusters );
93 fClusterPackedAmp = ( UChar_t* ) ( fClusterHltID + fNTrackClusters );
63d8b79d 94}
95
96#endif