]>
Commit | Line | Data |
---|---|---|
aa40a4a1 | 1 | // $Id$ |
2 | /** | |
3 | * @file rec-hlt-tpc-offline.C | |
4 | * @brief Test macro for the HLT TPC offline reco wrappers. | |
5 | * | |
6 | * The macro runs an HLT chain of TPC analysis, using the offline | |
7 | * algorithms ans appropriate wrappers. | |
8 | * | |
9 | * Usage: | |
10 | * <pre> | |
11 | * aliroot -b -q rec-hlt-tpc-offline.C | tee rec-hlt-tpc-offline.log | |
12 | * </pre> | |
13 | * | |
14 | * The chain to be run is defined by the macro given to the parameter | |
15 | * 'config=' | |
16 | * | |
17 | * The makro asumes that raw data is available in the rawx folders, either | |
18 | * simulated or real data. | |
19 | * | |
20 | * In the first section, an analysis chain is defined. The scale of the | |
21 | * chain can be defined by choosing the range of sectors and partitions. | |
22 | * | |
23 | * The reconstruction is steered by the AliReconstruction object in the | |
24 | * usual way. | |
25 | * | |
26 | * Matthias.Richter@ift.uib.no | |
27 | */ | |
28 | void rec_hlt_tpc_offline() | |
29 | { | |
30 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
31 | // | |
32 | // init the HLT system in order to define the analysis chain below | |
33 | // | |
34 | gSystem->Load("libHLTrec.so"); | |
35 | AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance(); | |
36 | ||
37 | //gHLT.SwitchAliLog(0); | |
38 | ||
39 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
40 | // | |
41 | // define the analysis chain to be run | |
42 | // | |
43 | int iMinSlice=0; | |
44 | int iMaxSlice=0; | |
45 | int iMinPart=0; | |
46 | int iMaxPart=5; | |
47 | ||
48 | TString writerInput; | |
49 | TString trackerInput; | |
50 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
51 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
52 | TString arg, publisher, cf; | |
53 | ||
54 | // raw data publisher components | |
55 | int ddlno=768; | |
56 | if (part>1) ddlno+=72+4*slice+(part-2); | |
57 | else ddlno+=2*slice+part; | |
58 | arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part); | |
59 | publisher.Form("DP_%02d_%d", slice, part); | |
60 | AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); | |
61 | ||
62 | // cluster finder components | |
63 | cf.Form("CF_%02d_%d", slice, part); | |
64 | AliHLTConfiguration cfconf(cf.Data(), "TPCOfflineClusterer", publisher.Data(), ""); | |
65 | ||
66 | if (trackerInput.Length()>0) trackerInput+=" "; | |
67 | trackerInput+=cf; | |
68 | //if (writerInput.Length()>0) writerInput+=" "; | |
69 | //writerInput+=cf; | |
70 | } | |
71 | } | |
72 | ||
73 | // one global tracker component | |
74 | TString tracker; | |
75 | tracker.Form("Global_TR"); | |
76 | AliHLTConfiguration trackerconf(tracker.Data(), "TPCOfflineTracker", trackerInput.Data(), ""); | |
77 | if (writerInput.Length()>0) writerInput+=" "; | |
78 | writerInput+=tracker; | |
79 | ||
80 | // the writer configuration | |
81 | AliHLTConfiguration fwconf("sink1", "ROOTFileWriter" , writerInput.Data(), "-datafile ESD.root -specfmt=_%d -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x"); | |
82 | ||
83 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
84 | // | |
85 | // Init and run the reconstruction | |
86 | // All but HLT reconstructio is switched off | |
87 | // | |
88 | AliReconstruction rec; | |
89 | rec.SetInput("./"); | |
90 | rec.SetRunVertexFinder(kFALSE); | |
91 | rec.SetRunLocalReconstruction(""); | |
92 | rec.SetRunTracking(""); | |
93 | rec.SetLoadAlignFromCDB(0); | |
94 | rec.SetFillESD("HLT"); | |
95 | rec.SetRunQA(kFALSE); | |
96 | AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG); | |
97 | AliTracker::SetFieldMap(field,kTRUE); | |
98 | rec.SetFillTriggerESD(kFALSE); | |
99 | rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so loglevel=0x7c chains=sink1"); | |
100 | rec.Run(); | |
101 | } |