ATLAS Offline Software
Functions | Variables
python.web Namespace Reference

Functions

def makeDict (scope, query)
 
def makeTable (name, ids)
 

Variables

int toGB = 1. / 1000. / 1000. / 1000.
 
string query = '*.AOD.*_r5591_r5625'
 13 TEV More...
 
string query13 = '*.merge.AOD.*_r5787_r5853'
 
 aods_idtag
 
 aods_idonly
 
 topq1_idtag
 
 topq1_idonly
 
 aods_ami = ami.askAmi('mc14_8TeV.' + query)
 
 topq1_ami = ami.askAmi('mc14_8TeV.' + query.replace('AOD','DAOD_TOPQ1') + '_p1854')
 
 aods_ami_size = ami.askAmi('mc14_8TeV.' + query, 'totalSize')
 
 topq1_ami_size = ami.askAmi('mc14_8TeV.' + query.replace('AOD','DAOD_TOPQ1') + '_p1854', 'totalSize')
 
list dsids_sofar = []
 
 remaining = set(aods_idonly.keys()).difference(set(dsids_sofar))
 

Function Documentation

◆ makeDict()

def python.web.makeDict (   scope,
  query 
)

Definition at line 11 of file web.py.

11 def makeDict(scope, query):
12  map = {}
13  map2 = {}
14  #print scope, query
15  for ds in grid.listDatasets(scope, query):
16  ar = ds.replace('/','').split('.')
17  tag = ar[5]
18 
19  if tag.find('_p'):
20  tag = tag.split('_p')[0]
21 
22  short = ar[1] + '.' + tag
23  map[short] = ds
24  map2[int(ar[1])] = ds
25 
26  return map, map2
27 

◆ makeTable()

def python.web.makeTable (   name,
  ids 
)

Definition at line 28 of file web.py.

28 def makeTable(name, ids):
29 
30  print('---++ %s (%d)' % (name, len(ids)))
31 
32  print('''%TABLE{tablewidth="100%" columnwidths="6%,70%,12%,12%"}%''')
33  print('| %8s | %60s | %22s | %22s | %22s | %22s |' % ( '*DSID*', '*Description*', '*Primary xAOD yield*', '*TOPQ1 yield*', '*Primary size [GB]*', '*xAOD size [GB]*' ))
34 
35  for id in ids:
36  dsids_sofar.append(id)
37 
38  primary_name = ''
39  topq1_name = 'Not Available (requested?)'
40  aod_yield = 0
41  topq1_yield = 0
42  aod_size = 0
43  topq1_size = 0
44 
45  if aods_idonly.has_key(id):
46  primary_name = aods_idonly[id]
47 
48  if topq1_idonly.has_key(id):
49  topq1_name = topq1_idonly[id]
50 
51  if aods_ami.has_key(primary_name.replace('/','')):
52  aod_yield = aods_ami[primary_name.replace('/','')]
53 
54  if topq1_ami.has_key(topq1_name.replace('/','')):
55  topq1_yield = topq1_ami[topq1_name.replace('/','')]
56 
57 
58  if aods_ami_size.has_key(primary_name.replace('/','')):
59  aod_size = aods_ami_size[primary_name.replace('/','')]
60 
61  if topq1_ami_size.has_key(topq1_name.replace('/','')):
62  topq1_size = topq1_ami_size[topq1_name.replace('/','')]
63 
64 
65  #print id, primary_name
66  desc = primary_name.split('.')[2]
67 
68  #%TWISTY{mode="div"showlink="AOD: 6.298.988"hidelink="Collapse"showimgleft="%ICONURLPATH{toggleopen-small}%"hideimgleft="%ICONURLPATH{toggleclose-small}%"}%INPUT%ICON{choice-no}%
69 
70  twisty = '''%TWISTY{
71  mode="div"
72  showlink="'''+desc+'''"
73  hidelink="'''+desc+'''"
74  showimgleft="%ICONURLPATH{toggleopen-small}%"
75  hideimgleft="%ICONURLPATH{toggleclose-small}%"}%''' + '<b>Primary:</b> ' + primary_name + '<br><b>TOPQ1:</b> ' + topq1_name + '<br>' + '%ENDTWISTY%'
76 
77  frac = 0
78  if aod_yield > 0:
79  frac = 100. * topq1_yield / aod_yield
80 
81  topq1_yield_txt = "%15d (%0.0f%%)" % (topq1_yield, frac)
82  cstart = ''
83  cend = ''
84  if aod_yield < topq1_yield:
85  cstart = '%RED%'
86  cend = "%ENDCOLOR%"
87  elif aod_yield > topq1_yield:
88  cstart = '%ORANGE%'
89  cend = "%ENDCOLOR%"
90 
91  topq1_yield_txt = cstart + topq1_yield_txt + cend
92 
93  frac = 0
94  if topq1_size > 0:
95  frac = 100. * topq1_size / aod_size
96 
97  topq1_size_txt = "%15d (%0.0f%%)" % (topq1_size * toGB, frac)
98 
99  print('| %d|%s| %d| %s| %4.2f| %s|' % (id, twisty, aod_yield, topq1_yield_txt, aod_size * toGB, topq1_size_txt))
100 
101  print('')
102 

Variable Documentation

◆ aods_ami

python.web.aods_ami = ami.askAmi('mc14_8TeV.' + query)

Definition at line 113 of file web.py.

◆ aods_ami_size

python.web.aods_ami_size = ami.askAmi('mc14_8TeV.' + query, 'totalSize')

Definition at line 116 of file web.py.

◆ aods_idonly

python.web.aods_idonly

Definition at line 111 of file web.py.

◆ aods_idtag

python.web.aods_idtag

Definition at line 111 of file web.py.

◆ dsids_sofar

list python.web.dsids_sofar = []

Definition at line 121 of file web.py.

◆ query

string python.web.query = '*.AOD.*_r5591_r5625'

13 TEV

Definition at line 104 of file web.py.

◆ query13

string python.web.query13 = '*.merge.AOD.*_r5787_r5853'

Definition at line 105 of file web.py.

◆ remaining

python.web.remaining = set(aods_idonly.keys()).difference(set(dsids_sofar))

Definition at line 132 of file web.py.

◆ toGB

int python.web.toGB = 1. / 1000. / 1000. / 1000.

Definition at line 9 of file web.py.

◆ topq1_ami

python.web.topq1_ami = ami.askAmi('mc14_8TeV.' + query.replace('AOD','DAOD_TOPQ1') + '_p1854')

Definition at line 114 of file web.py.

◆ topq1_ami_size

python.web.topq1_ami_size = ami.askAmi('mc14_8TeV.' + query.replace('AOD','DAOD_TOPQ1') + '_p1854', 'totalSize')

Definition at line 117 of file web.py.

◆ topq1_idonly

python.web.topq1_idonly

Definition at line 112 of file web.py.

◆ topq1_idtag

python.web.topq1_idtag

Definition at line 112 of file web.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.web.makeDict
def makeDict(scope, query)
Definition: web.py:11
python.web.makeTable
def makeTable(name, ids)
Definition: web.py:28
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
Trk::split
@ split
Definition: LayerMaterialProperties.h:38