Functions | |
def | configLogger (logfile, loglevel=logging.INFO) |
def | copy_payload (dbFile, inputTag, destTags, destDb, since, userText) |
def | create_metadata (metadataFilename, inputTag, destTags, destDb, since, userText) |
def | exists_iov (dbFile, tag) |
def | insert_to_file (template, target, replace_dict) |
def | kill_subproc_noexcept (p) |
def | send_mail (subject, message, send_to, send_from, text_attachments=[]) |
def | upload_payload (dbFile, inputTag, destTags, destDb, since, userText) |
Helper Script for StripO2O @author: Huilin Qu
def o2o_helper.configLogger | ( | logfile, | |
loglevel = logging.INFO |
|||
) |
Setting up logging to both file and console. @see: https://docs.python.org/2/howto/logging-cookbook.html
Definition at line 25 of file o2o_helper.py.
def o2o_helper.copy_payload | ( | dbFile, | |
inputTag, | |||
destTags, | |||
destDb, | |||
since, | |||
userText | |||
) |
Upload payload using conddb copy.
Definition at line 104 of file o2o_helper.py.
References popcon2dropbox.copy().
def o2o_helper.create_metadata | ( | metadataFilename, | |
inputTag, | |||
destTags, | |||
destDb, | |||
since, | |||
userText | |||
) |
Create metadata file for the conditionsUpload service. @see: uploadConditions.runWizard() @see: https://twiki.cern.ch/twiki/bin/view/CMS/DropBox Keyword arguments: metadataFilename -- output metadata filename inputTag -- input tag name destTags -- a list of destination tags destDb -- [destinationDatabase] in metadata since -- [since] in metadata userText -- [userText] in metadata
Definition at line 56 of file o2o_helper.py.
References createfilelist.int.
Referenced by upload_payload().
def o2o_helper.exists_iov | ( | dbFile, | |
tag | |||
) |
Check if there exists any IOV for a specific tag in the given sqlite file.
Definition at line 150 of file o2o_helper.py.
def o2o_helper.insert_to_file | ( | template, | |
target, | |||
replace_dict | |||
) |
Update the template file based on the replace_dict, and write to the target.
Definition at line 44 of file o2o_helper.py.
def o2o_helper.kill_subproc_noexcept | ( | p | ) |
Kill a subprocess without throwing OSError. Used for cleaning up subprocesses when the main script crashes.
Definition at line 16 of file o2o_helper.py.
def o2o_helper.send_mail | ( | subject, | |
message, | |||
send_to, | |||
send_from, | |||
text_attachments = [] |
|||
) |
Send an email. [send_to] needs to be a list.
Definition at line 132 of file o2o_helper.py.
References join().
def o2o_helper.upload_payload | ( | dbFile, | |
inputTag, | |||
destTags, | |||
destDb, | |||
since, | |||
userText | |||
) |
Upload payload using conditionUploader.
Definition at line 88 of file o2o_helper.py.
References create_metadata(), and join().