Belle II Software  release-06-01-15
SkimRegistryClass Class Reference

Public Member Functions

def __init__ (self)
 
def names (self)
 
def codes (self)
 
def modules (self)
 
def get_skim_module (self, SkimName)
 
def get_skims_in_module (self, SkimModule)
 
def get_skim_function (self, SkimName)
 
def encode_skim_name (self, SkimName)
 
def decode_skim_code (self, SkimCode)
 

Private Attributes

 _codes
 
 _modules
 
 _names
 

Static Private Attributes

 _registry = _RegisteredSkims
 

Detailed Description

Class containing information on all official registered skims. This class also
contains helper functions for getting information from the registry. For
convenience, an instance of this class is provided: `skim.registry.Registry`.

The table below lists all registered skims and their skim codes:

<TABLE>

Definition at line 194 of file registry.py.

Member Function Documentation

◆ codes()

def codes (   self)
A list of all registered skim codes.

Definition at line 217 of file registry.py.

217  def codes(self):
218  """A list of all registered skim codes."""
219  return self._codes
220 

◆ decode_skim_code()

def decode_skim_code (   self,
  SkimCode 
)
Find the name of the skim which corresponds to the provided skim code.

This is useful to determine the skim script used to produce a specific uDST
file, given the 8-digit code name of the file itself.

Parameters:
    SkimCode (str): 8 digit skim code assigned to some skim.

Returns:
    Name of the corresponding skim as it appears in the skim registry.

Definition at line 303 of file registry.py.

◆ encode_skim_name()

def encode_skim_name (   self,
  SkimName 
)
Find the 8 digit skim code assigned to the skim with the provided name.

Parameters:
    SkimName (str): Name of the corresponding skim as it appears in the skim registry.

Returns:
    8 digit skim code assigned to the given skim.

Definition at line 284 of file registry.py.

◆ get_skim_function()

def get_skim_function (   self,
  SkimName 
)
Get the skim class constructor for the given skim.

This is achieved by importing the module listed alongside the skim name in the
skim registry.

Parameters:
    SkimName (str): Name of the skim to be found.

Returns:
    The class constructor for the given skim.

Definition at line 268 of file registry.py.

◆ get_skim_module()

def get_skim_module (   self,
  SkimName 
)
Retrieve the skim module name from the registry which contains the given
skim.

Parameters:
    SkimName (str): Name of the skim as it appears in the skim registry.

Returns:
    The name of the skim module which contains the skim.

Definition at line 226 of file registry.py.

◆ get_skims_in_module()

def get_skims_in_module (   self,
  SkimModule 
)
Retrieve a list of the skims listed in the registry as existing in
the given skim module.

Parameters:
    SkimModule (str): The name of the module, *e.g.* ``btocharmless`` (not
        ``skim.btocharmless`` or ``btocharmless.py``).

Returns:
    The skims listed in the registry as belonging to ``SkimModule``.

Definition at line 246 of file registry.py.

◆ modules()

def modules (   self)
A list of all registered skim modules.

Definition at line 222 of file registry.py.

◆ names()

def names (   self)
A list of all registered skim names.

Definition at line 212 of file registry.py.


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