rail.projects.selection_factory module
- class rail.projects.selection_factory.RailSelection(**kwargs)[source]
Bases:
ConfigurableParamters for a simple data selection
This is just defined as a dict of cuts
- Parameters:
kwargs (Any)
-
config_options:
dict[str,StageParameter] = {'cuts': Parameter(Cuts associated to selection, type: <class 'dict'>, default: {} [optional]), 'name': Parameter(Selection name, type: <class 'str'>, default: None [required])}
-
yaml_tag:
str= 'Selection'
- class rail.projects.selection_factory.RailSelectionFactory[source]
Bases:
RailFactoryMixinFactory class to make selections
Expected usage is that user will define a yaml file with the various datasets that they wish to use with the following example syntax:
Selections: - Selection: name: maglim_25.5 cuts: maglim_i: [null, 25.5]
- classmethod add_selection(selection)[source]
- Return type:
None- Parameters:
selection (RailSelection)
-
client_classes:
list[type[Configurable]] = [<class 'rail.projects.selection_factory.RailSelection'>]
- classmethod get_selection(name)[source]
Get a selection by it’s assigned name
- Return type:
- Parameters:
name (str) – Name of the selection templates to return
- Returns:
selection in question
- Return type:
- classmethod get_selection_names()[source]
Return the names of the selections
- Return type:
list[str]
- classmethod get_selections()[source]
Return the dict of all the selections
- Return type:
dict[str,RailSelection]
- property selections: dict[str, RailSelection]
Return the dictionary of selection templates
-
yaml_tag:
str= 'Selections'