def main(): parser = argparse.ArgumentParser(description='Python based event display.') parser.add_argument('file', nargs='*', help="Optional input file to use") args = parser.parse_args() app = QtGui.QApplication(sys.argv) # If a file was passed, give it to the manager: manager = evd_manager_3D(args.file) thisgui = evdgui3D(manager) thisgui.initUI() signal.signal(signal.SIGINT, sigintHandler) timer = QtCore.QTimer() timer.start(500) # You may change this if you wish. timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms. app.exec_()
def main(): parser = argparse.ArgumentParser(description='Python based event display.') parser.add_argument("-c", "-C", "--config", help="Optional config file override.") parser.add_argument('file', nargs='*', help="Optional input file to use") args = parser.parse_args() app = QtGui.QApplication(sys.argv) if args.config is None: print("No config supplied, using default configuration file.") args.config = os.environ["LARCV_VIEWER_TOPDIR"] + "/config/default3D.cfg" # If a file was passed, give it to the manager: manager = evd_manager_3D(args.config, args.file) thisgui = evdgui3D() thisgui.connect_manager(manager) # manager.goToEvent(0) thisgui.initUI() manager.eventChanged.connect(thisgui.update) manager.metaRefreshed.connect(thisgui.metaChanged) signal.signal(signal.SIGINT, sigintHandler) timer = QtCore.QTimer() timer.start(500) # You may change this if you wish. timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms. app.exec_()
def main(): parser = argparse.ArgumentParser(description='Python based 3D event display. Requires opengl.') geom = parser.add_mutually_exclusive_group() geom.add_argument('-A', '-a', '--argoneut', action='store_true', help="Run with the argoneut geometry") geom.add_argument('-U', '-u', '--uboone', action='store_true', help="Run with the microboone geometry") geom.add_argument('-S', '-s', '--sbnd', action='store_true', help="Run with the SBND Geometry") geom.add_argument('-L', '-l', '--lariat', action='store_true', help="Run with the lariat geometry") parser.add_argument('file', nargs='*', help="Optional input file to use") args = parser.parse_args() app = QtGui.QApplication(sys.argv) if args.uboone: geom = geometry.microboone() elif args.lariat: geom = geometry.lariat() elif args.sbnd: geom = geometry.sbnd() else: geom = geometry.argoneut() # If a file was passed, give it to the manager: manager = evd_manager_3D(geom) manager.setInputFiles(args.file) thisgui = evdgui3D(geom, manager) # manager.goToEvent(0) signal.signal(signal.SIGINT, sigintHandler) timer = QtCore.QTimer() timer.start(500) # You may change this if you wish. timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms. app.exec_()
def main(): parser = argparse.ArgumentParser(description='Python based event display.') parser.add_argument("-c", "-C", "--config", help="Optional config file override.") parser.add_argument('file', nargs='*', help="Optional input file to use") args = parser.parse_args() app = QtWidgets.QApplication(sys.argv) if args.config is None: print("No config supplied, using default configuration file.") args.config = larcv.ProcessDriver.default_config() # Else, convert it to json: else: args.config = json.loads(args.config) # If a file was passed, give it to the manager: if len(args.file) > 0: args.config['IOManager']['Input']['InputFiles'] = args.file manager = evd_manager_3D(args.config) thisgui = evdgui3D() thisgui.connect_manager(manager) # manager.goToEvent(0) thisgui.initUI() manager.eventChanged.connect(thisgui.update) manager.metaRefreshed.connect(thisgui.metaChanged) signal.signal(signal.SIGINT, sigintHandler) timer = QtCore.QTimer() timer.start(500) # You may change this if you wish. timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms. app.exec_()
def main(): parser = argparse.ArgumentParser(description='Python based 3D event display. Requires opengl.') geom = parser.add_mutually_exclusive_group() geom.add_argument('-A', '-a', '--argoneut', action='store_true', help="Run with the argoneut geometry") geom.add_argument('-U', '-u', '--uboone', action='store_true', help="Run with the microboone geometry") geom.add_argument('-S', '-s', '--sbnd', action='store_true', help="Run with the SBND Geometry") geom.add_argument('-I', '-i', '--icarus', action='store_true', help="Run with the ICARUS Geometry") geom.add_argument('-L', '-l', '--lariat', action='store_true', help="Run with the lariat geometry") parser.add_argument('file', nargs='*', help="Optional input file to use") # # Fhicl configuration # parser.add_argument('--config', dest="config_path", help="Configuration file path (must define `services` or host serviceTable below)") parser.add_argument('--table', dest="service_table", help="Name of the FHiCL table where all services are configured") args = parser.parse_args() if args.config_path is not None: services.ServiceManager.setConfiguration(args.config_path, args.service_table) app = QtGui.QApplication(sys.argv) geometryCore = services.ServiceManager('Geometry') detProperties = services.ServiceManager('DetectorProperties') detClocks = services.ServiceManager('DetectorClocks') lar_properties = services.ServiceManager('LArProperties') if args.uboone: geom = geometry.microboone() elif args.lariat: geom = geometry.lariat() elif args.sbnd: geom = geometry.sbnd(geometryCore,detProperties,detClocks,lar_properties) elif args.icarus: geom = geometry.icarus(geometryCore,detProperties,detClocks,lar_properties) else: geom = geometry.argoneut() # If a file was passed, give it to the manager: manager = evd_manager_3D(geom) manager.setInputFiles(args.file) thisgui = evdgui3D(geom, manager) # manager.goToEvent(0) signal.signal(signal.SIGINT, sigintHandler) timer = QtCore.QTimer() timer.start(500) # You may change this if you wish. timer.timeout.connect(lambda: None) # Let the interpreter run each 500 ms. app.exec_()