Belle II Software  release-08-01-10
RootQuantityExtract Class Reference

Public Member Functions

def __init__ (self, extractor=None)
 
def addExtractor (self, class_type, extractor)
 
def extract (self, obj)
 

Public Attributes

 extractor
 the dictionary used for data extraction, key is the ROOT type and value a list of extractors
 

Detailed Description

Class to automatically quntaties from ROOT Objects

Definition at line 84 of file quantity_extract.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  extractor = None 
)
Initialize the class with a set of quantity extractors

Definition at line 89 of file quantity_extract.py.

89  def __init__(self, extractor=None):
90  """
91  Initialize the class with a set of quantity extractors
92  """
93 
94 
96  self.extractor = extractor
97 
98  if self.extractor is None:
99  # use default
100  self.extractor = default_extractor()
101 

Member Function Documentation

◆ addExtractor()

def addExtractor (   self,
  class_type,
  extractor 
)
Adds an extractor to this class

@param class_type: the string you get when
running <root_object>.IsA().GetName()
This is used to map the correct extractor to
this root object

Definition at line 102 of file quantity_extract.py.

◆ extract()

def extract (   self,
  obj 
)
Extract quantities from a root object

@return: a dictionary of extracted quantities

Definition at line 119 of file quantity_extract.py.


The documentation for this class was generated from the following file: