ATLAS Offline Software
Functions | Variables
checkTriggerxAOD Namespace Reference

Functions

def categorizeData (categData)
 
def compareCategoryData (trigData, recoData)
 
def printCategoryData (categData, diskTotal)
 
def sortTrigData (orderedData, diskTotal)
 
def printAuxDynVars (dynvars)
 

Variables

 __author__
 
 parser
 
 usage
 
 p
 
 dest
 
 help
 
 action
 
 default
 
 options
 
 args
 
 categoryStrings
 
 fileNames
 
 fileName
 
 poolFile
 
 summedData
 
 categData
 
 categTrigData
 
 categTrigDynVars
 
 brName
 
 m
 
 orderedData
 
 sorter
 
 key
 
 tfile
 
 ttree
 
 memSize
 
 diskSize
 
 mtlp
 
 br
 
 d_name
 
 m1
 
 m2
 
 m3
 
 nameType
 
 nt
 
 n
 
 found
 
 catName
 
 writer
 

Function Documentation

◆ categorizeData()

def checkTriggerxAOD.categorizeData (   categData)

Definition at line 25 of file checkTriggerxAOD.py.

25 def categorizeData(categData):
26  categorizedData = []
27  for br in categData.keys():
28  categorizedData += [ categData[ br ] ]
29  pass
30  sorter = PF.PoolRecord.Sorter.DiskSize
31  import operator
32  categorizedData.sort( key = operator.attrgetter( sorter ) )
33  return categorizedData
34 

◆ compareCategoryData()

def checkTriggerxAOD.compareCategoryData (   trigData,
  recoData 
)

Definition at line 35 of file checkTriggerxAOD.py.

35 def compareCategoryData(trigData,recoData):
36  trDict = {'Trig_Egamma':'egamma',
37  'Trig_Muon':'Muon',
38  'Trig_MET':'MET',
39  'Trig_Tau':'tau',
40  'Trig_Bjet':'BTag',
41  'Trig_Jet':'Jet',
42  'Trig_InDet':'InDet'}
43  td = categorizeData(trigData)
44  rd = categorizeData(recoData)
45 
46 
47  print( "=" * 80 )
48  print( " Categorized data" )
49  print( "=" * 80 )
50  print( " Trigger Offline Trigger/Offline Category Name Offline" )
51  print( "-" * 80 )
52  for d in td:
53  for r in rd:
54  if d.name in trDict:
55  if trDict[d.name] is r.name:
56  dsPerEvt = d.diskSize/poolFile.dataHeader.nEntries
57  rsPerEvt = r.diskSize/poolFile.dataHeader.nEntries
58  frac = dsPerEvt/rsPerEvt
59  print( "%12.3f kb %12.3f kb %12.3f %12s %12s" % ( dsPerEvt, rsPerEvt, frac, d.name, r.name ) )
60 
61 

◆ printAuxDynVars()

def checkTriggerxAOD.printAuxDynVars (   dynvars)

Definition at line 141 of file checkTriggerxAOD.py.

141 def printAuxDynVars(dynvars):
142 
143  for key,items in dynvars.items():
144  print( "=" * 80 )
145  print(key)
146  print( "=" * 80 )
147  for var in items:
148  print('%s'%var)
149 
150 
151 

◆ printCategoryData()

def checkTriggerxAOD.printCategoryData (   categData,
  diskTotal 
)

Definition at line 62 of file checkTriggerxAOD.py.

62 def printCategoryData(categData,diskTotal):
63  categorizedData = categorizeData(categData)
64 
65  print( "=" * 80 )
66  print( " Categorized data" )
67  print( "=" * 80 )
68  print( " Disk Size Fraction Category Name" )
69  print( "-" * 80 )
70  totDiskSize = 0.0
71  frac = 0.0
72  ds = []
73  dsFrac = []
74  dsName = []
75  for d in categorizedData:
76  dsPerEvt = d.diskSize / poolFile.dataHeader.nEntries
77  dsPerEvtFrac = d.diskSize / diskTotal
78  totDiskSize += dsPerEvt
79  frac += dsPerEvtFrac
80  ds += [dsPerEvt]
81  dsFrac += [dsPerEvtFrac]
82  dsName += [d.name]
83  print( "%12.3f kb %12.3f %s" % ( dsPerEvt, dsPerEvtFrac, d.name ) )
84  pass
85  print( "%12.3f kb %12.3f %s" % ( totDiskSize , frac, "Total" ) )
86  ds += [totDiskSize]
87  dsFrac += [frac]
88  dsName += ["Total"]
89 
90  print( "" )
91  print( "=" * 80 )
92  print( "CSV for categories disk size/evt and fraction:" )
93  # print out comment separated list in descending order
94  print(",".join(dsName[::-1]))
95  b = ['{:<0.3f}'.format(i) for i in ds[::-1]]
96  print(",".join(b))
97  b = ['{:<0.3f}'.format(i) for i in dsFrac[::-1]]
98  print(",".join(b))
99  print( "=" * 80 )
100  print( "" )
101 

◆ sortTrigData()

def checkTriggerxAOD.sortTrigData (   orderedData,
  diskTotal 
)

Definition at line 102 of file checkTriggerxAOD.py.

102 def sortTrigData(orderedData,diskTotal):
103  # Sort and print the trigger containers
104  orderTrigData = {}
105  memSize = 0.0
106  diskSize = 0.0
107  for d in orderedData:
108  catName = edm.getCategory(d.name).strip()
109  if(catName == 'NOTFOUND'): continue
110  if catName in orderTrigData.keys():
111  orderTrigData[ catName ].append(d)
112  else:
113  orderTrigData[ catName ] = [d]
114  pass
115  for k in orderTrigData:
116  # Print a header:
117  print( "" )
118  print( "=" * 100 )
119  print(' Trigger EDM group: %s' % (k))
120  print( "=" * 100 )
121  print( PF.PoolOpts.HDR_FORMAT %
122  ( "Mem Size", "Disk Size", "Size/Evt", "Compression",
123  "Items", "Container Name (Type)" ) )
124  print( "-" * 100 )
125  memSize = 0.0
126  diskSize = 0.0
127  for d in orderTrigData[k]:
128  memSize = memSize + d.memSize
129  diskSize = diskSize + d.diskSize
130  print( PF.PoolOpts.ROW_FORMAT %
131  ( d.memSize,
132  d.diskSize,
133  ( d.diskSize / poolFile.dataHeader.nEntries ),
134  ( d.memSize / d.diskSize ),
135  d.nEntries,
136  d.name ) )
137  print( "-" * 100 )
138  print( " %s Total size/evt %12.3f AOD fraction %12.3f" % (k,diskSize/poolFile.dataHeader.nEntries,diskSize/diskTotal) )
139  print( "=" * 100 )
140 

Variable Documentation

◆ __author__

checkTriggerxAOD.__author__
private

Definition at line 12 of file checkTriggerxAOD.py.

◆ action

checkTriggerxAOD.action

Definition at line 166 of file checkTriggerxAOD.py.

◆ args

checkTriggerxAOD.args

Definition at line 171 of file checkTriggerxAOD.py.

◆ br

checkTriggerxAOD.br

Definition at line 290 of file checkTriggerxAOD.py.

◆ brName

checkTriggerxAOD.brName

Definition at line 231 of file checkTriggerxAOD.py.

◆ categData

checkTriggerxAOD.categData

Definition at line 224 of file checkTriggerxAOD.py.

◆ categoryStrings

checkTriggerxAOD.categoryStrings

Definition at line 175 of file checkTriggerxAOD.py.

◆ categTrigData

checkTriggerxAOD.categTrigData

Definition at line 225 of file checkTriggerxAOD.py.

◆ categTrigDynVars

checkTriggerxAOD.categTrigDynVars

Definition at line 226 of file checkTriggerxAOD.py.

◆ catName

checkTriggerxAOD.catName

Definition at line 329 of file checkTriggerxAOD.py.

◆ d_name

checkTriggerxAOD.d_name

Definition at line 291 of file checkTriggerxAOD.py.

◆ default

checkTriggerxAOD.default

Definition at line 168 of file checkTriggerxAOD.py.

◆ dest

checkTriggerxAOD.dest

Definition at line 158 of file checkTriggerxAOD.py.

◆ diskSize

checkTriggerxAOD.diskSize

Definition at line 282 of file checkTriggerxAOD.py.

◆ fileName

checkTriggerxAOD.fileName

Definition at line 203 of file checkTriggerxAOD.py.

◆ fileNames

checkTriggerxAOD.fileNames

Definition at line 192 of file checkTriggerxAOD.py.

◆ found

checkTriggerxAOD.found

Definition at line 328 of file checkTriggerxAOD.py.

◆ help

checkTriggerxAOD.help

Definition at line 159 of file checkTriggerxAOD.py.

◆ key

checkTriggerxAOD.key

Definition at line 273 of file checkTriggerxAOD.py.

◆ m

checkTriggerxAOD.m

Definition at line 233 of file checkTriggerxAOD.py.

◆ m1

checkTriggerxAOD.m1

Definition at line 294 of file checkTriggerxAOD.py.

◆ m2

checkTriggerxAOD.m2

Definition at line 295 of file checkTriggerxAOD.py.

◆ m3

checkTriggerxAOD.m3

Definition at line 296 of file checkTriggerxAOD.py.

◆ memSize

checkTriggerxAOD.memSize

Definition at line 281 of file checkTriggerxAOD.py.

◆ mtlp

checkTriggerxAOD.mtlp

Definition at line 286 of file checkTriggerxAOD.py.

◆ n

checkTriggerxAOD.n

Definition at line 321 of file checkTriggerxAOD.py.

◆ nameType

checkTriggerxAOD.nameType

Definition at line 298 of file checkTriggerxAOD.py.

◆ nt

checkTriggerxAOD.nt

Definition at line 320 of file checkTriggerxAOD.py.

◆ options

checkTriggerxAOD.options

Definition at line 171 of file checkTriggerxAOD.py.

◆ orderedData

checkTriggerxAOD.orderedData

Definition at line 267 of file checkTriggerxAOD.py.

◆ p

checkTriggerxAOD.p

Definition at line 155 of file checkTriggerxAOD.py.

◆ parser

checkTriggerxAOD.parser

Definition at line 154 of file checkTriggerxAOD.py.

◆ poolFile

checkTriggerxAOD.poolFile

Definition at line 219 of file checkTriggerxAOD.py.

◆ sorter

checkTriggerxAOD.sorter

Definition at line 271 of file checkTriggerxAOD.py.

◆ summedData

checkTriggerxAOD.summedData

Definition at line 223 of file checkTriggerxAOD.py.

◆ tfile

checkTriggerxAOD.tfile

Definition at line 277 of file checkTriggerxAOD.py.

◆ ttree

checkTriggerxAOD.ttree

Definition at line 278 of file checkTriggerxAOD.py.

◆ usage

checkTriggerxAOD.usage

Definition at line 154 of file checkTriggerxAOD.py.

◆ writer

checkTriggerxAOD.writer

Definition at line 437 of file checkTriggerxAOD.py.

checkTriggerxAOD.printAuxDynVars
def printAuxDynVars(dynvars)
Definition: checkTriggerxAOD.py:141
vtune_athena.format
format
Definition: vtune_athena.py:14
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
checkTriggerxAOD.sortTrigData
def sortTrigData(orderedData, diskTotal)
Definition: checkTriggerxAOD.py:102
checkTriggerxAOD.compareCategoryData
def compareCategoryData(trigData, recoData)
Definition: checkTriggerxAOD.py:35
checkTriggerxAOD.printCategoryData
def printCategoryData(categData, diskTotal)
Definition: checkTriggerxAOD.py:62
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
checkTriggerxAOD.categorizeData
def categorizeData(categData)
Definition: checkTriggerxAOD.py:25
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567