StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AliHLTTPCCANeighboursFinder.cxx
1 // @(#) $Id: AliHLTTPCCANeighboursFinder.cxx,v 1.1 2016/02/05 23:27:28 fisyak Exp $
2 // **************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project *
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 // Developed by: Igor Kulakov <I.Kulakov@gsi.de> *
11 // Maksym Zyzak <M.Zyzak@gsi.de> *
12 // *
13 // Permission to use, copy, modify and distribute this software and its *
14 // documentation strictly for non-commercial purposes is hereby granted *
15 // without fee, provided that the above copyright notice appears in all *
16 // copies and that both the copyright notice and this permission notice *
17 // appear in the supporting documentation. The authors make no claims *
18 // about the suitability of this software for any purpose. It is *
19 // provided "as is" without express or implied warranty. *
20 // *
21 //***************************************************************************
22 
23 #include "AliHLTTPCCANeighboursFinder.h"
24 #include "AliHLTTPCCAMath.h"
25 #include "AliHLTTPCCATracker.h"
26 #include "AliHLTArray.h"
27 #include "AliHLTTPCCADef.h"
28 
29 #ifdef USE_TBB
30 #include <tbb/parallel_for.h>
31 #include <tbb/blocked_range.h>
32 #endif //USE_TBB
33 
34 #ifdef MAIN_DRAW
35 #include "AliHLTTPCCADisplay.h"
36 bool DRAW_EVERY_LINK = false;
37 #endif
38 
39 #include "debug.h"
40 
41 void AliHLTTPCCATracker::NeighboursFinder::execute()
42 {
43  const int numberOfRows = fTracker->Param().NRows();
44 
45 #ifdef MAIN_DRAW
46  if ( AliHLTTPCCADisplay::Instance().DrawType() == 1 ) {
47  AliHLTTPCCADisplay::Instance().SetSliceView();
48  AliHLTTPCCADisplay::Instance().ClearView();
49  AliHLTTPCCADisplay::Instance().SetCurrentSlice( fTracker );
50  AliHLTTPCCADisplay::Instance().DrawSlice( fTracker, 0 );
51  AliHLTTPCCADisplay::Instance().DrawSliceHits();
52  }
53 #endif
54  //tbb::affinity_partitioner partitioner;
55  const int rowStep = AliHLTTPCCAParameters::RowStep;
56 #ifdef USE_TBB
57  tbb::parallel_for( tbb::blocked_range<int>( rowStep, numberOfRows - rowStep, 1000 ), *this );//, partitioner );
58 #else //USE_TBB
59  for ( int iRow = rowStep; iRow < numberOfRows - rowStep; ++iRow ) {
60  executeOnRow( iRow );
61  }
62 #endif //USE_TBB
63 
64 // for ( int i = 0; i < AliHLTTPCCAParameters::NumberOfRows; ++i ) {
65 // const AliHLTTPCCARow &row = fData.Row( i );
66 // for ( int hit = 0; hit < row.NHits(); ++hit ) {
67 // std::cout << hit << " " << fData.HitLinkUpData( row )[hit] << std::endl;
68 //
69 // }
70 // }
71 }