]>
Commit | Line | Data |
---|---|---|
a329c9db | 1 | // $Id$ |
2 | /** | |
3 | * @file raw-hlt-its.C | |
4 | * @brief HLT data replay in AliReconstruction | |
5 | * | |
6 | * <pre> | |
7 | * Usage: aliroot -b -q ra-hlt-it.C'("raw.root","cdburi", minevent, maxevent)' | |
8 | * Parameter: | |
9 | * input default 'raw.root' | |
10 | * cdburi default 'raw://' | |
11 | * minevent default 0 (no restriction) | |
12 | * maxevent default -1 (no restriction) | |
13 | * usepredefined default false | |
14 | * </pre> | |
15 | * | |
16 | * Replay of raw data through the ITS chain. The reduced configuration | |
17 | * consists of SPD clusterfinder, SPD vetexer and histogram component. | |
18 | * Histograms are written to file 'histos.root'. | |
19 | * | |
20 | * The predefined chain can be run by specifying the 'GLOBAL-vertexhisto' | |
21 | * configuration. In that case also TPC tracking, ITS tracking, generation | |
22 | * of ESD and GlobalVertexer are executed as input to the histogramming | |
23 | * component. | |
24 | * | |
25 | * @author Matthias.Richter@ift.uib.no | |
26 | * @ingroup alihlt_its | |
27 | */ | |
28 | void rec_its_raw(const char* input="raw.root", | |
29 | const char* cdburi="raw://", | |
30 | int minevent=0, int maxevent=-1, | |
31 | bool usepredefined=false) | |
32 | { | |
33 | AliReconstruction rec; | |
34 | ||
35 | TString uri=cdburi; | |
36 | if (!uri.BeginsWith("local://")) { | |
37 | TGrid::Connect("alien"); | |
38 | } | |
39 | rec.SetDefaultStorage(cdburi); | |
40 | rec.SetRunQA(":") ; | |
41 | ||
42 | // AliReconstruction settings | |
43 | rec.SetInput(input); | |
44 | rec.SetRunVertexFinder(kFALSE); | |
45 | rec.SetLoadAlignFromCDB(0); | |
46 | ||
47 | rec.SetRunReconstruction("HLT"); | |
48 | ||
49 | if (minevent>=0 && maxevent>=minevent) { | |
50 | rec.SetEventRange(minevent, maxevent); | |
51 | } | |
52 | ||
53 | AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance(); | |
54 | ||
55 | if (!usepredefined) { | |
56 | // build up the chain only for the SPD CF and vertexer, including the histogramming | |
57 | AliHLTConfiguration vertexerSPD("vertexerSPD","ITSVertexerSPD", "ITS-SPD-CF",""); | |
58 | AliHLTConfiguration vertexhisto("vertexhisto","GlobalVertexerHisto", "vertexerSPD",""); | |
59 | ||
60 | AliHLTConfiguration filedump("file-dump","ROOTFileWriter", "vertexhisto vertexerSPD", "-datafile histos.root -concatenate-events -overwrite"); | |
61 | } else { | |
62 | // use the default chain from the agents | |
63 | AliHLTConfiguration filedump("file-dump","ROOTFileWriter", "GLOBAL-vertexhisto", "-datafile histos.root -concatenate-events -overwrite"); | |
64 | } | |
65 | ||
66 | rec.SetOption("HLT", "loglevel=0x7c ignore-hltout chains=file-dump"); | |
67 | ||
68 | AliLog::Flush(); | |
69 | rec.Run(); | |
70 | } |