Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
project(tutorials)
find_package(ROOT REQUIRED)
if(NOT ROOT_roofit_FOUND)
set(roofit_veto fit/RoofitDemo.C
roofit/*.C roostats/*.C histfactory/*.C)
endif()
if(NOT ROOT_unuran_FOUND)
set(unuran_veto math/testrandom.C unuran/unuranDemo.C unuran/unuranFoamTest.C
math/multidimSampling.C)
endif()
if(NOT ROOT_xml_FOUND)
set(xml_veto xml/*.C
histfactory/*.C # histfactory requires xml
unfold/*.C) # unfold requires xml
endif()
# variables identifying the package must have the package name in lower case (it
corresponds to the CMake option name)
if(NOT ROOT_r_FOUND)
set(r_veto r/*.C)
endif()
if(WIN32)
set(histfactory_veto histfactory/*.C
roostats/StandardFrequentistDiscovery.C) # histfactory
doesn't work on Windows
else()
set(histfactory_veto histfactory/makeExample.C)
endif()
if(NOT ROOT_fitsio_FOUND)
set(fitsio_veto fitsio/*.C)
endif()
if(NOT ROOT_mathmore_FOUND)
set(mathmore_veto
math/quasirandom.C
math/exampleMultiRoot.C
math/Bessel.C
math/LegendreAssoc.C
math/Legendre.C
math/mathmoreIntegration.C
math/tStudent.C
math/normalDist.C)
endif()
if(NOT ROOT_fftw3_FOUND)
set(fftw3_veto roofit/rf208_convolution.C
roofit/rf210_angularconv.C
roofit/rf211_paramconv.C
roofit/rf512_wsfactory_oper.C
fft/FFT.C
fit/fitConvolution.C)
endif()
if(NOT ROOT_opengl_FOUND)
set(opengl_veto tree/staff.C
gl/*.C)
endif()
if(NOT GRAPHVIZ_FOUND)
set(gviz_veto graphs/graphstruct.C)
endif()
if(NOT ROOT_imt_FOUND)
set(imt_veto multicore/imt*.C multicore/mt*.C dataframe/df018_customActions.C)
else()
if(MSVC)
#---Multiproc is not supported on Windows
set(imt_veto ${imt_veto} multicore/mp*.C multicore/mtbb201_parallelHistoFill.C)
endif()
endif()
if(ROOT_CLASSIC_BUILD)
set(classic_veto multicore/mp104_*.C multicore/mp105_*.C)
endif()
if (NOT ROOT_tmva_FOUND)
set(tmva_veto tmva/*.C tmva/*.py tmva/keras/*.C tmva/keras/*.py)
else()
#---These do not need to run for TMVA
set(tmva_veto tmva/createData.C)
endif()
if (NOT ROOT_pythia6_FOUND)
set(pythia_veto pythia/pythiaExample.C)
endif()
if (NOT ROOT_pythia8_FOUND)
set(pythia_veto ${pythia_veto} pythia/pythia8.C)
else()
if("$ENV{PYTHIA8}" STREQUAL "")
get_filename_component(pythia8dir "${PYTHIA8_INCLUDE_DIR}" DIRECTORY)
list(APPEND ROOT_environ PYTHIA8=${pythia8dir})
endif()
if("$ENV{PYTHIA8DATA}" STREQUAL "" AND PYTHIA8_DATA)
list(APPEND ROOT_environ PYTHIA8DATA=${PYTHIA8_DATA})
endif()
endif()
if(ROOT_root7_FOUND)
set(root7_veto dataframe/df013_InspectAnalysis.C)
endif()
set(all_veto hsimple.C
geom/geometry.C
${extra_veto}
${gui_veto}
${minuit2_veto}
${roofit_veto}
${unuran_veto}
${xml_veto}
${fitsio_veto}
${tmva_veto}
${mathmore_veto}
${fftw3_veto}
${opengl_veto}
${gviz_veto}
${r_veto}
${histfactory_veto}
${tbb_veto}
${imt_veto}
${classic_veto}
${pythia_veto}
${root7_veto}
)
#--many roostats tutorials depending on having creating the file first with
histfactory and example_combined_GaussExample_model.root
foreach(tname ModelInspector OneSidedFrequentistUpperLimitWithBands
StandardBayesianMCMCDemo StandardBayesianNumericalDemo
StandardFeldmanCousinsDemo StandardFrequentistDiscovery
StandardHistFactoryPlotsWithCategories StandardHypoTestDemo
StandardHypoTestInvDemo StandardProfileInspectorDemo
StandardTestStatDistributionDemo
OneSidedFrequentistUpperLimitWithBands
TwoSidedFrequentistUpperLimitWithBands StandardProfileLikelihoodDemo)
set(roostats-${tname}-depends tutorial-roostats-CreateExampleFile)
endforeach()
# These tests on ARM64 need much more than 20 minutes - increase the timeout
if(ROOT_ARCHITECTURE MATCHES arm64)
set(thisTestTimeout 2400) # 40m
else()
set(thisTestTimeout 1200) # 20m
endif()
ROOT_ADD_TEST(tutorial-${tname}
COMMAND ${ROOT_root_CMD} -b -l -q ${CMAKE_CURRENT_SOURCE_DIR}/${t}$
{${tname}-aclic}
PASSRC ${rc} FAILREGEX "Error in <" ": error:" "segmentation
violation" "FROM HESSE STATUS=FAILED"
LABELS tutorial
DEPENDS tutorial-hsimple ${${tname}-depends}
ENVIRONMENT ${ROOT_environ}
TIMEOUT ${thisTestTimeout})
endforeach()
#---Python tutorials-----------------------------------------------------
if(ROOT_python_FOUND)
find_package(PythonInterp REQUIRED)
foreach(t ${pytutorials})
list(FIND returncode_1 ${t} index)
if(index EQUAL -1)
set(rc 0)
else()
set(rc 255)
endif()
ROOT_ADD_TEST(tutorial-${tname}-py
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${t} -b
PASSRC ${rc} FAILREGEX "Error in" ": error:" "segmentation
violation"
LABELS tutorial
DEPENDS ${${tname}-depends}
ENVIRONMENT ${ROOT_environ})
endforeach()
endif()