forked from JeffersonLab/g4sbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rootlogon.C
31 lines (24 loc) · 918 Bytes
/
rootlogon.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
void rootlogon(){
//Check for a pre-existing rootlogon.C file in the current working directory and/or
//the current user's home directory:
FILE *ftest = fopen( "./rootlogon.C","r");
if( ftest != NULL ){
gROOT->ProcessLine(".x ./rootlogon.C");
fclose( ftest );
}
ftest = fopen("~/rootlogon.C","r");
if( ftest != NULL ){
gROOT->ProcessLine(".x ~/rootlogon.C");
fclose( ftest );
}
//gSystem->AddIncludePath(" -I${PROJECT_SOURCE_DIR}/include");
gSystem->AddIncludePath(" -I${CMAKE_INSTALL_PREFIX}");
gSystem->AddIncludePath(" -I${PROJECT_BINARY_DIR}/include");
FileStat_t buf;
if( !gSystem->GetPathInfo("${PROJECT_BINARY_DIR}/libg4sbsroot.so", buf) ){
gSystem->Load("${PROJECT_BINARY_DIR}/libg4sbsroot.so" ) ;
}
if( !gSystem->GetPathInfo("${PROJECT_BINARY_DIR}/libg4sbsroot.dylib", buf) ){
gSystem->Load("${PROJECT_BINARY_DIR}/libg4sbsroot.dylib" ) ;
}
}