morpho.processors.IO.IOROOTProcessor module

Some template vars

Members: IOROOTProcessor

Functions:

Classes:

ROOT IO processor Authors: M. Guigue Date: 06/26/18

Summary

Data:

Reference

class morpho.processors.IO.IOROOTProcessor.IOROOTProcessor(name, *args, **kwargs)[source]

Bases: morpho.processors.IO.IOProcessor.IOProcessor

Base IO ROOT Processor The ROOT Reader and Writer

Parameters:
  • filename (required) – path/name of file
  • variables (required) – variables to extract
  • action – read or write (default=”read”)
  • tree_name (required) – name of the tree
  • file_option – option for the file (default=Recreate)
Input:
None
Results:
data: dictionary containing the data
InternalConfigure(params)[source]

This method will be called by nymph to configure the processor

Reader()[source]

Read the content of a TTree in a ROOT File. Note the use of the uproot package. The variables should be a list of the “variable” to read.

Writer()[source]

Write the data into a TTree in a ROOT File. The variables should be a list of dictionaries where

  • “variable” is the variable name in the input dictionary,
  • “root_alias” is the name of the branch in the tree,
  • “type” is the type of data to be saved.