.so cleanup: restored .so in SetAdditionalLibs()
authordberzano <dario.berzano@cern.ch>
Fri, 12 Dec 2014 09:33:50 +0000 (10:33 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:11 +0000 (13:52 +0100)
gSystem->Load() does not need .so, .dylib extension: ROOT picks one
automatically; extensions there should *not* be specified in order to
make the code multiplatform.

Analysis Plugin's SetAdditionalLibs() *requires* libraries to have
either the ".so" or the ".dylib" extension because it needs to
distinguish libraries from PARfiles, headers, etc.: one of ".so" or
".dylib" *must* be specified, and at the time of loading it will be
correctly stripped - meaning that, for instance, "libASD.so" will work
on Macs too and "libASD.dylib" will also work on Linux boxes.

So:

 - gSystem->Load( "libASD" )  // no extension!
 - plugin->SetAdditionalLibs( "libASD1.so libASD2.dylib ..." )
     // must use either .so or .dylib

ANALYSIS/examples/EventMixing/AddAMEventMixingTest.C
PWG/DevNanoAOD/runGridESE.C
PWG/EMCAL/macros/runEMCalAnalysis.C
PWGCF/FLOW/Documentation/examples/manual/ttree/macros/runTTreeFilterOnGrid.C
PWGCF/FLOW/macros/CreateAlienHandler.C
PWGDQ/dielectron/TakuAlberica/single/runTaku.C
PWGDQ/dielectron/TakuAlberica/single/runTakuMC.C
PWGDQ/dielectron/macrosLMEE/testing/CreateAlienHandlerPbPb.C

index d6c21d0..f736efc 100644 (file)
@@ -17,7 +17,7 @@ Bool_t AddAMEventMixingTest(TString analysisSource = "proof", TString analysisMo
 
    TString myAdditionalLibs;
    if (useEventMixingPar) { AliAnalysisAlien::SetupPar("EventMixing"); myAdditionalLibs += " EventMixing.par"; }
-   else { gSystem->Load("libEventMixing"); myAdditionalLibs += " libEventMixing"; }
+   else { gSystem->Load("libEventMixing"); myAdditionalLibs += " libEventMixing.so"; }
    
    gROOT->LoadMacro("AliAnalysisTaskEx02.cxx++g");
    analysisPlugin->SetAnalysisSource("AliAnalysisTaskEx02.cxx+");
index 4436495..5e07c39 100644 (file)
@@ -190,7 +190,7 @@ AliAnalysisGrid* CreateAlienHandler(const char *taskname, const char *gridmode)
 
     // Declare all libraries (other than the default ones for the framework. These will be
     // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
-    plugin->SetAdditionalLibs("libPWGLFspectra libPWGDevNanoAOD");
+    plugin->SetAdditionalLibs("libPWGLFspectra.so libPWGDevNanoAOD.so");
 
     // Declare the output file names separated by blancs.
     // (can be like: file.root or file.root@ALICE::Niham::File)
index ed6cf44..74d49fc 100644 (file)
@@ -302,7 +302,7 @@ AliAnalysisGrid* CreateAlienHandler(const char* uniqueName, const char* gridDir,
   }
 
   TString tmpAdditionalLibs("");
-  tmpAdditionalLibs = Form("libTree libVMC libGeom libGui libXMLParser libMinuit libMinuit2 libProof libPhysics libSTEERBase libESD libAOD libOADB libANALYSIS libCDB libRAWDatabase libSTEER libANALYSISalice libCORRFW libTOFbase libRAWDatabase libRAWDatarec libTPCbase libTPCrec libITSbase libITSrec libTRDbase libTender libSTAT libTRDrec libHMPIDbase libPWGPP libPWGHFbase libPWGDQdielectron libPWGHFhfe libEMCALUtils libPHOSUtils libPWGCaloTrackCorrBase libEMCALraw libEMCALbase libEMCALrec libTRDbase libVZERObase libVZEROrec libTender libTenderSupplies libESDfilter libPWGTools libPWGEMCAL libPWGGAEMCALTasks libPWGCFCorrelationsBase libPWGCFCorrelationsDPhi  %s %s",additionalCode.Data(),additionalHeaders.Data());
+  tmpAdditionalLibs = Form("libTree.so libVMC.so libGeom.so libGui.so libXMLParser.so libMinuit.so libMinuit2.so libProof.so libPhysics.so libSTEERBase.so libESD.so libAOD.so libOADB.so libANALYSIS.so libCDB.so libRAWDatabase.so libSTEER.so libANALYSISalice.so libCORRFW.so libTOFbase.so libRAWDatabase.so libRAWDatarec.so libTPCbase.so libTPCrec.so libITSbase.so libITSrec.so libTRDbase.so libTender.so libSTAT.so libTRDrec.so libHMPIDbase.so libPWGPP.so libPWGHFbase.so libPWGDQdielectron.so libPWGHFhfe.so libEMCALUtils.so libPHOSUtils.so libPWGCaloTrackCorrBase.so libEMCALraw.so libEMCALbase.so libEMCALrec.so libTRDbase.so libVZERObase.so libVZEROrec.so libTender.so libTenderSupplies.so libESDfilter.so libPWGTools.so libPWGEMCAL.so libPWGGAEMCALTasks.so libPWGCFCorrelationsBase.so libPWGCFCorrelationsDPhi.so %s %s",additionalCode.Data(),additionalHeaders.Data());
 
 
   TString macroName("");
index da65f0d..f960c0b 100644 (file)
@@ -27,7 +27,7 @@ void runTTreeFilterOnGrid() {
     // create and customize the alien plugin
     AliAnalysisAlien *alienHandler = new AliAnalysisAlien();
     alienHandler->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS  -I$ALICE_ROOT/OADB -I$ALICE_ROOT/PWG/FLOW/Base -I$ALICE_ROOT/PWG/FLOW/Tasks -g");
-    alienHandler->SetAdditionalLibs("libGui libProof libMinuit libXMLParser libRAWDatabase libRAWDatarec libCDB libSTEERBase libSTEER libTPCbase libTOFbase libTRDbase libVZERObase libVZEROrec libT0base libT0rec libTender libTenderSupplies libPWGflowBase libPWGflowTasks AliFlowTTreeEvent.cxx AliFlowTTreeTrack.cxx AliAnalysisTaskTTreeFilter.cxx AliFlowTTreeEvent.h AliFlowTTreeTrack.h AliAnalysisTaskTTreeFilter.h");
+    alienHandler->SetAdditionalLibs("libGui.so libProof.so libMinuit.so libXMLParser.so libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so libSTEER.so libTPCbase.so libTOFbase.so libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so libT0rec.so libTender.so libTenderSupplies.so libPWGflowBase.so libPWGflowTasks.so AliFlowTTreeEvent.cxx AliFlowTTreeTrack.cxx AliAnalysisTaskTTreeFilter.cxx AliFlowTTreeEvent.h AliFlowTTreeTrack.h AliAnalysisTaskTTreeFilter.h");
     alienHandler->SetAnalysisSource("AliFlowTTreeEvent.cxx AliFlowTTreeTrack.cxx AliAnalysisTaskTTreeFilter.cxx");
     alienHandler->SetOverwriteMode();
     alienHandler->SetRunMode("full");
index 98994c6..8391f2d 100644 (file)
@@ -51,23 +51,23 @@ AliAnalysisGrid* CreateAlienHandler(Bool_t bUseParFiles=kFALSE) {
 
   // Declare all libraries (other than the default ones for the framework. These will be
   // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
-  //plugin->SetAdditionalLibs("libCORRFW libTOFbase libTOFrec");
+  //plugin->SetAdditionalLibs("libCORRFW.so libTOFbase.so libTOFrec.so");
   if(!bUseParFiles)
   {
-    plugin->SetAdditionalLibs("libGui libProof libMinuit libXMLParser "
-                              "libRAWDatabase libRAWDatarec libCDB libSTEERBase "
-                              "libSTEER libTPCbase libTOFbase libTOFrec "
-                              "libTRDbase libVZERObase libVZEROrec libT0base "
-                              "libT0rec libTender libTenderSupplies "
-                              "libPWGflowBase libPWGflowTasks");
+    plugin->SetAdditionalLibs("libGui.so libProof.so libMinuit.so libXMLParser.so "
+                              "libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so "
+                              "libSTEER.so libTPCbase.so libTOFbase.so libTOFrec.so "
+                              "libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so "
+                              "libT0rec.so libTender.so libTenderSupplies.so "
+                              "libPWGflowBase.so libPWGflowTasks.so");
   } 
   else // load libs via par files
   { 
-    plugin->SetAdditionalLibs("libGui libProof libMinuit libXMLParser "
-                              "libRAWDatabase libRAWDatarec libCDB libSTEERBase "
-                              "libSTEER libTPCbase libTOFbase libTOFrec "
-                              "libTRDbase libVZERObase libVZEROrec libT0base "
-                              "libT0rec libTender libTenderSupplies");
+    plugin->SetAdditionalLibs("libGui.so  libProof.so  libMinuit.so  libXMLParser.so "
+                              "libRAWDatabase.so  libRAWDatarec.so  libCDB.so  libSTEERBase.so "
+                              "libSTEER.so  libTPCbase.so  libTOFbase.so  libTOFrec.so "
+                              "libTRDbase.so  libVZERObase.so  libVZEROrec.so  libT0base.so "
+                              "libT0rec.so  libTender.so  libTenderSupplies.so");
     plugin->EnablePackage("PWGflowBase.par");
     plugin->EnablePackage("PWGflowTasks.par");
   }
index ab329e6..06ac773 100644 (file)
@@ -170,8 +170,8 @@ AliAnalysisGrid* CreateAlienHandler() {
   plugin->SetGridOutputDir("output");
   plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG2/FLOW/AliFlowCommon -I$ALICE_ROOT/PWG2/FLOW/AliFlowTasks -I$ALICE_ROOT/PWG3/dielectron/ -g");
   plugin->SetAnalysisSource("AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.cxx AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.cxx");
-  //  plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe libTender libTenderSupplies  AliAnalysisTaskMultiDielectronNew.h AliAnalysisTaskMultiDielectronNew.cxx");
-  plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe AliDielectronHistosTaku.h AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.h AliDielectronDebugTreeTaku.cxx AliDielectronTaku.h AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.h AliAnalysisTaskMultiDielectronNewTaku.cxx");
+  //  plugin->SetAdditionalLibs("libCORRFW.so libPWG3base.so libPWG3dielectron.so libPWG3hfe.so libTender.so libTenderSupplies.so AliAnalysisTaskMultiDielectronNew.h AliAnalysisTaskMultiDielectronNew.cxx");
+  plugin->SetAdditionalLibs("libCORRFW.so libPWG3base.so libPWG3dielectron.so libPWG3hfe.so AliDielectronHistosTaku.h AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.h AliDielectronDebugTreeTaku.cxx AliDielectronTaku.h AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.h AliAnalysisTaskMultiDielectronNewTaku.cxx");
   plugin->SetDefaultOutputs(kTRUE);
   plugin->SetAnalysisMacro(Form("%s.C",workingDir));
   plugin->SetExecutable(Form("%s.sh",workingDir));
index bb94aef..5105fb0 100644 (file)
@@ -101,8 +101,8 @@ AliAnalysisGrid* CreateAlienHandler() {
   plugin->SetGridOutputDir("output");
   plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWG2/FLOW/AliFlowCommon -I$ALICE_ROOT/PWG2/FLOW/AliFlowTasks -I$ALICE_ROOT/PWG3/dielectron/ -g");
   plugin->SetAnalysisSource("AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.cxx AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.cxx");
-  //  plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe libTender libTenderSupplies  AliAnalysisTaskMultiDielectronNew.h AliAnalysisTaskMultiDielectronNew.cxx");
-  plugin->SetAdditionalLibs("libCORRFW libPWG3base libPWG3dielectron libPWG3hfe libPWG2flowCommon libPWG2flowTasks AliDielectronHistosTaku.h AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.h AliDielectronDebugTreeTaku.cxx AliDielectronTaku.h AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.h AliAnalysisTaskMultiDielectronNewTaku.cxx");
+  //  plugin->SetAdditionalLibs("libCORRFW.so libPWG3base.so libPWG3dielectron.so libPWG3hfe.so libTender.so libTenderSupplies.so  AliAnalysisTaskMultiDielectronNew.h AliAnalysisTaskMultiDielectronNew.cxx");
+  plugin->SetAdditionalLibs("libCORRFW.so libPWG3base.so libPWG3dielectron.so libPWG3hfe.so libPWG2flowCommon.so libPWG2flowTasks.so AliDielectronHistosTaku.h AliDielectronHistosTaku.cxx AliDielectronDebugTreeTaku.h AliDielectronDebugTreeTaku.cxx AliDielectronTaku.h AliDielectronTaku.cxx AliAnalysisTaskMultiDielectronNewTaku.h AliAnalysisTaskMultiDielectronNewTaku.cxx");
   plugin->SetDefaultOutputs(kTRUE);
   plugin->SetAnalysisMacro(Form("%s.C",workingDir));
   plugin->SetExecutable(Form("%s.sh",workingDir));
index b7d52c8..9b15b10 100644 (file)
@@ -59,8 +59,8 @@ plugin->AddRunNumber(170040);
 // using ACLiC on the worker nodes.
 //   plugin->SetAnalysisSource("AliAnalysisHelperJetTasks.cxx AliAnalysisTaskPartonDisc.cxx");
    plugin->AddIncludePath("-I. .I$ALIEN_ROOT/api/lib -I$ROOTSYS/lib -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/PWGDQ/ -I$ALICE_ROOT/PWGDQ/dielectron/macrosLMEE -I$ALICE_ROOT/PWGDQ/dielectron -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/ANALYSIS/Tender -I$ALICE_ROOT/ANALYSIS/TenderSupplies");
- //  plugin->SetAdditionalLibs("libGui  libXMLParser libSTEERBase libESD libAOD libCDB libANALYSIS libANALYSISalice libCORRFW  libTender libProof libRAWDatabase libSTEER libTOFbase libPWGDQdielectron");// ConfigLowMassDiE.C")
-   plugin->SetAdditionalLibs("libGui  libXMLParser libSTEERBase libESD libAOD libCDB libANALYSIS libANALYSISalice libCORRFW  libTender libProof libRAWDatabase libSTEER libTOFbase libPWGDQdielectron ConfigLowMassDiE.C");
+ //  plugin->SetAdditionalLibs("libGui.so libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so libTender.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGDQdielectron.so");// ConfigLowMassDiE.C")
+   plugin->SetAdditionalLibs("libGui.so libXMLParser.so libSTEERBase.so libESD.so libAOD.so libCDB.so libANALYSIS.so libANALYSISalice.so libCORRFW.so libTender.so libProof.so libRAWDatabase.so libSTEER.so libTOFbase.so libPWGDQdielectron.so ConfigLowMassDiE.C");
    
 // Declare all libraries (other than the default ones for the framework. These will be
 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.