Manager¶
-
class
hep_rfm.
Manager
[source]¶ Bases:
object
Represent a class to store tables in different local/remote hosts, being able to do updates among them.
Variables: tables – paths to the stored tables. Methods Summary
add_table
(path[, protocol])Add a new table to the list of tables. available_table
([modifiers, allow_protocols])Get the path to the first available table. update
([parallelize, wdir, modifiers])Update the different tables registered within this manager. Methods Documentation
-
add_table
(path, protocol=None)[source]¶ Add a new table to the list of tables. The path is automatically transformed into the corresponding
ProtocolPath
instance.Parameters: path (str) – path to the new table.
-
available_table
(modifiers=None, allow_protocols=None)[source]¶ Get the path to the first available table. The behavior is similar to that of
hep_rfm.available_path
.Parameters: Returns: path to the first available table.
Return type: See also
-
update
(parallelize=False, wdir=None, modifiers=None)[source]¶ Update the different tables registered within this manager.
Parameters: - parallelize (int) – number of processes allowed to parallelize the synchronization of all the proxies. By default it is set to 0, so no parallelization is done.
- wdir (str) – where to create the temporary directory. The option is passed to
tempfile.TemporaryDirectory
as “dir”. - modifiers (dict) – information to modify the path of this class. For more information on its structure, see the definition of
hep_rfm.ProtocolPath.with_modifiers()
for each protocol.
Raises: RuntimeError – if a file is missing for any of the tables.
See also
-