Definition at line 29 of file periodInfo.py.
◆ __init__()
def periodInfo.AMIWrapper.__init__ |
( |
|
self | ) |
|
Definition at line 30 of file periodInfo.py.
32 self.ami=pyAMI.client.Client(
'atlas')
39 self.configFileName = os.path.expanduser(options.config)
41 sys.exit(
'No authentication file specified')
42 print (self.configFileName)
◆ periods()
def periodInfo.AMIWrapper.periods |
( |
|
self, |
|
|
|
period = None , |
|
|
|
level = None , |
|
|
|
project = None , |
|
|
|
status = None |
|
) |
| |
Definition at line 58 of file periodInfo.py.
58 def periods(self, period=None, level=None, project=None, status=None):
59 "Get list of periods. By default return all periods"
61 cmd =
'ListDataPeriods'
62 if period: cmd +=
' period='+period
63 if level: cmd +=
' periodLevel='+level
64 if project: cmd +=
' projectName='+project
65 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 45 of file periodInfo.py.
47 Execute an AMI command given as a list of command and paramters (ami format) or
48 space separated string (for convenience)
50 if isinstance(cmd, str):
53 print (
'PRINT AMI CMD', cmd )
54 results = self.ami.
execute(cmd,format=
'dict_object')
56 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 76 of file periodInfo.py.
76 def runListsPerPeriod(self, location='/afs/cern.ch/user/a/atlidbs/nt/DataPeriods/'):
78 Generate files containing run lists for periods if they don't already exist
82 periods = self.periods()
88 projectDir =path.normpath(location +
'/' + p[
'projectName'])
90 if not path.exists(projectDir):
91 os.makedirs(projectDir)
93 filename =
'%s/%s.runs.list' % (projectDir,p[
'period'])
98 if path.exists(filename):
99 os.system(
'rm ' + filename)
101 print (
'* Creating run list for %(projectName)s %(period)s ...' % p)
107 runs = self.runsForPeriod(p[
'period'], p[
'projectName'])
110 runList =
'\n'.
join(
sorted([r[
'runNumber']
for r
in runs]))
113 with open(filename,
'w')
as f:
116 print (
' ... written to', filename,
'\n' )
119 print (
'* No new period infomation to create')
◆ runsForPeriod()
def periodInfo.AMIWrapper.runsForPeriod |
( |
|
self, |
|
|
|
period, |
|
|
|
project |
|
) |
| |
Definition at line 68 of file periodInfo.py.
68 def runsForPeriod(self, period, project):
69 "Get info on runs for a particular period"
71 cmd =
'GetRunsForDataPeriod period='+period
72 cmd +=
' projectName='+project
◆ ami
periodInfo.AMIWrapper.ami |
◆ configFileName
periodInfo.AMIWrapper.configFileName |
The documentation for this class was generated from the following file: