Skip to content

Commit

Permalink
Move some geometry tutorials outside of visualisation main directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
martamaja10 committed Dec 11, 2024
1 parent 2a8009b commit b734021
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 32 deletions.
42 changes: 21 additions & 21 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if(MACOSX_VERSION VERSION_EQUAL 10.13)
endif()

if(NOT geom)
set(geom_veto visualisation/geom/*.C)
set(geom_veto visualisation/geom/*.C geom/*.C)
endif()

if(NOT ROOT_proof_FOUND)
Expand Down Expand Up @@ -733,14 +733,14 @@ if(ROOT_pyroot_FOUND)
file(GLOB_RECURSE pytutorials RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)

# Now python-specific vetos:
set(pyveto demos.py # requires GUI
math/fit/fit1_py.py # not a tutorial
gui/gui_simple.py # requires GUI
io/tree/csv2tntuple.py # not really a tutorial
geom/na49geomfile.py # ????
geom/na49visible.py # ????
tutorials/io/tree/csv2tree_ReadStream.py # not a tutorial
gui/numberEntry.py # requires GUI
set(pyveto pyroot/demo.py # requires GUI
pyroot/fit1_py.py # not a tutorial
pyroot/gui_ex.py # requires GUI
pyroot/mrt.py # not really a tutorial
pyroot/na49geomfile.py # ????
pyroot/na49visible.py # ????
pyroot/parse_CSV_file_with_TTree_ReadStream.py # not a tutorial
pyroot/numberEntry.py # requires GUI
legacy/pyroot/*py # legacy ...
histfactory/makeQuickModel.py # not a tutorial
visualisation/eve7/eve/lineset.py # requires GUI
Expand All @@ -754,7 +754,7 @@ if(ROOT_pyroot_FOUND)
if(NOT dataframe
OR DEFINED ENV{ROOTTEST_IGNORE_NUMBA_PY3}
OR (MSVC AND NOT win_broken_tests))
list(APPEND pyveto analysis/dataframe/df038_NumbaDeclare.py)
list(APPEND pyveto pyroot/pyroot004_NumbaDeclare.py)
endif()

if(dataframe AND DEFINED ENV{ROOTTEST_IGNORE_PANDAS_PY3})
Expand Down Expand Up @@ -820,7 +820,7 @@ if(ROOT_pyroot_FOUND)
list(APPEND pyveto machine_learning/PyTorch_Generate_CNN_Model.py)

if(NOT ROOT_geom_FOUND)
list(APPEND pyveto geom/geometry.py)
list(APPEND pyveto pyroot/geometry.py)
endif()

# Now glob all vetos for pyroot
Expand All @@ -835,15 +835,15 @@ if(ROOT_pyroot_FOUND)
message(STATUS "${nAfterVeto}/${nTotal} python tutorials have been activated.")

#---Python tutorials dependencies--------------------------------------
set(tree-ntuple1-depends tutorial-hsimple-py)
set(hist-h1ReadAndDraw-depends tutorial-hsimple-py)
set(pyroot-benchmarks-depends tutorial-hsimple-py
tutorial-math-fit-fit1-py
tutorial-geom-na49view-py
tutorial-hist-h1ReadAndDraw-py
tutorial-tree-ntuple1-py)
set(math-fit-fit1-depends tutorial-hist-fillrandom-py)
set(geom-na49view-depends tutorial-geom-geometry-py)
set(pyroot-ntuple1-depends tutorial-pyroot-hsimple-py)
set(pyroot-h1ReadAndDraw-depends tutorial-pyroot-hsimple-py)
set(pyroot-benchmarks-depends tutorial-pyroot-hsimple-py
tutorial-pyroot-fit1-py
tutorial-pyroot-na49view-py
tutorial-pyroot-h1ReadAndDraw-py
tutorial-pyroot-ntuple1-py)
set(pyroot-fit1-depends tutorial-hist-fillrandom-py)
set(pyroot-na49view-depends tutorial-pyroot-geometry-py)
set(roofit-rf503_wspaceread-depends tutorial-roofit-rf502_wspacewrite-py)
set(roofit-rf618_mixture_models-depends tutorial-analysis-dataframe-df106_HiggsToFourLeptons-py)

Expand All @@ -864,7 +864,7 @@ if(ROOT_pyroot_FOUND)
math/fit/combinedFit.py
math/fit/multifit.py
roofit/rf409_NumPyPandasToRooFit.py)
file(GLOB requires_numba RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} analysis/dataframe/df038_NumbaDeclare.py)
file(GLOB requires_numba RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} pyroot/pyroot004_NumbaDeclare.py)
file(GLOB requires_pandas RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
analysis/dataframe/df026_AsNumpyArrays.py
roofit/rf409_NumPyPandasToRooFit.py)
Expand Down
16 changes: 8 additions & 8 deletions tutorials/demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
bar.AddButton( 'browser', r'TPython::Exec( "b = ROOT.TBrowser()" );', 'Start the ROOT browser' )
bar.AddButton( 'hsimple', r'TPython::Exec( "' + to_run.format('hsimple.py') + '" );', 'Creating histograms/Ntuples on file', "button" )
bar.AddButton( 'hsum', r'TPython::Exec( "' + to_run.format('hist/hsum.py') + '" );', 'Filling Histograms and Some Graphics Options' )
bar.AddButton( 'formula1', r'TPython::Exec( "' + to_run.format('graphics/formula1.py') + '" );', 'Simple Formula and Functions' )
bar.AddButton( 'surfaces', r'TPython::Exec( "' + to_run.format('graphs/surfaces.py') + '" );', 'Surface Drawing Options' )
bar.AddButton( 'formula1', r'TPython::Exec( "' + to_run.format('visualisation/graphics/formula1.py') + '" );', 'Simple Formula and Functions' )
bar.AddButton( 'surfaces', r'TPython::Exec( "' + to_run.format('visualisation/graphs/surfaces.py') + '" );', 'Surface Drawing Options' )
bar.AddButton( 'fillrandom', r'TPython::Exec( "' + to_run.format('hist/fillrandom.py') + '" );','Histograms with Random Numbers from a Function' )
bar.AddButton( 'fit1', r'TPython::Exec( "' + to_run.format('math/fit/fit1.py') + '" );', 'A Simple Fitting Example' )
bar.AddButton( 'multifit', r'TPython::Exec( "' + to_run.format('math/fit/multifit.py') + '" );', 'Fitting in Subranges of Histograms' )
bar.AddButton( 'h1draw', r'TPython::Exec( "' + to_run.format('hist/h1ReadAndDraw.py') + '" );', 'Drawing Options for 1D Histograms' )
bar.AddButton( 'graph', r'TPython::Exec( "' + to_run.format('graphs/graph.py') + '" );', 'Example of a Simple Graph' )
bar.AddButton( 'gerrors', r'TPython::Exec( "' + to_run.format('graphs/gerrors.py') + '" );', 'Example of a Graph with Error Bars' )
bar.AddButton( 'tornado', r'TPython::Exec( "' + to_run.format('graphics/tornado.py') + '" );', 'Examples of 3-D PolyMarkers' )
bar.AddButton( 'shapes', r'TPython::Exec( "' + to_run.format('geom/shapes.py') + '" );', 'The Geometry Shapes' )
bar.AddButton( 'geometry', r'TPython::Exec( "' + to_run.format('geom/geometry.py') + '" );', 'Creation of the NA49 Geometry File' )
bar.AddButton( 'na49view', r'TPython::Exec( "' + to_run.format('geom/na49view.py') + '" );', 'Two Views of the NA49 Detector Geometry' )
bar.AddButton( 'graph', r'TPython::Exec( "' + to_run.format('visualisation/graphs/graph.py') + '" );', 'Example of a Simple Graph' )
bar.AddButton( 'gerrors', r'TPython::Exec( "' + to_run.format('visualisation/graphs/gerrors.py') + '" );', 'Example of a Graph with Error Bars' )
bar.AddButton( 'tornado', r'TPython::Exec( "' + to_run.format('visualisation/graphics/tornado.py') + '" );', 'Examples of 3-D PolyMarkers' )
bar.AddButton( 'shapes', r'TPython::Exec( "' + to_run.format('visualisation/geom/shapes.py') + '" );', 'The Geometry Shapes' )
bar.AddButton( 'geometry', r'TPython::Exec( "' + to_run.format('visualisation/geom/geometry.py') + '" );', 'Creation of the NA49 Geometry File' )
bar.AddButton( 'na49view', r'TPython::Exec( "' + to_run.format('visualisation/geom/na49view.py') + '" );', 'Two Views of the NA49 Detector Geometry' )
bar.AddButton( 'ntuple1', r'TPython::Exec( "' + to_run.format('io/tree/ntuple1.py') + '" );', 'Ntuples and Selections' )
bar.AddSeparator() # not implemented
bar.AddButton( 'make ntuple', r'TPython::Exec( "' + to_run.format('io/tree/csv2tntuple.py') + '" );', 'Convert a text file to an ntuple' )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_geom
/// \ingroup tutorial_geometry
/// Geometry detector assembly example
///
/// \macro_image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// \file
/// \ingroup tutorial_geom
/// \ingroup tutorial_geometry
/// GUI to draw the geometry shapes.
///
/// \macro_code
Expand Down
3 changes: 3 additions & 0 deletions tutorials/geom/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\addtogroup tutorial_geometry

These are the tutorials demonstrating different geometry features. To see more examples how to visualize geometry features see `tutorials/visualisation/geom/`(https://root.cern/doc/master/group__tutorial__geom.html).
4 changes: 4 additions & 0 deletions tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ The `$ROOTSYS/tutorials` directory includes several sub-directories:
\ingroup Tutorials
\brief Examples showing how to use Machine Learning from ROOT.

\defgroup tutorial_geometry Geometry tutorials
\ingroup Tutorials
\brief Examples showing how to make use of geometry classes in ROOT.

\defgroup tutorial_legacy Legacy tutorials
\ingroup Tutorials
\brief Legacy Tutorials
2 changes: 1 addition & 1 deletion tutorials/visualisation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

\defgroup tutorial_geom Geometry tutorials
\ingroup tutorial_visualisation
\brief Various ROOT geometry package examples.
\brief Various geometry visualisation examples.

\defgroup tutorial_gui GUI tutorials
\ingroup tutorial_visualisation
Expand Down

0 comments on commit b734021

Please sign in to comment.