]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
possibility to pass plugin run mode as argument + libraries loaded in the same way...
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 15:54:16 +0000 (15:54 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 15 Sep 2010 15:54:16 +0000 (15:54 +0000)
PWG4/totEt/macros/CreateAlienHandlerCaloEtSim.C
PWG4/totEt/macros/runCaloEt.C

index 6390bccf01d6a3361823b2b3e64f821dc2d1eb29..379819ef58c65fffbbbf7d62db4c181013876ad4 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputName)
+AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputName, const char * pluginRunMode)
 {
   // Check if user has a valid token, otherwise make one. This has limitations.
   // One can always follow the standard procedure of calling alien-token-init then
@@ -9,8 +9,10 @@ AliAnalysisGrid* CreateAlienHandlerCaloEtSim(TString outputDir, TString outputNa
   // Overwrite all generated files, datasets and output results from a previous session
   plugin->SetOverwriteMode();
   // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
-  plugin->SetRunMode("full");  // VERY IMPORTANT - DECRIBED BELOW
-  //plugin->SetRunMode("test");  // VERY IMPORTANT - DECRIBED BELOW
+  // plugin->SetRunMode("full");  // VERY IMPORTANT - DECRIBED BELOW
+  // plugin->SetRunMode("test");  // VERY IMPORTANT - DECRIBED BELOW
+  plugin->SetRunMode(pluginRunMode);  // VERY IMPORTANT - DECRIBED BELOW
+
   // Set versions of used packages
   plugin->SetAPIVersion("V1.1x");
   plugin->SetROOTVersion("v5-27-05");
index eb019099a29c794980ddf284443e48c6d4cfbb4c..934b343ac53051bda78ce995f83e43454ce24dbe 100644 (file)
@@ -5,47 +5,52 @@
 //With the argument true this submits jobs to the grid
 //As written this requires an xml script tag.xml in the ~/et directory on the grid to submit jobs
 void runCaloEt(bool submit = false, // true or false 
-              const char *dataType="simPbPb/LHC10e18a", // "sim" or "real" or "simPbPb"
+              const char *dataType="simPbPb/LHC10e18a", // "sim" or "real" etc.
+              const char *pluginRunMode="full", // "test" or "full" or "terminate"
               const char *det = "EMCAL") // "PHOS" or "EMCAL"
 {
   TStopwatch timer;
   timer.Start();
-  gSystem->Load("libTree.so");
-  gSystem->Load("libGeom.so");
-  gSystem->Load("libVMC.so");
-  gSystem->Load("libXMLIO.so");
+  gSystem->Load("libTree");
+  gSystem->Load("libGeom");
+  gSystem->Load("libVMC");
+  gSystem->Load("libPhysics");
+
+  gSystem->Load("libMinuit");
+
+  gSystem->AddIncludePath("-I$ALICE_ROOT/include");
   
-  gSystem->Load("libSTEERBase.so");
-  gSystem->Load("libESD.so");
-  gSystem->Load("libAOD.so");
+  gSystem->Load("libSTEERBase");
+  gSystem->Load("libESD");
+  gSystem->Load("libAOD");
   
   gSystem->Load("libANALYSIS");
   gSystem->Load("libANALYSISalice");
-  
-  if (!submit) { // assume the stuff you need is compiled
+  gSystem->Load("libCORRFW");
+
+  if (!submit) { 
     cout << "local - no submitting" << endl;
-    gSystem->Load("libPWG4totEt");
   }
   else { 
     cout << "submitting to grid" << endl;
-    gSystem->AddIncludePath("-I$ALICE_ROOT/include");
-    gROOT->ProcessLine(".L AliAnalysisEt.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtMonteCarlo.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtMonteCarloPhos.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtMonteCarloEmcal.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtReconstructed.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtReconstructedPhos.cxx+g");
-    gROOT->ProcessLine(".L AliAnalysisEtReconstructedEmcal.cxx+g");
-    
-    gROOT->ProcessLine(".L AliAnalysisTaskTotEt.cxx+g");
   }
+   
+  gROOT->ProcessLine(".L AliAnalysisEt.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtMonteCarlo.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtMonteCarloPhos.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtMonteCarloEmcal.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtReconstructed.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtReconstructedPhos.cxx+g");
+  gROOT->ProcessLine(".L AliAnalysisEtReconstructedEmcal.cxx+g");  
+  gROOT->ProcessLine(".L AliAnalysisTaskTotEt.cxx+g");
+
   char *kTreeName = "esdTree" ;
   TChain * chain   = new TChain(kTreeName,"myESDTree") ;
   
   if(submit){      
-    gSystem->Load("libNetx.so") ; 
-    gSystem->Load("libgapiUI.so");
-    gSystem->Load("libRAliEn.so"); 
+    gSystem->Load("libNetx") ; 
+    gSystem->Load("libgapiUI");
+    gSystem->Load("libRAliEn"); 
     TGrid::Connect("alien://") ;
   }
   
@@ -66,7 +71,7 @@ void runCaloEt(bool submit = false, // true or false
 
   if (submit) {
     gROOT->LoadMacro("CreateAlienHandlerCaloEtSim.C");
-    AliAnalysisGrid *alienHandler = CreateAlienHandlerCaloEtSim(outputDir, outputName);  
+    AliAnalysisGrid *alienHandler = CreateAlienHandlerCaloEtSim(outputDir, outputName, pluginRunMode);  
     if (!alienHandler) return;
     mgr->SetGridHandler(alienHandler);
   }