Skip to content

Commit

Permalink
Allow disabling Proof Support
Browse files Browse the repository at this point in the history
ROOT 6.26 finally officially deprecated Proof.

So let's allow to disable all code releated to Proof.
  • Loading branch information
ChristianTackeGSI authored and dennisklein committed Nov 11, 2022
1 parent c6e4928 commit 024660d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ endif()
# Set option(s)
option(BUILD_UNITTESTS "Build all unittests and add them as new tests" OFF)
option(ENABLE_GEANT3_TESTING "Enable tests utilizing Geant3" OFF)
option(BUILD_PROOF_SUPPORT "Support ROOT::Proof (deprecated)" ON)

# searches for needed packages
# REQUIRED means that cmake will stop if this packages are not found
Expand Down
14 changes: 11 additions & 3 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ set(sources
source/FairSource.cxx
source/FairUnpack.cxx

steer/FairAnaSelector.cxx
steer/FairLinkManager.cxx
steer/FairRadGridManager.cxx
steer/FairRadLenManager.cxx
Expand All @@ -72,7 +71,6 @@ set(sources
steer/FairRootManager.cxx
steer/FairRun.cxx
steer/FairRunAna.cxx
steer/FairRunAnaProof.cxx
steer/FairRunOnline.cxx
steer/FairRunSim.cxx
steer/FairTask.cxx
Expand All @@ -93,6 +91,12 @@ if(BUILD_MBS)
source/swaplw.c
)
endif()
if(BUILD_PROOF_SUPPORT)
list(APPEND sources
steer/FairAnaSelector.cxx
steer/FairRunAnaProof.cxx
)
endif()

fair_change_extensions_if_exists(.cxx .h FILES "${sources}" OUTVAR headers)

Expand Down Expand Up @@ -130,7 +134,6 @@ target_link_libraries(${target} PUBLIC
ROOT::Matrix
ROOT::Net # TSocket
ROOT::Physics
ROOT::Proof
ROOT::RIO
ROOT::Tree
${VMCLIB}
Expand All @@ -143,6 +146,11 @@ target_compile_definitions(${target} PRIVATE
# $<$<PLATFORM_ID:Linux>:Linux>
)

if(BUILD_PROOF_SUPPORT)
target_link_libraries(${target} PUBLIC ROOT::Proof)
target_compile_definitions(${target} PRIVATE BUILD_PROOF_SUPPORT)
endif()

fairroot_target_root_dictionary(${target}
HEADERS ${headers}
LINKDEF FairLinkDef.h
Expand Down
6 changes: 4 additions & 2 deletions base/FairLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#pragma link C++ class FairRootManager+;
#pragma link C++ class FairRun+;
#pragma link C++ class FairRunAna;
#pragma link C++ class FairRunAnaProof;
#pragma link C++ class FairRunIdGenerator;
#pragma link C++ class FairRunSim;
#pragma link C++ class FairGenericVMCConfig;
Expand All @@ -67,7 +66,6 @@
#pragma link C++ class FairWriteoutBuffer;
#pragma link C++ class FairRingSorter;
#pragma link C++ class FairRingSorterTask;
#pragma link C++ class FairAnaSelector+;
#pragma link C++ class FairLinkManager+;
#pragma link C++ class FairPrintFairLinks;

Expand All @@ -90,5 +88,9 @@
#pragma link C++ class MRevBuffer;
#pragma link C++ class REvent;
#endif
#ifdef BUILD_PROOF_SUPPORT
#pragma link C++ class FairAnaSelector+;
#pragma link C++ class FairRunAnaProof;
#endif

#endif
1 change: 0 additions & 1 deletion base/source/FairFileSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class FairFileSource : public FairFileSourceBase
fRootFile->Close();
}
}
/**Set the input tree when running on PROOF worker*/
void SetInTree(TTree* tempTree);
TObjArray* GetListOfFolders() { return fListFolder; }
TFolder* GetBranchDescriptionFolder() { return fCbmroot; }
Expand Down
1 change: 0 additions & 1 deletion base/source/FairMixedSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class FairMixedSource : public FairFileSourceBase
void SetFileHeader(FairFileHeader* f) { fFileHeader = f; }
Double_t GetEventTime();

/**Set the input tree when running on PROOF worker*/
TObjArray* GetListOfFolders() { return fListFolder; }
TFolder* GetBranchDescriptionFolder() { return fCbmroot; }
UInt_t GetEntries() { return fNoOfEntries; }
Expand Down
20 changes: 12 additions & 8 deletions examples/advanced/Tutorial3/macro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_digi.C)
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_reco.C)
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_digi_timebased.C)
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_reco_timebased.C)
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_digi_reco_proof.C)
if(BUILD_PROOF_SUPPORT)
GENERATE_ROOT_TEST_SCRIPT(${CMAKE_CURRENT_SOURCE_DIR}/run_digi_reco_proof.C)
endif()

foreach(mcEngine IN LISTS mcEngine_list)
add_test(NAME ex_tutorial3_sim_${mcEngine}
Expand Down Expand Up @@ -59,13 +61,15 @@ foreach(mcEngine IN LISTS mcEngine_list)
PASS_REGULAR_EXPRESSION "Macro finished successfully"
)

add_test(NAME ex_tutorial3_digi_reco_proof_${mcEngine}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_digi_reco_proof.sh 1 \"${mcEngine}\")
set_tests_properties(ex_tutorial3_digi_reco_proof_${mcEngine} PROPERTIES
FIXTURES_REQUIRED fixture.ex_tutorial3_sim_${mcEngine}
TIMEOUT ${maxTestTime}
PASS_REGULAR_EXPRESSION "Macro finished successfully"
)
if(BUILD_PROOF_SUPPORT)
add_test(NAME ex_tutorial3_digi_reco_proof_${mcEngine}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_digi_reco_proof.sh 1 \"${mcEngine}\")
set_tests_properties(ex_tutorial3_digi_reco_proof_${mcEngine} PROPERTIES
FIXTURES_REQUIRED fixture.ex_tutorial3_sim_${mcEngine}
TIMEOUT ${maxTestTime}
PASS_REGULAR_EXPRESSION "Macro finished successfully"
)
endif()
endforeach()

install(FILES
Expand Down

0 comments on commit 024660d

Please sign in to comment.