ATLAS Offline Software
Loading...
Searching...
No Matches
TPyEvent.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2#
3# Module holding the TPyEvent Python class
4#
5
6# Pull in ROOT:
7import ROOT
8
9
17class TPyEvent( ROOT.xAOD.TPyEvent ):
18
19
20 def __init__( self, mode = ROOT.xAOD.TEvent.kClassAccess ):
21
22 # Forward the call to the base class's constructor:
23 ROOT.xAOD.TPyEvent.__init__( self, mode )
24 return
25
26
27 def __getitem__( self, key ):
28 return self.pyRetrieve( key )
29
30
44 def contains( self, key, type ):
45 # Determine the class name:
46 clname = type.__name__
47 if hasattr( type, "__cpp_name__" ):
48 clname = type.__cpp_name__
49 pass
50 # Call the parent class's function:
51 return super( TPyEvent, self ).pyContains( key, clname )
52
53
68 def transientContains( self, key, type ):
69 # Determine the class name:
70 clname = type.__name__
71 if hasattr( type, "__cpp_name__" ):
72 clname = type.__cpp_name__
73 pass
74 # Call the parent class's function:
75 return super( TPyEvent,
76 self ).pyTransientContains( key, clname )
77
78
93 def record( self, obj, key ):
94 # Determine the class name:
95 clname = obj.__class__.__name__
96 if hasattr( obj.__class__, "__cpp_name__" ):
97 clname = obj.__class__.__cpp_name__
98 pass
99 # Call the parent class's function:
100 return super( TPyEvent, self ).pyRecord( obj, key, clname )
A Python wrapper around xAOD.TPyEvent.
Definition TPyEvent.py:17
__init__(self, mode=ROOT.xAOD.TEvent.kClassAccess)
Constructor for the class.
Definition TPyEvent.py:20
record(self, obj, key)
Convenient version of the base class's record function.
Definition TPyEvent.py:93
contains(self, key, type)
Convenient version of the base class's contains function.
Definition TPyEvent.py:44
transientContains(self, key, type)
Convenient version of the base class's transientContains function.
Definition TPyEvent.py:68
__getitem__(self, key)
Convenient shorthand for retrieving an object.
Definition TPyEvent.py:27