def _decorate(name=_name): """ Make the decoration of all objects fomr this module """ import LoKiCore.decorators as _LoKiCore _d = 'double' _v = 'std::vector<double>' # double -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(_d, _d), ## the base LoKi.Dicts.FunCalls(_d), ## call-traits LoKi.Dicts.FuncOps(_d, _d)) ## operators # vector<double> -> double _decorated |= _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(_v, _d), ## the base LoKi.Dicts.FunCalls(_v), ## call-traits LoKi.Dicts.FuncOps(_v, _v)) ## operators # double -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_d, bool), ## the base LoKi.Dicts.CutCalls(_d), ## call-traits LoKi.Dicts.CutsOps(_d, _d)) ## operators # vector<double> -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_v, bool), ## the base LoKi.Dicts.CutCalls(_v), ## call-traits LoKi.Dicts.CutsOps(_v, _v)) ## operators # vector<double> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_v, _v), ## the base LoKi.Dicts.PipeOps(_d, _d)) ## stremers # vector<double> -> double _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_v, _d), ## the base LoKi.Dicts.FunValOps(_d)) ## stremers # void -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor('void', _v), ## the base LoKi.Dicts.SourceOps(_d, _d)) ## stremers return _decorated
def _decorate(name=_name): """ Make the decoration of all objects fomr this module """ import LoKiCore.decorators as _LoKiCore from LoKiArrayFunctors.functions import _T ## regular functors which accept the combination # "function" : Combination -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name AFunc, ## the base LoKi.Dicts.FunCalls(_T), ## call-traits LoKi.Dicts.FuncOps(_T, _T)) ## operators&operations # "predicate/cut" : Combination -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## moduel name ACuts, ## the base LoKi.Dicts.CutCalls(_T), ## call-traits LoKi.Dicts.CutsOps(_T, _T)) ## operators&operations ## return _decorated ## RETURN
def _decorate(name=_name): """Make a decoration fo functions and predicates """ import LoKiCore.decorators as _LoKiCore p = 'const LHCb::Particle*' v = 'const LHCb::VertexBase*' # "function" : Particle -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(p, 'double'), ## the base LoKi.Dicts.ExtFunCalls(LHCb.Particle), ## call-traits LoKi.Dicts.FuncOps(p, p)) ## operators&operations # "function" : Vertex -> double _decorated != _LoKiCore.getAndDecorateFunctions( name, ## moduel name LoKi.Functor(v, 'double'), ## the base LoKi.Dicts.ExtFunCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.FuncOps(v, v)) ## operators&operations # "predicate/cut" : Particle -> bool _decorated != _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(p, bool), ## the base LoKi.Dicts.ExtCutCalls(LHCb.Particle), ## call-traits LoKi.Dicts.CutsOps(p, p)) ## operators&operations # "predicate/cut" : Vertex -> bool _decorated != _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(v, bool), ## the base LoKi.Dicts.ExtCutCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.CutsOps(v, v)) ## operators&operations # (re)decorate pids (Comparison with strings, integers and ParticleID objects: for t in (_LoKiPhys.ID, _LoKiPhys.ABSID): t = type(t) _LoKiCore.decoratePID(t, LoKi.Dicts.PIDOps(t)) _decorated.add(t) ## return _decorated ## RETURN
def decorateVoids(name=_name): """ Make the decoration of 'void'-functors this module """ import LoKiCore.decorators as _LoKiCore _d = 'double' _b = 'bool' _v = 'void' # void -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(_v, _d), ## the base LoKi.Dicts.FunCalls(_v), ## call-traits LoKi.Dicts.FuncOps(_v, _v)) ## operators # void -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_v, _b), ## the base LoKi.Dicts.CutCalls(_v), ## call-traits LoKi.Dicts.CutsOps(_v, _v)) ## operators return _decorated
def _decorate(name=_name): """ Make the decoration of all objects from this module """ import LoKiCore.decorators as _LoKiCore ## regular functors which accept the track _t = LHCb.Track _pt = 'const LHCb::Track*' # "function" : Track -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name TrFunc, ## the base LoKi.Dicts.FunCalls(_t), ## call-traits LoKi.Dicts.FuncOps(_pt, _pt)) ## operators&operations # "predicate/cut" : Track -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name TrCuts, ## the base LoKi.Dicts.CutCalls(_t), ## call-traits LoKi.Dicts.CutsOps(_pt, _pt)) ## operators&operations ## functional stuff _vt = 'std::vector<const LHCb::Track*>' ## std.vector ( ) _vd = 'std::vector<double>' ## std.vector ( 'double' ) # "map" : vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_vt, _vd), ## the base LoKi.Dicts.MapsOps(_pt)) ## call-traits # "pipe" : vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_vt, _vt), ## the base LoKi.Dicts.PipeOps(_pt, _pt)) ## call-traits # "funval" : vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_vt, 'double'), ## the base LoKi.Dicts.FunValOps(_pt)) ## call-traits # "cutval" : vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_vt, bool), ## the base LoKi.Dicts.CutValOps(_pt)) ## call-traits # "source" : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _vt), ## the base LoKi.Dicts.SourceOps(_pt, _pt)) ## call-traits ## smart info: _decorated |= _LoKiCore.getAndDecorateInfos( name, ## module name TrFunc, ## the base LoKi.Dicts.InfoOps(_pt)) ## methods ## ## primitive voids: _decorated |= _LoKiCore.getAndDecoratePrimitiveVoids(name) return _decorated ## RETURN
def _decorate ( name = _name ) : """ Make the decoration of all objects fomr this module """ import LoKiCore.decorators as _LoKiCore _o1 = 'const LHCb::ODIN*' _l0 = 'const LHCb::L0DUReport*' _hlt = 'const LHCb::HltDecReports*' o1 = LHCb.ODIN l0 = LHCb.L0DUReport hlt = LHCb.HltDecReports # "function" : ODIN -> double _decorated = _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_o1,'double') , ## the base LoKi.Dicts.FunCalls (o1) , ## call-traits LoKi.Dicts.FuncOps (_o1,_o1) ) ## operators&operations # "function" : L0 -> double _decorated |= _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_l0,'double') , ## the base LoKi.Dicts.FunCalls (l0) , ## call-traits LoKi.Dicts.FuncOps (_l0,_l0) ) ## operators&operations # "function" : HLT -> double _decorated |= _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_hlt,'double') , ## the base LoKi.Dicts.FunCalls (hlt) , ## call-traits LoKi.Dicts.FuncOps (_hlt,_hlt) ) ## operators&operations # "predicate/cut" : ODIN -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_o1,bool) , ## the base LoKi.Dicts.CutCalls (o1) , ## call-traits LoKi.Dicts.CutsOps (_o1,_o1) ) ## operators&operations # "predicate/cut" : L0 -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_l0,bool) , ## the base LoKi.Dicts.CutCalls (l0) , ## call-traits LoKi.Dicts.CutsOps (_l0,_l0) ) ## operators&operations # "predicate/cut" : HLT -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_hlt,bool) , ## the base LoKi.Dicts.CutCalls (hlt) , ## call-traits LoKi.Dicts.CutsOps (_hlt,_hlt) ) ## operators&operations ## return _decorated ## RETURN
def _decorate(name=_name): """ Make the decoration of all objects from this module """ import LoKiCore.decorators as _LoKiCore _pp = 'const LHCb::ProtoParticle*' _ppv = 'std::vector<const LHCb::ProtoParticle*>' ## std.vector( _mcp ) _vd = 'std::vector<double>' ## std.vector( 'double' ) # # ProtoParticle -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(_pp, 'double'), ## the base LoKi.Dicts.FunCalls(LHCb.ProtoParticle), ## call-traits LoKi.Dicts.FuncOps(_pp, _pp)) ## operators&operations # ProtoParticle -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_pp, bool), ## the base LoKi.Dicts.CutCalls(LHCb.ProtoParticle), ## call-traits LoKi.Dicts.CutsOps(_pp, _pp)) ## operators&operations ## functional part: # vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_ppv, _vd), ## the base LoKi.Dicts.MapsOps(_pp)) ## call-traits # vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_ppv, _ppv), ## the base LoKi.Dicts.PipeOps(_pp, _pp)) ## call-traits # vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_ppv, 'double'), ## the base LoKi.Dicts.FunValOps(_pp)) ## call-traits # vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_ppv, bool), ## the base LoKi.Dicts.CutValOps(_pp)) ## call-traits #sources : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _ppv), ## the base LoKi.Dicts.SourceOps(_pp, _pp)) ## call-traits # 'infos' _decorated |= _LoKiCore.getAndDecorateInfos( name, ## module name LoKi.Functor(_pp, 'double'), ## the base LoKi.Dicts.InfoOps(_pp)) ## methods # primitive voids : _decorated |= _LoKiCore.getAndDecoratePrimitiveVoids(name) return _decorated
def decorate ( name = _name ) : _mcp = 'const LHCb::MCParticle*' _mcv = 'const LHCb::MCVertex*' ## MC : # MCParticle -> double _decorated = _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_mcp,'double') , ## the base LoKi.Dicts.FunCalls (LHCb.MCParticle) , ## call-traits LoKi.Dicts.FuncOps (_mcp,_mcp) ) ## operators&operations # MCVertex -> double _decorated |= _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_mcv,'double') , ## the base LoKi.Dicts.FunCalls (LHCb.MCVertex) , ## call-traits LoKi.Dicts.FuncOps (_mcv,_mcv) ) ## operators&operations # MCParticle -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_mcp,bool) , ## the base LoKi.Dicts.CutCalls (LHCb.MCParticle) , ## call-traits LoKi.Dicts.CutsOps (_mcp,_mcp) ) ## operators&operations # MCVertex -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## moduel name LoKi.Functor (_mcv,bool) , ## the base LoKi.Dicts.CutCalls (LHCb.MCVertex) , ## call-traits LoKi.Dicts.CutsOps (_mcv,_mcv) ) ## operators&operations ## HepMC: _gp = 'const HepMC::GenParticle*' _gv = 'const HepMC::GenVertex*' # HepMC -> double _decorated |= _LoKiCore.getAndDecorateFunctions ( name , ## moduel name LoKi.Functor (_gp,'double') , ## the base LoKi.Dicts.FunCalls (HepMC.GenParticle) , ## call-traits LoKi.Dicts.FuncOps (_gp,_gp) ) ## operators&operations _decorated |= _LoKiCore.getAndDecorateFunctions ( name , ## module name LoKi.Functor (_gv,'double') , ## the base LoKi.Dicts.FunCalls (HepMC.GenVertex) , ## call-traits LoKi.Dicts.FuncOps (_gv,_gv) ) ## operators&operations # HepMC -> bool _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_gp,bool) , ## the base LoKi.Dicts.CutCalls (HepMC.GenParticle) , ## call-traits LoKi.Dicts.CutsOps (_gp,_gp) ) ## operators&operations _decorated |= _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_gv,bool) , ## the base LoKi.Dicts.CutCalls (HepMC.GenVertex) , ## call-traits LoKi.Dicts.CutsOps (_gv,_gv) ) ## operators&operations ## return _decorated ## RETURN
def _decorate(name=_name): """ Make the decoration of all objects from this module """ import LoKiCore.decorators as _LoKiCore tC = 'const Hlt::Candidate*' tS = 'const Hlt::Stage*' vC = 'std::vector<const Hlt::Candidate*>' vD = 'std::vector<double>' # ## "function" : Hlt::Candidate -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(tC, 'double'), ## the base LoKi.Dicts.FunCalls(Hlt.Candidate), ## call-traits LoKi.Dicts.FuncOps(tC, tC)) ## operators&operations ## "predicate/cut" : Hlt::Candidate -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(tC, bool), ## the base LoKi.Dicts.CutCalls(Hlt.Candidate), ## call-traits LoKi.Dicts.CutsOps(tC, tC)) ## operators&operations ## "function" : Hlt::Stage -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(tS, 'double'), ## the base LoKi.Dicts.FunCalls(Hlt.Stage), ## call-traits LoKi.Dicts.FuncOps(tS, tS)) ## operators&operations ## "predicate/cut" : Hlt::Stage -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(tS, bool), ## the base LoKi.Dicts.CutCalls(Hlt.Stage), ## call-traits LoKi.Dicts.CutsOps(tS, tS)) ## operators&operations ## functional part: # "map" : vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(vC, vD), ## the base LoKi.Dicts.MapsOps(tC)) ## call-traits # "pipe" : vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(vC, vC), ## the base LoKi.Dicts.PipeOps(tC, tC)) ## call-traits # "funval" : vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(vC, 'double'), ## the base LoKi.Dicts.FunValOps(tC)) ## call-traits # "cutval" : vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(vC, bool), ## the base LoKi.Dicts.CutValOps(tC)) ## call-traits # 'source' : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', vC), ## the base LoKi.Dicts.SourceOps(tC, tC)) ## call-traits ## primitive voids _decorated |= _LoKiCore.getAndDecoratePrimitiveVoids(name) # ========================================================================= ## LHCb::Track remnants ATTENTION !!! # ========================================================================= tT = 'const LHCb::Track*' vT = 'std::vector<const LHCb::Track*>' # function _decorated |= _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(tT, 'double'), ## the base LoKi.Dicts.FunCalls(LHCb.Track), ## call-traits LoKi.Dicts.FuncOps(tT, tT)) ## operators&operations # "pipe" : vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(vT, vT), ## the base LoKi.Dicts.PipeOps(tT, tT)) ## call-traits # 'source' : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', vT), ## the base LoKi.Dicts.SourceOps(tT, tT)) ## call-traits # ========================================================================= ## LHCb::VertexBase specifics # ========================================================================= tV = 'const LHCb::VertexBase*' vV = 'std::vector<const LHCb::VertexBase*>' # function _decorated |= _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(tV, 'double'), ## the base LoKi.Dicts.FunCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.FuncOps(tV, tV)) ## operators&operations # predicates _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(tV, bool), ## the base LoKi.Dicts.CutCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.CutsOps(tV, tV)) ## operators&operations # "pipe" : vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(vV, vV), ## the base LoKi.Dicts.PipeOps(tV, tV)) ## call-traits # 'source' : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', vV), ## the base LoKi.Dicts.SourceOps(tV, tV)) ## call-traits # ========================================================================= ## various "info" operations # ========================================================================= ## decorate HltCandidates: _decorated |= _LoKiCore.getAndDecorateInfos( name, LoKi.Functor(tC, 'double'), ## the base LoKi.Dicts.InfoOps(tC) ## info-opeartion ) ## decorate HltCandidates: _decorated |= _LoKiCore.getAndDecorateInfos( name, LoKi.Functor(tC, bool), ## the base LoKi.Dicts.InfoOps(tC) ## info-opeartion ) ## decorate HltStages: _decorated |= _LoKiCore.getAndDecorateInfos( name, LoKi.Functor(tS, 'double'), ## the base LoKi.Dicts.InfoOps(tS) ## info-opeartion ) ## decorate HltStages: _decorated |= _LoKiCore.getAndDecorateInfos( name, LoKi.Functor(tS, bool), ## the base LoKi.Dicts.InfoOps(tS) ## info-opeartion ) ## return _decorated ## RETURN
def _decorate(name=_name): """ Make the decoration of all objects fomr this module """ import LoKiCore.decorators as _LoKiCore _gp = 'const HepMC::GenParticle*' _gv = 'const HepMC::GenVertex*' ## _vgp = std.vector ( _gp ) ## _vgv = std.vector ( _gv ) ## _vd = std.vector ( 'double' ) _vgp = 'std::vector<const HepMC::GenParticle*>' _vgv = 'std::vector<const HepMC::GenVertex*>' _vd = 'std::vector<double>' # T -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## moduel name LoKi.Functor(_gp, 'double'), ## the base LoKi.Dicts.FunCalls(HepMC.GenParticle), ## call-traits LoKi.Dicts.FuncOps(_gp, _gp)) ## operators&operations _decorated |= _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(_gv, 'double'), ## the base LoKi.Dicts.FunCalls(HepMC.GenVertex), ## call-traits LoKi.Dicts.FuncOps(_gv, _gv)) ## operators&operations # T -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_gp, bool), ## the base LoKi.Dicts.CutCalls(HepMC.GenParticle), ## call-traits LoKi.Dicts.CutsOps(_gp, _gp)) ## operators&operations _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(_gv, bool), ## the base LoKi.Dicts.CutCalls(HepMC.GenVertex), ## call-traits LoKi.Dicts.CutsOps(_gv, _gv)) ## operators&operations # functional part # map: vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## moduel name LoKi.Functor(_vgp, _vd), ## the base LoKi.Dicts.MapsOps(_gp)) ## call-traits _decorated |= _LoKiCore.getAndDecorateMaps( name, ## moduel name LoKi.Functor(_vgv, _vd), ## the base LoKi.Dicts.MapsOps(_gv)) ## call-traits # pipe: vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_vgp, _vgp), ## the base LoKi.Dicts.PipeOps(_gp, _gp)) ## call-traits _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_vgv, _vgv), ## the base LoKi.Dicts.PipeOps(_gv, _gv)) ## call-traits # vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_vgp, 'double'), ## the base LoKi.Dicts.FunValOps(_gp)) ## call-traits _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_vgv, 'double'), ## the base LoKi.Dicts.FunValOps(_gv)) ## call-traits # vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_vgp, bool), ## the base LoKi.Dicts.CutValOps(_gp)) ## call-traits _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_vgv, bool), ## the base LoKi.Dicts.CutValOps(_gv)) ## call-traits #sources : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _vgp), ## the base LoKi.Dicts.SourceOps(_gp, _gp)) ## call-traits _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _vgv), ## the base LoKi.Dicts.SourceOps(_gv, _gv)) ## call-traits # decorate pids (Comparison with strings, integers and ParticleID objects: for t in (GID, GABSID): t = type(t) _LoKiCore.decoratePID(t, LoKi.Dicts.PIDOps(t)) _decorated.add(t) ## return _decorated ## RETURN
def _decorate ( name = _name ) : """ Make the decoration of all objects from this module """ import LoKiCore.decorators as _LoKiCore _mcp = 'const LHCb::MCParticle*' _mcv = 'const LHCb::MCVertex*' #_vp = std.vector( _mcp ) #_vv = std.vector( _mcv ) #_vd = std.vector( 'double' ) _vp = 'std::vector<const LHCb::MCParticle*>' ## std.vector( _mcp ) _vv = 'std::vector<const LHCb::MCVertex*>' ## std.vector( _mcv ) _vd = 'std::vector<double>' ## std.vector( 'double' ) # # MCParticle -> double _decorated = _LoKiCore.getAndDecorateFunctions ( name , ## modulr name LoKi.Functor (_mcp,'double') , ## the base LoKi.Dicts.FunCalls (LHCb.MCParticle) , ## call-traits LoKi.Dicts.FuncOps (_mcp,_mcp) ) ## operators&operations # MCVertex -> double _decorated != _LoKiCore.getAndDecorateFunctions ( name , ## moduel name LoKi.Functor (_mcv,'double') , ## the base LoKi.Dicts.FunCalls (LHCb.MCVertex) , ## call-traits LoKi.Dicts.FuncOps (_mcv,_mcv) ) ## operators&operations # MCParticle -> bool _decorated != _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_mcp,bool) , ## the base LoKi.Dicts.CutCalls (LHCb.MCParticle) , ## call-traits LoKi.Dicts.CutsOps (_mcp,_mcp) ) ## operators&operations # MCVertex -> bool _decorated != _LoKiCore.getAndDecoratePredicates ( name , ## module name LoKi.Functor (_mcv,bool) , ## the base LoKi.Dicts.CutCalls (LHCb.MCVertex) , ## call-traits LoKi.Dicts.CutsOps (_mcv,_mcv) ) ## operators&operations ## functional part: # vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps ( name , ## moduel name LoKi.Functor (_vp,_vd) , ## the base LoKi.Dicts.MapsOps(_mcp) ) ## call-traits _decorated |= _LoKiCore.getAndDecorateMaps ( name , ## moduel name LoKi.Functor (_vv,_vd) , ## the base LoKi.Dicts.MapsOps(_mcv) ) ## call-traits # vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes ( name , ## module name LoKi.Functor (_vp,_vp) , ## the base LoKi.Dicts.PipeOps(_mcp,_mcp) ) ## call-traits _decorated |= _LoKiCore.getAndDecoratePipes ( name , ## module name LoKi.Functor (_vv,_vv) , ## the base LoKi.Dicts.PipeOps(_mcv,_mcv) ) ## call-traits # vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals ( name , ## module name LoKi.Functor (_vp,'double') , ## the base LoKi.Dicts.FunValOps(_mcp) ) ## call-traits _decorated |= _LoKiCore.getAndDecorateFunVals ( name , ## module name LoKi.Functor (_vv,'double') , ## the base LoKi.Dicts.FunValOps(_mcv) ) ## call-traits # vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals ( name , ## module name LoKi.Functor (_vp,bool) , ## the base LoKi.Dicts.CutValOps(_mcp) ) ## call-traits _decorated |= _LoKiCore.getAndDecorateCutVals ( name , ## module name LoKi.Functor (_vv,bool) , ## the base LoKi.Dicts.CutValOps(_mcv) ) ## call-traits #sources : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources ( name , ## module name LoKi.Functor ('void',_vp) , ## the base LoKi.Dicts.SourceOps(_mcp,_mcp) ) ## call-traits _decorated |= _LoKiCore.getAndDecorateSources ( name , ## module name LoKi.Functor ('void',_vv) , ## the base LoKi.Dicts.SourceOps(_mcv,_mcv) ) ## call-traits ## primitive voids: _decorated |= _LoKiCore.getAndDecoratePrimitiveVoids ( name ) ## decorate pids (Comparison with strings, integers and ParticleID objects: for t in ( MCID , MCABSID ) : t = type ( t ) _LoKiCore.decoratePID ( t , LoKi.Dicts.PIDOps ( t ) ) _decorated.add ( t ) return _decorated
def _decorate(name=_name): """ Make the decoration of all objects from this module """ import LoKiCore.decorators as _LoKiCore p = 'const LHCb::Particle*' v = 'const LHCb::VertexBase*' d = 'double' _vp = 'std::vector<const LHCb::Particle*>' ## std.vector( p ) _vv = 'std::vector<const LHCb::VertexBase*>' ## std.vector( v ) _vd = 'std::vector<double>' ## std.vector( 'double' ) #_vp = std.vector( p ) #_vv = std.vector( v ) #_vd = std.vector( 'double' ) # # "function" : Particle -> double _decorated = _LoKiCore.getAndDecorateFunctions( name, ## module name , ## the base LoKi.Functor(p, 'double'), ## the base LoKi.Dicts.FunCalls(LHCb.Particle), ## call-traits LoKi.Dicts.FuncOps(p, p)) ## operators&operations # "function" : Vertex -> double _decorated |= _LoKiCore.getAndDecorateFunctions( name, ## module name LoKi.Functor(v, 'double'), ## the base LoKi.Dicts.FunCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.FuncOps(v, v)) ## operators&operations # "predicate/cut" : Particle -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## module name LoKi.Functor(p, bool), ## the base LoKi.Dicts.CutCalls(LHCb.Particle), ## call-traits LoKi.Dicts.CutsOps(p, p)) ## operators&operations # "predicate/cut" : Vertex -> bool _decorated |= _LoKiCore.getAndDecoratePredicates( name, ## moduel name LoKi.Functor(v, bool), ## the base LoKi.Dicts.CutCalls(LHCb.VertexBase), ## call-traits LoKi.Dicts.CutsOps(v, v)) ## operators&operations # ========================================================================= ## functional part: # ========================================================================= # "map" : vector<T> -> vector<double> _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_vp, _vd), ## the base LoKi.Dicts.MapsOps(p)) ## call-traits _decorated |= _LoKiCore.getAndDecorateMaps( name, ## module name LoKi.Functor(_vv, _vd), ## the base LoKi.Dicts.MapsOps(v)) ## call-traits # "pipe" : vector<T> -> vector<T> _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_vp, _vp), ## the base LoKi.Dicts.PipeOps(p, p)) ## call-traits _decorated |= _LoKiCore.getAndDecoratePipes( name, ## module name LoKi.Functor(_vv, _vv), ## the base LoKi.Dicts.PipeOps(v, v)) ## call-traits # "funval" : vector<T> -> double _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_vp, 'double'), ## the base LoKi.Dicts.FunValOps(p)) ## call-traits _decorated |= _LoKiCore.getAndDecorateFunVals( name, ## module name LoKi.Functor(_vv, 'double'), ## the base LoKi.Dicts.FunValOps(v)) ## call-traits # "cutval" : vector<T> -> bool _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_vp, bool), ## the base LoKi.Dicts.CutValOps(p)) ## call-traits _decorated |= _LoKiCore.getAndDecorateCutVals( name, ## module name LoKi.Functor(_vv, bool), ## the base LoKi.Dicts.CutValOps(v)) ## call-traits # 'source' : void -> vector<T> _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _vp), ## the base LoKi.Dicts.SourceOps(p, p)) ## call-traits _decorated |= _LoKiCore.getAndDecorateSources( name, ## module name LoKi.Functor('void', _vv), ## the base LoKi.Dicts.SourceOps(v, v)) ## call-traits # 'infos' _decorated |= _LoKiCore.getAndDecorateInfos( name, ## module name LoKi.Functor(p, 'double'), ## the base LoKi.Dicts.InfoOps(p)) ## methods _decorated |= _LoKiCore.getAndDecorateInfos( name, ## module name LoKi.Functor(v, 'double'), ## the base LoKi.Dicts.InfoOps(v)) ## methods ## void primitives _decorated |= _LoKiCore.getAndDecoratePrimitiveVoids(name) # decorate pids (Comparison with strings, integers and ParticleID objects: for t in (ID, ABSID): t = type(t) _LoKiCore.decoratePID(t, LoKi.Dicts.PIDOps(t)) _decorated.add(t) ## return _decorated