Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hallc_replay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jlab
hallc
exp
polhe3
hallc_replay
Commits
28e1b8e8
Commit
28e1b8e8
authored
4 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Issue with hard-coded root build-dir"
parent
c8d5b074
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.rootlogon.C
+37
-0
37 additions, 0 deletions
.rootlogon.C
rootlogon.C
+0
-12
0 additions, 12 deletions
rootlogon.C
with
37 additions
and
12 deletions
.rootlogon.C
0 → 100644
+
37
−
0
View file @
28e1b8e8
#include
<fmt/core.h>
void
_rootlogon
()
{
// ensure we have format loaded. Should be able to move to C++20 fmt library
// some point in the future
R__LOAD_LIBRARY
(
libfmt
);
// check if we requested a special build directory through the environment,
const
char
*
build_dir_from_env
=
gSystem
->
Getenv
(
"ROOT_BUILD_TMPDIR"
);
const
std
::
string
build_dir
=
build_dir_from_env
?
build_dir_from_env
:
"$HOME/.root_build_dir"
;
// ensure the build directory exists to avoid crashes due a directory
// note: in principle this allows us to execute arbitrary code, but seeing
// as this can only be manipulated through the shell environment in the
// first place this should not be a safety concern.
const
std
::
string
mkdir
=
fmt
::
format
(
"mkdir -p {}"
,
build_dir
);
gSystem
->
Exec
(
mkdir
.
c_str
());
// Communicate what build directory we are using
fmt
::
print
(
"---> Setting ACLiC build directory to: {}
\n\n
"
,
build_dir
);
gSystem
->
SetBuildDir
(
build_dir
.
c_str
());
// Ensure we have our environment setup
gROOT
->
ProcessLine
(
".include /usr/local/include/hcana"
);
gROOT
->
ProcessLine
(
".include SCRIPTS/include"
);
gROOT
->
ProcessLine
(
".include ."
);
// Some basic plotting setup
gROOT
->
SetStyle
(
"Plain"
);
gStyle
->
SetPalette
(
1
);
// Load extra ROOT libraries, TODO check if this is still
// needed in the newer ROOT versions we are using.
gSystem
->
Load
(
"libTree"
);
gSystem
->
Load
(
"libTreePlayer"
);
gSystem
->
Load
(
"libHist"
);
}
This diff is collapsed.
Click to expand it.
rootlogon.C
deleted
100644 → 0
+
0
−
12
View file @
c8d5b074
void
rootlogon
()
{
gSystem
->
SetBuildDir
(
"$HOME/.root_build_dir"
);
gROOT
->
ProcessLine
(
".include /usr/local/include/hcana"
);
gROOT
->
ProcessLine
(
".include SCRIPTS/include"
);
gROOT
->
ProcessLine
(
".include ."
);
R__LOAD_LIBRARY
(
libfmt
)
gROOT
->
SetStyle
(
"Plain"
);
gStyle
->
SetPalette
(
1
);
gSystem
->
Load
(
"libTree"
);
gSystem
->
Load
(
"libTreePlayer"
);
gSystem
->
Load
(
"libHist"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment