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
29 changes: 15 additions & 14 deletions tutorials/analysis/dataframe/df036_missingBranches.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# \file
# \ingroup tutorial_dataframe
# \notebook -nodraw
#
# This example shows how to process a dataset where entries might be
# incomplete due to one or more missing branches in one or more of the files
# in the dataset. It shows usage of the FilterAvailable and DefaultValueFor
# RDataFrame functionalities to act upon the missing entries.
#
# \macro_code
# \macro_output
#
# \date September 2024
# \author Vincenzo Eduardo Padulano (CERN)
## \file
## \ingroup tutorial_dataframe
## \notebook -nodraw
##
## This example shows how to process a dataset where entries might be
## incomplete due to one or more missing branches in one or more of the files
## in the dataset. It shows usage of the FilterAvailable and DefaultValueFor
## RDataFrame functionalities to act upon the missing entries.
##
## \macro_code
## \macro_output
##
## \date September 2024
## \author Vincenzo Eduardo Padulano (CERN)

import array
import os

Expand Down
31 changes: 16 additions & 15 deletions tutorials/analysis/dataframe/df037_TTreeEventMatching.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# \file
# \ingroup tutorial_dataframe
# \notebook -nodraw
#
# This example shows processing of a TTree-based dataset with horizontal
# concatenations (friends) and event matching (based on TTreeIndex). In case
# the current event being processed does not match one (or more) of the friend
# datasets, one can use the FilterAvailable and DefaultValueFor functionalities
# to act upon the situation.
#
# \macro_code
# \macro_output
#
# \date September 2024
# \author Vincenzo Eduardo Padulano (CERN)
## \file
## \ingroup tutorial_dataframe
## \notebook -nodraw
##
## This example shows processing of a TTree-based dataset with horizontal
## concatenations (friends) and event matching (based on TTreeIndex). In case
## the current event being processed does not match one (or more) of the friend
## datasets, one can use the FilterAvailable and DefaultValueFor functionalities
## to act upon the situation.
##
## \macro_code
## \macro_output
##
## \date September 2024
## \author Vincenzo Eduardo Padulano (CERN)

import array
import os

Expand Down
45 changes: 23 additions & 22 deletions tutorials/analysis/dataframe/distrdf004_dask_lxbatch.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
# \file
# \ingroup tutorial_dataframe
#
# Configure a Dask connection to a HTCondor cluster hosted by the CERN batch
# service. To reproduce this tutorial, run the following steps:
#
# 1. Login to lxplus
# 2. Source an LCG release (minimum LCG104). See
# https://lcgdocs.web.cern.ch/lcgdocs/lcgreleases/introduction/ for details
# 3. Install the `dask_lxplus` package, which provides the `CernCluster` class
# needed to properly connect to the CERN condor pools. See
# https://batchdocs.web.cern.ch/specialpayload/dask.html for instructions
# 4. Run this tutorial
#
# The tutorial defines resources that each job will request to the condor
# scheduler, then creates a Dask client that can be used by RDataFrame to
# distribute computations.
#
# \macro_code
#
# \date September 2023
# \author Vincenzo Eduardo Padulano CERN
## \file
## \ingroup tutorial_dataframe
##
## Configure a Dask connection to a HTCondor cluster hosted by the CERN batch
## service. To reproduce this tutorial, run the following steps:
##
## 1. Login to lxplus
## 2. Source an LCG release (minimum LCG104). See
## https://lcgdocs.web.cern.ch/lcgdocs/lcgreleases/introduction/ for details
## 3. Install the `dask_lxplus` package, which provides the `CernCluster` class
## needed to properly connect to the CERN condor pools. See
## https://batchdocs.web.cern.ch/specialpayload/dask.html for instructions
## 4. Run this tutorial
##
## The tutorial defines resources that each job will request to the condor
## scheduler, then creates a Dask client that can be used by RDataFrame to
## distribute computations.
##
## \macro_code
##
## \date September 2023
## \author Vincenzo Eduardo Padulano CERN

from datetime import datetime
import socket
import time

from dask.distributed import Client
from dask_lxplus import CernCluster

import ROOT

Check failure on line 31 in tutorials/analysis/dataframe/distrdf004_dask_lxbatch.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

tutorials/analysis/dataframe/distrdf004_dask_lxbatch.py:24:1: I001 Import block is un-sorted or un-formatted help: Organize imports


def create_connection() -> Client:
Expand Down
6 changes: 4 additions & 2 deletions tutorials/io/experimental/rfile001_basics.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
/// \ingroup ROOT7 tutorial_io
/// Demonstrate the basic usage of RFile.
///
/// \author Giacomo Parolini <giacomo.parolini@cern.ch>
/// \date 2025-11-06
/// \macro_code
/// \macro_output
///
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
/// is welcome!
///
/// \date 2025-11-06
/// \author Giacomo Parolini <giacomo.parolini@cern.ch>

void write_hist_to_rfile(const char *fileName)
{
Expand Down
6 changes: 4 additions & 2 deletions tutorials/io/experimental/rfile001_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
# \ingroup ROOT7 tutorial_io
# Demonstrate the basic usage of RFile.
#
# \author Giacomo Parolini <giacomo.parolini@cern.ch>
# \date 2025-11-06
# \macro_code
# \macro_output
#
# \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
# is welcome!
#
# \date 2025-11-06
# \author Giacomo Parolini <giacomo.parolini@cern.ch>

import ROOT

import os

Check failure on line 16 in tutorials/io/experimental/rfile001_basics.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

tutorials/io/experimental/rfile001_basics.py:14:1: I001 Import block is un-sorted or un-formatted help: Organize imports

def write_hist_to_rfile(fileName):
# Create a histogram to write to the file
Expand Down
2 changes: 2 additions & 0 deletions tutorials/machine_learning/TMVA_SOFIE_GNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## \notebook -nodraw
##
## \macro_code
##
## \author

import ROOT

Expand All @@ -10,12 +12,12 @@
# NumPys builtin openblas later, which will conflict with the system openblas.
ROOT.gInterpreter.Load("libopenblaso.so")

import time

Check failure on line 15 in tutorials/machine_learning/TMVA_SOFIE_GNN.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E402)

tutorials/machine_learning/TMVA_SOFIE_GNN.py:15:1: E402 Module level import not at top of file

import graph_nets as gn

Check failure on line 17 in tutorials/machine_learning/TMVA_SOFIE_GNN.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E402)

tutorials/machine_learning/TMVA_SOFIE_GNN.py:17:1: E402 Module level import not at top of file
import numpy as np

Check failure on line 18 in tutorials/machine_learning/TMVA_SOFIE_GNN.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E402)

tutorials/machine_learning/TMVA_SOFIE_GNN.py:18:1: E402 Module level import not at top of file
import sonnet as snt

Check failure on line 19 in tutorials/machine_learning/TMVA_SOFIE_GNN.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E402)

tutorials/machine_learning/TMVA_SOFIE_GNN.py:19:1: E402 Module level import not at top of file
from graph_nets import utils_tf

Check failure on line 20 in tutorials/machine_learning/TMVA_SOFIE_GNN.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E402)

tutorials/machine_learning/TMVA_SOFIE_GNN.py:20:1: E402 Module level import not at top of file

# defining graph properties
num_nodes = 5
Expand Down
8 changes: 5 additions & 3 deletions tutorials/machine_learning/TMVA_SOFIE_GNN_Application.C
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/// \file
/// \ingroup tutorial_ml
/// \notebook -nodraw
// Macro evaluating a GNN model which was generated with the Parser macro
//
// \macro_code
/// Macro evaluating a GNN model which was generated with the Parser macro
///
/// \macro_code
///
/// \author

// need to add include path to find generated model file
#ifdef __CLING__
Expand Down
2 changes: 2 additions & 0 deletions tutorials/machine_learning/TMVA_SOFIE_GNN_Parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
## The tutorial also generate some data which can serve as input for the tutorial TMVA_SOFIE_GNN_Application.C
##
## \macro_code
##
## \author

import os

Expand Down
26 changes: 13 additions & 13 deletions tutorials/math/fit/NumericalMinimization.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# \file
# \ingroup tutorial_fit
# \notebook -nodraw
# Example on how to use the new Minimizer class in ROOT
# Show usage with all the possible minimizers.
# Minimize the Rosenbrock function (a 2D -function)
#
# input : minimizer name + algorithm name
# randomSeed: = <0 : fixed value: 0 random with seed 0; >0 random with given seed
#
# \macro_code
#
# \author Lorenzo Moneta
## \file
## \ingroup tutorial_fit
## \notebook -nodraw
## Example on how to use the new Minimizer class in ROOT
## Show usage with all the possible minimizers.
## Minimize the Rosenbrock function (a 2D -function)
##
## input : minimizer name + algorithm name
## randomSeed: = <0 : fixed value: 0 random with seed 0; >0 random with given seed
##
## \macro_code
##
## \author Lorenzo Moneta

import ROOT
import numpy as np

Check failure on line 16 in tutorials/math/fit/NumericalMinimization.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

tutorials/math/fit/NumericalMinimization.py:15:1: I001 Import block is un-sorted or un-formatted help: Organize imports


def RosenBrock(vecx):
Expand Down
1 change: 1 addition & 0 deletions tutorials/math/matrix/decomposeQR.C
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/// This tutorial shows how to decompose a matrix A in an orthogonal matrix Q and an upper
/// triangular matrix R using QR Householder decomposition with the TDecompQRH class.
/// The matrix same matrix as in this example is used: https://en.wikipedia.org/wiki/QR_decomposition#Example_2
/// \author

#include <iostream>
#include "TMath.h"
Expand Down
Loading