Exemplo n.º 1
0
 def __getattr__(cls, name):  # for non-templated classes in std
     try:
         klass = _backend.CreateScopeProxy(name, cls)
     except TypeError as e:
         raise AttributeError(str(e))
     setattr(cls, name, klass)
     return klass
Exemplo n.º 2
0
        class std(with_metaclass(_stdmeta, object)):
            stlclasses = ( 'complex', 'pair', \
               'deque', 'list', 'queue', 'stack', 'vector', 'map', 'multimap', 'set', 'multiset' )

            for name in stlclasses:
                locals()[name] = Template('std::%s' % name)

            string = _backend.CreateScopeProxy('string')
Exemplo n.º 3
0
def makeClass( name ) :
   return _backend.CreateScopeProxy( name )
Exemplo n.º 4
0
 def __getattr__( cls, name ):   # for non-templated classes in std
    klass = _backend.CreateScopeProxy( name, cls )
    setattr( cls, name, klass )
    return klass
Exemplo n.º 5
0
#####################################################
### Definition of the string conversion methods   ###
#####################################################


def _Event__str__(self):
    theString = "Event number %i\n" % self.Number
    theString += "Read in %f and processed in %f.\n" % (self.ReadTime,
                                                        self.ProcTime)
    return theString


if hasattr(_root, "MakeRootClass"):
    _root.MakeRootClass("Event").__str__ = _Event__str__
else:
    _root.CreateScopeProxy("Event").__str__ = _Event__str__


def _LHCOEvent__str__(self):
    theString = "Trigger word: %b\n" % self.Trigger
    return theString


if hasattr(_root, "MakeRootClass"):
    _root.MakeRootClass("LHCOEvent").__str__ = _LHCOEvent__str__
else:
    _root.CreateScopeProxy("LHCOEvent").__str__ = _LHCOEvent__str__


def _LHEFEvent__str__(self):
    hepmcstr = "Process ID: %i\n" % self.ProcessID