3 * Example macro to run TPC calibration interface embedded into AliRoot reconstruction.
4 * The input used is unpacked from the HLTOUT of recorded data, in which the merged
5 * tracks, the ESD and the TPC clusters have been added. The seed maker and the calibration
10 * aliroot -b -q calib-from-hltout.C'("raw.root","task" )' | tee calib-from-hltout.log
11 * aliroot -b -q calib-from-hltout.C'("raw.root","calibtime")' | tee calib-from-hltout.log
12 * aliroot -b -q calib-from-hltout.C'("raw.root","calibtimegain")' | tee calib-from-hltout.log
16 * The reconstruction is steered by the AliReconstruction object in the
17 * usual way. Keep in mind that you should use the proper default and
18 * specific storage otherwise the reconstruction will break.
21 * @author Kalliopi.Kanaki@ift.uib.no
24 void calib_from_hltout(const char* input="./", const char* option="task"){
26 gSystem->Load("libANALYSIS");
27 gSystem->Load("libTPCcalib");
29 if(!gSystem->AccessPathName("galice.root")){
30 cerr << "Please delete file galice.root or run at a different place." << endl;
35 cerr << "Please specify input or run without arguments." << endl;
39 /////////////////////////////////////////////////////////////////////////
41 // init the HLT system in order to define the analysis chain below
44 AliHLTSystem *gHLT = AliHLTPluginBase::GetInstance();
46 cerr << "fatal error: cannot get HLT instance" << endl;
49 AliHLTConfiguration publisher("hltout", "AliHLTOUTPublisher", NULL, "");
51 AliHLTConfiguration seedconf("seeds", "TPCCalibSeedMaker", "hltout","");
53 TString calibOption = option;
54 if (calibOption.CompareTo("task")==0) AliHLTConfiguration calibtimeconf("TPCcalib", "TPCCalibration", "hltout seeds" ,"");
55 else if(calibOption.CompareTo("calibtime")==0) AliHLTConfiguration calibtimeconf("calibTime", "TPCCalibTime", "hltout seeds", "");
56 else if(calibOption.CompareTo("calibtimegain")==0) AliHLTConfiguration calibtimeconf("calibTimeGain", "TPCCalibTimeGain","hltout seeds", "");
59 cerr << "\nPlease specify an option for the calibration component you want to run." << endl;
64 /////////////////////////////////////////////////////////////////////////
66 // Init and run the reconstruction
67 // All but HLT reconstruction is switched off
69 AliReconstruction rec;
71 rec.SetRunVertexFinder(kFALSE);
72 rec.SetRunLocalReconstruction("HLT");
73 rec.SetRunTracking("");
74 rec.SetLoadAlignFromCDB(0);
76 rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
77 rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
78 //rec.SetDefaultStorage("local:///home/kanaki/calibComp/libraryTest/OCDB/");
79 //rec.SetSpecificStorage("GRP/GRP/Data", "local:///home/kanaki/calibComp/libraryTest/OCDB/");
82 // NOTE: FillESD is a step in the AliReconstruction sequence and has
83 // nothing to do with the fact that this macro writes ESD output
84 // HLT processes the HLTOUT during FillESD and extracts data which
85 // has already been prepared. This step is currently not necessary for
89 if (calibOption.CompareTo("task")==0) rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTGlobal.so libAliHLTTPC.so libAliHLTTPCCalibration.so loglevel=0x7c chains=TPCcalib");
90 if (calibOption.CompareTo("calibtime")==0) rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTGlobal.so libAliHLTTPC.so libAliHLTTPCCalibration.so loglevel=0x7c chains=calibTime");
91 else if(calibOption.CompareTo("calibtimegain")==0) rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTGlobal.so libAliHLTTPC.so libAliHLTTPCCalibration.so loglevel=0x7c chains=calibTimeGain");
93 //rec.SetEventRange(0,20);