root#

ROOT contrib functionality.

Class ROOTFormatter#

class ROOTFormatter#

Bases: Formatter

Class ROOTNumpyFormatter#

class ROOTNumpyFormatter#

Bases: Formatter

Class ROOTPandasFormatter#

class ROOTPandasFormatter#

Bases: Formatter

Class UprootFormatter#

class UprootFormatter#

Bases: Formatter

Class GuardedTFile#

class GuardedTFile(*args, **kwargs)#

Bases: object

Functions#

import_ROOT(batch=True, ignore_cli=True, reset=False)#

Imports, caches and returns the ROOT module and sets certain flags when it was not already cached. When batch is True, the module is loaded in batch mode. When ignore_cli is True, ROOT’s command line parsing is disabled. When reset is True, the two settings are enforced independent of whether the module was previously cached or not. This entails enabling them in case they were disabled before.

hadd_task(task, inputs, output, cwd=None, local=False, force=True, hadd_args=None)#

This method is intended to be used by tasks that are supposed to merge root files, e.g. when inheriting from law.contrib.tasks.ForestMerge. inputs should be a sequence of local targets that represent the files to merge into output. cwd is the working directory in which hadd is invoked. When empty, a temporary directory is used. The task itself is used to print and publish messages via its law.Task.publish_message() and law.Task.publish_step() methods.

When local is True, the input and output targets are assumed to be local and the merging is based on their local paths. Otherwise, the targets are fetched first and the output target is localized. When force is True, any existing output file is overwritten. hadd_args can be a sequence of additional arguments that are added to the hadd command.