else:
            self.current_cat = {}
            self.cats[ cat_name ] = self.current_cat
        self.current_cat_name = cat_name
            
    def addField( self, name, value ):
        if self.current_cat == None: self.addCategory( 'global' )
#        vlist = value.split(',')
        self.current_cat[ name ] = value 
#        print "Add field: %s %s %s " % ( self.current_cat_name, name, value )
        
    def data(self): 
        return self.cats     

if __name__ == "__main__":
    app = QtGui.QApplication( ['Hyperwall Data Browser'] )
    hcomm = ClusterCommunicator.getHComm()
    
    if hcomm.rank == 0:
        window = SliceWidgetWindow( hcomm )
        if len(sys.argv)>2 and sys.argv[1] == '-c':
            config = ConfigFileParser( sys.argv[2] )
            window.wizard.processConfig( config.data() )
        app.connect( app, QtCore.SIGNAL("aboutToQuit()"), window.terminate ) 
        window.show()
    else:
        window = CellPlotWidgetWindow( hcomm )
        app.connect( app, QtCore.SIGNAL("aboutToQuit()"), window.terminate ) 
        window.showFullScreen()
    
    app.exec_()