Skip to content

Commit aa0799b

Browse files
authored
Allow loading a local rootlogon.C from the current directory (star-bnl#770)
Adds logic to check for and load a local ./rootlogon.C if it exists, as requested by users. This enables complementary user-defined ROOT configuration alongside the default setup. These lines are taken directly from /afs/rhic.bnl.gov/star/ROOT/5.34.38/root/etc/rootlogon.C. I haven’t tested them myself, but @jlauret has confirmed that they work.
1 parent b8465d0 commit aa0799b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

StRoot/macros/rootlogon.C

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@
6161
gInterpreter->AddIncludePath("$STAR/.$STAR_HOST_SYS/include");
6262
gInterpreter->AddIncludePath("$STAR/StRoot");
6363
gInterpreter->AddIncludePath("/usr/include/mysql");
64+
65+
// Requested by users, allow loading a "complementary" local
66+
// rootlogon if exists
67+
if ( !gSystem->AccessPathName("./rootlogon.C", kFileExists ) ){
68+
cout << "Found and loading local rootlogon.C" << endl;
69+
gROOT->Macro("./rootlogon.C");
70+
}
6471
}

0 commit comments

Comments
 (0)