48 def __findComponents(self, ca):
49 if ca is not PropSetterProxy.__scannedCA:
50 PropSetterProxy.__scannedCA = ca
51 PropSetterProxy.__compPaths = {}
52 def __add(path, comp):
53 if comp.getName() == "":
54 return
55 PropSetterProxy.__compPaths[ path ] = comp
56
57
58 for svc in ca._services:
59 PropSetterProxy.__compPaths['SvcMgr/'+svc.getFullJobOptName()] = svc
60 for t in ca._publicTools:
61 PropSetterProxy.__compPaths['ToolSvc/'+t.getFullJobOptName()] = t
62 for t in ca._conditionsAlgs:
63 PropSetterProxy.__compPaths[t.getFullJobOptName()] = t
64 if ca._privateTools:
65 for t in ca._privateTools:
66 PropSetterProxy.__compPaths[t.getFullJobOptName()] = t
67
68 def __nestAlg(startpath, comp):
69 if comp.getName() == "":
70 return
71 for name, value in comp._descriptors.items():
72 if isinstance(value.cpp_type, (ConfigurableAlgTool, PrivateToolHandle)):
73 __add( startpath+"/"+name+"/"+value.getFullJobOptName(), value )
74 __nestAlg( startpath+"/"+name+"/"+value.getName(), value )
75 if isinstance( value.cpp_type, PrivateToolHandleArray):
76 for toolIndex,t in enumerate(value):
77 __add( startpath+"/"+name+"/"+t.getFullJobOptName(), t )
78 __nestAlg( startpath+"/"+name+"/"+t.getName(), value[toolIndex] )
79
80
81 def __nestSeq( startpath, seq ):
82 for c in seq.Members:
83 if isSequence(c):
84 __nestSeq( startpath+"/"+c.getName(), c )
85 else:
86 __add( startpath+"/"+c.getFullJobOptName(), c )
87 __nestAlg( startpath+"/"+c.getFullJobOptName(), c )
88
89 __nestSeq("", ca._sequence)
90
91
92
93
94