Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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()
eventstfile_test.EventsTFileTestCase.test
def test
Definition:
eventstfile_test.py:11
eventstfile_test.EventsTFileTestCase
Definition:
eventstfile_test.py:9
testtree.create_tree
def create_tree
Definition:
testtree.py:6
Generated for CMSSW Reference Manual by
1.8.5