3 from JetMonitoring.JetMonitoringConf
import HistoDefinitionTool
5 def createHistoDefTool( name, title=None,nbinsx=10, xlow=10.0, xup=1.0, nbinsy=10, ylow=0.0, yup=1.0, hname=None):
6 """Short cut to return a HistoDefinitionTool from a compact list of arguments"""
7 if title
is None : title = name
8 if hname
is None : hname = name
10 return HistoDefinitionTool(name,hname=hname, title=title,nbinsx=nbinsx, xlow=xlow, xup=xup, nbinsy=nbinsy, ylow=ylow, yup=yup)
13 """Merge 2 histo definitions (assumming 1D definition) into a 2D histo definiton
15 - HistoDefinitionTool instances
16 - tuple in the form ('title', nbins, xlow, xup)
20 if isinstance(hdef,HistoDefinitionTool):
21 return (hdef.title, hdef.nbinsx, hdef.xlow, hdef.xup)
23 hdef1 = makeTuple(hdef1)
24 hdef2 = makeTuple(hdef2)
26 topT1, xT1, n = hdef1[0].
split(
';')
27 topT2, xT2, n = hdef2[0].
split(
';')
28 title =
';'.
join([topT2+
' vs '+topT1 , xT1, xT2 ])
30 hdef = (title, ) + hdef1[1:] + hdef2[1:]