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