def testReadHist(self):
     i = ti.Input(input_file='test.root',
               hist='test_hist',
               )
     h = i.read()
     h_test = create_test_hist()
     self.assertEqual(h.nbins(), h_test.nbins())
 def setUp(self):
     f = File('test.root', 'recreate')
     tree = create_test_tree()
     h = create_test_hist()
     h.write()
     tree.write()
     f.write()
     f.Close()
 def setUp(self):
     f = File("test.root", "recreate")
     f.mkdir("TTbar_plus_X_analysis/EPlusJets/Ref selection", recurse=True)
     f.cd("TTbar_plus_X_analysis/EPlusJets/Ref selection")
     tree = create_test_tree()
     h = create_test_hist()
     h.write()
     tree.write()
     f.write()
     f.Close()
 def setUp(self):
     f = File('test.root', 'recreate')
     f.mkdir('TTbar_plus_X_analysis/EPlusJets/Ref selection', recurse=True)
     f.cd('TTbar_plus_X_analysis/EPlusJets/Ref selection')
     tree = create_test_tree()
     h = create_test_hist()
     h.write()
     tree.write()
     f.write()
     f.Close()