Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
HeppyCore
python
framework
eventstfile_test.py
Go to the documentation of this file.
1
import
unittest
2
3
from
eventstfile
import
Events
4
from
PhysicsTools.HeppyCore.utils.testtree
import
create_tree
5
6
testfname =
'test_tree.root'
7
8
class
EventsTFileTestCase
(unittest.TestCase):
9
10
def
test
(self):
11
events =
Events
(testfname,
'test_tree'
)
12
event = events.to(2)
13
for
iev, ev
in
enumerate(events):
14
self.assertEqual(iev, ev.var1)
15
16
if
__name__ ==
'__main__'
:
17
create_tree
(testfname)
18
unittest.main()
testtree.create_tree
def create_tree(filename="test_tree.root")
Definition:
testtree.py:5
eventstfile_test.EventsTFileTestCase
Definition:
eventstfile_test.py:8
eventstfile.Events
Definition:
eventstfile.py:6
eventstfile_test.EventsTFileTestCase.test
def test(self)
Definition:
eventstfile_test.py:10
Generated for CMSSW Reference Manual by
1.8.11