|
def | __init__ (self, jhm) |
|
def | buildKnownTools (self, compactSpecification) |
|
def | add1DHistoTool (self, name, binning, attributeInfo, **otherArgs) |
|
def | add2DHistoTool (self, name, binning=None, attributeInfo1=None, attributeInfo2=None, **otherArgs) |
|
def | create2DHistoToolFrom1D (self, name, **otherArgs) |
|
def | addSelector (self, selectString, name="", typ="float") |
|
Definition at line 8 of file JetAttributeHistoManager.py.
◆ __init__()
def JetAttributeHistoManager.AttributeHistoManager.__init__ |
( |
|
self, |
|
|
|
jhm |
|
) |
| |
◆ add1DHistoTool()
def JetAttributeHistoManager.AttributeHistoManager.add1DHistoTool |
( |
|
self, |
|
|
|
name, |
|
|
|
binning, |
|
|
|
attributeInfo, |
|
|
** |
otherArgs |
|
) |
| |
Definition at line 23 of file JetAttributeHistoManager.py.
23 def add1DHistoTool(self, name, binning, attributeInfo,**otherArgs):
25 if self.jhm.hasTool(name):
26 print (
"ERROR JetAttributeHisto with name ", name ,
" already exists. Can't add a new one")
30 return self.jhm.addTool( tool)
◆ add2DHistoTool()
def JetAttributeHistoManager.AttributeHistoManager.add2DHistoTool |
( |
|
self, |
|
|
|
name, |
|
|
|
binning = None , |
|
|
|
attributeInfo1 = None , |
|
|
|
attributeInfo2 = None , |
|
|
** |
otherArgs |
|
) |
| |
Definition at line 34 of file JetAttributeHistoManager.py.
34 def add2DHistoTool(self, name, binning=None, attributeInfo1=None, attributeInfo2=None,**otherArgs):
35 if self.jhm.hasTool(name):
36 print (
"ERROR JetAttributeHisto with name ", name ,
" already exists. Can't add a new one")
39 tool =
create2DHistoTool(name, binning, attributeInfo1, attributeInfo2, **otherArgs)
40 return self.jhm.addTool( tool )
◆ addSelector()
def JetAttributeHistoManager.AttributeHistoManager.addSelector |
( |
|
self, |
|
|
|
selectString, |
|
|
|
name = "" , |
|
|
|
typ = "float" |
|
) |
| |
Definition at line 69 of file JetAttributeHistoManager.py.
69 def addSelector(self, selectString, name="", typ="float"):
70 if name !=
"" and self.jhm.hasTool(name) :
71 print (
"ERROR JetSelectorAttributeRunII with name ", name ,
" already exists. Can't add a new one")
73 if self.jhm.hasTool(selectString) :
74 print (
"ERROR JetSelectorAttributeRunII ", selectString ,
" already exists. Can't add a new one")
78 from AthenaCommon.AppMgr
import ToolSvc
81 return self.jhm.addTool( tool , alias=selectString)
◆ buildKnownTools()
def JetAttributeHistoManager.AttributeHistoManager.buildKnownTools |
( |
|
self, |
|
|
|
compactSpecification |
|
) |
| |
Definition at line 13 of file JetAttributeHistoManager.py.
13 def buildKnownTools(self, compactSpecification):
14 for name, spec
in compactSpecification.items():
16 binning, attributeInfo = spec
17 self.add1DHistoTool(name, binning, attributeInfo)
19 binning, attributeInfo1, attributeInfo2 = spec
20 doTProfile = name.beginswith(
"Prof_")
21 self.add2DHistoTool(name, binning, attributeInfo1, attributeInfo2, DoTProfile=doTProfile)
◆ create2DHistoToolFrom1D()
def JetAttributeHistoManager.AttributeHistoManager.create2DHistoToolFrom1D |
( |
|
self, |
|
|
|
name, |
|
|
** |
otherArgs |
|
) |
| |
Definition at line 43 of file JetAttributeHistoManager.py.
43 def create2DHistoToolFrom1D(self, name, **otherArgs):
44 tool = self.jhm.
tool(name, build2Difmissing=
False)
45 if tool
is not None :
return tool
49 n1, n2 = name.split(
':')
50 t1 = self.jhm.
tool(n1)
51 t2 = self.jhm.
tool(n2)
54 missing = n1
if t1
is None else n2
55 print (
"ERROR : can't build 2D histo", name,
" : ",missing,
" is unknonw")
59 def rebuildSuffix(index):
60 if index==-1:
return ''
61 return '['+
str(index)+
']'
62 attInfo1 = (t1.AttributeNames[0]+rebuildSuffix(t1.SelectIndex), t1.AttributeTypes[0])
63 attInfo2 = (t2.AttributeNames[0]+rebuildSuffix(t2.SelectIndex), t2.AttributeTypes[0])
67 return self.jhm.addTool( tool)
◆ jhm
JetAttributeHistoManager.AttributeHistoManager.jhm |
The documentation for this class was generated from the following file: