# Generate some data, fill the static histograms and NTuple. for i in range(10000): x = gauss( mean, sigma ) sthist.addValues ( (x, ) ) ntuple.addRow ( (x, ) ) if i < 1000 : sthists.addValues ( (x, ) ) # only fill with first 1000 # Print some statistics from static histogram # Could do same for dynamic datarep = sthist.getDataRep() print "Histogram :" print " Title : " + sthist.getTitle() print " Entries : %i" % sthist.numberOfEntries() print " Mean = %f" % datarep.getMean ( 'x' ) print " Rms = %f" % datarep.getRMS ( 'x' ) # Print the average X value on the display canvas.selectDisplay ( sthist) canvas.addTextRep ( sthist, 'averagex' ) canvas.selectDisplay ( dyhist) canvas.addTextRep ( dyhist, 'averagex' ) # Get the contents of the bins as a DataArray high = sthist.createDataArray() low = sthists.createDataArray () # Take difference with high statistics one scaled down, and a column