CMS 3D CMS Logo

Functions
testtree Namespace Reference

Functions

def create_tree (filename="test_tree.root")
 

Function Documentation

def testtree.create_tree (   filename = "test_tree.root")

Definition at line 5 of file testtree.py.

References edm.print().

Referenced by eventstfile_test.EventsTFileTestCase.test(), and chain_test.ChainTestCase.test_get().

5 def create_tree(filename="test_tree.root"):
6  outfile = TFile(filename, 'recreate')
7  tree = Tree('test_tree', 'A test tree')
8  tree.var('var1')
9  for i in range(100):
10  tree.fill('var1', i)
11  tree.tree.Fill()
12  print('creating a tree', tree.tree.GetName(),\
13  tree.tree.GetEntries(), 'entries in',\
14  outfile.GetName())
15  outfile.Write()
16 
def create_tree(filename="test_tree.root")
Definition: testtree.py:5
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65