]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/exa/recraw-local.C
projection also for smaller ranges than the full axis for the BF (Alis Rodriguez...
[u/mrichter/AliRoot.git] / HLT / exa / recraw-local.C
index 0100fdd8ec44f49db2158fd573c3ec93e7fefefc..1d41e71ae3ccd9d7e80f854c2411aa4d71474f23 100644 (file)
@@ -12,6 +12,8 @@
  *     recraw-local.C'("raw://run12345")'
  *     recraw-local.C'("raw://run12345", minEvent, MaxEvent)'
  *     recraw-local.C'("raw.root", "local://$PWD", minEvent, MaxEvent)'
+ *     recraw-local.C'("10000135031045.10..root", "raw://", -1, -1)'
+ *     recraw-local.C'("alien:///alice/data/2010/LHC10f/000135031/raw/10000135031045.10.root", "raw://", -1, -1)'
  *
  * Defaults
  *     cdb="raw://"  -> take OCDB from GRID
@@ -59,8 +61,15 @@ void recraw_local(const char *filename,
                  int minEvent=-1,
                  int maxEvent=-1,
                  const char *modules="ALL",
-                 const char *hltOptions="loglevel=0x7c")
+                 const char *hltOptions="loglevel=0x7c",
+                 const char *cdbDrain=NULL)
 {
+  if(!gSystem->AccessPathName("galice.root")){
+    cerr << "AliReconstruction on raw data requires to delete galice.root, or run at different place." << endl;
+    cerr << "!!! DO NOT DELETE the galice.root of your simulation, but create a subfolder !!!!" << endl;
+    return;
+  }
+
   // connect to the GRID if we use a file or OCDB from the GRID
   TString struri=cdbURI;
   TString strfile=filename;
@@ -72,6 +81,17 @@ 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/..");      
+    }
+  }
+  if (cdbDrain) man->SetDrain(cdbDrain);
 
   // Reconstruction settings
   AliReconstruction rec;
@@ -82,17 +102,23 @@ 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.SetRunMultFinder(strModules.Contains("ITS"));
   rec.SetInput(filename);
   rec.SetOption("HLT", hltOptions);