4 * @brief Run reconstruction of raw data locally
7 * Usage: aliroot -b -q -l \
8 * recraw-local.C'("file", "cdb", minEvent, maxEvent, modules)'
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)'
17 * cdb="raw://" -> take OCDB from GRID
18 * minEvent=-1 -> no lower event selection
19 * maxEvent=-1 -> no upper event selection
20 * modules="ALL" -> all modules
21 * hltOption="loglevel=0x7c" -> logging level info and above
25 * The input file can be a file on the grid, indicated by the tag
26 * 'alien://' indicates. By default also the OCDB is set to the GRID.
27 * If either the file or the OCDB is taken from the GRID, the macros
28 * connects to the Grid in the beginning.
30 * Input files can be specified via te run number when using the tag
31 * 'raw://' followed by the string 'run12345' where the number needs
34 * As for the OCDB it is always a good idea to use the OCDB from the
35 * Grid as this will contain all the necessary objects and the latest
36 * calibration. The special URI 'raw://' is most advisable as it selects
37 * the storage automatically from the run number. Other options are e.g.
38 * - "alien://folder=/alice/data/2010/OCDB"
39 * - "local://$ALICE_ROOT/OCDB"
41 * Re-running the HLT reconstruction
42 * By specifying the hlt options, the HLT chain can be re-run instead
43 * of just extracting the online result. E.g. the following options
44 * specify to ignore the HLTOUT payload and run the two chains defined
45 * in the agents. The translation of the online configuration into
46 * an HLT offline chain is under development.
48 * ignore-hltout chains=GLOBAL-esd-converter,TPC-clusters
51 * Note: You need a valid GRID token, use 'alien-token-init' of your
54 * @author Matthias.Richter@ift.uib.no
57 void recraw_local(const char *filename,
61 const char *modules="ALL",
62 const char *hltOptions="loglevel=0x7c")
64 // connect to the GRID if we use a file or OCDB from the GRID
65 TString struri=cdbURI;
66 TString strfile=filename;
67 if (struri.BeginsWith("raw://") ||
68 strfile.Contains("://") && !strfile.Contains("local://")) {
69 TGrid::Connect("alien");
72 // Set the CDB storage location
73 AliCDBManager * man = AliCDBManager::Instance();
74 man->SetDefaultStorage(cdbURI);
76 // Reconstruction settings
77 AliReconstruction rec;
79 if (minEvent>=0 || maxEvent>minEvent) {
80 if (minEvent<0) minEvent=0;
81 if (maxEvent<minEvent) maxEvent=minEvent;
82 rec.SetEventRange(minEvent,maxEvent);
86 rec.SetRunReconstruction(modules);
88 rec.SetRunReconstruction("ALL");
91 rec.SetRunQA("HLT TPC:ALL") ;
92 //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
94 // AliReconstruction settings
95 rec.SetWriteESDfriend(kTRUE);
96 rec.SetInput(filename);
97 rec.SetOption("HLT", hltOptions);
99 rec.SetRunPlaneEff(kFALSE);
101 // switch off cleanESD
102 rec.SetCleanESD(kFALSE);
109 void recraw_local(const char *filename,
112 const char *modules="ALL",
113 const char *hltOptions="loglevel=0x7f")
115 recraw_local(filename, "raw://", minEvent, maxEvent, modules, hltOptions);
120 cout << "recraw-local: Run AliRoot reconstruction locally" << endl;
121 cout << " Usage: aliroot -b -q -l \\" << endl;
122 cout << " recraw-local.C'(\"file\", \"cdb\", minEvent, maxEvent, modules, hltOptions)'" << endl;
124 cout << " Examples:" << endl;
125 cout << " recraw-local.C'(\"alien:///alice/data/2009/.../....root\")' " << endl;
126 cout << " recraw-local.C'(\"raw://run12345\")'" << endl;
127 cout << " recraw-local.C'(\"raw://run12345\", minEvent, MaxEvent)'" << endl;
128 cout << " recraw-local.C'(\"raw.root\", \"local://$PWD\", minEvent, MaxEvent)'" << endl;
130 cout << " Defaults" << endl;
131 cout << " cdb=\"raw://\" -> take OCDB from GRID" << endl;
132 cout << " minEvent=-1 -> no lower event selection" << endl;
133 cout << " maxEvent=-1 -> no upper event selection" << endl;
134 cout << " modules=\"ALL\" -> all modules" << endl;
135 cout << " hltOption=\"loglevel=0x7c\" -> logging level info and above" << endl;