|
| _database |
| the specified databases
|
|
| _experiment |
| the experiment number, default (= latest) is 99999
|
|
| _run |
| the run number, default (= latest) is 99999
|
|
Helper class to translate the user-specified database(s) into parameters for basf2
Definition at line 24 of file cli.py.
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
command_argument |
|
) |
| |
Init the stored databases and exp/run from the specified command argument
Definition at line 27 of file cli.py.
27 def __init__(self, command_argument):
28 """Init the stored databases and exp/run from the specified command argument"""
32 self._experiment = 99999
37 split_argument = command_argument.split(
":")
38 if len(split_argument) == 2:
39 command_argument, exp_run = split_argument
41 if exp_run !=
"latest":
43 self._experiment, self._run = map(int, exp_run.split(
"/"))
45 raise argparse.ArgumentTypeError(
46 f
"Do not understand the exp/run argument '{exp_run}'")
48 elif len(split_argument) != 1:
49 raise argparse.ArgumentTypeError(
50 f
"Do not understand the database argument '{command_argument}'")
53 self._database = command_argument.split(
",")
56 def normalize(database):
58 if os.path.exists(database):
59 if os.path.basename(database) !=
"database.txt":
60 database = os.path.join(database,
"database.txt")
64 self._database = list(map(normalize, self._database))
◆ get_all_cuts()
Get all cuts stored in the database(s)
and sort them according to base_identifier, cut_identifier.
Definition at line 89 of file cli.py.
◆ set_database()
Set the basf2 database chain according to the specified databases.
Before that, clean up and invalidate everything from th database.
The distinction between file databases and global databases is done
via the fact of a file/folder with this name exists or not.
Definition at line 66 of file cli.py.
The documentation for this class was generated from the following file:
- hlt/softwaretrigger/scripts/softwaretrigger/cli.py