]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/macros/transformHWCLtoSWCF.C
- divide charge of the FCF due to gain correction and implement correct error calculation
[u/mrichter/AliRoot.git] / HLT / TPCLib / macros / transformHWCLtoSWCF.C
1
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 Kalliopi Kanaki <Kalliopi.Kanaki@ift.uib.no>           *
7 //*                  for The ALICE HLT Project.                            *
8 //*                                                                        *
9 //* Permission to use, copy, modify and distribute this software and its   *
10 //* documentation strictly for non-commercial purposes is hereby granted   *
11 //* without fee, provided that the above copyright notice appears in all   *
12 //* copies and that both the copyright notice and this permission notice   *
13 //* appear in the supporting documentation. The authors make no claims     *
14 //* about the suitability of this software for any purpose. It is          *
15 //* provided "as is" without express or implied warranty.                  *
16 //**************************************************************************
17
18 /** 
19  * @file   transformHWCLtoSWCL.C
20  * @author Kalliopi.Kanaki@ift.uib.no
21  * @date   
22  * @brief  Test macro for the AliHLTTPCHWClusterTransformComponent.cxx
23  * 
24  *
25  * This macro tests the component that does the tranformation from the HW 
26  * cluster format to the software cluster structure. 
27  * For the macro to work, the user needs to use the FilePublisher component
28  * to make the input files available. The data specification has to be given
29  * and the input files have to be present.
30  *
31  * In order for the reconstruction to work properly at the absence of raw/ folders,
32  * a directory has to be specified as the input argument of the function
33  * and an empty raw0 folder has to be created in it.
34  *
35  * The component runs without arguments.
36  * 
37  */
38
39 void transformHWCLtoSWCF(const char* input="./"){
40   
41   
42   if(!gSystem->AccessPathName("galice.root")){
43     cerr << "Please delete file galice.root or run at a different place." << endl;
44     return;
45   }
46
47   if (!input) {
48     cerr << "please specify input or run without arguments" << endl;
49     return;
50   }
51   
52   
53   /////////////////////////////////////////////////////////////////////////////////////////////////
54   // 
55   // init the HLT system in order to define the analysis chain below
56   //
57   gSystem->Load("libHLTrec.so");
58   AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
59
60   ///////////////////////////////////////////////////////////////////////////////////////////////////
61   //
62   // define the analysis chain to be run
63   //
64     
65   int iMinSlice = 0; 
66   int iMaxSlice = 0;
67   int iMinPart  = 0;
68   int iMaxPart  = 0;
69
70   TString FCFInput;
71   //for(int slice=iMinSlice; slice<=iMaxSlice; slice++){
72     // for(int part=iMinPart; slice<=iMaxPart; part++){
73   
74          TString argument;
75          argument.Form("-datatype 'HWCLUST1' 'TPC '  -datafile ~/FCF/Cluster.fcf -dataspec 0x%02x%02x%02x%02x", iMinSlice, iMaxSlice, iMinPart, iMaxPart);
76          AliHLTConfiguration pubconf("FP", "FilePublisher", NULL, argument.Data());
77          if(FCFInput.Length()>0) FCFInput+=" ";
78          FCFInput+="FP";
79     // }
80  // }
81
82   AliHLTConfiguration hwconf("FCF", "TPCHWClusterTransform", FCFInput.Data(), "");  
83   AliHLTConfiguration clusDumpconf("sink1", "TPCClusterDump", "FCF", "-directory ClusterDump");
84   
85    
86   ///////////////////////////////////////////////////////////////////////////////////////////////////
87   //
88   // Init and run the reconstruction
89   // All but HLT reconstruction is switched off
90   //
91   AliReconstruction rec;
92   rec.SetInput(input);
93   rec.SetRunVertexFinder(kFALSE);
94   rec.SetRunLocalReconstruction("HLT");
95   rec.SetRunTracking("");
96   rec.SetLoadAlignFromCDB(0);
97   rec.SetRunQA(":");
98   rec.SetFillESD("");
99   //rec.SetFillTriggerESD(false);
100   rec.SetOption("HLT", "libAliHLTTPC.so loglevel=0x7c chains=sink1");
101   rec.Run();
102 }