]>
Commit | Line | Data |
---|---|---|
4acc2401 | 1 | // @(#) $Id$ |
ce565086 | 2 | // ************************************************************************** |
fbb9b71b | 3 | // This file is property of and copyright by the ALICE HLT Project * |
d54804bf | 4 | // ALICE Experiment at CERN, All rights reserved. * |
5 | // * | |
6 | // Primary Authors: Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> * | |
7 | // Ivan Kisel <kisel@kip.uni-heidelberg.de> * | |
8 | // for The ALICE HLT Project. * | |
9 | // * | |
10 | // Permission to use, copy, modify and distribute this software and its * | |
11 | // documentation strictly for non-commercial purposes is hereby granted * | |
12 | // without fee, provided that the above copyright notice appears in all * | |
13 | // copies and that both the copyright notice and this permission notice * | |
14 | // appear in the supporting documentation. The authors make no claims * | |
15 | // about the suitability of this software for any purpose. It is * | |
16 | // provided "as is" without express or implied warranty. * | |
ce565086 | 17 | // * |
d54804bf | 18 | //*************************************************************************** |
326c2d4b | 19 | |
4acc2401 | 20 | #include "AliHLTTPCCASliceOutput.h" |
21 | #include "MemoryAssignmentHelpers.h" | |
326c2d4b | 22 | |
4acc2401 | 23 | GPUhd() int AliHLTTPCCASliceOutput::EstimateSize( int nOfTracks, int nOfTrackClusters ) |
24 | { | |
25 | // calculate the amount of memory [bytes] needed for the event | |
26 | ||
b8139972 | 27 | const int kClusterDataSize = sizeof( int ) + sizeof( unsigned short ) + sizeof( float2 ) + sizeof( float ) + sizeof( UChar_t ) + sizeof( UChar_t ); |
4acc2401 | 28 | |
29 | return sizeof( AliHLTTPCCASliceOutput ) + sizeof( AliHLTTPCCASliceTrack )*nOfTracks + kClusterDataSize*nOfTrackClusters; | |
30 | } | |
326c2d4b | 31 | |
6de2bc40 | 32 | |
4acc2401 | 33 | GPUhd() void AliHLTTPCCASliceOutput::SetPointers() |
dc4788ec | 34 | { |
4acc2401 | 35 | // set all pointers |
00d07bcd | 36 | |
4acc2401 | 37 | char *mem = &fMemory[0]; |
38 | AssignMemory( fTracks, mem, fNTracks ); | |
39 | AssignMemory( fClusterUnpackedYZ, mem, fNTrackClusters ); | |
40 | AssignMemory( fClusterUnpackedX, mem, fNTrackClusters ); | |
6de2bc40 | 41 | AssignMemory( fClusterId, mem, fNTrackClusters ); |
4acc2401 | 42 | AssignMemory( fClusterPackedYZ, mem, fNTrackClusters ); |
6de2bc40 | 43 | AssignMemory( fClusterRow, mem, fNTrackClusters ); |
4acc2401 | 44 | AssignMemory( fClusterPackedAmp, mem, fNTrackClusters ); |
dc4788ec | 45 | } |
00d07bcd | 46 |