old_contents: from ROOT import TFile
  
  f = TFile("test_data/events.root")
  t = f.Get("events")
  n = t.GetEntries()
  print "Number of events = " + str(n)
  
  for i in xrange(n):
      t.GetEntry(i)
      n2 = t.nPart
      print "Number of particles = " + str(n2)
new_contents: from ROOT import TFile
  
  file_events = TFile("test_data/events.root")
  tree_events = file_events.Get("events")
  n_events = tree_events.GetEntries()
  print "Number of events = " + str(n_events)
  
  for i_event in xrange(n_events):
      tree_events.GetEntry(i_event)
      n_particles = tree_events.nPart
      print "Number of particles = " + str(n_particles)
      
subject: improve variable names