summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-09-30 11:12:31 -0400
committerStan Seibert <stan@mtrr.org>2011-09-30 11:12:31 -0400
commit1690552ff476ae8d0994f38966ce9422b800b901 (patch)
treeabf9229608f1592fb900f5a393d3602d6a642db5 /bin
parent7a3b6dacebb30658ccae38280452a4659d3e4a09 (diff)
downloadchroma-1690552ff476ae8d0994f38966ce9422b800b901.tar.gz
chroma-1690552ff476ae8d0994f38966ce9422b800b901.tar.bz2
chroma-1690552ff476ae8d0994f38966ce9422b800b901.zip
chroma-sim --rootlogon will create a .rootlogon.C file in your current directory so you can read Chroma ROOT files.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chroma-sim13
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())