43 for name
in event.widget.selection()}
44 histograms = {name:h
for name,h
in objects.items()
45 if isinstance(h, ROOT.TH1)}
48 for name,obj
in sorted(histograms.items()):
49 if isinstance(obj, ROOT.GH2Base):
52 self.
main._draw_single(obj,color,len(histograms))
53 if self.
main.plotlocation.get()==
'Overlay':
98 def Insert(self,obj,parent='',objname=None,icon=None):
103 objname = obj.GetName()
105 if (isinstance(obj, ROOT.TKey)
and
106 not issubclass(getattr(ROOT, obj.GetClassName()), ROOT.TH1)
and
107 not issubclass(getattr(ROOT, obj.GetClassName()), ROOT.TChannel)):
110 if (isinstance(obj, ROOT.TTree)
or
111 isinstance(obj, ROOT.TCutG)
or
112 isinstance(obj, ROOT.TProcessID)):
116 name = parent +
'/' + objname
122 if isinstance(obj, ROOT.TList):
124 elif isinstance(obj, ROOT.TDirectory):
125 iterable = obj.GetListOfKeys()
127 iterable = obj.GetList()
128 elif isinstance(obj, ROOT.GH2Base):
129 iterable = itertools.chain(obj.GetProjections(),
130 obj.GetSummaryProjections())
134 if iterable
is not None:
139 objname=None, icon=None):
140 is_histogram_key = (isinstance(obj, ROOT.TKey)
and
141 issubclass(getattr(ROOT, obj.GetClassName()), ROOT.TH1))
142 is_histogram = isinstance(obj, ROOT.TH1)
145 objname = obj.GetName()
147 if (is_histogram_key
and
159 if name
not in self.
treeview.get_children(parent):
163 icon = self.
main._PickIcon(obj)
164 self.
treeview.insert(parent,
'end', name, text=objname,image=icon)