/[pdpsoft]/nl.nikhef.ndpf.3maand/trunk/3maand.py
ViewVC logotype

Diff of /nl.nikhef.ndpf.3maand/trunk/3maand.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2678 by templon, Thu Jul 4 15:03:14 2013 UTC revision 2679 by templon, Mon Nov 18 11:01:28 2013 UTC
# Line 10  Line 10 
10  # constants to be changed each year  # constants to be changed each year
11    
12  pledges = {          # pledges in SI06 units  pledges = {          # pledges in SI06 units
13      'alice' : 3209,      'alice' : 3210,
14      'atlas' : 30586,      'atlas' : 30598,
15      'lhcb'  : 15388      'lhcb'  : 15393
16      }      }
17  total_cap = 81718  total_cap = 81619
18    
19  import optparse  import optparse
20    
# Line 239  class Table(object): Line 239  class Table(object):
239      def add(self, name, val):      def add(self, name, val):
240          self.data[name] = val          self.data[name] = val
241    
242  heptab = Table("HEP Usage @ Nikhef from " + SDATE.isoformat() + " to " + EDATE.isoformat(),  heptab = Table("Usage @ Nikhef from " + SDATE.isoformat() + " to " + EDATE.isoformat(),
243                 ["group", "WallGHzEquiv"])                 ["group", "WallGHzEquiv"])
244  for g in hepvos:  for g in hepvos:
245      heptab.add(g, sums[g])      heptab.add(g, sums[g])
 heptab.add("non-HEP",sumothervos)  
246  heptab.add("local", sumlocal)  heptab.add("local", sumlocal)
 heptab.add("probes", sumprobes)  
 heptab.add("admin", sumadmin)  
247    
248  othertab = Table("non-HEP Usage @ Nikhef from " + SDATE.isoformat() + " to " + EDATE.isoformat(),  othertab = Table("Usage @ Nikhef from " + SDATE.isoformat() + " to " + EDATE.isoformat(),
249                 ["group", "WallGHzEquiv"])                 ["group", "WallGHzEquiv"])
250    
251  for g in othervos:  for g in othervos:
# Line 386  writer.writerow(["ALICE",   pledges["ali Line 383  writer.writerow(["ALICE",   pledges["ali
383  writer.writerow(["farmcap", total_cap])  writer.writerow(["farmcap", total_cap])
384  writer.writerow([' ',' '])  writer.writerow([' ',' '])
385    
386    first_tabl = True
387  for tabl in [heptab, othertab]:  for tabl in [heptab, othertab]:
388      writer.writerow([tabl.header])      if first_tabl:
389      writer.writerow(tabl.columnheaders)          writer.writerow([tabl.header])
390            writer.writerow(tabl.columnheaders)
391            first_tabl = False
392            
393      groups_sorted = sorted(tabl.data, key=tabl.data.get, reverse=True)      groups_sorted = sorted(tabl.data, key=tabl.data.get, reverse=True)
394      for g in groups_sorted:      for g in groups_sorted:
395          writer.writerow([g, tabl.data[g]])          writer.writerow([g, tabl.data[g]])
396    
     writer.writerow([' ',' '])  
397    

Legend:
Removed from v.2678  
changed lines
  Added in v.2679

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28