]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
simplify par files on the grid
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 12 Feb 2011 15:50:47 +0000 (15:50 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 12 Feb 2011 15:50:47 +0000 (15:50 +0000)
PWG2/FLOW/macros/CreateAlienHandler.C
PWG2/FLOW/macros/runFlowTaskCentralityTrain.C

index 15a0da718baa9b29e537db284249e8156209d8aa..a426a4a1068425716c3f0122d7981c25e6ac3eea 100644 (file)
@@ -1,12 +1,9 @@
-AliAnalysisGrid* CreateAlienHandler() {
+AliAnalysisGrid* CreateAlienHandler(Bool_t bUseParFiles=kFALSE) {
   // 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 source /tmp/gclient_env_$UID in the current shell.
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
   
-  // Set if you want to use par files on Grid:
-  Bool_t bUseParFiles = kTRUE;
-  
   // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   //plugin->SetRunMode("test");
   //plugin->SetRunMode("offline");
index 73beaa458a3a1ae0275d348076fe833521a62d6f..857b3102528377cb139a922eadb6d8793e734e7f 100644 (file)
@@ -1,11 +1,7 @@
 enum anaModes {mLocal,mPROOF,mGrid};
 //mLocal: Analyze locally files in your computer using aliroot
-//mLocalPAR: Analyze locally files in your computer using root + PAR files
 //mPROOF: Analyze CAF files with PROOF
 //mGrid: Analyze files on Grid via AliEn plug-in and using precompiled FLOW libraries
-//       (Remark: When using this mode set also Bool_t bUseParFiles = kFALSE; in CreateAlienHandler.C)
-//mGridPAR: Analyze files on Grid via AliEn plug-in and using par files for FLOW package
-//          (Remark: when using this mode set also Bool_t bUseParFiles = kTRUE; in CreateAlienHandler.C)
 
 // CENTRALITY DEFINITION
 //Int_t binfirst = 4;  //where do we start numbering bins
@@ -22,8 +18,6 @@ TString commonOutputFileName = "outputCentrality"; // e.g.: result for centralit
 //void runFlowTaskCentralityTrain(Int_t mode=mLocal, Int_t nEvents = 10,
 //Bool_t DATA = kFALSE, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0)
 
-//void runFlowTaskCentralityTrain(Int_t mode = mGridPAR, Int_t nEvents = 50000000,
-//              Bool_t DATA = kTRUE, const Char_t* dataDir="/alice/data/LHC10h_000137161_p1_plusplusplus", Int_t offset=0)
 void runFlowTaskCentralityTrain( Int_t mode = mPROOF,
                                  Bool_t useFlowParFiles = kFALSE,
                                  Bool_t DATA = kTRUE,
@@ -40,13 +34,8 @@ void runFlowTaskCentralityTrain( Int_t mode = mPROOF,
   // Load needed libraries:
   LoadLibraries(mode,useFlowParFiles);
 
-  // Create and configure the AliEn plug-in:
-  if(mode == mGrid)
-  {
-    gROOT->LoadMacro("CreateAlienHandler.C");
-    AliAnalysisGrid *alienHandler = CreateAlienHandler();
-    if(!alienHandler) return;
-  }
+  // Create analysis manager:
+  AliAnalysisManager *mgr = new AliAnalysisManager("FlowAnalysisManager");
 
   // Chains:
   if(mode == mLocal)
@@ -55,11 +44,12 @@ void runFlowTaskCentralityTrain( Int_t mode = mPROOF,
     //TChain* chain = CreateAODChain(dataDir, nEvents, offset);
   }
 
-  // Create analysis manager:
-  AliAnalysisManager *mgr = new AliAnalysisManager("FlowAnalysisManager");
   // Connect plug-in to the analysis manager:
   if(mode == mGrid)
   {
+    gROOT->LoadMacro("CreateAlienHandler.C");
+    AliAnalysisGrid *alienHandler = CreateAlienHandler(useFlowParFiles);
+    if(!alienHandler) return;
     mgr->SetGridHandler(alienHandler);
   }