LCOV - code coverage report
Current view: top level - HLT/TPCLib/tracking-ca - AliHLTTPCCAStandaloneFramework.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 22 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 21 0.0 %

          Line data    Source code
       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             : #ifndef ALIHLTTPCCASTANDALONEFRAMEWORK_H
      10             : #define ALIHLTTPCCASTANDALONEFRAMEWORK_H
      11             : 
      12             : #include "AliHLTTPCCADef.h"
      13             : #if defined(HLTCA_STANDALONE) & defined(HLTCA_STANDALONE_OLD_MERGER)
      14             : #include "AliHLTTPCCAMerger.h"
      15             : #define AliHLTTPCGMMerger AliHLTTPCCAMerger
      16             : #else
      17             : #include "AliHLTTPCGMMerger.h"
      18             : #endif
      19             : #include "AliHLTTPCCAClusterData.h"
      20             : #include "AliHLTTPCCATrackerFramework.h"
      21             : #include <iostream>
      22             : #include <fstream>
      23             : 
      24             : /**
      25             :  * @class AliHLTTPCCAStandaloneFramework
      26             :  *
      27             :  * The class to run the HLT TPC reconstruction (36 CA slice trackers + CA merger )
      28             :  * in a stand-alone mode.
      29             :  * Used by AliTPCtrackerCA, the CA event display, CA performance.
      30             :  *
      31             :  */
      32             : class AliHLTTPCCAStandaloneFramework
      33             : {
      34             : #ifdef HLTCA_STANDALONE
      35             :         friend int DrawGLScene(bool DoAnimation);
      36             : #endif
      37             : 
      38             :   public:
      39             : 
      40             :     AliHLTTPCCAStandaloneFramework();
      41             :     ~AliHLTTPCCAStandaloneFramework();
      42             : 
      43             :     static AliHLTTPCCAStandaloneFramework &Instance();
      44             : 
      45           0 :         const AliHLTTPCCAParam &Param ( int iSlice ) const { return(fTracker.Param(iSlice)); }
      46           0 :         const AliHLTTPCCARow &Row ( int iSlice, int iRow ) const { return(fTracker.Row(iSlice, iRow)); }
      47           0 :     const AliHLTTPCCASliceOutput &Output( int iSlice ) const { return *fSliceOutput[iSlice]; }
      48           0 :     AliHLTTPCGMMerger  &Merger()  { return fMerger; }
      49           0 :     AliHLTTPCCAClusterData &ClusterData( int iSlice ) { return fClusterData[iSlice]; }
      50             : 
      51             :     /**
      52             :      * prepare for reading of the event
      53             :      */
      54             :     void StartDataReading( int guessForNumberOfClusters = 256 );
      55             : 
      56             :     /**
      57             :      *  read next cluster
      58             :      */
      59             :     void ReadCluster( int id, int iSlice, int iRow, float X, float Y, float Z, float Amp ) {
      60           0 :       fClusterData[iSlice].ReadCluster( id, iRow, X, Y, Z, Amp );
      61           0 :     }
      62             : 
      63             :     /**
      64             :      * finish reading of the event
      65             :      */
      66             :     void FinishDataReading();
      67             : 
      68             :     /**
      69             :      *  perform event reconstruction
      70             :      */
      71             :     int ProcessEvent(int forceSingleSlice = -1);
      72             : 
      73             : 
      74           0 :     int NSlices() const { return fgkNSlices; }
      75             : 
      76           0 :     double LastTime( int iTimer ) const { return fLastTime[iTimer]; }
      77           0 :     double StatTime( int iTimer ) const { return fStatTime[iTimer]; }
      78           0 :     int StatNEvents() const { return fStatNEvents; }
      79             : 
      80             :     void WriteSettings( std::ostream &out ) const;
      81             :     void WriteEvent( std::ostream &out ) const;
      82             :     void WriteTracks( std::ostream &out ) const;
      83             : 
      84             :     void ReadSettings( std::istream &in );
      85             :     void ReadEvent( std::istream &in );
      86             :     void ReadTracks( std::istream &in );
      87             : 
      88           0 :         int InitGPU(int sliceCount = 1, int forceDeviceID = -1) { return(fTracker.InitGPU(sliceCount, forceDeviceID)); }
      89           0 :         int ExitGPU() { return(fTracker.ExitGPU()); }
      90           0 :         void SetGPUDebugLevel(int Level, std::ostream *OutFile = NULL, std::ostream *GPUOutFile = NULL) { fDebugLevel = Level; fTracker.SetGPUDebugLevel(Level, OutFile, GPUOutFile); fMerger.SetDebugLevel(Level);}
      91           0 :         int SetGPUTrackerOption(char* OptionName, int OptionValue) {return(fTracker.SetGPUTrackerOption(OptionName, OptionValue));}
      92           0 :         int SetGPUTracker(bool enable) { return(fTracker.SetGPUTracker(enable)); }
      93           0 :         int GetGPUStatus() const { return(fTracker.GetGPUStatus()); }
      94           0 :         int GetGPUMaxSliceCount() const { return(fTracker.MaxSliceCount()); }
      95           0 :         void SetEventDisplay(int v) {fEventDisplay = v;}
      96           0 :         void SetRunMerger(int v) {fRunMerger = v;}
      97             : 
      98           0 :         int InitializeSliceParam(int iSlice, AliHLTTPCCAParam& param) { return(fTracker.InitializeSliceParam(iSlice, param)); }
      99           0 :         void SetOutputControl(char* ptr, size_t size) {fOutputControl.fOutputPtr = ptr;fOutputControl.fOutputMaxSize = size;}
     100             : 
     101             :   private:
     102             : 
     103             :     static const int fgkNSlices = 36;       //* N slices
     104             : 
     105             :     AliHLTTPCCAStandaloneFramework( const AliHLTTPCCAStandaloneFramework& );
     106             :     const AliHLTTPCCAStandaloneFramework &operator=( const AliHLTTPCCAStandaloneFramework& ) const;
     107             : 
     108             :     AliHLTTPCGMMerger fMerger;  //* global merger
     109             :     AliHLTTPCCAClusterData fClusterData[fgkNSlices];
     110             :         AliHLTTPCCASliceOutput* fSliceOutput[fgkNSlices];
     111             :         AliHLTTPCCASliceOutput::outputControlStruct fOutputControl;
     112             : 
     113             :         AliHLTTPCCATrackerFramework fTracker;
     114             : 
     115             :     double fLastTime[20]; //* timers
     116             :     double fStatTime[20]; //* timers
     117             :     int fStatNEvents;    //* n events proceed
     118             : 
     119             :         int fDebugLevel;        //Tracker Framework Debug Level
     120             :         int fEventDisplay;      //Display event in Standalone Event Display
     121             :         int fRunMerger;         //Run Track Merger
     122             : };
     123             : 
     124             : #endif //ALIHLTTPCCASTANDALONEFRAMEWORK_H

Generated by: LCOV version 1.11