Example #1
0
 def __init__(self, desc):
     from histbook import Hist
     # hist_descriptor is what is produced by HBHistogramCompiler.descriptor()
     self.H = Hist.fromjson(desc["historgam"])
     self.Mapping = desc["mapping"]              # maps historgam input name to stream name
     self.Constants = desc["constants"]
     self.Inputs = set(self.Mapping.keys())
     self.T = None
Example #2
0
 def add(self, dump):
     from histbook import Hist
     # dump is what is returned by HBHistogramCollector.dump
     h = Hist.fromjson(json.loads(dump))
     #print "HBHistogramAggregator.add: delta content: %s" % (h._content,)
     self.H += h