Skip to content
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
7 changes: 5 additions & 2 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ if(NOT xrootd)
roofit/roofit/rf618_mixture_models.py # depends on df106_HiggsToFourLeptons.py
visualisation/rcanvas/df104.py
visualisation/rcanvas/df105.py
io/tree/imt_parTreeProcessing.C
)
endif()

Expand Down Expand Up @@ -281,8 +282,6 @@ endif()
if(MSVC)
#---Multiproc is not supported on Windows
set(imt_veto ${imt_veto} analysis/parallel/mp*.C io/tree/mp*.C legacy/multicore/mp*.C multicore/mp*.C ./analysis/parallel/mtbb_parallelHistoFill.C)
#---XRootD is not supported on Windows
set(imt_veto ${imt_veto} io/tree/imt_parTreeProcessing.C)
endif()

if(ROOT_CLASSIC_BUILD)
Expand Down Expand Up @@ -879,6 +878,7 @@ if(ROOT_pyroot_FOUND)
tutorial-legacy-g3d-na49view-py
tutorial-hist-hist015_TH1_read_and_draw-py
tutorial-io-tree-ntuple1-py)
set(hist-hist015_TH1_read_and_draw_uhi-depends tutorial-hsimple-py)
set(math-fit-fit1-depends tutorial-hist-hist001_TH1_fillrandom-py)
set(legacy-g3d-na49view-depends tutorial-legacy-g3d-geometry-py)
set(roofit-roofit-rf503_wspaceread-depends tutorial-roofit-roofit-rf502_wspacewrite-py)
Expand All @@ -897,6 +897,9 @@ if(ROOT_pyroot_FOUND)
# To add a new requirement, add a glob expression that's named requires_<packageName>,
# and add it to the list "fixtureLists" below.
file(GLOB requires_numpy RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
hsimple.py
io/tree/ntuple1.py # indirect dependency from hsimple.py
hist/hist015_TH1_read_and_draw.py # indirect dependency from hsimple.py
analysis/dataframe/df017_vecOpsHEP.py
analysis/dataframe/df026_AsNumpyArrays.py
analysis/dataframe/df032_RDFFromNumpy.py
Expand Down
10 changes: 3 additions & 7 deletions tutorials/hist/hist015_TH1_read_and_draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
##
## \author Wim Lavrijsen

import ROOT

Check failure on line 12 in tutorials/hist/hist015_TH1_read_and_draw.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

tutorials/hist/hist015_TH1_read_and_draw.py:12:8: F401 `ROOT` imported but unused
from ROOT import TCanvas, TPad, TFile, TPaveLabel, TPaveText
from ROOT import gROOT

Check failure on line 14 in tutorials/hist/hist015_TH1_read_and_draw.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

tutorials/hist/hist015_TH1_read_and_draw.py:12:1: I001 Import block is un-sorted or un-formatted

c1 = TCanvas( 'c1', 'Histogram Drawing Options', 200, 10, 700, 900 )

Expand All @@ -22,14 +22,10 @@
pad2.Draw()
pad3.Draw()
#
# We connect the ROOT file generated in a previous tutorial
# We connect the ROOT file generated in the hsimple.py tutorial
#
File = "py-hsimple.root"
if (ROOT.gSystem.AccessPathName(File)) :
ROOT.Info("hist015_TH1_read_and_draw.py", File+" does not exist")
exit()

example = TFile(File)
example = TFile("py-hsimple.root")
example.ls()

# Draw a global picture title
Expand Down Expand Up @@ -86,4 +82,4 @@
c1.Update()

if (example.IsOpen()):
example.Close()
example.Close()
8 changes: 2 additions & 6 deletions tutorials/hist/hist015_TH1_read_and_draw_uhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@
import matplotlib.pyplot as plt
import mplhep as hep
import numpy as np
import ROOT

Check failure on line 16 in tutorials/hist/hist015_TH1_read_and_draw_uhi.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

tutorials/hist/hist015_TH1_read_and_draw_uhi.py:16:8: F401 `ROOT` imported but unused
from ROOT import TFile, gROOT

mpl_fig = plt.figure(figsize=(14, 12))
gs = mpl_fig.add_gridspec(3, 2, height_ratios=[1.5, 1.5, 1.5])

# We connect the ROOT file generated in a previous tutorial
File = "py-hsimple.root"
if ROOT.gSystem.AccessPathName(File):
ROOT.Info("hist015_TH1_read_and_draw.py", File + " does not exist")
exit()
# We connect the ROOT file generated in the hsimple.py tutorial

example = TFile(File)
example = TFile("py-hsimple.root")
example.ls()

# Draw histogram hpx in first pad.
Expand Down
Loading