CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
testtree Namespace Reference

Functions

def create_tree
 

Function Documentation

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

Definition at line 6 of file testtree.py.

References print(), and sistrip::SpyUtilities.range().

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

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