]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/exa/recraw-local.C
extra benchmarks are added
[u/mrichter/AliRoot.git] / HLT / exa / recraw-local.C
CommitLineData
94430cc1 1// $Id$
2/**
3 * @file recraw-local.C
4 * @brief Run reconstruction of raw data locally
5 *
6 * <pre>
7 * Usage: aliroot -b -q -l \
8 * recraw-local.C'("file", "cdb", minEvent, maxEvent)'
9 *
10 * Examples:
11 * recraw-local.C'("alien:///alice/data/2009/.../.root")'
12 * recraw-local.C'("raw://run12345")'
13 * recraw-local.C'("raw://run12345", minEvent, MaxEvent)'
14 * recraw-local.C'("raw.root", "local://$PWD", minEvent, MaxEvent)'
15 *
16 * Defaults
17 * file=raw.root"
18 * cdb="raw://"
19 * minEvent=-1
20 * maxEvent=-1
21 *
22 * </pre>
23 *
24 * The input file can be a file on the grid, indicated by the tag
25 * 'alien://' indicates. By default also the OCDB is set to the GRID.
26 * If either the file or the OCDB is taken from the GRID, the macros
27 * connects to the Grid in the beginning.
28 *
29 * Input files can be specified via te run number when using the tag
30 * 'raw://' followed by the string 'run12345' where the number needs
31 * to be adjusted.
32 *
33 * Note: You need a valid token, use 'alien-token-init' of your alien
34 * installation.
35 *
36 * @author Matthias.Richter@ift.uib.no
37 * @ingroup alihlt_qa
38 */
39void recraw_local(const char *filename,
40 const char *cdbURI,
41 int minEvent=-1,
42 int maxEvent=-1)
43{
44 // connect to the GRID if we use a file or OCDB from the GRID
45 TString struri=cdbURI;
46 TString strfile=filename;
47 if (struri.BeginsWith("raw://") ||
48 strfile.Contains("://") && !strfile.Contains("local://")) {
49 TGrid::Connect("alien");
50 }
51
52 // Set the CDB storage location
53 AliCDBManager * man = AliCDBManager::Instance();
54 man->SetDefaultStorage(cdbURI);
55
56 // Reconstruction settings
57 AliReconstruction rec;
58
59 if (minEvent>=0 || maxEvent>minEvent) {
60 if (minEvent<0) minEvent=0;
61 if (maxEvent<minEvent) maxEvent=minEvent;
62 rec.SetEventRange(minEvent,maxEvent);
63 }
64
65 rec.SetRunReconstruction("ALL");
66
67 // QA options
68 rec.SetRunQA("ALL:ALL") ;
69 rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
70
71 // AliReconstruction settings
72 rec.SetWriteESDfriend(kTRUE);
73 rec.SetInput(filename);
74 rec.SetOption("HLT","loglevel=0x3f");
75
76 rec.SetRunPlaneEff(kFALSE);
77
78 // switch off cleanESD
79 rec.SetCleanESD(kFALSE);
80
81 AliLog::Flush();
82 rec.Run();
83
84}
85
86void recraw_local(const char *filename="raw.root",
87 int minEvent=-1,
88 int maxEvent=-1)
89{
90 recraw_local(filename, "raw://", minEvent, maxEvent);
91}