diff options
Diffstat (limited to 'bin/chroma-sim')
-rwxr-xr-x | bin/chroma-sim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/chroma-sim b/bin/chroma-sim index 8b0e44b..b6587f9 100755 --- a/bin/chroma-sim +++ b/bin/chroma-sim @@ -42,9 +42,22 @@ if __name__ == '__main__': parser.add_option('--debug', dest='debug', action='store_true', default=False, help='Start python debugger on exception') + parser.add_option('--rootlogon', dest='rootlogon', + action='store_true', default=False, + help='Write a .rootlogon.C file to the current directory for reading Chroma ROOT files.') options, args = parser.parse_args() + if options.rootlogon: + if os.path.exists('.rootlogon.C'): + print >>sys.stderr, ".rootlogon.C file already exists!" + sys.exit(1) + else: + with open('.rootlogon.C', 'w') as f: + print >>f, '{\ngROOT->ProcessLine(".L ~/.chroma/root.C+");\n}' + print >>sys.stderr, '.rootlogon.C created' + sys.exit(0) + if len(args) < 1: sys.exit(parser.format_help()) |