CMS 3D CMS Logo

Functions
testtree Namespace Reference

Functions

def create_tree (filename="test_tree.root")
 

Function Documentation

◆ create_tree()

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

Definition at line 6 of file testtree.py.

References print(), and isotrackApplyRegressor.range.

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

6 def create_tree(filename="test_tree.root"):
7  outfile = TFile(filename, 'recreate')
8  tree = Tree('test_tree', 'A test tree')
9  tree.var('var1')
10  for i in range(100):
11  tree.fill('var1', i)
12  tree.tree.Fill()
13  print('creating a tree', tree.tree.GetName(),\
14  tree.tree.GetEntries(), 'entries in',\
15  outfile.GetName())
16  outfile.Write()
17 
def create_tree(filename="test_tree.root")
Definition: testtree.py:6
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47