Functions | |
def | add_campaign (campaign_file, campaign, args) |
def | copy_default_templates (args, next_campaign) |
def | customize_default_template (file_name, regex_replace_pairs) |
def | get_first_match (regex, directory) |
def | main (argv=None) |
Variables | |
tuple | required_version = (2,7) |
def mps_setup_new_align.add_campaign | ( | campaign_file, | |
campaign, | |||
args | |||
) |
Adds a line with campaign information from `args` to `campaign_file`. Arguments: - `campaign_file`: output file - `campaign`: name of the campaign - `args`: command line arguments for this campaign
Definition at line 150 of file mps_setup_new_align.py.
References split.
Referenced by main().
def mps_setup_new_align.copy_default_templates | ( | args, | |
next_campaign | |||
) |
Copies the default configuration templates. Arguments: - `args`: container with the needed information - `next_campaign`: destination for the copy operation
Definition at line 197 of file mps_setup_new_align.py.
References customize_default_template(), and join().
Referenced by main().
def mps_setup_new_align.customize_default_template | ( | file_name, | |
regex_replace_pairs | |||
) |
Replace all lines in `file_name` matching `regex_string` with `replace_string`. Lines starting with '#' or ';' are ignored. Arguments: - `file_name`: path to the file to be customized - `regex_replace_pairs`: tuples containing a regex string and its replacement
Definition at line 226 of file mps_setup_new_align.py.
Referenced by copy_default_templates(), and main().
def mps_setup_new_align.get_first_match | ( | regex, | |
directory | |||
) |
Checks if `directory` matches `regex` and returns the first match converted to an integer. If it does not match -1 is returned. Arguments: - `regex`: Regular expression to be tested against - `directory`: name of the directory under test
Definition at line 133 of file mps_setup_new_align.py.
References createfilelist.int.
Referenced by main().
Main routine of the script. Arguments: - `argv`: arguments passed to the main routine
Definition at line 28 of file mps_setup_new_align.py.
References add_campaign(), helper.checked_out_MPS(), copy_default_templates(), customize_default_template(), get_first_match(), join(), genParticles_cff.map, and str.
tuple mps_setup_new_align.required_version = (2,7) |
Definition at line 19 of file mps_setup_new_align.py.