/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
PhysicsTools/Heppy/python/physicsobjects/FastObjects.py
30 строк
664 B
Giovanni
Heppy: Electron instance members must be reinitialized, since PyROOT seems to be recycling python proxies also for different objects
30 янв 2015, 13:31
30 янв 2015, 13:31
6b03172
Код
Авторство
О чём код?
import ROOT def AddPhysObj(x): x.physObj = x return x def AddPhysObjAndCallInit(x): x.physObj = x x._physObjInit() return x def decorate(orig,deco): for b in deco.__bases__ : decorate(orig,b) for m in deco.__dict__ : if m[0] != "_" or m[1] != "_" : setattr(orig,m,deco.__dict__[m]) #print m #$ef decorate(oldstyle): # cmssw=eval("ROOT.pat.%s"%oldstyle.__name__) # for ty in tuple([oldstyle])+oldstyle.__bases__: # print ty # for m in ty.__dict__ : # if m[0] != "_" or m[1] != "_": # setattr(cmssw,m,ty.__dict__[m]) # print m # decorate(o) # o=AddPhysObj