![]() |
![]() |
Classes | |
class | _DasCache |
class | FileListCreator |
Functions | |
def | _get_events (entity, name) |
def | _get_properties (name, entity, properties, filters=None, sub_entity=None, aggregators=None) |
def | _make_file_info (dataset_name_nevents) |
def | das_client (query, check_key=None) |
def | find_key (collection, key_chain) |
def | get_chunks (long_list, chunk_size) |
def | get_datasets (dataset_pattern) |
def | get_events_per_dataset (dataset_name) |
def | get_events_per_file (file_name) |
def | get_file_info (dataset) |
def | get_files (dataset_name) |
def | get_max_run (dataset_name) |
def | get_runs (file_name) |
def | main (argv=None) |
def | merge_strings (strings) |
def | print_msg (text, line_break=True, log_file=None) |
Variables | |
FileInfo = collections.namedtuple("FileInfo", "dataset name nevents runs") | |
|
private |
Retrieve the number of events from `entity` called `name`. Arguments: - `entity`: type of entity - `name`: name of entity
Definition at line 1066 of file tkal_create_file_lists.py.
References _get_properties(), das_client(), find_key(), and createfilelist.int.
Referenced by get_events_per_dataset(), and get_events_per_file().
|
private |
Retrieve `properties` from `entity` called `name`. Arguments: - `name`: name of entity - `entity`: type of entity - `properties`: list of property names - `filters`: list of filters on properties - `sub_entity`: type of entity from which to extract the properties; defaults to `entity` - `aggregators`: additional aggregators/filters to amend to query
Definition at line 1080 of file tkal_create_file_lists.py.
References das_client(), find_key(), and join().
Referenced by _get_events(), and get_file_info().
|
private |
Definition at line 1118 of file tkal_create_file_lists.py.
References FileInfo, and get_runs().
Submit `query` to DAS client and handle possible errors. Further treatment of the output might be necessary. Arguments: - `query`: DAS query - `check_key`: optional key to be checked for; retriggers query if needed
Definition at line 905 of file tkal_create_file_lists.py.
References find_key(), cmssw_das_client.get_data(), edm.print(), print_msg(), and str.
Referenced by _get_events(), _get_properties(), get_datasets(), get_files(), get_max_run(), and get_runs().
def tkal_create_file_lists.find_key | ( | collection, | |
key_chain | |||
) |
Searches for `key` in `collection` and returns first corresponding value. Arguments: - `collection`: list of dictionaries - `key_chain`: chain of keys to be searched for
Definition at line 950 of file tkal_create_file_lists.py.
Referenced by _get_events(), _get_properties(), das_client(), get_datasets(), get_files(), and get_runs().
def tkal_create_file_lists.get_chunks | ( | long_list, | |
chunk_size | |||
) |
Generates list of sub-lists of `long_list` with a maximum size of `chunk_size`. Arguments: - `long_list`: original list - `chunk_size`: maximum size of created sub-lists
Definition at line 1121 of file tkal_create_file_lists.py.
Referenced by tkal_create_file_lists.FileListCreator._create_dataset_cff().
def tkal_create_file_lists.get_datasets | ( | dataset_pattern | ) |
Retrieve list of dataset matching `dataset_pattern`. Arguments: - `dataset_pattern`: pattern of dataset names
Definition at line 1034 of file tkal_create_file_lists.py.
References das_client(), and find_key().
def tkal_create_file_lists.get_events_per_dataset | ( | dataset_name | ) |
Retrieve the number of a events in `dataset_name`. Arguments: - `dataset_name`: name of a dataset
Definition at line 1046 of file tkal_create_file_lists.py.
References _get_events().
def tkal_create_file_lists.get_events_per_file | ( | file_name | ) |
Retrieve the number of a events in `file_name`. Arguments: - `file_name`: name of a dataset file
Definition at line 1056 of file tkal_create_file_lists.py.
References _get_events().
def tkal_create_file_lists.get_file_info | ( | dataset | ) |
Definition at line 1106 of file tkal_create_file_lists.py.
References _get_properties().
def tkal_create_file_lists.get_files | ( | dataset_name | ) |
Retrieve list of files in `dataset_name`. Arguments: - `dataset_name`: name of the dataset
Definition at line 1021 of file tkal_create_file_lists.py.
References das_client(), and find_key().
def tkal_create_file_lists.get_max_run | ( | dataset_name | ) |
Retrieve the maximum run number in `dataset_name`. Arguments: - `dataset_name`: name of the dataset
Definition at line 1009 of file tkal_create_file_lists.py.
References das_client(), and SiStripPI.max.
def tkal_create_file_lists.get_runs | ( | file_name | ) |
Try to guess the run number from `file_name`. If run could not be determined, gets the run numbers from DAS (slow!) Arguments: - `file_name`: name of the considered file
Definition at line 994 of file tkal_create_file_lists.py.
References das_client(), find_key(), createfilelist.int, and join().
Referenced by _make_file_info().
Main routine. Not called, if this module is loaded via `import`. Arguments: - `argv`: Command line arguments passed to the script.
Definition at line 29 of file tkal_create_file_lists.py.
def tkal_create_file_lists.merge_strings | ( | strings | ) |
Merge strings in `strings` into a common string. Arguments: - `strings`: list of strings
Definition at line 1135 of file tkal_create_file_lists.py.
References str.
Formatted printing of `text`. Arguments: - `text`: string to be printed
Definition at line 976 of file tkal_create_file_lists.py.
References edm.print(), and str.
Referenced by tkal_create_file_lists.FileListCreator._create_dataset_cff(), tkal_create_file_lists.FileListCreator._create_dataset_ini_section(), tkal_create_file_lists.FileListCreator._create_dataset_txt(), tkal_create_file_lists.FileListCreator._create_hippy_txt(), tkal_create_file_lists.FileListCreator._create_json_file(), tkal_create_file_lists.FileListCreator._get_track_collection(), tkal_create_file_lists.FileListCreator._print_eventcounts(), tkal_create_file_lists.FileListCreator._request_dataset_information(), tkal_create_file_lists.FileListCreator._validate_input(), tkal_create_file_lists.FileListCreator._write_file_lists(), das_client(), tkal_create_file_lists._DasCache.dump(), and tkal_create_file_lists._DasCache.load().
tkal_create_file_lists.FileInfo = collections.namedtuple("FileInfo", "dataset name nevents runs") |
Definition at line 1116 of file tkal_create_file_lists.py.
Referenced by _make_file_info(), and SiStripDetVOffBuilder.FileExists().