Public Member Functions | |
def | createXML |
def | GetListObjects |
def | Loop |
def | SetFilename |
def | SetTag |
def | Verbose |
Public Attributes | |
dir | |
Filename | |
tag | |
TagOption | |
Verbose | |
XML |
Definition at line 19 of file Inspector.py.
def Inspector::Inspector::createXML | ( | self, | |
value | |||
) |
Definition at line 26 of file Inspector.py.
def Inspector::Inspector::GetListObjects | ( | self | ) |
Definition at line 68 of file Inspector.py.
00069 : 00070 00071 afile = TFile(self.Filename) 00072 00073 if afile.IsZombie(): 00074 print " error trying to open file: " + self.Filename 00075 sys.exit() 00076 00077 if self.XML: 00078 00079 print ''' 00080 <cuy> 00081 ''' 00082 print ' <validation type=\"'+afile.GetName()+'\" file=\"'+self.Filename+'\" release=\"x.y.z\">' 00083 00084 self.dir = ROOT.gDirectory 00085 self.Loop() 00086 00087 if self.XML: 00088 00089 print ''' 00090 </validation> 00091 00092 </cuy> 00093 ''' 00094 00095 00096 00097 00098 00099 00100 00101 00102
def Inspector::Inspector::Loop | ( | self | ) |
Definition at line 33 of file Inspector.py.
00034 : 00035 00036 afile = TFile(self.Filename) 00037 afilename = self.Filename 00038 stripfilename = afilename 00039 00040 try: 00041 if self.TagOption: 00042 stripfilename = self.tag 00043 except: 00044 stripfilename = afilename.split('/')[len(afilename.split('/')) -1] 00045 stripfilename = stripfilename[0:(len(stripfilename)-5)] 00046 00047 alist = self.dir.GetListOfKeys() 00048 00049 for i in alist: 00050 aobj = i.ReadObj() 00051 if aobj.IsA().InheritsFrom("TDirectory"): 00052 if self.Verbose: 00053 print ' found directory: '+i.GetName() 00054 00055 if self.XML: 00056 print ' <!-- '+i.GetName()+' -->' 00057 00058 bdir = self.dir 00059 afile.GetObject(i.GetName(),bdir) 00060 blist = bdir.GetListOfKeys() 00061 for j in blist: 00062 bobj = j.ReadObj() 00063 if bobj.IsA().InheritsFrom(ROOT.TH1.Class()): 00064 if self.Verbose: 00065 print ' --> found TH1: name = '+j.GetName() + ' title = '+j.GetTitle() 00066 if self.XML: 00067 print ' <TH1 name=\"'+stripfilename+'_'+j.GetName()+'\" source=\"'+'/'+i.GetName()+'/'+j.GetName()+'\"/>'
def Inspector::Inspector::SetFilename | ( | self, | |
value | |||
) |
Definition at line 21 of file Inspector.py.
def Inspector::Inspector::SetTag | ( | self, | |
value | |||
) |
Definition at line 29 of file Inspector.py.
def Inspector::Inspector::Verbose | ( | self, | |
value | |||
) |
Definition at line 23 of file Inspector.py.
Definition at line 70 of file Inspector.py.
Definition at line 21 of file Inspector.py.
Definition at line 29 of file Inspector.py.
Definition at line 29 of file Inspector.py.
Definition at line 23 of file Inspector.py.
Definition at line 26 of file Inspector.py.