3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
7 * Primary Authors: Kalliopi Kanaki <Kalliopi.Kanaki@ift.uib.no> *
8 * for The ALICE HLT Project. *
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. *
17 **************************************************************************/
19 /** @file testAliHLTTPCOfflineCluster.C
20 @author Kalliopi Kanaki
22 @brief Test macro/program for the AliHLTTPCOfflineCluster class
28 #include "AliHLTTPCTransform.h"
29 #include "AliHLTTPCClusterData.h"
30 #include "AliHLTTPCSpacePointData.h"
31 #include "AliHLTTPCOfflineCluster.h"
32 #include "TObjArray.h"
40 /////////////////////////////////////////////////////////////////
41 /////////////////////////////////////////////////////////////////
42 /////////////////////////////////////////////////////////////////
44 // configuration of the test program
46 /////////////////////////////////////////////////////////////////
47 /////////////////////////////////////////////////////////////////
48 /////////////////////////////////////////////////////////////////
52 #include "/scratch/prog/HLT/TPCLib/AliHLTTPCSpacePointData.h";
54 int testAliHLTTPCOfflineCluster(){
56 //gSystem->Load("libAliHLTUtil.so");
57 gSystem->Load("libAliHLTTPC.so");
66 AliHLTTPCSpacePointData spacePoint1 = { 5.,3.,2.,7,8,11.2,5.4.,1,0,kFALSE,0 };
68 // AliHLTTPCSpacePointData *spacePoint = new AliHLTTPCSpacePointData(); //[1];
69 // spacePoint->fX = 3.;
70 // spacePoint->fY = 2.;
71 // spacePoint->fZ = 5.;
73 cout << "hlt X: " << spacePoint1.fX << endl;
74 cout << "hlt padrow: " << (Int_t)spacePoint1.fPadRow << endl;
75 cout << "hlt Z: " << spacePoint1.fZ << endl;
78 //Float_t xyz[3] = {spacePoint1.fX , spacePoint1.fPadRow, spacePoint1.fZ };
79 //AliHLTTPCTransform::Local2Global(xyz,36);
80 //cout << xyz[0] << " " << xyz[1] << " " << xyz[2] << endl;
82 AliTPCclusterMI *offCl1 = new AliTPCclusterMI();
83 AliHLTTPCOfflineCluster *p1 = new AliHLTTPCOfflineCluster();
85 offCl1 = p1->ConvertHLTToOffline(spacePoint1);
86 //offCl1 = new AliHLTTPCOfflineCluster(spacePoint1); // ??? to be tested
88 cout << "off pad: " << offCl1->GetPad() << endl;
89 cout << "off row: " << offCl1->GetRow() << endl;
90 cout << "off time bin: " << offCl1->GetTimeBin() << endl;
92 cout << "================================" << endl;
94 AliTPCclusterMI *offCl2 = new AliTPCclusterMI();
98 cout << "off pad: " << offCl2->GetPad() << endl;
99 cout << "off row: " << offCl2->GetRow() << endl;
101 AliHLTTPCOfflineCluster *p2 = new AliHLTTPCOfflineCluster();
102 AliHLTTPCSpacePointData spacePoint2 = p2->ConvertOfflineToHLT(offCl2);
104 cout << "hlt X: " << spacePoint2.fX << endl;
105 cout << "hlt padrow: " << (Int_t)spacePoint2.fPadRow << endl;
108 //delete [] spacePoint;
112 int main(int /*argc*/, const char** /*argv*/){
114 return testAliHLTTPCOfflineCluster();