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
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.
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
33 * Note: You need a valid GRID token, use 'alien-token-init' of your
36 * @author Matthias.Richter@ift.uib.no
39 void recraw_local(const char *filename,
43 const char *modules="ALL")
45 // connect to the GRID if we use a file or OCDB from the GRID
46 TString struri=cdbURI;
47 TString strfile=filename;
48 if (struri.BeginsWith("raw://") ||
49 strfile.Contains("://") && !strfile.Contains("local://")) {
50 TGrid::Connect("alien");
53 // Set the CDB storage location
54 AliCDBManager * man = AliCDBManager::Instance();
55 man->SetDefaultStorage(cdbURI);
57 // Reconstruction settings
58 AliReconstruction rec;
60 if (minEvent>=0 || maxEvent>minEvent) {
61 if (minEvent<0) minEvent=0;
62 if (maxEvent<minEvent) maxEvent=minEvent;
63 rec.SetEventRange(minEvent,maxEvent);
67 rec.SetRunReconstruction(modules);
69 rec.SetRunReconstruction("ALL");
72 rec.SetRunQA("HLT TPC:ALL") ;
73 //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
75 // AliReconstruction settings
76 rec.SetWriteESDfriend(kTRUE);
77 rec.SetInput(filename);
78 rec.SetOption("HLT","loglevel=0x3f");
80 rec.SetRunPlaneEff(kFALSE);
82 // switch off cleanESD
83 rec.SetCleanESD(kFALSE);
90 void recraw_local(const char *filename,
93 const char *modules="ALL")
95 recraw_local(filename, "raw://", minEvent, maxEvent, modules);
100 cout << "recraw-local: Run AliRoot reconstruction locally" << endl;
101 cout << " Usage: aliroot -b -q -l \\" << endl;
102 cout << " recraw-local.C'(\"file\", \"cdb\", minEvent, maxEvent, modules)'" << endl;
104 cout << " Examples:" << endl;
105 cout << " recraw-local.C'(\"alien:///alice/data/2009/.../....root\")' " << endl;
106 cout << " recraw-local.C'(\"raw://run12345\")'" << endl;
107 cout << " recraw-local.C'(\"raw://run12345\", minEvent, MaxEvent)'" << endl;
108 cout << " recraw-local.C'(\"raw.root\", \"local://$PWD\", minEvent, MaxEvent)'" << endl;
110 cout << " Defaults" << endl;
111 cout << " cdb=\"raw://\" -> take OCDB from GRID" << endl;
112 cout << " minEvent=-1 -> no lower event selection" << endl;
113 cout << " maxEvent=-1 -> no upper event selection" << endl;
114 cout << " modules=\"ALL\" -> all modules" << endl;