#!/usr/bin/env python

res = '''
1738:  Peak resident set size usage (VmHWM): 4612.53 MB
1738:  Peak resident set size usage (VmHWM): 4618.63 MB
1738:  Peak resident set size usage (VmHWM): 4140.77 MB
1738:  Peak resident set size usage (VmHWM): 4528.42 MB
1738:  Peak resident set size usage (VmHWM): 4907.39 MB
1738:  Peak resident set size usage (VmHWM): 4668.15 MB
1738:  Peak resident set size usage (VmHWM): 3985.01 MB
1738:  Peak resident set size usage (VmHWM): 4058.95 MB
1738:  Peak resident set size usage (VmHWM): 3995.81 MB
1738:  Peak resident set size usage (VmHWM): 4808.03 MB
1738:  Peak resident set size usage (VmHWM): 4496.43 MB
1738:  Peak resident set size usage (VmHWM): 4569.67 MB
1738:  Peak resident set size usage (VmHWM): 4954.35 MB
1738:  Peak resident set size usage (VmHWM): 4566.76 MB
1738:  Peak resident set size usage (VmHWM): 4646 MB
1738:  Peak resident set size usage (VmHWM): 4304.9 MB
1738:  Peak resident set size usage (VmHWM): 4489.72 MB
1738:  Peak resident set size usage (VmHWM): 5133.25 MB
1738:  Peak resident set size usage (VmHWM): 4664.75 MB
1738:  Peak resident set size usage (VmHWM): 4646.01 MB
1738:  Peak resident set size usage (VmHWM): 4308.73 MB
1738:  Peak resident set size usage (VmHWM): 3827.55 MB
1738:  Peak resident set size usage (VmHWM): 4819.07 MB
1738:  Peak resident set size usage (VmHWM): 4700.09 MB
1738:  Peak resident set size usage (VmHWM): 4096.57 MB
1738:  Peak resident set size usage (VmHWM): 4465.98 MB
1738:  Peak resident set size usage (VmHWM): 5210.28 MB
1738:  Peak resident set size usage (VmHWM): 4512.38 MB
1738:  Peak resident set size usage (VmHWM): 4553.27 MB
1738:  Peak resident set size usage (VmHWM): 4755.39 MB
1738:  Peak resident set size usage (VmHWM): 4737.02 MB
1738:  Peak resident set size usage (VmHWM): 4589.22 MB
1738:  Peak resident set size usage (VmHWM): 4105.11 MB
1738:  Peak resident set size usage (VmHWM): 4517.96 MB
1738:  Peak resident set size usage (VmHWM): 4349.21 MB
1738:  Peak resident set size usage (VmHWM): 4618.76 MB
1738:  Peak resident set size usage (VmHWM): 4503.61 MB
1738:  Peak resident set size usage (VmHWM): 4679.75 MB
1738:  Peak resident set size usage (VmHWM): 4660.59 MB
1738:  Peak resident set size usage (VmHWM): 4347.77 MB
1738:  Peak resident set size usage (VmHWM): 5065.09 MB
1738:  Peak resident set size usage (VmHWM): 4848.31 MB
1738:  Peak resident set size usage (VmHWM): 4148.12 MB
1738:  Peak resident set size usage (VmHWM): 4976.42 MB
1738:  Peak resident set size usage (VmHWM): 5358.99 MB
1738:  Peak resident set size usage (VmHWM): 4254.98 MB
1738:  Peak resident set size usage (VmHWM): 4355.74 MB
1738:  Peak resident set size usage (VmHWM): 4936.56 MB
1738:  Peak resident set size usage (VmHWM): 5054.5 MB
1738:  Peak resident set size usage (VmHWM): 4430.43 MB
1738:  Peak resident set size usage (VmHWM): 5292.83 MB
1738:  Peak resident set size usage (VmHWM): 4703.01 MB
1738:  Peak resident set size usage (VmHWM): 4653.18 MB
1738:  Peak resident set size usage (VmHWM): 4708.34 MB
1738:  Peak resident set size usage (VmHWM): 4703 MB
1738:  Peak resident set size usage (VmHWM): 4351.76 MB
1738:  Peak resident set size usage (VmHWM): 4947.78 MB
1738:  Peak resident set size usage (VmHWM): 4597.14 MB
1738:  Peak resident set size usage (VmHWM): 4931.5 MB
1738:  Peak resident set size usage (VmHWM): 4898.73 MB
1738:  Peak resident set size usage (VmHWM): 4118.77 MB
1738:  Peak resident set size usage (VmHWM): 4433.42 MB
1738:  Peak resident set size usage (VmHWM): 6200.61 MB
1738:  Peak resident set size usage (VmHWM): 4395.67 MB
1738:  Peak resident set size usage (VmHWM): 4357.92 MB
1738:  Peak resident set size usage (VmHWM): 4250.46 MB
1738:  Peak resident set size usage (VmHWM): 5148.9 MB
1738:  Peak resident set size usage (VmHWM): 5035.5 MB
1738:  Peak resident set size usage (VmHWM): 4911.9 MB
1738:  Peak resident set size usage (VmHWM): 4230.43 MB
1738:  Peak resident set size usage (VmHWM): 4463.75 MB
1738:  Peak resident set size usage (VmHWM): 4295.08 MB
1738:  Peak resident set size usage (VmHWM): 4176.8 MB
1738:  Peak resident set size usage (VmHWM): 4795.79 MB
1738:  Peak resident set size usage (VmHWM): 4981.26 MB
1738:  Peak resident set size usage (VmHWM): 4766.11 MB
1738:  Peak resident set size usage (VmHWM): 4428.05 MB
1738:  Peak resident set size usage (VmHWM): 4553.2 MB
1738:  Peak resident set size usage (VmHWM): 4601.9 MB
1738:  Peak resident set size usage (VmHWM): 4041.13 MB
1738:  Peak resident set size usage (VmHWM): 4481.74 MB
1738:  Peak resident set size usage (VmHWM): 4941.53 MB
1738:  Peak resident set size usage (VmHWM): 4962.78 MB
1738:  Peak resident set size usage (VmHWM): 5224.84 MB
1738:  Peak resident set size usage (VmHWM): 5518.3 MB
1738:  Peak resident set size usage (VmHWM): 4822.8 MB
1738:  Peak resident set size usage (VmHWM): 4760.39 MB
1738:  Peak resident set size usage (VmHWM): 5128.74 MB
1738:  Peak resident set size usage (VmHWM): 4372.8 MB
1738:  Peak resident set size usage (VmHWM): 4696.3 MB
1738:  Peak resident set size usage (VmHWM): 4947.19 MB
1738:  Peak resident set size usage (VmHWM): 4861.87 MB
1738:  Peak resident set size usage (VmHWM): 4239.31 MB
1738:  Peak resident set size usage (VmHWM): 5180.64 MB
1738:  Peak resident set size usage (VmHWM): 4601.61 MB
1738:  Peak resident set size usage (VmHWM): 4137.98 MB
1738:  Peak resident set size usage (VmHWM): 4364.28 MB
1738:  Peak resident set size usage (VmHWM): 4445.8 MB
1738:  Peak resident set size usage (VmHWM): 5134.52 MB
1738:  Peak resident set size usage (VmHWM): 4702.86 MB
1738:  Peak resident set size usage (VmHWM): 4374.82 MB
1738:  Peak resident set size usage (VmHWM): 4983.99 MB
1738:  Peak resident set size usage (VmHWM): 4882.46 MB
1738:  Peak resident set size usage (VmHWM): 4400.12 MB
1738:  Peak resident set size usage (VmHWM): 4537.5 MB
1738:  Peak resident set size usage (VmHWM): 5174.72 MB
1738:  Peak resident set size usage (VmHWM): 3946.27 MB
1738:  Peak resident set size usage (VmHWM): 5600.96 MB
1738:  Peak resident set size usage (VmHWM): 4882 MB
1738:  Peak resident set size usage (VmHWM): 4319.33 MB
1738:  Peak resident set size usage (VmHWM): 4661.51 MB
1738:  Peak resident set size usage (VmHWM): 4641.23 MB
1738:  Peak resident set size usage (VmHWM): 4042.26 MB
1738:  Peak resident set size usage (VmHWM): 4783.39 MB
1738:  Peak resident set size usage (VmHWM): 5156.83 MB
1738:  Peak resident set size usage (VmHWM): 4934.51 MB
1738:  Peak resident set size usage (VmHWM): 5093.63 MB
1738:  Peak resident set size usage (VmHWM): 4587.88 MB
1738:  Peak resident set size usage (VmHWM): 4912.11 MB
1738:  Peak resident set size usage (VmHWM): 4830.85 MB
1738:  Peak resident set size usage (VmHWM): 4532.65 MB
1738:  Peak resident set size usage (VmHWM): 4601.36 MB
1738:  Peak resident set size usage (VmHWM): 4727.26 MB
1738:  Peak resident set size usage (VmHWM): 5516.97 MB
1738:  Peak resident set size usage (VmHWM): 4842.72 MB
1738:  Peak resident set size usage (VmHWM): 4626.86 MB
1738:  Peak resident set size usage (VmHWM): 4222.44 MB
1738:  Peak resident set size usage (VmHWM): 5273.12 MB
1738:  Peak resident set size usage (VmHWM): 4816.18 MB
1738:  Peak resident set size usage (VmHWM): 4020.11 MB
1738:  Peak resident set size usage (VmHWM): 4266.22 MB
1738:  Peak resident set size usage (VmHWM): 4487.3 MB
1738:  Peak resident set size usage (VmHWM): 5268.71 MB
1738:  Peak resident set size usage (VmHWM): 4361.65 MB
1738:  Peak resident set size usage (VmHWM): 4478.34 MB
1738:  Peak resident set size usage (VmHWM): 4559.08 MB
1738:  Peak resident set size usage (VmHWM): 4017.91 MB
1738:  Peak resident set size usage (VmHWM): 4283.21 MB
1738:  Peak resident set size usage (VmHWM): 4588.17 MB
1738:  Peak resident set size usage (VmHWM): 4613.83 MB
1738:  Peak resident set size usage (VmHWM): 5222.31 MB
1738:  Peak resident set size usage (VmHWM): 4258.31 MB
1738:  Peak resident set size usage (VmHWM): 4718.12 MB
1738:  Peak resident set size usage (VmHWM): 6080.43 MB
1738:  Peak resident set size usage (VmHWM): 5967.7 MB
1738:  Peak resident set size usage (VmHWM): 6050.85 MB
1738:  Peak resident set size usage (VmHWM): 4361.76 MB
1738:  Peak resident set size usage (VmHWM): 5223.92 MB
1738:  Peak resident set size usage (VmHWM): 5277.29 MB
1738:  Peak resident set size usage (VmHWM): 5032.26 MB
1738:  Peak resident set size usage (VmHWM): 5167.76 MB
1738:  Peak resident set size usage (VmHWM): 5064.63 MB
1738:  Peak resident set size usage (VmHWM): 4886.04 MB
1738:  Peak resident set size usage (VmHWM): 4692.34 MB
1738:  Peak resident set size usage (VmHWM): 4419.18 MB
1738:  Peak resident set size usage (VmHWM): 4632.6 MB
1738:  Peak resident set size usage (VmHWM): 4430.48 MB
1738:  Peak resident set size usage (VmHWM): 4243.51 MB
1738:  Peak resident set size usage (VmHWM): 5500.07 MB
1738:  Peak resident set size usage (VmHWM): 5083.69 MB
1738:  Peak resident set size usage (VmHWM): 4793.6 MB
1738:  Peak resident set size usage (VmHWM): 4175.24 MB
1738:  Peak resident set size usage (VmHWM): 4499.8 MB
'''

# print(res)
mem = []
lines = res.splitlines()
for line in lines:
  line = line.strip('\n')
  if len(line)>0:
    content = line.split(' ')
    val = float(content[len(content)-2])
    # print(val)
    mem.append(val)


import ROOT as rt
h1 = rt.TH1F("h1","Peak resident set size usage (VmHWM)", 50,3000,6000)
h1.GetXaxis().SetTitle("MB")
h1.GetYaxis().SetTitle("per batch (10 evts)")

for val in mem:
  h1.Fill(val)

h1.Draw()
