Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GeoModelDev
GeoModel
Commits
5a85d99f
Commit
5a85d99f
authored
Oct 21, 2022
by
Riccardo Maria Bianchi
Browse files
Options
Downloads
Patches
Plain Diff
let users disable HepMC3 support if not needed
parent
88e0ccf0
No related branches found
No related tags found
2 merge requests
!170
Merging latest CMake fixes from master into the branch to test the new CI single-build jobs
,
!168
Fix FullSimLight and FSL builds for distribution kits, and make HepMC3 dependency optional
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
FSL/.gitignore
+1
-0
1 addition, 0 deletions
FSL/.gitignore
FSL/CMakeLists.txt
+12
-1
12 additions, 1 deletion
FSL/CMakeLists.txt
FSL/src/fsl_mainwindow.cpp
+18
-6
18 additions, 6 deletions
FSL/src/fsl_mainwindow.cpp
FSL/src/fsl_mainwindow.ui
+4
-4
4 additions, 4 deletions
FSL/src/fsl_mainwindow.ui
with
35 additions
and
11 deletions
FSL/.gitignore
0 → 100644
+
1
−
0
View file @
5a85d99f
.DS_Store
This diff is collapsed.
Click to expand it.
FSL/CMakeLists.txt
+
12
−
1
View file @
5a85d99f
...
...
@@ -33,9 +33,20 @@ else()
endif
()
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
# Support for the HepMC3 exchange format
# This is ON by default, but it can be disabled by the user if not used/needed,
# or if HepMC3 is not installed
option
(
GEOMODEL_USE_HEPMC3
"Enable the build of all GeoModel sub-packages"
ON
)
if
(
GEOMODEL_USE_HEPMC3
)
find_package
(
HepMC3 REQUIRED
)
endif
()
if
(
HepMC3_FOUND
)
target_compile_definitions
(
fullSimLight PRIVATE USE_HEPMC3
)
endif
()
# Find the dependencies of the project.
find_package
(
Qt5 COMPONENTS Core Gui Widgets Sql PrintSupport OpenGL REQUIRED
)
...
...
...
...
This diff is collapsed.
Click to expand it.
FSL/src/fsl_mainwindow.cpp
+
18
−
6
View file @
5a85d99f
...
...
@@ -191,6 +191,13 @@ FSLMainWindow::FSLMainWindow(QWidget *parent)
connect
(
&
fullSimLight_process
,
SIGNAL
(
started
()),
this
,
SLOT
(
fsml_process_started
()));
connect
(
&
fullSimLight_process
,
SIGNAL
(
finished
(
int
,
QProcess
::
ExitStatus
)),
this
,
SLOT
(
fsml_process_finished
()));
// Disable options if the underlying packages/tools are not installed/found
// (e.g., HepMC3, Pythia, ...)
// TODO: add check for Pythia, external plugins, and anything is not embedded in FullSimLight by default
#ifndef USE_HEPMC3
ui
->
cB_gen_options
->
setItemData
(
2
,
false
,
Qt
::
UserRole
-
1
);
ui
->
groupBox_hepmc3
->
setEnabled
(
false
);
#endif
}
...
...
@@ -935,10 +942,11 @@ void FSLMainWindow::configure_generator()
ui
->
sB_NOT
->
setValue
(
1
);
ui
->
sB_NOT
->
setEnabled
(
false
);
#ifdef USE_HEPMC3
ui
->
pB_hepmc3_browse_files
->
setEnabled
(
true
);
ui
->
cB_hepmc3_type_of_eve
->
setEnabled
(
true
);
ui
->
lE_HEPMC3
->
setEnabled
(
true
);
#endif
ui
->
cB_particle
->
setEnabled
(
false
);
ui
->
lE_px
->
setEnabled
(
false
);
...
...
@@ -1152,6 +1160,7 @@ void FSLMainWindow::run_configuration()
QStringList
args
;
//Contains arguments of the command
//Needs to be fixed. Should not be a hard coded path.
//TODO: add check if exe is found. If not, throw an error message
Command
=
"fullSimLight"
;
args
<<
"-c"
<<
QString
::
fromUtf8
(
tmpConf
.
c_str
());
...
...
@@ -1173,6 +1182,7 @@ void FSLMainWindow::run_gmex()
QStringList
args
;
//Contains arguments of the command
//Needs to be fixed. Should not be a hard coded path.
//TODO: add check if exe is found. If not, throw an error message
Command
=
"gmex"
;
args
<<
QString
::
fromUtf8
(
geom_file_address
.
c_str
());
...
...
@@ -1194,6 +1204,7 @@ void FSLMainWindow::run_gmclash()
QStringList
args
;
//Contains arguments of the command
//Needs to be fixed. Should not be a hard coded path.
//TODO: add check if exe is found. If not, throw an error message
Command
=
"gmclash"
;
args
<<
QString
(
"-g"
)
<<
QString
::
fromUtf8
(
geom_file_address
.
c_str
());
...
...
@@ -1404,18 +1415,18 @@ void FSLMainWindow::load_configuration()
{
ui
->
sB_NOT
->
setValue
(
1
);
ui
->
sB_NOT
->
setEnabled
(
false
);
#ifdef USE_HEPMC3
ui
->
cB_gen_options
->
setCurrentIndex
(
2
);
ui
->
pB_hepmc3_browse_files
->
setEnabled
(
true
);
ui
->
cB_hepmc3_type_of_eve
->
setEnabled
(
true
);
ui
->
lE_HEPMC3
->
setEnabled
(
true
);
hepmc3_type_of_file
=
j_load
[
"HepMC3 type of file"
];
hepmc3_input_file
=
j_load
[
"HepMC3 file"
];
ui
->
cB_hepmc3_type_of_eve
->
setCurrentText
(
QString
::
fromUtf8
(
hepmc3_type_of_file
.
c_str
()));
ui
->
lE_HEPMC3
->
setText
(
QString
::
fromUtf8
(
hepmc3_input_file
.
c_str
()));
#endif
ui
->
lE_px
->
clear
();
...
...
@@ -1880,6 +1891,7 @@ void FSLMainWindow::load_configuration_CL(std::string config_file_path)
ui
->
sB_NOT
->
setValue
(
1
);
ui
->
sB_NOT
->
setEnabled
(
false
);
#ifdef USE_HEPMC3
ui
->
cB_gen_options
->
setCurrentIndex
(
2
);
ui
->
pB_hepmc3_browse_files
->
setEnabled
(
true
);
ui
->
cB_hepmc3_type_of_eve
->
setEnabled
(
true
);
...
...
@@ -1891,7 +1903,7 @@ void FSLMainWindow::load_configuration_CL(std::string config_file_path)
ui
->
cB_hepmc3_type_of_eve
->
setCurrentText
(
QString
::
fromUtf8
(
hepmc3_type_of_file
.
c_str
()));
ui
->
lE_HEPMC3
->
setText
(
QString
::
fromUtf8
(
hepmc3_input_file
.
c_str
()));
#endif
ui
->
lE_px
->
clear
();
ui
->
lE_py
->
clear
();
...
...
...
...
This diff is collapsed.
Click to expand it.
FSL/src/fsl_mainwindow.ui
+
4
−
4
View file @
5a85d99f
...
...
@@ -29,7 +29,7 @@
</font>
</property>
<property
name=
"currentIndex"
>
<number>
0
</number>
<number>
1
</number>
</property>
<widget
class=
"QWidget"
name=
"main"
>
<attribute
name=
"title"
>
...
...
@@ -595,7 +595,7 @@
</spacer>
</item>
<item
row=
"2"
column=
"4"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
5
"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
pythia
"
>
<property
name=
"font"
>
<font>
<pointsize>
15
</pointsize>
...
...
@@ -667,7 +667,7 @@
</widget>
</item>
<item
row=
"3"
column=
"4"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
10
"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
hepmc3
"
>
<property
name=
"font"
>
<font>
<pointsize>
15
</pointsize>
...
...
@@ -742,7 +742,7 @@
</spacer>
</item>
<item
row=
"4"
column=
"4"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
12
"
>
<widget
class=
"QGroupBox"
name=
"groupBox_
plugin
"
>
<property
name=
"font"
>
<font>
<pointsize>
15
</pointsize>
...
...
...
...
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
sign in
to comment