|  | 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 33 of file TaskManager.py.
   34     """Convert a tuple from a database query into a dictonary.""" 
   36     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 72 of file TaskManager.py.
   72 def getFullTaskNames(taskman,dsname,taskname,requireSingleTask=False,confirmWithUser=False,addWildCards=True):
 
   73     """Retrieve the full dataset and task names given a pair of (dsname,task) that may 
   74        contain wildcards or be just a parital name such as the run number. Depending 
   75        on the requireSingleTask and confirmWithUser settings a TaskManagerCheckError 
   76        is raised if there are multiple tasks or if the user doesn't confirm.""" 
   77     taskList = taskman.getTaskNames(dsname,taskname,addWildCards)
 
   79         raise  TaskManagerCheckError (
'ERROR: No tasks found for dataset = %s, task = %s' % (dsname,taskname))
 
   80     if requireSingleTask 
and len(taskList)!=1:
 
   81         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)
 
   82         m += 
"    %-50s  %s\n" % (
'DATASET NAME',
'TASK NAME')
 
   83         m += 
"    %s\n" % (75*
'-')
 
   85             m += 
"    %-50s  %s\n" % (t[0],t[1])
 
   87         raise TaskManagerCheckError (m)
 
   89         print (
'Please confirm that you want to execute this command for the following tasks:\n')
 
   90         print (
"    %-50s  %s" % (
'DATASET NAME',
'TASK NAME'))
 
   91         print (
"    %s" % (75*
'-'))
 
   93             print (
"    %-50s  %s" % (t[0],t[1]))
 
   94         a = input(
'\nARE YOU SURE [n] ? ')
 
   96             raise TaskManagerCheckError (
'ERROR: Aborted by user')
 
 
 
◆ getJobConfig()
      
        
          | def python.TaskManager.getJobConfig | ( |  | jobDir, | 
        
          |  |  |  | dsName, | 
        
          |  |  |  | taskName, | 
        
          |  |  |  | jobName = '*' | 
        
          |  | ) |  |  | 
      
 
Read config dict from job files.
 
Definition at line 101 of file TaskManager.py.
  102     """Read config dict from job files.""" 
  104     configFile = glob.glob(
'%s/%s/%s/%s/%s' % (jobDir,dsName,taskName,jobName,
'*.config.py.final.py'))
 
  106         configFile = glob.glob(
'%s/%s/%s/%s/%s' % (jobDir,dsName,taskName,jobName,
'*.config.py'))
 
  109     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 41 of file TaskManager.py.
   42     """Get the key for which dictonary d has an entry with value v. 
   43     Returns 'Undefined' if there's no such key, if several values are found.""" 
   44     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 51 of file TaskManager.py.
   52     """Returns 'ok', 'warn' or 'bad' depending on the value of status.""" 
   58     if status 
in statusMap:
 
   59         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)
void print(char *figname, TCanvas *c1)
std::string join(const std::vector< std::string > &v, const char c=',')
def getStatusClass(status)
def dictFactory(cursor, row)