#NEWLINE# def run( self , vistrail , name ) : #NEWLINE# #INDENT# result = [ ] #NEWLINE# versions = vistrail . get_tagMap ( ) . itervalues ( ) #NEWLINE# for version in versions : #NEWLINE# #INDENT# p = vistrail . getPipeline ( version ) #NEWLINE# ms = [ ] #NEWLINE# for ( module_id , module ) in p . modules . iteritems ( ) : #NEWLINE# #INDENT# if ( module . name == 'FileSink' ) : #NEWLINE# #INDENT# for f in module . functions : #NEWLINE# #INDENT# if ( ( f . name == 'outputName' ) and ( len ( f . params ) == 1 ) and ( f . params [ 0 ] . value ( ) == 'atlas-x.gif' ) ) : #NEWLINE# #INDENT# ms . append ( module_id ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# s = set ( ) #NEWLINE# inv_graph = p . graph . inverse ( ) #NEWLINE# for m in ms : #NEWLINE# #INDENT# s = s . union ( set ( ( inv_graph . bfs ( m ) . keys ( ) + [ m ] ) ) ) #NEWLINE# #UNINDENT# for m in s : #NEWLINE# #INDENT# result . append ( ( version , result ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . queryResult = result #NEWLINE# self . tupleLength = 2 #NEWLINE# self . computeIndices ( ) #NEWLINE# return result