diff --git a/FofbTool/Configuration.py b/FofbTool/Configuration.py index 4ee6d4e4759afe1600d53b0dd1e3e16f37e7eea5..4afd8dbbfb11fe50c889b39474ede529a6c6600e 100644 --- a/FofbTool/Configuration.py +++ b/FofbTool/Configuration.py @@ -38,7 +38,7 @@ def logdebugconf(): def loadconfig(filepath): """ Load a configuration file for the module. - It initialize the internal configuration. + It supersed the default configuration, if found. PARAMETERS ---------- diff --git a/scripts/FofbTool b/scripts/FofbTool index 168cf8b9b8467775faf4a39f53078724e09ea52d..3465b78380d551e782833405d6803668fa26f77a 100755 --- a/scripts/FofbTool +++ b/scripts/FofbTool @@ -52,6 +52,9 @@ if __name__ == '__main__': parser.add_argument("--stop-ccn", action="store_true", help="Stop command for the ComBPM applications blocks.") + parser.add_argument("--dump-configuration", type=argparse.FileType('w'), + help="Dump the current configuration in a file at the giver path.") + parser.add_argument("--configure", choices=["combpm", "ccn", "comcorr", "corr", "all"], nargs='?', const='all', help="Configuration commands for the Fofb applications blocs."+ @@ -77,6 +80,11 @@ if __name__ == '__main__': FofbTool.Configuration.loadconfig(args.fileconfig) FofbTool.Configuration.logdebugconf() + if not args.dump_configuration is None: + FofbTool.Configuration.config.write(args.dump_configuration) + args.dump_configuration.close() + + ## Check running if not FofbTool.Utils.check_fofbnotrunning(): logger.warning("FOFB is running")