opengate.postprocessors.base ============================ .. py:module:: opengate.postprocessors.base Attributes ---------- .. autoapisummary:: opengate.postprocessors.base.__run_group_prefix__ Classes ------- .. autoapisummary:: opengate.postprocessors.base.ProcessingGroupBase opengate.postprocessors.base.PostProcessor opengate.postprocessors.base.ManagedExternalLink Module Contents --------------- .. py:data:: __run_group_prefix__ :value: 'data_from_run' .. py:class:: ProcessingGroupBase(*args, **kwargs) Bases: :py:obj:`opengate.base.GateObject` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: processing_units .. py:attribute:: _need_tree_update :value: True .. py:method:: close() Dummy implementation for inherited classes which do not implement this method. .. py:method:: to_dictionary() .. py:property:: last_added_processing_unit .. py:method:: add_processing_unit(processing_unit, **kwargs) .. py:method:: get_processing_unit(name) .. py:property:: all_processing_units .. py:property:: is_post_processor .. py:property:: tree_roots .. py:method:: get_output_groups() .. py:method:: update_processing_tree() .. py:method:: update_processing_tree_if_needed() .. py:property:: processing_groups .. py:class:: PostProcessor(*args, **kwargs) Bases: :py:obj:`ProcessingGroupBase` This is the base class used for all objects that handle user input in GATE. The class is assumed to be processed by process_cls(), either explicitly or via the metaclass MetaUserInfo, before any instances of the class are created. Some class attributes, e.g. inherited_user_info_defaults, are created as part of this processing. .. py:attribute:: output_file_handle :value: None .. py:attribute:: extra_file_handles .. py:method:: initialize() .. py:method:: initialize_output_file() .. py:property:: output_directory_external_files .. py:property:: output_directory .. py:method:: get_extra_file_handle(identifier) .. py:method:: get_or_register_extra_file_handle(file_handle) Register a handle if it is not known yet. .. py:method:: has_extra_file_handle(identifier) .. py:method:: create_external_link(where, name, target, createparents=False) Create an external link. Create an external link to a *target* node with the given *name* in *where* location. *target* can be a node object in another file or a path string in the form 'file:/path/to/node'. If *createparents* is true, the intermediate groups required for reaching *where* are created (the default is not doing so). The returned node is an :class:`ExternalLink` instance. .. py:method:: release_file_handles() .. py:method:: close() Dummy implementation for inherited classes which do not implement this method. .. py:method:: run() .. py:property:: hdf5_group .. py:method:: initialize_hdf5_groups() .. py:property:: all_initial_units Get all .. py:class:: ManagedExternalLink(post_processor, parentnode, name, target=None, _log=False) Bases: :py:obj:`tables.linkextension.ExternalLink`, :py:obj:`tables.link.Link` Variant of the ExternalLink class from PyTables. .. py:attribute:: _c_classid :value: 'MANAGEDEXTERNALLINK' .. py:attribute:: post_processor The external file handler, if the link has been dereferenced. In case the link has not been dereferenced yet, its value is None. .. py:property:: extfile .. py:method:: _get_filename_node() Return the external filename and nodepath from `self.target`. .. py:method:: __call__(**kwargs) Dereference self.target and return the object. You can pass all the arguments supported by the :func:`open_file` function (except filename, of course) so as to open the referenced external file. .. py:method:: umount() Safely unmount self.extfile, if opened. .. py:method:: __str__() Return a short string representation of the link.