616 """Return a HistoSpec from alias :
617 * if alias is a string look up in JetStandardHistoSpecs.knownHistos
618 --> if found, return a full clone (so client can modify it safely)
619 --> if not found and contain a ';' build a HistoSpec for a 2D histograms
620 * if alias is a ToolSpec, returns it directly
622 if isinstance(alias, ToolSpec):
624 elif isinstance(alias,str):
625 from JetMonitoring.JetStandardHistoSpecs
import knownHistos
627 c = knownHistos.get(alias,
None)
631 return c.clone(c.name)
633 raise JetMonSpecException(
" Unknown Histo specification : '{}' ".
format(alias))
637 aliases = alias.split(
';')
638 aliasX, aliasY = aliases[0], aliases[1]
639 cX = knownHistos.get(aliasX,
None)
640 cY = knownHistos.get(aliasY,
None)
641 if len(aliases) == 2:
643 print(
"ERROR unknown Histo Filler specification ", cX
if cX
is None else cY)
646 return cX.to2DSpec(cY)
649 cZ = knownHistos.get(aliasZ,
None)
655 cZ = HistoSpec(vZ.Name, (10,0,1) , title=vZ.Name+
';'+vZ.Name+
';', xvar=vZ )
656 return cX.to2DSpec(cY, zspec=cZ)
660 print(
'ERROR can not instantiate a tool from ', alias)