Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated / Disable Proof Support by Default #1235

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ file an issue, so that we can see how to handle this.
* If you need it, speak up NOW.
* It is disabled by default in this release.
* It can still be enabled with `-DBUILD_MBS=ON`.
* Deprecated Proof relaled classes
* Proof was deprecated by ROOT
* The affected code in FairRoot is disabled by default now
* It can still be enabled with `-DBUILD_PROOF_SUPPORT=ON`.
* Deprecate some singleton-like APIs:
* `FairRunAnaProof::Instance()` - keep a pointer to the
object after instantiating it in your code.
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ ENDIF(NOT UNIX)
option(BUILD_UNITTESTS "Build all unittests and add them as new tests" OFF)
option(ENABLE_GEANT3_TESTING "Enable tests utilizing Geant3" OFF)
option(BUILD_MBS "Build MBS" OFF)
option(BUILD_PROOF_SUPPORT "Support ROOT::Proof (deprecated)" OFF)

# searches for needed packages
# REQUIRED means that cmake will stop if this packages are not found
Expand Down
3 changes: 3 additions & 0 deletions FairRoot_build_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ list(APPEND options
if ((NOT DEFINED BUILD_MBS) OR BUILD_MBS)
list(APPEND options "-DBUILD_MBS=ON")
endif()
if ((NOT DEFINED BUILD_PROOF_SUPPORT) OR BUILD_PROOF_SUPPORT)
list(APPEND options "-DBUILD_PROOF_SUPPORT=ON")
endif()
if (USE_CLANG_TIDY)
list(APPEND options "-DCMAKE_CXX_CLANG_TIDY=clang-tidy")
endif()
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pipeline{
[os: 'ubuntu', ver: '20.04', arch: 'x86_64', compiler: 'gcc-9', fairsoft: 'apr21_patches_mt'],
[os: 'ubuntu', ver: 'rolling', arch: 'x86_64', compiler: 'current', fairsoft: 'dev',
check: 'warnings',
extra: '-DUSE_CLANG_TIDY=ON -DBUILD_MBS=OFF'],
extra: '-DUSE_CLANG_TIDY=ON -DBUILD_MBS=OFF -DBUILD_PROOF_SUPPORT=OFF'],
[os: 'fedora', ver: '33', arch: 'x86_64', compiler: 'gcc-10', fairsoft: 'apr21_patches'],
[os: 'fedora', ver: '33', arch: 'x86_64', compiler: 'gcc-10', fairsoft: 'apr21_patches_mt'],
[os: 'macos', ver: '12', arch: 'arm64', compiler: 'apple-clang-13', fairsoft: '22.4'],
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 @@ -127,7 +131,6 @@ target_link_libraries(${target} PUBLIC
ROOT::Matrix
ROOT::Net # TSocket
ROOT::Physics
ROOT::Proof
ROOT::RIO
ROOT::Tree
${VMCLIB}
Expand All @@ -140,6 +143,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