CMS 3D CMS Logo

Classes | Functions
o2olib Namespace Reference

Classes

class  O2OJob
 
class  O2OJobConf
 
class  O2OJobMgr
 
class  O2OMgr
 
class  O2ORun
 
class  O2ORunMgr
 
class  O2OTool
 

Functions

def get_db_credentials (db_service, authFile)
 
def print_table (headers, table)
 

Function Documentation

def o2olib.get_db_credentials (   db_service,
  authFile 
)

Definition at line 65 of file o2olib.py.

Referenced by o2olib.O2OMgr.getSession().

65 def get_db_credentials( db_service, authFile ):
66  (username, account, pwd) = auth.get_credentials( authPathEnvVar, db_service[1], authFile )
67  return username,pwd
68 
def get_db_credentials(db_service, authFile)
Definition: o2olib.py:65
def o2olib.print_table (   headers,
  table 
)

Definition at line 69 of file o2olib.py.

References edm.print().

Referenced by o2olib.O2OJobMgr.listJobs().

69 def print_table( headers, table ):
70  ws = []
71  for h in headers:
72  ws.append(len(h))
73  for row in table:
74  ind = 0
75  for c in row:
76  if ind<len(ws):
77  if len(c)> ws[ind]:
78  ws[ind] = len(c)
79  ind += 1
80 
81  def printf( row ):
82  line = ''
83  ind = 0
84  for w in ws:
85  fmt = '{:<%s}' %w
86  if ind<len(ws):
87  line += (fmt.format( row[ind] )+' ')
88  ind += 1
89  print(line)
90  printf( headers )
91  hsep = ''
92  for w in ws:
93  fmt = '{:-<%s}' %w
94  hsep += (fmt.format('')+' ')
95  print(hsep)
96  for row in table:
97  printf( row )
98 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def print_table(headers, table)
Definition: o2olib.py:69