]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/exa/recraw-local.C
handle the case of simulated raw data by checking for the GRP in the working director...
[u/mrichter/AliRoot.git] / HLT / exa / recraw-local.C
index 9e4b923a55e0e603cf963863c3b5bf1886b00cf0..d2960c7b6a72410a16574ef0bf1c599bd695daae 100644 (file)
@@ -18,6 +18,7 @@
  *     minEvent=-1   -> no lower event selection
  *     maxEvent=-1   -> no upper event selection
  *     modules="ALL" -> all modules
+ *     hltOption="loglevel=0x7c" -> logging level info and above
  *
  * </pre>
  *
  * Input files can be specified via te run number when using the tag
  * 'raw://' followed by the string 'run12345' where the number needs
  * to be adjusted.
- * 
+ *
+ * As for the OCDB it is always a good idea to use the OCDB from the
+ * Grid as this will contain all the necessary objects and the latest
+ * calibration. The special URI 'raw://' is most advisable as it selects
+ * the storage automatically from the run number. Other options are e.g.
+ * - "alien://folder=/alice/data/2010/OCDB"
+ * - "local://$ALICE_ROOT/OCDB"
+ *
+ * Re-running the HLT reconstruction
+ * By specifying the hlt options, the HLT chain can be re-run instead
+ * of just extracting the online result. E.g. the following options
+ * specify to ignore the HLTOUT payload and run the two chains defined
+ * in the agents. The translation of the online configuration into
+ * an HLT offline chain is under development.
+ * <pre>
+ *   ignore-hltout chains=GLOBAL-esd-converter,TPC-clusters
+ * <pre>
+ *
  * Note: You need a valid GRID token, use 'alien-token-init' of your
  * alien installation.
  *
@@ -40,7 +58,8 @@ void recraw_local(const char *filename,
                  const char *cdbURI,
                  int minEvent=-1,
                  int maxEvent=-1,
-                 const char *modules="ALL")
+                 const char *modules="ALL",
+                 const char *hltOptions="loglevel=0x7c")
 {
   // connect to the GRID if we use a file or OCDB from the GRID
   TString struri=cdbURI;
@@ -53,6 +72,16 @@ void recraw_local(const char *filename,
   // Set the CDB storage location
   AliCDBManager * man = AliCDBManager::Instance();
   man->SetDefaultStorage(cdbURI);
+  if (struri.BeginsWith("local://")) {
+    // set specific storage for GRP entry
+    // search in the working directory and one level above, the latter
+    // follows the standard simulation setup like e.g. in test/ppbench
+    if (!gSystem->AccessPathName("GRP/GRP/Data")) {
+      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD");
+    } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) {
+      man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/..");      
+    }
+  }
 
   // Reconstruction settings
   AliReconstruction rec;
@@ -63,19 +92,24 @@ void recraw_local(const char *filename,
     rec.SetEventRange(minEvent,maxEvent);
   }
 
+  TString strModules=modules;
   if (modules)
     rec.SetRunReconstruction(modules);
   else
     rec.SetRunReconstruction("ALL");
 
   // QA options
-  rec.SetRunQA("HLT TPC:ALL") ;
+  TString qaOptions="HLT TPC";
+  if (!strModules.Contains("TPC")) qaOptions.ReplaceAll("TPC", "");
+  qaOptions+=":ALL";
+  rec.SetRunQA(qaOptions) ;
   //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
 
   // AliReconstruction settings
   rec.SetWriteESDfriend(kTRUE);
+  rec.SetRunVertexFinder(strModules.Contains("ITS"));
   rec.SetInput(filename);
-  rec.SetOption("HLT","loglevel=0x3f");
+  rec.SetOption("HLT", hltOptions);
 
   rec.SetRunPlaneEff(kFALSE);
 
@@ -90,16 +124,17 @@ void recraw_local(const char *filename,
 void recraw_local(const char *filename,
                  int minEvent=-1,
                  int maxEvent=-1,
-                 const char *modules="ALL")
+                 const char *modules="ALL",
+                 const char *hltOptions="loglevel=0x7f")
 {
-  recraw_local(filename, "raw://", minEvent, maxEvent, modules);
+  recraw_local(filename, "raw://", minEvent, maxEvent, modules, hltOptions);
 }
 
 void recraw_local()
 {
   cout << "recraw-local: Run AliRoot reconstruction locally" << endl;
   cout << " Usage: aliroot -b -q -l \\" << endl;
-  cout << "     recraw-local.C'(\"file\", \"cdb\", minEvent, maxEvent, modules)'" << endl;
+  cout << "     recraw-local.C'(\"file\", \"cdb\", minEvent, maxEvent, modules, hltOptions)'" << endl;
   cout << "" << endl;
   cout << " Examples:" << endl;
   cout << "     recraw-local.C'(\"alien:///alice/data/2009/.../....root\")' " << endl;
@@ -112,4 +147,5 @@ void recraw_local()
   cout << "     minEvent=-1   -> no lower event selection" << endl;
   cout << "     maxEvent=-1   -> no upper event selection" << endl;
   cout << "     modules=\"ALL\" -> all modules" << endl;
+  cout << "     hltOption=\"loglevel=0x7c\" -> logging level info and above" << endl;
 }