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 *
7 //*************************************************************************
9 #ifndef ALIHLTTPCCASTANDALONEFRAMEWORK_H
10 #define ALIHLTTPCCASTANDALONEFRAMEWORK_H
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCATracker.h"
14 #include "AliHLTTPCCAMerger.h"
15 #include "AliHLTTPCCAClusterData.h"
19 * @class AliHLTTPCCAStandaloneFramework
21 * The class to run the HLT TPC reconstruction (36 CA slice trackers + CA merger )
22 * in a stand-alone mode.
23 * Used by AliTPCtrackerCA, the CA event display, CA performance.
26 class AliHLTTPCCAStandaloneFramework
31 AliHLTTPCCAStandaloneFramework();
32 ~AliHLTTPCCAStandaloneFramework();
34 static AliHLTTPCCAStandaloneFramework &Instance();
36 AliHLTTPCCATracker &SliceTracker( int iSlice ) { return fSliceTrackers[iSlice]; }
37 AliHLTTPCCAMerger &Merger() { return fMerger; }
38 AliHLTTPCCAClusterData &ClusterData( int iSlice ) { return fClusterData[iSlice]; }
41 * prepare for reading of the event
43 void StartDataReading( int guessForNumberOfClusters = 256 );
48 void ReadCluster( int id, int iSlice, int iRow, float X, float Y, float Z, float Amp ) {
49 fClusterData[iSlice].ReadCluster( id, iRow, X, Y, Z, Amp );
53 * finish reading of the event
55 void FinishDataReading();
58 * perform event reconstruction
63 int NSlices() const { return fgkNSlices; }
65 double LastTime( int iTimer ) const { return fLastTime[iTimer]; }
66 double StatTime( int iTimer ) const { return fStatTime[iTimer]; }
67 int StatNEvents() const { return fStatNEvents; }
69 void WriteSettings( std::ostream &out ) const;
70 void WriteEvent( std::ostream &out ) const;
71 void WriteTracks( std::ostream &out ) const;
73 void ReadSettings( std::istream &in );
74 void ReadEvent( std::istream &in ) const;
75 void ReadTracks( std::istream &in );
79 static const int fgkNSlices = 36; //* N slices
81 AliHLTTPCCAStandaloneFramework( const AliHLTTPCCAStandaloneFramework& );
82 const AliHLTTPCCAStandaloneFramework &operator=( const AliHLTTPCCAStandaloneFramework& ) const;
84 AliHLTTPCCATracker fSliceTrackers[fgkNSlices]; //* array of slice trackers
85 AliHLTTPCCAMerger fMerger; //* global merger
86 AliHLTTPCCAClusterData fClusterData[fgkNSlices];
88 double fLastTime[20]; //* timers
89 double fStatTime[20]; //* timers
90 int fStatNEvents; //* n events proceed