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) geom = lariat() # If a file was passed, give it to the manager: manager = lariat_manager(geom) manager.parseFileName(args.file) thisgui = lariatgui(geom,manager) thisgui.initUI() # 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('file', nargs='?', help="Optional input file to use") args = parser.parse_args() app = QtGui.QApplication(sys.argv) geom = lariat() # If a file was passed, give it to the manager: manager = lariat_manager(geom) manager.parseFileName(args.file) thisgui = lariatgui(geom, manager) thisgui.initUI() # 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.') 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('-T', '-t', '--uboonetruncated', action='store_true', help="Run with the truncated 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.uboonetruncated: geom = geometry.microboonetruncated() 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_2D(geom) manager.setInputFiles(args.file) thisgui = evdgui(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.') 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('-T', '-t', '--uboonetruncated', action='store_true', help="Run with the truncated microboone 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.uboonetruncated: geom = geometry.microboonetruncated() elif args.lariat: geom = geometry.lariat() else: geom = geometry.argoneut() # If a file was passed, give it to the manager: manager = larlite_manager(geom) manager.setInputFiles(args.file) thisgui = larlitegui(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 for drawing larsoft products.') parser.add_argument('file', nargs='?', help="Optional input file to use") 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('-L', '-l', '--lariat', action='store_true', help="Run with the lariat geometry") args = parser.parse_args() app = QtGui.QApplication(sys.argv) if args.argoneut: geom = geometry.argoneut() elif args.lariat: geom = geometry.lariat() else: geom = geometry.microboone() # If a file was passed, give it to the manager: manager = larsoft_manager(geom) manager.setInputFile(args.file) thisgui = larsoftgui(geom, manager) thisgui.initUI() thisgui.update() # manager.goToEvent(0) # thisgui.setWindowState(window.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive) thisgui.raise_() thisgui.activateWindow() 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='TITUS event display.') geom = parser.add_mutually_exclusive_group() # # Detector # 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('-T', '-t', '--uboonetruncated', action='store_true', help="Run with the truncated microboone geometry") geom.add_argument('-S', '-s', '--sbnd', action='store_true', help="Run with the SBND Geometry") geom.add_argument('-S3', '-s3', '--sbnd3', action='store_true', help="Run with the SBND Geometry with 3 drift windows") 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") # # 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") parser.add_argument('-nosw', '--no_split_wire', action='store_true', help="Do not use split wire geometry (you also need to pass the right FHiCL)") # # File dir and search pattern # parser.add_argument('-fd', '--file-directory', help="The directory where to look for new files", required=True) parser.add_argument('-sp', '--search-pattern', help="The serach pattern used to find files", default='*-decoded.root', type=str, required=False) # # Input file # parser.add_argument('file', nargs='*', help="Optional input file to use") args = parser.parse_args() if args.config_path is not None: services.ServiceManager.setConfiguration(args.config_path, args.service_table) geometryCore = services.ServiceManager('Geometry') detProperties = services.ServiceManager('DetectorProperties') detClocks = services.ServiceManager('DetectorClocks') lar_properties = services.ServiceManager('LArProperties') app = QtGui.QApplication(sys.argv) if args.uboone: print('TITUS Live is not available for MicroBooNE.') exit() geom = geometry.microboone() elif args.uboonetruncated: print('TITUS Live is not available for MicroBooNE.') exit() geom = geometry.microboonetruncated() elif args.lariat: print('TITUS Live is not available for LArIAT.') exit() geom = geometry.lariat() elif args.sbnd: geom = geometry.sbnd(geometryCore,detProperties,detClocks,lar_properties) elif args.sbnd3: geom = geometry.sbnd(geometryCore,detProperties,detClocks,lar_properties) geom._tRange = 7500 geom._triggerOffset = 2500 geom._readoutWindowSize = 7500 geom.recalculateOffsets() elif args.icarus: geom = geometry.icarus(geometryCore,detProperties,detClocks,lar_properties,args.no_split_wire) else: print('TITUS Live is not available for ArgoNeuT.') exit() geom = geometry.argoneut() # If a file was passed, give it to the manager: manager = live_evd_manager_2D(geom) manager.setInputFiles(args.file) thisgui = livegui(geom, manager, app, args.file_directory, args.search_pattern) # 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 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_()