ATLAS Offline Software
Loading...
Searching...
No Matches
Rtt_histogram.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2import xml.etree.ElementTree as ET
3import sys
4import string
5import ROOT
6
7theApp.EvtMax = 0
8print (sys.version)
9#tree = ET.parse("tesr.xml")
10listhis = [] #list for combine perf his
11listhisIndetG = [] #list for indet global his
12print ("############# reading combine performance ")
13tree = ET.parse("/afs/cern.ch/user/y/yunju/working/yunju/public/Rtt_ohpxml/CombPerf.xml")
14#tree = ET.parse("ohp.xml")
15root = tree.getroot()
16for neighbor in root.getiterator('histos'):
17 #print (neighbor.attrib)
18 #print (neighbor.text)
19 listpaths=neighbor.text
20 print ("info: %s %s" % (neighbor,listpaths))
21 n1 = neighbor.text.split(',')
22 print ("list:%s" %n1)
23 for stringth in n1:
24 print (stringth.find("Global_ISSERVER"))
25 if stringth.find("Global_ISSERVER")!=-1:
26 finalpath=string.replace(stringth,"${Global_ISSERVER}/${Global_PROVIDER}","run_302347")
27 print (stringth.find("MET"))
28 if stringth.find("MET")!=-1:
29 finalpath=string.replace(finalpath,"run_302347","run_302347/lb_432")
30 finalpath2=string.replace(finalpath," ", "")
31 finalpath2=string.replace(finalpath2,"\t","")#remove tab
32 finalpath3=string.replace(finalpath2,"\n","")
33 listhis.append(finalpath3)
34print (listhis )
35print ("############# reading indetglobal ")
36treeindetglobal = ET.parse("/afs/cern.ch/user/y/yunju/working/yunju/public/Rtt_ohpxml/globaldq-indet_20_11_0_25_1.xml")
37#treeindetglobal = ET.parse("ohp.xml")
38rootindetglobal = treeindetglobal.getroot()
39for neighbor in rootindetglobal.getiterator('histos'):
40 listpaths=neighbor.text
41 print ("info: %s %s" % (neighbor,listpaths))
42 n1 = neighbor.text.split(',')
43 print ("list:%s" %n1)
44 for stringth in n1:
45 print (stringth.find("Global_ISSERVER"))
46 if stringth.find("Histogramming-Global-iss/GM-Gatherer-MIG:GlobalMonitoringSegment")!=-1:
47 finalpath=string.replace(stringth,"Histogramming-Global-iss/GM-Gatherer-MIG:GlobalMonitoringSegment","run_302347")
48 print (stringth.find("${ID_AL_BASE_PATH}"))
49 if stringth.find("${ID_AL_BASE_PATH}")!=-1:
50 finalpath=string.replace(finalpath,"${ID_AL_BASE_PATH}","ExtendedTracks_NoTriggerSelection") #defined in idgl-options.xml
51 print ("info with empty: %s" % ([finalpath]))
52 finalpath2=string.replace(finalpath,"\t","")#remove tab
53 finalpath2=string.replace(finalpath2," ","")#remove space
54 print ("info with out empty: %s" % (finalpath2))
55 finalpath3=string.replace(finalpath2,"\n","")
56 listhisIndetG.append(finalpath3)
57print (listhisIndetG )
58f = ROOT.TFile("Monitor.root")
59print ("############# checking combine perf ")
60for ith in listhis:
61 print ("get his %s" %ith)
62 histCount = f.Get(ith)
63 if histCount :
64 histCount.Draw()
65 else:
66 print ("missing combined perf %s " %ith )
67
68
69print ("############# checking indetglobal ")
70for ith in listhisIndetG:
71 print ("get his %s" %ith)
72 histCount = f.Get(ith)
73 if histCount :
74 histCount.Draw()
75 else:
76 print ("missing indet global %s " %ith )
77