Skip to content

Commit a22fa24

Browse files
keep a link from PyhfData to globalInfo, facilitates debugging
1 parent f926b85 commit a22fa24

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

smodels/statistics/pyhfInterface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,13 @@ class PyhfData:
110110
:ivar inputJsons: list of json instances
111111
:ivar jsonFiles: optional list of json files
112112
:ivar nWS: number of workspaces = number of json files
113+
:ivar globalInfo: None, or link to globalInfo (for debugging)
113114
"""
114115

115116
def __init__( self, nsignals : Dict[str, Dict], inputJsons, jsonFiles=None,
116-
includeCRs=False, signalUncertainty=None):
117+
includeCRs=False, signalUncertainty=None,
118+
globalInfo = None ):
119+
self.globalInfo = globalInfo
117120
self.nsignals = nsignals
118121
self.getTotalYield()
119122
self.inputJsons = inputJsons

smodels/statistics/statsTools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def getComputerPyhf(self ):
281281
signalUncertainty = globalInfo.signalUncertainty
282282

283283
# Loading the jsonFiles, unless we already have them (because we pickled)
284-
data = PyhfData(nsignals, jsons, globalInfo.jsonFiles, includeCRs, signalUncertainty)
284+
data = PyhfData(nsignals, jsons, globalInfo.jsonFiles, includeCRs, signalUncertainty, globalInfo )
285285
if data.errorFlag:
286286
return None
287287
self.upperLimitComputer = PyhfUpperLimitComputer(data, lumi=self.dataObject.getLumi() )

0 commit comments

Comments
 (0)