|
ATLAS Offline Software
|
|
def | dictFactory (cursor, row) |
|
def | getKey (d, v) |
|
def | getStatusClass (status) |
|
def | appendUnique (s, v) |
|
def | getFullTaskNames (taskman, dsname, taskname, requireSingleTask=False, confirmWithUser=False, addWildCards=True) |
|
def | getJobConfig (jobDir, dsName, taskName, jobName=' *') |
|
◆ appendUnique()
def python.TaskManager.appendUnique |
( |
|
s, |
|
|
|
v |
|
) |
| |
◆ dictFactory()
def python.TaskManager.dictFactory |
( |
|
cursor, |
|
|
|
row |
|
) |
| |
Convert a tuple from a database query into a dictonary.
Definition at line 35 of file TaskManager.py.
36 """Convert a tuple from a database query into a dictonary."""
38 for idx, col
in enumerate(cursor.description):
◆ getFullTaskNames()
def python.TaskManager.getFullTaskNames |
( |
|
taskman, |
|
|
|
dsname, |
|
|
|
taskname, |
|
|
|
requireSingleTask = False , |
|
|
|
confirmWithUser = False , |
|
|
|
addWildCards = True |
|
) |
| |
Retrieve the full dataset and task names given a pair of (dsname,task) that may
contain wildcards or be just a parital name such as the run number. Depending
on the requireSingleTask and confirmWithUser settings a TaskManagerCheckError
is raised if there are multiple tasks or if the user doesn't confirm.
Definition at line 74 of file TaskManager.py.
74 def getFullTaskNames(taskman,dsname,taskname,requireSingleTask=False,confirmWithUser=False,addWildCards=True):
75 """Retrieve the full dataset and task names given a pair of (dsname,task) that may
76 contain wildcards or be just a parital name such as the run number. Depending
77 on the requireSingleTask and confirmWithUser settings a TaskManagerCheckError
78 is raised if there are multiple tasks or if the user doesn't confirm."""
79 taskList = taskman.getTaskNames(dsname,taskname,addWildCards)
81 raise TaskManagerCheckError (
'ERROR: No tasks found for dataset = %s, task = %s' % (dsname,taskname))
82 if requireSingleTask
and len(taskList)!=1:
83 m =
"ERROR: Multiple data set names found for dataset = %s, task = %s\n Please use full dataset or task name from list below, using option -n if necessary:\n\n" % (dsname,taskname)
84 m +=
" %-50s %s\n" % (
'DATASET NAME',
'TASK NAME')
85 m +=
" %s\n" % (75*
'-')
87 m +=
" %-50s %s\n" % (t[0],t[1])
89 raise TaskManagerCheckError (m)
91 print (
'Please confirm that you want to execute this command for the following tasks:\n')
92 print (
" %-50s %s" % (
'DATASET NAME',
'TASK NAME'))
93 print (
" %s" % (75*
'-'))
95 print (
" %-50s %s" % (t[0],t[1]))
96 a =
input(
'\nARE YOU SURE [n] ? ')
98 raise TaskManagerCheckError (
'ERROR: Aborted by user')
◆ getJobConfig()
def python.TaskManager.getJobConfig |
( |
|
jobDir, |
|
|
|
dsName, |
|
|
|
taskName, |
|
|
|
jobName = '*' |
|
) |
| |
Read config dict from job files.
Definition at line 103 of file TaskManager.py.
104 """Read config dict from job files."""
106 configFile = glob.glob(
'%s/%s/%s/%s/%s' % (jobDir,dsName,taskName,jobName,
'*.config.py.final.py'))
108 configFile = glob.glob(
'%s/%s/%s/%s/%s' % (jobDir,dsName,taskName,jobName,
'*.config.py'))
111 return config[
'jobConfig']
◆ getKey()
def python.TaskManager.getKey |
( |
|
d, |
|
|
|
v |
|
) |
| |
Get the key for which dictonary d has an entry with value v.
Returns 'Undefined' if there's no such key, if several values are found.
Definition at line 43 of file TaskManager.py.
44 """Get the key for which dictonary d has an entry with value v.
45 Returns 'Undefined' if there's no such key, if several values are found."""
46 l = [k
for k
in d.keys()
if d[k]==v]
◆ getStatusClass()
def python.TaskManager.getStatusClass |
( |
|
status | ) |
|
Returns 'ok', 'warn' or 'bad' depending on the value of status.
Definition at line 53 of file TaskManager.py.
54 """Returns 'ok', 'warn' or 'bad' depending on the value of status."""
60 if status
in statusMap:
61 return statusMap[status]
◆ __author__
string python.TaskManager.__author__ = 'Juerg Beringer' |
|
private |
◆ __version__
string python.TaskManager.__version__ = 'TaskManager.py atlas/athena' |
|
private |
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
def getJobConfig(jobDir, dsName, taskName, jobName=' *')
def getFullTaskNames(taskman, dsname, taskname, requireSingleTask=False, confirmWithUser=False, addWildCards=True)
std::string join(const std::vector< std::string > &v, const char c=',')
def getStatusClass(status)
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
def dictFactory(cursor, row)