Definition at line 30 of file periodInfo.py.
◆ __init__()
def periodInfo.AMIWrapper.__init__ |
( |
|
self | ) |
|
Definition at line 31 of file periodInfo.py.
33 self.ami=pyAMI.client.Client(
'atlas')
40 self.configFileName = os.path.expanduser(options.config)
42 sys.exit(
'No authentication file specified')
43 print (self.configFileName)
◆ periods()
def periodInfo.AMIWrapper.periods |
( |
|
self, |
|
|
|
period = None , |
|
|
|
level = None , |
|
|
|
project = None , |
|
|
|
status = None |
|
) |
| |
Definition at line 59 of file periodInfo.py.
59 def periods(self, period=None, level=None, project=None, status=None):
60 "Get list of periods. By default return all periods"
62 cmd =
'ListDataPeriods'
63 if period: cmd +=
' period='+period
64 if level: cmd +=
' periodLevel='+level
65 if project: cmd +=
' projectName='+project
66 if status: cmd +=
' status='+status
◆ run()
def periodInfo.AMIWrapper.run |
( |
|
self, |
|
|
|
cmd |
|
) |
| |
Execute an AMI command given as a list of command and paramters (ami format) or
space separated string (for convenience)
Definition at line 46 of file periodInfo.py.
48 Execute an AMI command given as a list of command and paramters (ami format) or
49 space separated string (for convenience)
51 if isinstance(cmd, str):
54 print (
'PRINT AMI CMD', cmd )
55 results = self.ami.
execute(cmd,format=
'dict_object')
57 return results.get_rows()
◆ runListsPerPeriod()
def periodInfo.AMIWrapper.runListsPerPeriod |
( |
|
self, |
|
|
|
location = '/afs/cern.ch/user/a/atlidbs/nt/DataPeriods/' |
|
) |
| |
Generate files containing run lists for periods if they don't already exist
Definition at line 77 of file periodInfo.py.
77 def runListsPerPeriod(self, location='/afs/cern.ch/user/a/atlidbs/nt/DataPeriods/'):
79 Generate files containing run lists for periods if they don't already exist
83 periods = self.periods()
89 projectDir =path.normpath(location +
'/' + p[
'projectName'])
91 if not path.exists(projectDir):
92 os.makedirs(projectDir)
94 filename =
'%s/%s.runs.list' % (projectDir,p[
'period'])
99 if path.exists(filename):
100 os.system(
'rm ' + filename)
102 print (
'* Creating run list for %(projectName)s %(period)s ...' % p)
108 runs = self.runsForPeriod(p[
'period'], p[
'projectName'])
111 runList =
'\n'.
join(
sorted([r[
'runNumber']
for r
in runs]))
114 with open(filename,
'w')
as f:
117 print (
' ... written to', filename,
'\n' )
120 print (
'* No new period infomation to create')
◆ runsForPeriod()
def periodInfo.AMIWrapper.runsForPeriod |
( |
|
self, |
|
|
|
period, |
|
|
|
project |
|
) |
| |
Definition at line 69 of file periodInfo.py.
69 def runsForPeriod(self, period, project):
70 "Get info on runs for a particular period"
72 cmd =
'GetRunsForDataPeriod period='+period
73 cmd +=
' projectName='+project
◆ ami
periodInfo.AMIWrapper.ami |
◆ configFileName
periodInfo.AMIWrapper.configFileName |
The documentation for this class was generated from the following file: