Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
ebdb0feb7f | |||
e67d92fc05 | |||
ead1674b13 | |||
fd22884ce8 | |||
20dd08fbef | |||
3e66760c26 | |||
d6bcdf52b8 | |||
30bd2b2876 | |||
9f8f89db6d | |||
458913ca31 | |||
5c3accc6ed | |||
6f8b0a2341 | |||
4febdb42b4 | |||
ae95a5dc1c | |||
c3f531e0d5 | |||
0b61130e28 | |||
d1cd63dcb0 | |||
7838901fbe | |||
00b012d0dd | |||
d2984d8923 | |||
58889614e5 | |||
c9fc373862 | |||
ebefcf7af9 |
@ -1,7 +1,7 @@
|
|||||||
# - musrfit
|
# - musrfit
|
||||||
cmake_minimum_required(VERSION 3.17)
|
cmake_minimum_required(VERSION 3.17)
|
||||||
|
|
||||||
project(musrfit VERSION 1.9.5 LANGUAGES C CXX)
|
project(musrfit VERSION 1.9.7 LANGUAGES C CXX)
|
||||||
|
|
||||||
#--- musrfit specific options -------------------------------------------------
|
#--- musrfit specific options -------------------------------------------------
|
||||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||||
|
21
ChangeLog
21
ChangeLog
@ -12,6 +12,27 @@ or
|
|||||||
|
|
||||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||||
|
|
||||||
|
Release of V1.9.7, 2025/01/18
|
||||||
|
=============================
|
||||||
|
|
||||||
|
allow spaces in RUN block path-filename
|
||||||
|
|
||||||
|
Release of V1.9.6, 2024/12/02
|
||||||
|
=============================
|
||||||
|
|
||||||
|
added jump to block feature in musredit.
|
||||||
|
|
||||||
|
|
||||||
|
Release of V1.9.5, 2024/06/24
|
||||||
|
=============================
|
||||||
|
|
||||||
|
yaml export of ALL fit-parameters, as initiated by R.M.L. McFadden.
|
||||||
|
|
||||||
|
Release of V1.9.4, 2024/06/08
|
||||||
|
=============================
|
||||||
|
|
||||||
|
enable OpenMP for macOS.
|
||||||
|
|
||||||
Release of V1.9.3, 2024/04/19
|
Release of V1.9.3, 2024/04/19
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ set(MUSRFIT_VERSION "@MUSRFIT_VERSION@")
|
|||||||
# Get the current working branch
|
# Get the current working branch
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git rev-parse --abbrev-ref HEAD
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${SRC_DIR}
|
||||||
OUTPUT_VARIABLE GIT_BRANCH
|
OUTPUT_VARIABLE GIT_BRANCH
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
@ -17,7 +17,7 @@ execute_process(
|
|||||||
# Get the latest abbreviated commit hash of the working branch
|
# Get the latest abbreviated commit hash of the working branch
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git log -1 --pretty="%h, %ci"
|
COMMAND git log -1 --pretty="%h, %ci"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${SRC_DIR}
|
||||||
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
BIN
doc/examples/.DS_Store
vendored
BIN
doc/examples/.DS_Store
vendored
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
# Sphinx build info version 1
|
# Sphinx build info version 1
|
||||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
config: 81576a0588e1a44f70c715e85985d5a5
|
config: 1c72e3ac8764a6fbfdf66c0cdf797d3d
|
||||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||||
VERSION: '1.9.4',
|
VERSION: '1.9.5',
|
||||||
LANGUAGE: 'None',
|
LANGUAGE: 'None',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Acknowledgements — musrfit 1.9.4 documentation</title>
|
<title>Acknowledgements — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -223,7 +223,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.4 documentation</title>
|
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -213,7 +213,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Bugtracking — musrfit 1.9.4 documentation</title>
|
<title>Bugtracking — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -211,7 +211,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>How to Cite musrfit? — musrfit 1.9.4 documentation</title>
|
<title>How to Cite musrfit? — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -203,7 +203,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -225,7 +225,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Short description and references to the supported file-formats — musrfit 1.9.4 documentation</title>
|
<title>Short description and references to the supported file-formats — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ Between detectors, there will be an empty line.</p>
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -525,7 +525,7 @@ Between detectors, there will be an empty line.</p>
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Index — musrfit 1.9.4 documentation</title>
|
<title>Index — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -753,7 +753,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -775,7 +775,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Welcome to the musrfit documentation! — musrfit 1.9.4 documentation</title>
|
<title>Welcome to the musrfit documentation! — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -285,7 +285,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -307,7 +307,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.4 documentation</title>
|
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ fit serves as template for the second and so on. The template field stays empty
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -540,7 +540,7 @@ fit serves as template for the second and so on. The template field stays empty
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>mupp - μSR Parameter Plotter — musrfit 1.9.4 documentation</title>
|
<title>mupp - μSR Parameter Plotter — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ SCRIPT COMMANDS:
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -430,7 +430,7 @@ SCRIPT COMMANDS:
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.4 documentation</title>
|
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1007,7 +1007,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -1029,7 +1029,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.4 documentation</title>
|
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -656,7 +656,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Search — musrfit 1.9.4 documentation</title>
|
<title>Search — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +185,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -207,7 +207,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.4 documentation</title>
|
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -430,7 +430,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Setting up musrfit on Different Platforms — musrfit 1.9.4 documentation</title>
|
<title>Setting up musrfit on Different Platforms — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1125,7 +1125,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -1147,7 +1147,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Tutorial for musrfit — musrfit 1.9.4 documentation</title>
|
<title>Tutorial for musrfit — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -527,7 +527,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -549,7 +549,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Documentation of user libs (user functions) — musrfit 1.9.4 documentation</title>
|
<title>Documentation of user libs (user functions) — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -875,7 +875,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -897,7 +897,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>User manual — musrfit 1.9.4 documentation</title>
|
<title>User manual — musrfit 1.9.5 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -257,6 +257,26 @@
|
|||||||
<dt><strong>-u, –use-no-of-threads <number></strong></dt>
|
<dt><strong>-u, –use-no-of-threads <number></strong></dt>
|
||||||
<dd><number>: number of threads to be used (OpenMP). Needs to be <= max. number of cores.
|
<dd><number>: number of threads to be used (OpenMP). Needs to be <= max. number of cores.
|
||||||
If OpenMP is enable, the maximal number of cores is used, if it is not limited by this option.</dd>
|
If OpenMP is enable, the maximal number of cores is used, if it is not limited by this option.</dd>
|
||||||
|
<dt><strong>-r, –reset</strong></dt>
|
||||||
|
<dd><p class="first">reset startup <code class="docutils literal notranslate"><span class="pre">musrfit_startup.xml</span></code>, i.e. rewrite a default, and quit.
|
||||||
|
The order of which <code class="docutils literal notranslate"><span class="pre">musrfit_startup.xml</span></code> is reset is:</p>
|
||||||
|
<blockquote class="last">
|
||||||
|
<div><ol class="arabic simple">
|
||||||
|
<li>if present in the current dir.</li>
|
||||||
|
<li>if present under <code class="docutils literal notranslate"><span class="pre">$HOME/.musrfit/</span></code></li>
|
||||||
|
<li>if present under <code class="docutils literal notranslate"><span class="pre">$MUSRFITPATH/</span></code></li>
|
||||||
|
<li>if present under <code class="docutils literal notranslate"><span class="pre">$ROOTSYS/</span></code></li>
|
||||||
|
</ol>
|
||||||
|
</div></blockquote>
|
||||||
|
</dd>
|
||||||
|
<dt><strong>-y, –yaml</strong></dt>
|
||||||
|
<dd><p class="first">write fit results (<code class="docutils literal notranslate"><span class="pre">MINUIT2.OUTPUT</span></code>) into a yaml-file. Output <code class="docutils literal notranslate"><span class="pre"><msr-file>.yaml</span></code>.</p>
|
||||||
|
<p class="last">The motivation for storing parameter information in this (hierarchical) manner is to provide easy access to details that are cumbersome
|
||||||
|
to store/access in tabular formats (e.g., <code class="docutils literal notranslate"><span class="pre">CSV</span></code> or <code class="docutils literal notranslate"><span class="pre">TSV</span></code>). This is especially true for the parameter covariance/correlation matrices.
|
||||||
|
The advantage is evident when processing the contents of the <code class="docutils literal notranslate"><span class="pre">.yaml</span></code> output, which can be easily accomplished using one of the
|
||||||
|
YAML parsers implemented in your favourite programming language (see, e.g., <a class="reference external" href="https://yaml.org/">https://yaml.org/</a> for a list of options). As an example,
|
||||||
|
this can be achieved in <code class="docutils literal notranslate"><span class="pre">Python</span></code> using the <code class="docutils literal notranslate"><span class="pre">PyYAML</span></code>.</p>
|
||||||
|
</dd>
|
||||||
<dt><strong>–dump <type></strong></dt>
|
<dt><strong>–dump <type></strong></dt>
|
||||||
<dd>is writing a data file with the fit data and the theory; <type> can be ascii (data in columns) or root (data in ROOT histograms).</dd>
|
<dd>is writing a data file with the fit data and the theory; <type> can be ascii (data in columns) or root (data in ROOT histograms).</dd>
|
||||||
<dt><strong>–timeout <timeout_tag></strong></dt>
|
<dt><strong>–timeout <timeout_tag></strong></dt>
|
||||||
@ -2874,7 +2894,7 @@ The syntax here is attribute driven</li>
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Jun 08, 2024.
|
Last updated on Jun 24, 2024.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -2896,7 +2916,7 @@ The syntax here is attribute driven</li>
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.4',
|
VERSION:'1.9.5',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include "Minuit2/MnPrint.h"
|
#include "Minuit2/MnPrint.h"
|
||||||
#include "Minuit2/MnScan.h"
|
#include "Minuit2/MnScan.h"
|
||||||
#include "Minuit2/MnSimplex.h"
|
#include "Minuit2/MnSimplex.h"
|
||||||
|
#include "Minuit2/MnStrategy.h"
|
||||||
#include "Minuit2/MnUserParameterState.h"
|
#include "Minuit2/MnUserParameterState.h"
|
||||||
#include "Minuit2/MinosError.h"
|
#include "Minuit2/MinosError.h"
|
||||||
|
|
||||||
@ -1763,7 +1764,7 @@ Bool_t PFitter::ExecuteMigrad()
|
|||||||
|
|
||||||
// create migrad object
|
// create migrad object
|
||||||
// strategy is by default = 'default'
|
// strategy is by default = 'default'
|
||||||
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, fStrategy);
|
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||||
|
|
||||||
// minimize
|
// minimize
|
||||||
// maxfcn is MINUIT2 Default maxfcn
|
// maxfcn is MINUIT2 Default maxfcn
|
||||||
@ -1839,7 +1840,7 @@ Bool_t PFitter::ExecuteMinimize()
|
|||||||
|
|
||||||
// create minimizer object
|
// create minimizer object
|
||||||
// strategy is by default = 'default'
|
// strategy is by default = 'default'
|
||||||
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, fStrategy);
|
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||||
|
|
||||||
// minimize
|
// minimize
|
||||||
// maxfcn is MINUIT2 Default maxfcn
|
// maxfcn is MINUIT2 Default maxfcn
|
||||||
@ -2656,7 +2657,7 @@ Bool_t PFitter::ExecuteSimplex()
|
|||||||
|
|
||||||
// create minimizer object
|
// create minimizer object
|
||||||
// strategy is by default = 'default'
|
// strategy is by default = 'default'
|
||||||
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, fStrategy);
|
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
|
||||||
|
|
||||||
// minimize
|
// minimize
|
||||||
// maxfcn is 10*MINUIT2 Default maxfcn
|
// maxfcn is 10*MINUIT2 Default maxfcn
|
||||||
|
@ -188,13 +188,28 @@ void PFunction::FillFuncEvalTree(iter_t const& i, PFuncTreeNode &node)
|
|||||||
node.fID = PFunctionGrammar::constGammaMuID; // keep the ID
|
node.fID = PFunctionGrammar::constGammaMuID; // keep the ID
|
||||||
node.fDvalue = GAMMA_BAR_MUON; // keep the value
|
node.fDvalue = GAMMA_BAR_MUON; // keep the value
|
||||||
} else if (i->value.id() == PFunctionGrammar::constFieldID) { // handle constant field from meta data
|
} else if (i->value.id() == PFunctionGrammar::constFieldID) { // handle constant field from meta data
|
||||||
|
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||||
|
boost::algorithm::trim(str);
|
||||||
|
if (strstr(str.c_str(), "-"))
|
||||||
|
node.fSign = true;
|
||||||
node.fID = PFunctionGrammar::constFieldID; // keep the ID
|
node.fID = PFunctionGrammar::constFieldID; // keep the ID
|
||||||
} else if (i->value.id() == PFunctionGrammar::constEnergyID) { // handle constant energy from meta data
|
} else if (i->value.id() == PFunctionGrammar::constEnergyID) { // handle constant energy from meta data
|
||||||
|
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||||
|
boost::algorithm::trim(str);
|
||||||
|
if (strstr(str.c_str(), "-"))
|
||||||
|
node.fSign = true;
|
||||||
node.fID = PFunctionGrammar::constEnergyID; // keep the ID
|
node.fID = PFunctionGrammar::constEnergyID; // keep the ID
|
||||||
} else if (i->value.id() == PFunctionGrammar::constTempID) { // handle constant temperature from meta data
|
} else if (i->value.id() == PFunctionGrammar::constTempID) { // handle constant temperature from meta data
|
||||||
str = std::string(i->value.begin(), i->value.end()); // get string
|
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||||
boost::algorithm::trim(str);
|
boost::algorithm::trim(str);
|
||||||
status = sscanf(str.c_str(), "T%d", &ivalue); // convert string to temperature index
|
std::string pstr;
|
||||||
|
if (strstr(str.c_str(), "-")) {
|
||||||
|
node.fSign = true;
|
||||||
|
pstr = "-T%d";
|
||||||
|
} else {
|
||||||
|
pstr = "T%d";
|
||||||
|
}
|
||||||
|
status = sscanf(str.c_str(), pstr.c_str(), &ivalue); // convert string to temperature index
|
||||||
node.fID = PFunctionGrammar::constTempID; // keep the ID
|
node.fID = PFunctionGrammar::constTempID; // keep the ID
|
||||||
node.fIvalue = ivalue; // Temp idx
|
node.fIvalue = ivalue; // Temp idx
|
||||||
} else if (i->value.id() == PFunctionGrammar::parameterID) { // handle parameter number
|
} else if (i->value.id() == PFunctionGrammar::parameterID) { // handle parameter number
|
||||||
@ -432,21 +447,30 @@ Double_t PFunction::EvalNode(PFuncTreeNode &node)
|
|||||||
} else if (node.fID == PFunctionGrammar::constGammaMuID) {
|
} else if (node.fID == PFunctionGrammar::constGammaMuID) {
|
||||||
return node.fDvalue;
|
return node.fDvalue;
|
||||||
} else if (node.fID == PFunctionGrammar::constFieldID) {
|
} else if (node.fID == PFunctionGrammar::constFieldID) {
|
||||||
return fMetaData.fField;
|
Double_t dval = fMetaData.fField;
|
||||||
|
if (node.fSign)
|
||||||
|
dval *= -1.0;
|
||||||
|
return dval;
|
||||||
} else if (node.fID == PFunctionGrammar::constEnergyID) {
|
} else if (node.fID == PFunctionGrammar::constEnergyID) {
|
||||||
if (fMetaData.fEnergy == PMUSR_UNDEFINED) {
|
if (fMetaData.fEnergy == PMUSR_UNDEFINED) {
|
||||||
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: energy meta data not available." << std::endl;
|
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: energy meta data not available." << std::endl;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
return fMetaData.fEnergy;
|
Double_t dval = fMetaData.fEnergy;
|
||||||
|
if (node.fSign)
|
||||||
|
dval *= -1.0;
|
||||||
|
return dval;
|
||||||
} else if (node.fID == PFunctionGrammar::constTempID) {
|
} else if (node.fID == PFunctionGrammar::constTempID) {
|
||||||
if (node.fIvalue >= fMetaData.fTemp.size()) {
|
if (node.fIvalue >= fMetaData.fTemp.size()) {
|
||||||
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: Temp idx=" << node.fIvalue << " requested which is >= #Temp(s)=" << fMetaData.fTemp.size() << " available." << std::endl;
|
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: Temp idx=" << node.fIvalue << " requested which is >= #Temp(s)=" << fMetaData.fTemp.size() << " available." << std::endl;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
return fMetaData.fTemp[node.fIvalue];
|
Double_t dval = fMetaData.fTemp[node.fIvalue];
|
||||||
|
if (node.fSign)
|
||||||
|
dval *= -1.0;
|
||||||
|
return dval;
|
||||||
} else if (node.fID == PFunctionGrammar::parameterID) {
|
} else if (node.fID == PFunctionGrammar::parameterID) {
|
||||||
Double_t dval;
|
Double_t dval;
|
||||||
if (node.fSign)
|
if (node.fSign)
|
||||||
@ -610,9 +634,9 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
|||||||
} else if (i->value.id() == PFunctionGrammar::constGammaMuID) {
|
} else if (i->value.id() == PFunctionGrammar::constGammaMuID) {
|
||||||
fFuncString += "gamma_mu";
|
fFuncString += "gamma_mu";
|
||||||
} else if (i->value.id() == PFunctionGrammar::constFieldID) {
|
} else if (i->value.id() == PFunctionGrammar::constFieldID) {
|
||||||
fFuncString += "B";
|
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||||
} else if (i->value.id() == PFunctionGrammar::constEnergyID) {
|
} else if (i->value.id() == PFunctionGrammar::constEnergyID) {
|
||||||
fFuncString += "EN";
|
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||||
} else if (i->value.id() == PFunctionGrammar::constTempID) {
|
} else if (i->value.id() == PFunctionGrammar::constTempID) {
|
||||||
assert(i->children.size() == 0);
|
assert(i->children.size() == 0);
|
||||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||||
|
@ -140,9 +140,12 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
strLine.str(line);
|
strLine.str(line);
|
||||||
strLine >> firstOnLine;
|
strLine >> firstOnLine;
|
||||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||||
|
// for path-names with spaces
|
||||||
|
std::string::size_type loc{0};
|
||||||
|
while (!strLine.eof()) {
|
||||||
firstOnLine.clear();
|
firstOnLine.clear();
|
||||||
strLine >> firstOnLine;
|
strLine >> firstOnLine;
|
||||||
std::string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
loc = firstOnLine.rfind(tempRunNumber.str());
|
||||||
if ( loc != std::string::npos ) {
|
if ( loc != std::string::npos ) {
|
||||||
while ( loc > 0 ) {
|
while ( loc > 0 ) {
|
||||||
if (isdigit(firstOnLine.at(--loc))) {
|
if (isdigit(firstOnLine.at(--loc))) {
|
||||||
@ -154,7 +157,8 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
in->close();
|
in->close();
|
||||||
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** The first processed run file number does not match the \"file index\"!";
|
std::cerr << std::endl << ">> msr2data: **ERROR** The first processed run file number does not match the \"file index\"!";
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** The number of digits to be used for formatting the run numbers cannot be determined!";
|
std::cerr << std::endl << ">> msr2data: **ERROR** The number of digits to be used for formatting the run numbers cannot be determined!";
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
||||||
@ -164,7 +168,6 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
std::cerr << std::endl << ">> msr2data: **ERROR** Please check the first msr-file that should be processed;";
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first file from the run list.";
|
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first file from the run list.";
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** Obviously it contains no RUN block...";
|
std::cerr << std::endl << ">> msr2data: **ERROR** Obviously it contains no RUN block...";
|
||||||
@ -558,11 +561,23 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun, bool calledFromGlobalM
|
|||||||
strLine.str(line);
|
strLine.str(line);
|
||||||
strLine >> firstOnLine;
|
strLine >> firstOnLine;
|
||||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||||
strLine >> firstOnLine;
|
// needed for path-fln with spaces
|
||||||
std::string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
std::string::size_type loc;
|
||||||
|
std::string sstr{""};
|
||||||
|
firstOnLine.clear();
|
||||||
|
while (!strLine.eof()) {
|
||||||
|
strLine >> sstr;
|
||||||
|
if (firstOnLine.empty())
|
||||||
|
firstOnLine = sstr;
|
||||||
|
else
|
||||||
|
firstOnLine += " " + sstr;
|
||||||
|
loc = firstOnLine.rfind(tempRunNumber.str());
|
||||||
if ( loc != std::string::npos ) {
|
if ( loc != std::string::npos ) {
|
||||||
firstOnLine.replace(loc, fRunNumberDigits, newRunNumber.str());
|
firstOnLine.replace(loc, fRunNumberDigits, newRunNumber.str());
|
||||||
} else {
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (strLine.eof()) {
|
||||||
std::cerr << std::endl << ">> msr2data: **WARNING** The template run file number does not match the \"file index\"";
|
std::cerr << std::endl << ">> msr2data: **WARNING** The template run file number does not match the \"file index\"";
|
||||||
std::cerr << std::endl << ">> msr2data: **WARNING** Unexpected things will happen... (for sure)";
|
std::cerr << std::endl << ">> msr2data: **WARNING** Unexpected things will happen... (for sure)";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -694,9 +709,16 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
|||||||
msrParamList->at(i).fIsGlobal = true;
|
msrParamList->at(i).fIsGlobal = true;
|
||||||
++fNumGlobalParam;
|
++fNumGlobalParam;
|
||||||
}
|
}
|
||||||
// std::cout << "debug> " << msrParamList->at(i).fNo << ": " << msrParamList->at(i).fName.Data() << " is global: " << msrParamList->at(i).fIsGlobal << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// there should be at least one run specific parameter, otherwise the GLOBAL option doesn't make sense
|
||||||
|
if (fNumSpecParam == 0) {
|
||||||
|
std::cout << ">> msr2data: **ERROR** found NO run specific parameter, hence the GLOBAL option doesn't make sense." << std::endl;
|
||||||
|
std::cout << ">> msr2data: Could it be, that your run specific labling is < 4 digits? Please check your msr-Input-File." << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check if parameters have been sorted correctly from the beginning
|
// check if parameters have been sorted correctly from the beginning
|
||||||
bool wasSorted(true);
|
bool wasSorted(true);
|
||||||
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
|
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
|
||||||
@ -1793,6 +1815,9 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
|||||||
rawRunData = fDataHandler->GetRunData((*msrRunList)[0].GetRunName()->Data());
|
rawRunData = fDataHandler->GetRunData((*msrRunList)[0].GetRunName()->Data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rawRunData == nullptr)
|
||||||
|
return -1;
|
||||||
|
|
||||||
switch (rawRunData->GetNoOfTemperatures()) {
|
switch (rawRunData->GetNoOfTemperatures()) {
|
||||||
case 1:
|
case 1:
|
||||||
dataParamNames.push_back("dataT");
|
dataParamNames.push_back("dataT");
|
||||||
|
@ -3244,7 +3244,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
while ((iter != lines.end()) && !error) {
|
while ((iter != lines.end()) && !error) {
|
||||||
// remove potential comment at the end of lines
|
// remove potential comment at the end of lines
|
||||||
str = iter->fLine;
|
str = iter->fLine;
|
||||||
Ssiz_t idx = str.Index("#");
|
Ssiz_t idx = str.Index("(");
|
||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
str.Remove(idx);
|
str.Remove(idx);
|
||||||
|
|
||||||
@ -3274,23 +3274,29 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get run name, beamline, institute, and file-format
|
// get run name, beamline, institute, and file-format
|
||||||
|
// the path/filename could potentially contain spaces! Hence the run name needs to be reconstructed from the parsing
|
||||||
if (tokens->GetEntries() < 5) {
|
if (tokens->GetEntries() < 5) {
|
||||||
error = true;
|
error = true;
|
||||||
} else {
|
} else {
|
||||||
// run name
|
// run name
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
str = TString("");
|
||||||
str = ostr->GetString();
|
for (Int_t i=1; i<tokens->GetEntries()-3; i++) {
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||||
|
str += ostr->GetString();
|
||||||
|
if (i<tokens->GetEntries()-4)
|
||||||
|
str += TString(" ");
|
||||||
|
}
|
||||||
param.SetRunName(str);
|
param.SetRunName(str);
|
||||||
// beamline
|
// beamline
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(2));
|
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-3));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
param.SetBeamline(str);
|
param.SetBeamline(str);
|
||||||
// institute
|
// institute
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(3));
|
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-2));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
param.SetInstitute(str);
|
param.SetInstitute(str);
|
||||||
// data file format
|
// data file format
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(4));
|
ostr = dynamic_cast<TObjString*>(tokens->At(tokens->GetEntries()-1));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
param.SetFileFormat(str);
|
param.SetFileFormat(str);
|
||||||
}
|
}
|
||||||
|
@ -939,6 +939,7 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
|||||||
|
|
||||||
if (fBatchMode) {
|
if (fBatchMode) {
|
||||||
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
|
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
|
||||||
|
fAveragedView = fStartWithAvg;
|
||||||
HandleAverage();
|
HandleAverage();
|
||||||
PlotAverage(true);
|
PlotAverage(true);
|
||||||
}
|
}
|
||||||
|
@ -3697,6 +3697,8 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
|||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
|
std::cout << "as35> in ReadAsciiFile() ..." << std::endl;
|
||||||
|
|
||||||
// open file
|
// open file
|
||||||
std::ifstream f;
|
std::ifstream f;
|
||||||
|
|
||||||
@ -3848,7 +3850,14 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ey = ostr->GetString().Atof();
|
ey = ostr->GetString().Atof();
|
||||||
|
if (ey == 0) {
|
||||||
|
std::cerr << std::endl << ">> PRunDataHandler::ReadAsciiFile **WARNING** line no " << lineNo << ": error y = 0 which doesn't make sense. Will set it to 1.0. Please check!!";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
ey = 1.0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
std::cerr << std::endl << ">> PRunDataHandler::ReadAsciiFile **WARNING** line no " << lineNo << ": error y = 0 which doesn't make sense. Will set it to 1.0. Please check!!";
|
||||||
|
std::cerr << std::endl;
|
||||||
ey = 1.0;
|
ey = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4357,7 +4366,7 @@ Bool_t PRunDataHandler::ReadDatFile()
|
|||||||
// open file
|
// open file
|
||||||
std::ifstream f;
|
std::ifstream f;
|
||||||
|
|
||||||
// open db-file
|
// open dat-file
|
||||||
f.open(fRunPathName.Data(), std::ifstream::in);
|
f.open(fRunPathName.Data(), std::ifstream::in);
|
||||||
if (!f.is_open()) {
|
if (!f.is_open()) {
|
||||||
std::cerr << std::endl << ">> PRunDataHandler::ReadDatFile **ERROR** Couldn't open data file (" << fRunPathName.Data() << ") for reading, sorry ...";
|
std::cerr << std::endl << ">> PRunDataHandler::ReadDatFile **ERROR** Couldn't open data file (" << fRunPathName.Data() << ") for reading, sorry ...";
|
||||||
@ -4456,6 +4465,12 @@ Bool_t PRunDataHandler::ReadDatFile()
|
|||||||
idx++;
|
idx++;
|
||||||
} else { // error value
|
} else { // error value
|
||||||
if (isData[i-1] == 1) { // Err or PosErr hence keep it
|
if (isData[i-1] == 1) { // Err or PosErr hence keep it
|
||||||
|
if (dval == 0.0) {
|
||||||
|
std::cout << std::endl << ">> PRunDataHandler::ReadDatFile **WARNING** found Err value = 0. Doesn't make sense! Will set it to 1. Please check!";
|
||||||
|
std::cerr << std::endl << ">> in line: " << lineNo;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
dval = 1.0;
|
||||||
|
}
|
||||||
runData.fDataNonMusr.AppendSubErrData(idx-1, dval);
|
runData.fDataNonMusr.AppendSubErrData(idx-1, dval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4470,11 +4485,11 @@ Bool_t PRunDataHandler::ReadDatFile()
|
|||||||
|
|
||||||
f.close();
|
f.close();
|
||||||
|
|
||||||
// got through all the data sets and if there is NO error vector set it to '0.0'
|
// got through all the data sets and if there is NO error vector set it to '1.0'
|
||||||
for (UInt_t i=0; i<noOfDataSets; i++) {
|
for (UInt_t i=0; i<noOfDataSets; i++) {
|
||||||
if (runData.fDataNonMusr.GetErrData()->at(i).size() == 0) {
|
if (runData.fDataNonMusr.GetErrData()->at(i).size() == 0) {
|
||||||
for (UInt_t j=0; j<runData.fDataNonMusr.GetData()->at(i).size(); j++) {
|
for (UInt_t j=0; j<runData.fDataNonMusr.GetData()->at(i).size(); j++) {
|
||||||
runData.fDataNonMusr.AppendSubErrData(i, 0.0);
|
runData.fDataNonMusr.AppendSubErrData(i, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,7 +765,7 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
|||||||
fout << " <!-- Color as RGB coded string -->" << std::endl;
|
fout << " <!-- Color as RGB coded string -->" << std::endl;
|
||||||
fout << " <color>0,0,0</color> <!-- kBlack -->" << std::endl;
|
fout << " <color>0,0,0</color> <!-- kBlack -->" << std::endl;
|
||||||
fout << " <color>255,0,0</color> <!-- kRed -->" << std::endl;
|
fout << " <color>255,0,0</color> <!-- kRed -->" << std::endl;
|
||||||
fout << " <color>0,255,0</color> <!-- kGreen -->" << std::endl;
|
fout << " <color>0,153,0</color> <!-- kGreen+2 -->" << std::endl;
|
||||||
fout << " <color>0,0,255</color> <!-- kBlue -->" << std::endl;
|
fout << " <color>0,0,255</color> <!-- kBlue -->" << std::endl;
|
||||||
fout << " <color>255,0,255</color> <!-- kMagenta -->" << std::endl;
|
fout << " <color>255,0,255</color> <!-- kMagenta -->" << std::endl;
|
||||||
fout << " <color>0,255,255</color> <!-- kCyan -->" << std::endl;
|
fout << " <color>0,255,255</color> <!-- kCyan -->" << std::endl;
|
||||||
|
10
src/external/libZFRelaxation/CMakeLists.txt
vendored
10
src/external/libZFRelaxation/CMakeLists.txt
vendored
@ -53,14 +53,10 @@ target_include_directories(
|
|||||||
)
|
)
|
||||||
|
|
||||||
#--- add library dependencies -------------------------------------------------
|
#--- add library dependencies -------------------------------------------------
|
||||||
if (OpenMP_FOUND)
|
|
||||||
target_compile_options(ZFRelaxation PUBLIC ${OpenMP_CXX_FLAGS})
|
|
||||||
endif (OpenMP_FOUND)
|
|
||||||
|
|
||||||
set(gomp "")
|
set(gomp "")
|
||||||
if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
if (OpenMP_FOUND)
|
||||||
set(gomp gomp)
|
set(gomp OpenMP::OpenMP_CXX)
|
||||||
endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
endif (OpenMP_FOUND)
|
||||||
target_link_libraries(ZFRelaxation
|
target_link_libraries(ZFRelaxation
|
||||||
${gomp} FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
|
${gomp} FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
|
||||||
)
|
)
|
||||||
|
@ -82,11 +82,14 @@ struct PFunctionGrammar : public grammar<PFunctionGrammar>
|
|||||||
|
|
||||||
const_gamma_mu = leaf_node_d[ str_p("GAMMA_MU") ];
|
const_gamma_mu = leaf_node_d[ str_p("GAMMA_MU") ];
|
||||||
|
|
||||||
const_field = leaf_node_d[ str_p("B") ];
|
const_field = leaf_node_d[ str_p("B") ] |
|
||||||
|
leaf_node_d[ str_p("-B") ];
|
||||||
|
|
||||||
const_energy = leaf_node_d[ str_p("EN") ];
|
const_energy = leaf_node_d[ str_p("EN") ] |
|
||||||
|
leaf_node_d[ str_p("-EN") ];
|
||||||
|
|
||||||
const_temp = leaf_node_d[ ( lexeme_d[ "T" >> +digit_p ] ) ];
|
const_temp = leaf_node_d[ ( lexeme_d[ "T" >> +digit_p ] ) ] |
|
||||||
|
leaf_node_d[ ( lexeme_d[ "-T" >> +digit_p ] ) ];
|
||||||
|
|
||||||
fun_label = leaf_node_d[ ( lexeme_d[ "FUN" >> +digit_p ] ) ];
|
fun_label = leaf_node_d[ ( lexeme_d[ "FUN" >> +digit_p ] ) ];
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Check if all given run numbers are covered by the formatting of the data file name
|
// Check if all given run numbers are covered by the formatting of the data file name
|
||||||
status = msr2dataHandler->CheckRunNumbersInRange();
|
status = msr2dataHandler->CheckRunNumbersInRange();
|
||||||
if(status) {
|
if (status) {
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << ">> msr2data: **ERROR** At least one given run number is out of range! Quitting..." << std::endl;
|
std::cerr << ">> msr2data: **ERROR** At least one given run number is out of range! Quitting..." << std::endl;
|
||||||
return status;
|
return status;
|
||||||
|
@ -656,12 +656,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
|||||||
param.SetName(headerInfo[i]);
|
param.SetName(headerInfo[i]);
|
||||||
param.SetValue(dval);
|
param.SetValue(dval);
|
||||||
if (i+1 < token.size()) {
|
if (i+1 < token.size()) {
|
||||||
if (headerCode[i+1] == PMUPP_VALUE) {
|
if ((headerCode[i+1] == PMUPP_VALUE) || (headerCode[i+1] == PMUPP_RUN)) {
|
||||||
param.SetNegErr(0.0);
|
param.SetNegErr(0.0);
|
||||||
param.SetPosErr(0.0);
|
param.SetPosErr(0.0);
|
||||||
run.AddParam(param);
|
run.AddParam(param);
|
||||||
param.ResetParam();
|
param.ResetParam();
|
||||||
}
|
}
|
||||||
|
} else { // last token
|
||||||
|
param.SetNegErr(0.0);
|
||||||
|
param.SetPosErr(0.0);
|
||||||
|
run.AddParam(param);
|
||||||
|
param.ResetParam();
|
||||||
}
|
}
|
||||||
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
||||||
param.SetPosErr(dval);
|
param.SetPosErr(dval);
|
||||||
|
@ -638,7 +638,7 @@ void PmuppGui::fileOpen()
|
|||||||
this,
|
this,
|
||||||
"muSR Parameter Files",
|
"muSR Parameter Files",
|
||||||
"./",
|
"./",
|
||||||
"db-files (*.db);; All Params (*.msr *.db *.dat);; Msr-Files (*.msr);; dat-Files (*.dat);; All (*)");
|
"dat-files (*.dat);; db-Files (*.db);; All Params (*.msr *.db *.dat);; Msr-Files (*.msr);; All (*)");
|
||||||
|
|
||||||
if (list.count() == 0)
|
if (list.count() == 0)
|
||||||
return;
|
return;
|
||||||
@ -985,7 +985,8 @@ void PmuppGui::refresh()
|
|||||||
|
|
||||||
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
||||||
if (fParamDataHandler->GetCollection(i)->GetName() == label) { // found collection
|
if (fParamDataHandler->GetCollection(i)->GetName() == label) { // found collection
|
||||||
pathName = fParamDataHandler->GetCollection(i)->GetPathName();
|
QDir dir(QDir::currentPath());
|
||||||
|
pathName = dir.path() + "/" + fParamDataHandler->GetCollection(i)->GetName();
|
||||||
collIdx = i;
|
collIdx = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1014,7 +1015,7 @@ void PmuppGui::refresh()
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::critical(this, "ERROR - REFRESH",
|
QMessageBox::critical(this, "ERROR - REFRESH",
|
||||||
QString("Couldn't refresh %1").arg(fParamDataHandler->GetCollection(collIdx)->GetName()));
|
QString("Couldn't refresh %1?!").arg(fParamDataHandler->GetCollection(collIdx)->GetName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,6 +144,8 @@ bool PAdminXMLParser::startElement()
|
|||||||
fKeyWord = eMusrviewShowOneToOne;
|
fKeyWord = eMusrviewShowOneToOne;
|
||||||
} else if (qName == "enable_musrt0") {
|
} else if (qName == "enable_musrt0") {
|
||||||
fKeyWord = eEnableMusrT0;
|
fKeyWord = eEnableMusrT0;
|
||||||
|
} else if (qName == "ignore_theme_auto_detection") {
|
||||||
|
fKeyWord = eIgnoreThemeAutoDetection;
|
||||||
} else if (qName == "dark_theme_icons_menu") {
|
} else if (qName == "dark_theme_icons_menu") {
|
||||||
fKeyWord = eDarkThemeIconsMenu;
|
fKeyWord = eDarkThemeIconsMenu;
|
||||||
} else if (qName == "dark_theme_icons_toolbar") {
|
} else if (qName == "dark_theme_icons_toolbar") {
|
||||||
@ -337,6 +339,13 @@ bool PAdminXMLParser::characters()
|
|||||||
flag = false;
|
flag = false;
|
||||||
fAdmin->setEnableMusrT0Flag(flag);
|
fAdmin->setEnableMusrT0Flag(flag);
|
||||||
break;
|
break;
|
||||||
|
case eIgnoreThemeAutoDetection:
|
||||||
|
if (str == "y")
|
||||||
|
flag = true;
|
||||||
|
else
|
||||||
|
flag = false;
|
||||||
|
fAdmin->setIgnoreThemeAutoDetection(flag);
|
||||||
|
break;
|
||||||
case eDarkThemeIconsMenu:
|
case eDarkThemeIconsMenu:
|
||||||
if (str == "y")
|
if (str == "y")
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -622,6 +631,7 @@ void PAdminXMLParser::dump()
|
|||||||
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
|
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
|
||||||
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
|
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
|
||||||
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
|
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
|
||||||
|
std::cout << "debug> ignore_theme_auto_detection : " << fAdmin->getIgnoreThemeAutoDetection() << std::endl;
|
||||||
std::cout << "debug> dark_theme_icons_menu : " << fAdmin->getDarkThemeIconsMenuFlag() << std::endl;
|
std::cout << "debug> dark_theme_icons_menu : " << fAdmin->getDarkThemeIconsMenuFlag() << std::endl;
|
||||||
std::cout << "debug> dark_theme_icons_toolbar : " << fAdmin->getDarkThemeIconsToolbarFlag() << std::endl;
|
std::cout << "debug> dark_theme_icons_toolbar : " << fAdmin->getDarkThemeIconsToolbarFlag() << std::endl;
|
||||||
std::cout << "debug> edit_w : " << fAdmin->getEditWidth() << std::endl;
|
std::cout << "debug> edit_w : " << fAdmin->getEditWidth() << std::endl;
|
||||||
@ -736,33 +746,6 @@ QString PAdminXMLParser::expandPath(const QString &str)
|
|||||||
*/
|
*/
|
||||||
PAdmin::PAdmin() : QObject()
|
PAdmin::PAdmin() : QObject()
|
||||||
{
|
{
|
||||||
fTimeout = 3600;
|
|
||||||
|
|
||||||
fFontName = QString("Courier"); // default font
|
|
||||||
fFontSize = 11; // default font size
|
|
||||||
|
|
||||||
fPrefPathName = QString("");
|
|
||||||
fExecPath = QString("");
|
|
||||||
fDefaultSavePath = QString("");
|
|
||||||
fTheoFuncPixmapPath = QString("");
|
|
||||||
|
|
||||||
fBeamline = QString("");
|
|
||||||
fInstitute = QString("");
|
|
||||||
fFileFormat = QString("");
|
|
||||||
|
|
||||||
fMusrviewShowFourier = false;
|
|
||||||
fMusrviewShowAvg = false;
|
|
||||||
|
|
||||||
fTitleFromDataFile = false;
|
|
||||||
fEnableMusrT0 = false;
|
|
||||||
fLifetimeCorrection = true;
|
|
||||||
fEstimateN0 = true;
|
|
||||||
fYamlOut = false;
|
|
||||||
fChisqPreRunBlock = false;
|
|
||||||
|
|
||||||
fEditWidth = 900;
|
|
||||||
fEditHeight = 800;
|
|
||||||
|
|
||||||
fMsr2DataParam.runList = QString("");
|
fMsr2DataParam.runList = QString("");
|
||||||
fMsr2DataParam.runListFileName = QString("");
|
fMsr2DataParam.runListFileName = QString("");
|
||||||
fMsr2DataParam.msrFileExtension = QString("");
|
fMsr2DataParam.msrFileExtension = QString("");
|
||||||
@ -1028,6 +1011,12 @@ int PAdmin::savePrefs(QString pref_fln)
|
|||||||
else
|
else
|
||||||
data[i] = " <enable_musrt0>n</enable_musrt0>";
|
data[i] = " <enable_musrt0>n</enable_musrt0>";
|
||||||
}
|
}
|
||||||
|
if (data[i].contains("<ignore_theme_auto_detection>")) {
|
||||||
|
if (fIgnoreThemeAutoDetection)
|
||||||
|
data[i] = " <ignore_theme_auto_detection>y</ignore_theme_auto_detection>";
|
||||||
|
else
|
||||||
|
data[i] = " <ignore_theme_auto_detection>n</ignore_theme_auto_detection>";
|
||||||
|
}
|
||||||
if (data[i].contains("<dark_theme_icons_menu>") && data[i].contains("</dark_theme_icons_menu>")) {
|
if (data[i].contains("<dark_theme_icons_menu>") && data[i].contains("</dark_theme_icons_menu>")) {
|
||||||
if (fDarkThemeIconsMenu)
|
if (fDarkThemeIconsMenu)
|
||||||
data[i] = " <dark_theme_icons_menu>y</dark_theme_icons_menu>";
|
data[i] = " <dark_theme_icons_menu>y</dark_theme_icons_menu>";
|
||||||
|
@ -73,7 +73,7 @@ class PAdminXMLParser
|
|||||||
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
|
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
|
||||||
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
|
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
|
||||||
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
|
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
|
||||||
eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eEditW, eEditH,
|
eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eIgnoreThemeAutoDetection, eEditW, eEditH,
|
||||||
eFontName, eFontSize, eExecPath, eDefaultSavePath,
|
eFontName, eFontSize, eExecPath, eDefaultSavePath,
|
||||||
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
|
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
|
||||||
eTheoFuncPixmapPath, eFunc, eFuncName, eFuncComment, eFuncLabel,
|
eTheoFuncPixmapPath, eFunc, eFuncName, eFuncComment, eFuncLabel,
|
||||||
@ -131,6 +131,7 @@ class PAdmin : public QObject
|
|||||||
bool getEstimateN0Flag() { return fEstimateN0; }
|
bool getEstimateN0Flag() { return fEstimateN0; }
|
||||||
bool getYamlOutFlag() { return fYamlOut; }
|
bool getYamlOutFlag() { return fYamlOut; }
|
||||||
bool getChisqPerRunBlockFlag() { return fChisqPreRunBlock; }
|
bool getChisqPerRunBlockFlag() { return fChisqPreRunBlock; }
|
||||||
|
bool getIgnoreThemeAutoDetection() { return fIgnoreThemeAutoDetection; }
|
||||||
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu; }
|
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu; }
|
||||||
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar; }
|
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar; }
|
||||||
int getEditWidth() { return fEditWidth; }
|
int getEditWidth() { return fEditWidth; }
|
||||||
@ -160,6 +161,7 @@ class PAdmin : public QObject
|
|||||||
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
|
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
|
||||||
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
|
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
|
||||||
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
|
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
|
||||||
|
void setIgnoreThemeAutoDetection(const bool flag) { fIgnoreThemeAutoDetection = flag; }
|
||||||
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
|
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
|
||||||
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
|
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
|
||||||
void setEditWidth(const int width) { fEditWidth = width; }
|
void setEditWidth(const int width) { fEditWidth = width; }
|
||||||
@ -186,38 +188,39 @@ class PAdmin : public QObject
|
|||||||
private:
|
private:
|
||||||
friend class PAdminXMLParser;
|
friend class PAdminXMLParser;
|
||||||
|
|
||||||
int fTimeout; ///< timeout in seconds
|
int fTimeout{3600}; ///< timeout in seconds
|
||||||
|
|
||||||
QString fFontName; ///< default font name
|
QString fFontName{QString("Monospace")}; ///< default font name
|
||||||
int fFontSize; ///< default font size
|
int fFontSize{11}; ///< default font size
|
||||||
|
|
||||||
QString fPrefPathName; ///< path-name of the musredit_startup.xml
|
QString fPrefPathName{QString("")}; ///< path-name of the musredit_startup.xml
|
||||||
QString fExecPath; ///< system path to the musrfit executables
|
QString fExecPath{QString("")}; ///< system path to the musrfit executables
|
||||||
QString fDefaultSavePath; ///< default path where the msr-file should be saved
|
QString fDefaultSavePath{QString("")}; ///< default path where the msr-file should be saved
|
||||||
QString fTheoFuncPixmapPath; ///< path where the default pixmaps can be found
|
QString fTheoFuncPixmapPath{QString("")}; ///< path where the default pixmaps can be found
|
||||||
|
|
||||||
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
||||||
|
|
||||||
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
bool fMusrviewShowFourier{false}; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
||||||
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
bool fMusrviewShowAvg{false}; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
||||||
bool fMusrviewShowOneToOne; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
|
bool fMusrviewShowOneToOne{false}; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
|
||||||
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
bool fKeepMinuit2Output{false}; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
||||||
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
bool fDumpAscii{false}; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
||||||
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
bool fDumpRoot{false}; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
||||||
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
bool fTitleFromDataFile{true}; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
||||||
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
bool fChisqPreRunBlock{false}; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
||||||
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
bool fEstimateN0{true}; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
||||||
bool fYamlOut; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
|
bool fYamlOut{false}; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
|
||||||
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
bool fEnableMusrT0{true}; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
||||||
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
bool fIgnoreThemeAutoDetection{false}; ///< flag indicating that the theme autodetection shall be ignored. (default: no)
|
||||||
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
|
bool fDarkThemeIconsMenu{false}; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
||||||
|
bool fDarkThemeIconsToolbar{false}; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
|
||||||
int fEditWidth{900}; ///< startup edit width
|
int fEditWidth{900}; ///< startup edit width
|
||||||
int fEditHeight{800}; ///< startup edit height
|
int fEditHeight{800}; ///< startup edit height
|
||||||
|
|
||||||
QString fBeamline; ///< name of the beamline. Used to generate default run header lines.
|
QString fBeamline{QString("")}; ///< name of the beamline. Used to generate default run header lines.
|
||||||
QString fInstitute; ///< name of the institute. Used to generate default run header lines.
|
QString fInstitute{QString("")}; ///< name of the institute. Used to generate default run header lines.
|
||||||
QString fFileFormat; ///< default file format. Used to generate default run header lines.
|
QString fFileFormat{QString("")}; ///< default file format. Used to generate default run header lines.
|
||||||
bool fLifetimeCorrection; ///< flag indicating if by default the lifetime-correction-flag in a single histo file shall be set.
|
bool fLifetimeCorrection{true}; ///< flag indicating if by default the lifetime-correction-flag in a single histo file shall be set.
|
||||||
|
|
||||||
mutable PMsr2DataParam fMsr2DataParam; ///< keeps msr2data default parameter flags
|
mutable PMsr2DataParam fMsr2DataParam; ///< keeps msr2data default parameter flags
|
||||||
|
|
||||||
|
@ -59,6 +59,12 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
|
|||||||
fDarkThemeIconsToolbar_checkBox->setCheckState(Qt::Unchecked);
|
fDarkThemeIconsToolbar_checkBox->setCheckState(Qt::Unchecked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fAdmin->getIgnoreThemeAutoDetection()) {
|
||||||
|
fIgnoreThemeAutoDetection_checkBox->setCheckState(Qt::Checked);
|
||||||
|
} else {
|
||||||
|
fIgnoreThemeAutoDetection_checkBox->setCheckState(Qt::Unchecked);
|
||||||
|
}
|
||||||
|
|
||||||
fKeepMn2Output_checkBox->setChecked(fAdmin->getKeepMinuit2OutputFlag());
|
fKeepMn2Output_checkBox->setChecked(fAdmin->getKeepMinuit2OutputFlag());
|
||||||
|
|
||||||
if (fAdmin->getDumpAsciiFlag() && !fAdmin->getDumpRootFlag()) {
|
if (fAdmin->getDumpAsciiFlag() && !fAdmin->getDumpRootFlag()) {
|
||||||
|
@ -55,6 +55,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
|
|||||||
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
|
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
|
||||||
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
|
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
|
||||||
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
|
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
|
||||||
|
bool getIgnoreThemeAutoDetection() { return fIgnoreThemeAutoDetection_checkBox->isChecked(); }
|
||||||
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
|
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
|
||||||
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
|
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
|
||||||
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
||||||
|
@ -88,11 +88,11 @@
|
|||||||
PTextEdit::PTextEdit( QWidget *parent )
|
PTextEdit::PTextEdit( QWidget *parent )
|
||||||
: QMainWindow( parent )
|
: QMainWindow( parent )
|
||||||
{
|
{
|
||||||
bool gotTheme = getTheme();
|
|
||||||
|
|
||||||
// reads and manages the conents of the xml-startup (musredit_startup.xml) file
|
// reads and manages the conents of the xml-startup (musredit_startup.xml) file
|
||||||
fAdmin = std::make_unique<PAdmin>();
|
fAdmin = std::make_unique<PAdmin>();
|
||||||
|
|
||||||
|
bool gotTheme = getTheme();
|
||||||
|
|
||||||
// set default setting of the fDarkMenuIconIcons only if a theme has been recognized, otherwise take the
|
// set default setting of the fDarkMenuIconIcons only if a theme has been recognized, otherwise take the
|
||||||
// one from the xml startup file.
|
// one from the xml startup file.
|
||||||
if (gotTheme) {
|
if (gotTheme) {
|
||||||
@ -125,6 +125,7 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
setupEditActions();
|
setupEditActions();
|
||||||
setupTextActions();
|
setupTextActions();
|
||||||
setupMusrActions();
|
setupMusrActions();
|
||||||
|
setupJumpToBlock();
|
||||||
setupHelpActions();
|
setupHelpActions();
|
||||||
|
|
||||||
fTabWidget = std::make_unique<QTabWidget>( this );
|
fTabWidget = std::make_unique<QTabWidget>( this );
|
||||||
@ -133,7 +134,6 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
|
|
||||||
textFamily(fAdmin->getFontName());
|
textFamily(fAdmin->getFontName());
|
||||||
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
||||||
fFontChanging = false;
|
|
||||||
|
|
||||||
QString iconName("");
|
QString iconName("");
|
||||||
if (fDarkMenuIcon)
|
if (fDarkMenuIcon)
|
||||||
@ -958,6 +958,31 @@ void PTextEdit::setupHelpActions()
|
|||||||
menu->addAction(a);
|
menu->addAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Setup the JumpToBlock actions.
|
||||||
|
*/
|
||||||
|
void PTextEdit::setupJumpToBlock()
|
||||||
|
{
|
||||||
|
QToolBar *tb = new QToolBar( this );
|
||||||
|
tb->setWindowTitle( "JumpToBlock Actions" );
|
||||||
|
addToolBar( tb );
|
||||||
|
|
||||||
|
QStringList jumpToBlockStr = {"FITPARAMETER", "THEORY", "FUNCTIONS", "GLOBAL", "RUN", "COMMANDS", "PLOT", "FOURIER", "STATISTIC"};
|
||||||
|
fJumpToBlock = std::make_unique<QComboBox>();
|
||||||
|
if (fJumpToBlock == nullptr)
|
||||||
|
return;
|
||||||
|
fJumpToBlock->addItems(jumpToBlockStr);
|
||||||
|
fJumpToBlock->setEditable(false);
|
||||||
|
|
||||||
|
connect( fJumpToBlock.get(), SIGNAL( activated(int) ), this, SLOT( jumpToBlock(int) ));
|
||||||
|
|
||||||
|
QLabel *jstr = new QLabel(" Jump to block: ");
|
||||||
|
|
||||||
|
tb->addWidget(jstr);
|
||||||
|
tb->addWidget(fJumpToBlock.get());
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>load a msr-file.
|
* <p>load a msr-file.
|
||||||
@ -974,6 +999,7 @@ void PTextEdit::load( const QString &f, const int index )
|
|||||||
// create a new text edit object
|
// create a new text edit object
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
|
edit->setCenterOnScroll(true);
|
||||||
|
|
||||||
// place the text edit object at the appropriate tab position
|
// place the text edit object at the appropriate tab position
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
@ -1158,6 +1184,7 @@ void PTextEdit::fileNew()
|
|||||||
{
|
{
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
|
edit->setCenterOnScroll(true);
|
||||||
doConnections( edit );
|
doConnections( edit );
|
||||||
fTabWidget->addTab( edit, tr( "noname" ) );
|
fTabWidget->addTab( edit, tr( "noname" ) );
|
||||||
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
||||||
@ -1391,18 +1418,18 @@ void PTextEdit::fileSavePrefs()
|
|||||||
QString msg("");
|
QString msg("");
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText("Which Preferences do you want to open?");
|
msgBox.setText("Which Preferences do you want to open?");
|
||||||
msgBox.addButton("Default", QMessageBox::AcceptRole);
|
QAbstractButton *def = msgBox.addButton("Default", QMessageBox::AcceptRole);
|
||||||
msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
QAbstractButton *cust = msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
||||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||||
int result = msgBox.exec();
|
int result = msgBox.exec();
|
||||||
if (result == QMessageBox::Cancel) {
|
if (result == QMessageBox::Cancel) {
|
||||||
return;
|
return;
|
||||||
} else if (result == 0) { // default dir
|
} else if (msgBox.clickedButton() == def) { // default dir
|
||||||
fln = fAdmin->getDefaultPrefPathName();
|
fln = fAdmin->getDefaultPrefPathName();
|
||||||
msg = QString("Current Default Preferences Path-Name:\n") + fln;
|
msg = QString("Current Default Preferences Path-Name:\n") + fln;
|
||||||
if (QMessageBox::information(this, "Info", msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
if (QMessageBox::information(this, "Info", msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||||
return;
|
return;
|
||||||
} else if (result == 1) { // custom dir
|
} else if (msgBox.clickedButton() == cust) { // custom dir
|
||||||
fln = QFileDialog::getSaveFileName( this,
|
fln = QFileDialog::getSaveFileName( this,
|
||||||
tr( "Save Prefs As" ), "musredit_startup.xml",
|
tr( "Save Prefs As" ), "musredit_startup.xml",
|
||||||
tr( "xml-Files (*.xml);;All Files (*)" ) );
|
tr( "xml-Files (*.xml);;All Files (*)" ) );
|
||||||
@ -1939,7 +1966,7 @@ void PTextEdit::editUncomment()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Chances the font.
|
* <p>Changes the font.
|
||||||
*
|
*
|
||||||
* \param f font name
|
* \param f font name
|
||||||
*/
|
*/
|
||||||
@ -1956,7 +1983,7 @@ void PTextEdit::textFamily( const QString &f )
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Chances the font size.
|
* <p>Changes the font size.
|
||||||
*
|
*
|
||||||
* \param p font size in points.
|
* \param p font size in points.
|
||||||
*/
|
*/
|
||||||
@ -2185,6 +2212,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
||||||
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
||||||
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
|
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
|
||||||
|
fMsr2DataParam->yamlOut = fAdmin->getYamlOutFlag();
|
||||||
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
|
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
|
||||||
|
|
||||||
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
||||||
@ -2207,6 +2235,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
||||||
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
||||||
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
|
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
|
||||||
|
fAdmin->setYamlOutFlag(fMsr2DataParam->yamlOut);
|
||||||
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
|
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
|
||||||
|
|
||||||
// analyze parameters
|
// analyze parameters
|
||||||
@ -2707,6 +2736,7 @@ void PTextEdit::musrPrefs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dlg->exec() == QDialog::Accepted) {
|
if (dlg->exec() == QDialog::Accepted) {
|
||||||
|
fAdmin->setIgnoreThemeAutoDetection(dlg->getIgnoreThemeAutoDetection());
|
||||||
fAdmin->setDarkThemeIconsMenuFlag(dlg->getDarkThemeIconsMenuFlag());
|
fAdmin->setDarkThemeIconsMenuFlag(dlg->getDarkThemeIconsMenuFlag());
|
||||||
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
|
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
|
||||||
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
|
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
|
||||||
@ -3304,12 +3334,35 @@ void PTextEdit::setFileSystemWatcherActive()
|
|||||||
fFileSystemWatcherActive = true;
|
fFileSystemWatcherActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>slot called when jumpToBlock combobox is selected
|
||||||
|
* @param idx
|
||||||
|
*/
|
||||||
|
void PTextEdit::jumpToBlock(int idx)
|
||||||
|
{
|
||||||
|
QString str = fJumpToBlock->itemText(idx);
|
||||||
|
|
||||||
|
QTextDocument::FindFlags flags= QTextDocument::FindCaseSensitively | QTextDocument::FindWholeWords;
|
||||||
|
|
||||||
|
bool found = currentEditor()->find(str, flags);
|
||||||
|
if (found)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// set cursor to start
|
||||||
|
currentEditor()->moveCursor(QTextCursor::Start);
|
||||||
|
currentEditor()->find(str, flags);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief PTextEdit::getTheme
|
* @brief PTextEdit::getTheme
|
||||||
*/
|
*/
|
||||||
bool PTextEdit::getTheme()
|
bool PTextEdit::getTheme()
|
||||||
{
|
{
|
||||||
|
if (fAdmin->getIgnoreThemeAutoDetection())
|
||||||
|
return false;
|
||||||
|
|
||||||
fDarkMenuIcon = false; // true if theme is dark
|
fDarkMenuIcon = false; // true if theme is dark
|
||||||
fDarkToolBarIcon = false; // needed for ubuntu dark since there the menu icons are dark, however the toolbar icons are plain!
|
fDarkToolBarIcon = false; // needed for ubuntu dark since there the menu icons are dark, however the toolbar icons are plain!
|
||||||
|
|
||||||
@ -3341,10 +3394,9 @@ bool PTextEdit::getTheme()
|
|||||||
|
|
||||||
if (str.contains("dark", Qt::CaseInsensitive)) {
|
if (str.contains("dark", Qt::CaseInsensitive)) {
|
||||||
fDarkMenuIcon = true;
|
fDarkMenuIcon = true;
|
||||||
if (str.contains("ubuntu", Qt::CaseInsensitive)) {
|
if (str.contains("ubuntu", Qt::CaseInsensitive) ||
|
||||||
fDarkMenuIcon = false;
|
str.contains("xfce", Qt::CaseInsensitive) ||
|
||||||
fDarkToolBarIcon = false;
|
str.contains("mx", Qt::CaseInsensitive)) {
|
||||||
} else if (str.contains("xfce", Qt::CaseInsensitive)) {
|
|
||||||
fDarkMenuIcon = false;
|
fDarkMenuIcon = false;
|
||||||
fDarkToolBarIcon = false;
|
fDarkToolBarIcon = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,6 +86,7 @@ private:
|
|||||||
void setupTextActions();
|
void setupTextActions();
|
||||||
void setupMusrActions();
|
void setupMusrActions();
|
||||||
void setupHelpActions();
|
void setupHelpActions();
|
||||||
|
void setupJumpToBlock();
|
||||||
void load( const QString &f, const int index=-1 );
|
void load( const QString &f, const int index=-1 );
|
||||||
PSubTextEdit *currentEditor() const;
|
PSubTextEdit *currentEditor() const;
|
||||||
void doConnections( PSubTextEdit *e );
|
void doConnections( PSubTextEdit *e );
|
||||||
@ -167,16 +168,18 @@ private slots:
|
|||||||
void fileChanged(const QString &fileName);
|
void fileChanged(const QString &fileName);
|
||||||
void setFileSystemWatcherActive();
|
void setFileSystemWatcherActive();
|
||||||
|
|
||||||
|
void jumpToBlock(int idx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool fDarkMenuIcon; ///< flag indicating if a dark or plain icon shall be used in the menu pull-downs
|
bool fDarkMenuIcon{false}; ///< flag indicating if a dark or plain icon shall be used in the menu pull-downs
|
||||||
bool fDarkToolBarIcon; ///< flag indicating if a dark or plain icon shall be used in the toolbar
|
bool fDarkToolBarIcon{false}; ///< flag indicating if a dark or plain icon shall be used in the toolbar
|
||||||
std::unique_ptr<PAdmin> fAdmin; ///< pointer to the xml-startup file informations. Needed for different purposes like default working- and executable directories etc.
|
std::unique_ptr<PAdmin> fAdmin; ///< pointer to the xml-startup file informations. Needed for different purposes like default working- and executable directories etc.
|
||||||
std::unique_ptr<QFileSystemWatcher> fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
|
std::unique_ptr<QFileSystemWatcher> fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
|
||||||
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
|
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
|
||||||
QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling
|
QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling
|
||||||
QString fLastDirInUse; ///< string holding the path from where the last file was loaded.
|
QString fLastDirInUse{QString("")}; ///< string holding the path from where the last file was loaded.
|
||||||
QStringList fMusrFTPrevCmd;
|
QStringList fMusrFTPrevCmd;
|
||||||
int fEditW, fEditH;
|
int fEditW{900}, fEditH{800};
|
||||||
|
|
||||||
QMap<QString, QAction*> fActions;
|
QMap<QString, QAction*> fActions;
|
||||||
std::unique_ptr<QAction> fMusrT0Action;
|
std::unique_ptr<QAction> fMusrT0Action;
|
||||||
@ -186,7 +189,8 @@ private:
|
|||||||
|
|
||||||
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
||||||
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
||||||
bool fFontChanging; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
bool fFontChanging{false}; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
||||||
|
std::unique_ptr<QComboBox> fJumpToBlock; ///< combo box used to jump to the msr-file blocks
|
||||||
|
|
||||||
std::unique_ptr<QTabWidget> fTabWidget; ///< tab widget in which the text editor(s) are placed
|
std::unique_ptr<QTabWidget> fTabWidget; ///< tab widget in which the text editor(s) are placed
|
||||||
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>452</width>
|
<width>460</width>
|
||||||
<height>180</height>
|
<height>200</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -20,20 +20,13 @@
|
|||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
|
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget_0">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>5</y>
|
|
||||||
<width>451</width>
|
|
||||||
<height>171</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="fTabWidget">
|
<widget class="QTabWidget" name="fTabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="fGeneral_tab">
|
<widget class="QWidget" name="fGeneral_tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -43,7 +36,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>70</y>
|
<y>80</y>
|
||||||
<width>421</width>
|
<width>421</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -52,13 +45,13 @@
|
|||||||
<string>Change Default Search Paths</string>
|
<string>Change Default Search Paths</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>12</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>415</width>
|
<width>416</width>
|
||||||
<height>62</height>
|
<height>61</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
@ -87,6 +80,13 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fIgnoreThemeAutoDetection_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ignore Theme Auto Detect</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="fDarkThemeIconsMenu_checkBox">
|
<widget class="QCheckBox" name="fDarkThemeIconsMenu_checkBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -305,7 +305,8 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>fTabWidget</tabstop>
|
<tabstop>fTabWidget</tabstop>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
<musrview_show_avg>n</musrview_show_avg>
|
<musrview_show_avg>n</musrview_show_avg>
|
||||||
<musrview_show_one_to_one>n</musrview_show_one_to_one>
|
<musrview_show_one_to_one>n</musrview_show_one_to_one>
|
||||||
<enable_musrt0>y</enable_musrt0>
|
<enable_musrt0>y</enable_musrt0>
|
||||||
|
<ignore_theme_auto_detection>n</ignore_theme_auto_detection>
|
||||||
<dark_theme_icons_menu>n</dark_theme_icons_menu>
|
<dark_theme_icons_menu>n</dark_theme_icons_menu>
|
||||||
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>
|
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>
|
||||||
<edit_w>900</edit_w>
|
<edit_w>900</edit_w>
|
||||||
|
@ -645,12 +645,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
|||||||
param.SetName(headerInfo[i]);
|
param.SetName(headerInfo[i]);
|
||||||
param.SetValue(dval);
|
param.SetValue(dval);
|
||||||
if (i+1 < token.size()) {
|
if (i+1 < token.size()) {
|
||||||
if (headerCode[i+1] == PMUPP_VALUE) {
|
if ((headerCode[i+1] == PMUPP_VALUE) || (headerCode[i+1] == PMUPP_RUN)) {
|
||||||
param.SetNegErr(0.0);
|
param.SetNegErr(0.0);
|
||||||
param.SetPosErr(0.0);
|
param.SetPosErr(0.0);
|
||||||
run.AddParam(param);
|
run.AddParam(param);
|
||||||
param.ResetParam();
|
param.ResetParam();
|
||||||
}
|
}
|
||||||
|
} else { // last token
|
||||||
|
param.SetNegErr(0.0);
|
||||||
|
param.SetPosErr(0.0);
|
||||||
|
run.AddParam(param);
|
||||||
|
param.ResetParam();
|
||||||
}
|
}
|
||||||
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
||||||
param.SetPosErr(dval);
|
param.SetPosErr(dval);
|
||||||
|
@ -637,7 +637,7 @@ void PmuppGui::fileOpen()
|
|||||||
this,
|
this,
|
||||||
"muSR Parameter Files",
|
"muSR Parameter Files",
|
||||||
"./",
|
"./",
|
||||||
"db-files (*.db);; All Params (*.msr *.db *.dat);; Msr-Files (*.msr);; dat-Files (*.dat);; All (*)");
|
"dat-files (*.dat);; db-Files (*.db);; All Params (*.msr *.db *.dat);; Msr-Files (*.msr);; All (*)");
|
||||||
|
|
||||||
if (list.count() == 0)
|
if (list.count() == 0)
|
||||||
return;
|
return;
|
||||||
@ -973,7 +973,8 @@ void PmuppGui::refresh()
|
|||||||
|
|
||||||
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
||||||
if (fParamDataHandler->GetCollection(i)->GetName() == label) { // found collection
|
if (fParamDataHandler->GetCollection(i)->GetName() == label) { // found collection
|
||||||
pathName = fParamDataHandler->GetCollection(i)->GetPathName();
|
QDir dir(QDir::currentPath());
|
||||||
|
pathName = dir.path() + "/" + fParamDataHandler->GetCollection(i)->GetName();
|
||||||
collIdx = i;
|
collIdx = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -150,6 +150,8 @@ bool PAdminXMLParser::startElement()
|
|||||||
fKeyWord = eMusrviewShowOneToOne;
|
fKeyWord = eMusrviewShowOneToOne;
|
||||||
} else if (qName == "enable_musrt0") {
|
} else if (qName == "enable_musrt0") {
|
||||||
fKeyWord = eEnableMusrT0;
|
fKeyWord = eEnableMusrT0;
|
||||||
|
} else if (qName == "ignore_theme_auto_detection") {
|
||||||
|
fKeyWord = eIgnoreThemeAutoDetection;
|
||||||
} else if (qName == "dark_theme_icons_menu") {
|
} else if (qName == "dark_theme_icons_menu") {
|
||||||
fKeyWord = eDarkThemeIconsMenu;
|
fKeyWord = eDarkThemeIconsMenu;
|
||||||
} else if (qName == "dark_theme_icons_toolbar") {
|
} else if (qName == "dark_theme_icons_toolbar") {
|
||||||
@ -158,11 +160,11 @@ bool PAdminXMLParser::startElement()
|
|||||||
fKeyWord = eEditW;
|
fKeyWord = eEditW;
|
||||||
} else if (qName == "edit_h") {
|
} else if (qName == "edit_h") {
|
||||||
fKeyWord = eEditH;
|
fKeyWord = eEditH;
|
||||||
} else if (qName =="keep_minuit2_output") {
|
} else if (qName == "keep_minuit2_output") {
|
||||||
fKeyWord = eKeepMinuit2Output;
|
fKeyWord = eKeepMinuit2Output;
|
||||||
} else if (qName == "dump_ascii") {
|
} else if (qName == "dump_ascii") {
|
||||||
fKeyWord = eDumpAscii;
|
fKeyWord = eDumpAscii;
|
||||||
} else if (qName =="dump_root") {
|
} else if (qName == "dump_root") {
|
||||||
fKeyWord = eDumpRoot;
|
fKeyWord = eDumpRoot;
|
||||||
} else if (qName == "estimate_n0") {
|
} else if (qName == "estimate_n0") {
|
||||||
fKeyWord = eEstimateN0;
|
fKeyWord = eEstimateN0;
|
||||||
@ -281,7 +283,6 @@ bool PAdminXMLParser::endElement()
|
|||||||
bool PAdminXMLParser::characters()
|
bool PAdminXMLParser::characters()
|
||||||
{
|
{
|
||||||
QString str = fXml.text().toString();
|
QString str = fXml.text().toString();
|
||||||
|
|
||||||
if (str.isEmpty())
|
if (str.isEmpty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -344,6 +345,13 @@ bool PAdminXMLParser::characters()
|
|||||||
flag = false;
|
flag = false;
|
||||||
fAdmin->setEnableMusrT0Flag(flag);
|
fAdmin->setEnableMusrT0Flag(flag);
|
||||||
break;
|
break;
|
||||||
|
case eIgnoreThemeAutoDetection:
|
||||||
|
if (str == "y")
|
||||||
|
flag = true;
|
||||||
|
else
|
||||||
|
flag = false;
|
||||||
|
fAdmin->setIgnoreThemeAutoDetection(flag);
|
||||||
|
break;
|
||||||
case eDarkThemeIconsMenu:
|
case eDarkThemeIconsMenu:
|
||||||
if (str == "y")
|
if (str == "y")
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -405,6 +413,7 @@ bool PAdminXMLParser::characters()
|
|||||||
flag = false;
|
flag = false;
|
||||||
fAdmin->fMsr2DataParam.yamlOut = flag;
|
fAdmin->fMsr2DataParam.yamlOut = flag;
|
||||||
fAdmin->setYamlOutFlag(flag);
|
fAdmin->setYamlOutFlag(flag);
|
||||||
|
break;
|
||||||
case eChisqPreRunBlock:
|
case eChisqPreRunBlock:
|
||||||
if (str == "y")
|
if (str == "y")
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -628,6 +637,7 @@ void PAdminXMLParser::dump()
|
|||||||
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
|
std::cout << "debug> musrview_show_fourier : " << fAdmin->getMusrviewShowFourierFlag() << std::endl;
|
||||||
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
|
std::cout << "debug> musrview_show_avg : " << fAdmin->getMusrviewShowAvgFlag() << std::endl;
|
||||||
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
|
std::cout << "debug> enable_musrt0 : " << fAdmin->getEnableMusrT0Flag() << std::endl;
|
||||||
|
std::cout << "debug> ignore_theme_auto_detection : " << fAdmin->getIgnoreThemeAutoDetection() << std::endl;
|
||||||
std::cout << "debug> dark_theme_icons_menu : " << fAdmin->getDarkThemeIconsMenuFlag() << std::endl;
|
std::cout << "debug> dark_theme_icons_menu : " << fAdmin->getDarkThemeIconsMenuFlag() << std::endl;
|
||||||
std::cout << "debug> dark_theme_icons_toolbar : " << fAdmin->getDarkThemeIconsToolbarFlag() << std::endl;
|
std::cout << "debug> dark_theme_icons_toolbar : " << fAdmin->getDarkThemeIconsToolbarFlag() << std::endl;
|
||||||
std::cout << "debug> edit_w : " << fAdmin->getEditWidth() << std::endl;
|
std::cout << "debug> edit_w : " << fAdmin->getEditWidth() << std::endl;
|
||||||
@ -742,30 +752,6 @@ QString PAdminXMLParser::expandPath(const QString &str)
|
|||||||
*/
|
*/
|
||||||
PAdmin::PAdmin() : QObject()
|
PAdmin::PAdmin() : QObject()
|
||||||
{
|
{
|
||||||
fTimeout = 3600;
|
|
||||||
|
|
||||||
fFontName = QString("Courier"); // default font
|
|
||||||
fFontSize = 11; // default font size
|
|
||||||
|
|
||||||
fPrefPathName = QString("");
|
|
||||||
fExecPath = QString("");
|
|
||||||
fDefaultSavePath = QString("");
|
|
||||||
fTheoFuncPixmapPath = QString("");
|
|
||||||
|
|
||||||
fBeamline = QString("");
|
|
||||||
fInstitute = QString("");
|
|
||||||
fFileFormat = QString("");
|
|
||||||
|
|
||||||
fMusrviewShowFourier = false;
|
|
||||||
fMusrviewShowAvg = false;
|
|
||||||
|
|
||||||
fTitleFromDataFile = false;
|
|
||||||
fEnableMusrT0 = false;
|
|
||||||
fLifetimeCorrection = true;
|
|
||||||
fEstimateN0 = true;
|
|
||||||
fYamlOut = false;
|
|
||||||
fChisqPreRunBlock = false;
|
|
||||||
|
|
||||||
fMsr2DataParam.runList = QString("");
|
fMsr2DataParam.runList = QString("");
|
||||||
fMsr2DataParam.runListFileName = QString("");
|
fMsr2DataParam.runListFileName = QString("");
|
||||||
fMsr2DataParam.msrFileExtension = QString("");
|
fMsr2DataParam.msrFileExtension = QString("");
|
||||||
@ -1031,6 +1017,12 @@ int PAdmin::savePrefs(QString pref_fln)
|
|||||||
else
|
else
|
||||||
data[i] = " <enable_musrt0>n</enable_musrt0>";
|
data[i] = " <enable_musrt0>n</enable_musrt0>";
|
||||||
}
|
}
|
||||||
|
if (data[i].contains("<ignore_theme_auto_detection>")) {
|
||||||
|
if (fIgnoreThemeAutoDetection)
|
||||||
|
data[i] = " <ignore_theme_auto_detection>y</ignore_theme_auto_detection>";
|
||||||
|
else
|
||||||
|
data[i] = " <ignore_theme_auto_detection>n</ignore_theme_auto_detection>";
|
||||||
|
}
|
||||||
if (data[i].contains("<dark_theme_icons_menu>") && data[i].contains("</dark_theme_icons_menu>")) {
|
if (data[i].contains("<dark_theme_icons_menu>") && data[i].contains("</dark_theme_icons_menu>")) {
|
||||||
if (fDarkThemeIconsMenu)
|
if (fDarkThemeIconsMenu)
|
||||||
data[i] = " <dark_theme_icons_menu>y</dark_theme_icons_menu>";
|
data[i] = " <dark_theme_icons_menu>y</dark_theme_icons_menu>";
|
||||||
|
@ -73,7 +73,7 @@ class PAdminXMLParser
|
|||||||
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
|
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
|
||||||
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
|
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0, eYamlOut,
|
||||||
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
|
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
|
||||||
eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eEditW, eEditH,
|
eIgnoreThemeAutoDetection, eDarkThemeIconsMenu, eDarkThemeIconsToolbar, eEditW, eEditH,
|
||||||
eFontName, eFontSize, eExecPath, eDefaultSavePath,
|
eFontName, eFontSize, eExecPath, eDefaultSavePath,
|
||||||
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
|
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
|
||||||
eTheoFuncPixmapPath, eFunc, eFuncName, eFuncComment, eFuncLabel,
|
eTheoFuncPixmapPath, eFunc, eFuncName, eFuncComment, eFuncLabel,
|
||||||
@ -131,6 +131,7 @@ class PAdmin : public QObject
|
|||||||
bool getDumpRootFlag() { return fDumpRoot; }
|
bool getDumpRootFlag() { return fDumpRoot; }
|
||||||
bool getEstimateN0Flag() { return fEstimateN0; }
|
bool getEstimateN0Flag() { return fEstimateN0; }
|
||||||
bool getChisqPerRunBlockFlag() { return fChisqPreRunBlock; }
|
bool getChisqPerRunBlockFlag() { return fChisqPreRunBlock; }
|
||||||
|
bool getIgnoreThemeAutoDetection() { return fIgnoreThemeAutoDetection; }
|
||||||
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu; }
|
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu; }
|
||||||
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar; }
|
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar; }
|
||||||
int getEditWidth() { return fEditWidth; }
|
int getEditWidth() { return fEditWidth; }
|
||||||
@ -160,6 +161,7 @@ class PAdmin : public QObject
|
|||||||
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
|
void setEstimateN0Flag(const bool flag) { fEstimateN0 = flag; }
|
||||||
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
|
void setYamlOutFlag(const bool flag) { fYamlOut = flag; }
|
||||||
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
|
void setChisqPerRunBlockFlag(const bool flag) { fChisqPreRunBlock = flag; }
|
||||||
|
void setIgnoreThemeAutoDetection(const bool flag) { fIgnoreThemeAutoDetection = flag; }
|
||||||
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
|
void setDarkThemeIconsMenuFlag(const bool flag) { fDarkThemeIconsMenu = flag; }
|
||||||
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
|
void setDarkThemeIconsToolbarFlag(const bool flag) { fDarkThemeIconsToolbar = flag; }
|
||||||
void setEditWidth(const int width) { fEditWidth = width; }
|
void setEditWidth(const int width) { fEditWidth = width; }
|
||||||
@ -186,31 +188,32 @@ class PAdmin : public QObject
|
|||||||
private:
|
private:
|
||||||
friend class PAdminXMLParser;
|
friend class PAdminXMLParser;
|
||||||
|
|
||||||
int fTimeout; ///< timeout in seconds
|
int fTimeout{3600}; ///< timeout in seconds
|
||||||
|
|
||||||
QString fFontName; ///< default font name
|
QString fFontName{QString("Monospace")}; ///< default font name
|
||||||
int fFontSize; ///< default font size
|
int fFontSize{11}; ///< default font size
|
||||||
|
|
||||||
QString fPrefPathName; ///< path-name of the musredit_startup.xml
|
QString fPrefPathName{QString("")}; ///< path-name of the musredit_startup.xml
|
||||||
QString fExecPath; ///< system path to the musrfit executables
|
QString fExecPath{QString("")}; ///< system path to the musrfit executables
|
||||||
QString fDefaultSavePath; ///< default path where the msr-file should be saved
|
QString fDefaultSavePath{QString("")}; ///< default path where the msr-file should be saved
|
||||||
QString fTheoFuncPixmapPath; ///< path where the default pixmaps can be found
|
QString fTheoFuncPixmapPath{QString("")}; ///< path where the default pixmaps can be found
|
||||||
|
|
||||||
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
||||||
|
|
||||||
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
bool fMusrviewShowFourier{false}; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
||||||
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
bool fMusrviewShowAvg{false}; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
||||||
bool fMusrviewShowOneToOne; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
|
bool fMusrviewShowOneToOne{false}; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
|
||||||
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
bool fKeepMinuit2Output{false}; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
||||||
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
bool fDumpAscii{false}; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
||||||
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
bool fDumpRoot{false}; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
||||||
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
bool fTitleFromDataFile{true}; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
||||||
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
bool fChisqPreRunBlock{false}; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
||||||
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
bool fEstimateN0{true}; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
||||||
bool fYamlOut; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
|
bool fYamlOut{false}; ///< flag indicating if the MINUIT2.OUTPUT file should also be written as <msr-file>.yaml output. (default: no).
|
||||||
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
bool fEnableMusrT0{true}; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
||||||
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
bool fIgnoreThemeAutoDetection{false}; ///< flag indicating that the theme autodetection shall be ignored. (default: no)
|
||||||
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
|
bool fDarkThemeIconsMenu{false}; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
||||||
|
bool fDarkThemeIconsToolbar{false}; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
|
||||||
int fEditWidth{900}; ///< startup edit width
|
int fEditWidth{900}; ///< startup edit width
|
||||||
int fEditHeight{800}; ///< startup edit height
|
int fEditHeight{800}; ///< startup edit height
|
||||||
|
|
||||||
|
@ -59,6 +59,12 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
|
|||||||
fDarkThemeIconsToolbar_checkBox->setCheckState(Qt::Unchecked);
|
fDarkThemeIconsToolbar_checkBox->setCheckState(Qt::Unchecked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fAdmin->getIgnoreThemeAutoDetection()) {
|
||||||
|
fIgnoreThemeAutoDetection_checkBox->setCheckState(Qt::Checked);
|
||||||
|
} else {
|
||||||
|
fIgnoreThemeAutoDetection_checkBox->setCheckState(Qt::Unchecked);
|
||||||
|
}
|
||||||
|
|
||||||
fKeepMn2Output_checkBox->setChecked(fAdmin->getKeepMinuit2OutputFlag());
|
fKeepMn2Output_checkBox->setChecked(fAdmin->getKeepMinuit2OutputFlag());
|
||||||
|
|
||||||
if (fAdmin->getDumpAsciiFlag() && !fAdmin->getDumpRootFlag()) {
|
if (fAdmin->getDumpAsciiFlag() && !fAdmin->getDumpRootFlag()) {
|
||||||
|
@ -55,6 +55,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
|
|||||||
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
|
bool getKeepRunPerBlockChisqFlag() { return fPerRunBlockChisq_checkBox->isChecked(); }
|
||||||
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
|
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
|
||||||
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
|
bool getYamlOutFlag() { return fYamlOut_checkBox->isChecked(); }
|
||||||
|
bool getIgnoreThemeAutoDetection() { return fIgnoreThemeAutoDetection_checkBox->isChecked(); }
|
||||||
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
|
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
|
||||||
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
|
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
|
||||||
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
||||||
|
@ -88,11 +88,11 @@
|
|||||||
PTextEdit::PTextEdit( QWidget *parent )
|
PTextEdit::PTextEdit( QWidget *parent )
|
||||||
: QMainWindow( parent )
|
: QMainWindow( parent )
|
||||||
{
|
{
|
||||||
bool gotTheme = getTheme();
|
|
||||||
|
|
||||||
// reads and manages the conents of the xml-startup (musredit_startup.xml) file
|
// reads and manages the conents of the xml-startup (musredit_startup.xml) file
|
||||||
fAdmin = std::make_unique<PAdmin>();
|
fAdmin = std::make_unique<PAdmin>();
|
||||||
|
|
||||||
|
bool gotTheme = getTheme();
|
||||||
|
|
||||||
// set default setting of the fDarkMenuIconIcons only if a theme has been recognized, otherwise take the
|
// set default setting of the fDarkMenuIconIcons only if a theme has been recognized, otherwise take the
|
||||||
// one from the xml startup file.
|
// one from the xml startup file.
|
||||||
if (gotTheme) {
|
if (gotTheme) {
|
||||||
@ -117,8 +117,6 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initialize stuff
|
// initialize stuff
|
||||||
//as35 fMusrT0Action = nullptr;
|
|
||||||
|
|
||||||
fMsr2DataParam = nullptr;
|
fMsr2DataParam = nullptr;
|
||||||
fFindReplaceData = nullptr;
|
fFindReplaceData = nullptr;
|
||||||
|
|
||||||
@ -127,6 +125,7 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
setupEditActions();
|
setupEditActions();
|
||||||
setupTextActions();
|
setupTextActions();
|
||||||
setupMusrActions();
|
setupMusrActions();
|
||||||
|
setupJumpToBlock();
|
||||||
setupHelpActions();
|
setupHelpActions();
|
||||||
|
|
||||||
fTabWidget = std::make_unique<QTabWidget>( this );
|
fTabWidget = std::make_unique<QTabWidget>( this );
|
||||||
@ -135,7 +134,6 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
|
|
||||||
textFamily(fAdmin->getFontName());
|
textFamily(fAdmin->getFontName());
|
||||||
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
||||||
fFontChanging = false;
|
|
||||||
|
|
||||||
QString iconName("");
|
QString iconName("");
|
||||||
if (fDarkMenuIcon)
|
if (fDarkMenuIcon)
|
||||||
@ -164,12 +162,6 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
*/
|
*/
|
||||||
void PTextEdit::aboutToQuit()
|
void PTextEdit::aboutToQuit()
|
||||||
{
|
{
|
||||||
/* //as35
|
|
||||||
if (fMusrT0Action) {
|
|
||||||
delete fMusrT0Action;
|
|
||||||
fMusrT0Action = nullptr;
|
|
||||||
}
|
|
||||||
*/ //as35
|
|
||||||
if (fMsr2DataParam) {
|
if (fMsr2DataParam) {
|
||||||
delete fMsr2DataParam;
|
delete fMsr2DataParam;
|
||||||
fMsr2DataParam = nullptr;
|
fMsr2DataParam = nullptr;
|
||||||
@ -965,6 +957,31 @@ void PTextEdit::setupHelpActions()
|
|||||||
menu->addAction(a);
|
menu->addAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Setup the JumpToBlock actions.
|
||||||
|
*/
|
||||||
|
void PTextEdit::setupJumpToBlock()
|
||||||
|
{
|
||||||
|
QToolBar *tb = new QToolBar( this );
|
||||||
|
tb->setWindowTitle( "JumpToBlock Actions" );
|
||||||
|
addToolBar( tb );
|
||||||
|
|
||||||
|
QStringList jumpToBlockStr = {"FITPARAMETER", "THEORY", "FUNCTIONS", "GLOBAL", "RUN", "COMMANDS", "PLOT", "FOURIER", "STATISTIC"};
|
||||||
|
fJumpToBlock = std::make_unique<QComboBox>();
|
||||||
|
if (fJumpToBlock == nullptr)
|
||||||
|
return;
|
||||||
|
fJumpToBlock->addItems(jumpToBlockStr);
|
||||||
|
fJumpToBlock->setEditable(false);
|
||||||
|
|
||||||
|
connect( fJumpToBlock.get(), SIGNAL( activated(int) ), this, SLOT( jumpToBlock(int) ));
|
||||||
|
|
||||||
|
QLabel *jstr = new QLabel(" Jump to block: ");
|
||||||
|
|
||||||
|
tb->addWidget(jstr);
|
||||||
|
tb->addWidget(fJumpToBlock.get());
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>load a msr-file.
|
* <p>load a msr-file.
|
||||||
@ -981,6 +998,7 @@ void PTextEdit::load( const QString &f, const int index )
|
|||||||
// create a new text edit object
|
// create a new text edit object
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
|
edit->setCenterOnScroll(true);
|
||||||
|
|
||||||
// place the text edit object at the appropriate tab position
|
// place the text edit object at the appropriate tab position
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
@ -1165,6 +1183,7 @@ void PTextEdit::fileNew()
|
|||||||
{
|
{
|
||||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||||
|
edit->setCenterOnScroll(true);
|
||||||
doConnections( edit );
|
doConnections( edit );
|
||||||
fTabWidget->addTab( edit, tr( "noname" ) );
|
fTabWidget->addTab( edit, tr( "noname" ) );
|
||||||
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
||||||
@ -1398,18 +1417,18 @@ void PTextEdit::fileSavePrefs()
|
|||||||
QString msg("");
|
QString msg("");
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText("Which Preferences do you want to open?");
|
msgBox.setText("Which Preferences do you want to open?");
|
||||||
msgBox.addButton("Default", QMessageBox::AcceptRole);
|
QAbstractButton *def = msgBox.addButton("Default", QMessageBox::AcceptRole);
|
||||||
msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
QAbstractButton *cust = msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
||||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||||
int result = msgBox.exec();
|
int result = msgBox.exec();
|
||||||
if (result == QMessageBox::Cancel) {
|
if (result == QMessageBox::Cancel) {
|
||||||
return;
|
return;
|
||||||
} else if (result == 0) { // default dir
|
} else if (msgBox.clickedButton() == def) { // default dir
|
||||||
fln = fAdmin->getDefaultPrefPathName();
|
fln = fAdmin->getDefaultPrefPathName();
|
||||||
msg = QString("Current Default Preferences Path-Name:\n") + fln;
|
msg = QString("Current Default Preferences Path-Name:\n") + fln;
|
||||||
if (QMessageBox::information(this, "INFO", msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
if (QMessageBox::information(this, "INFO", msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||||
return;
|
return;
|
||||||
} else if (result == 1) { // custom dir
|
} else if (msgBox.clickedButton() == cust) { // custom dir
|
||||||
fln = QFileDialog::getSaveFileName( this,
|
fln = QFileDialog::getSaveFileName( this,
|
||||||
tr( "Save Prefs As" ), "musredit_startup.xml",
|
tr( "Save Prefs As" ), "musredit_startup.xml",
|
||||||
tr( "xml-Files (*.xml);;All Files (*)" ) );
|
tr( "xml-Files (*.xml);;All Files (*)" ) );
|
||||||
@ -2703,6 +2722,7 @@ void PTextEdit::musrPrefs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dlg->exec() == QDialog::Accepted) {
|
if (dlg->exec() == QDialog::Accepted) {
|
||||||
|
fAdmin->setIgnoreThemeAutoDetection(dlg->getIgnoreThemeAutoDetection());
|
||||||
fAdmin->setDarkThemeIconsMenuFlag(dlg->getDarkThemeIconsMenuFlag());
|
fAdmin->setDarkThemeIconsMenuFlag(dlg->getDarkThemeIconsMenuFlag());
|
||||||
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
|
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
|
||||||
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
|
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
|
||||||
@ -3291,12 +3311,35 @@ void PTextEdit::setFileSystemWatcherActive()
|
|||||||
fFileSystemWatcherActive = true;
|
fFileSystemWatcherActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>slot called when jumpToBlock combobox is selected
|
||||||
|
* @param idx
|
||||||
|
*/
|
||||||
|
void PTextEdit::jumpToBlock(int idx)
|
||||||
|
{
|
||||||
|
QString str = fJumpToBlock->itemText(idx);
|
||||||
|
|
||||||
|
QTextDocument::FindFlags flags= QTextDocument::FindCaseSensitively | QTextDocument::FindWholeWords;
|
||||||
|
|
||||||
|
bool found = currentEditor()->find(str, flags);
|
||||||
|
if (found)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// set cursor to start
|
||||||
|
currentEditor()->moveCursor(QTextCursor::Start);
|
||||||
|
currentEditor()->find(str, flags);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief PTextEdit::getTheme
|
* @brief PTextEdit::getTheme
|
||||||
*/
|
*/
|
||||||
bool PTextEdit::getTheme()
|
bool PTextEdit::getTheme()
|
||||||
{
|
{
|
||||||
|
if (fAdmin->getIgnoreThemeAutoDetection())
|
||||||
|
return false;
|
||||||
|
|
||||||
fDarkMenuIcon = false; // true if theme is dark
|
fDarkMenuIcon = false; // true if theme is dark
|
||||||
fDarkToolBarIcon = false; // needed for ubuntu dark since there the menu icons are dark, however the toolbar icons are plain!
|
fDarkToolBarIcon = false; // needed for ubuntu dark since there the menu icons are dark, however the toolbar icons are plain!
|
||||||
|
|
||||||
@ -3328,10 +3371,9 @@ bool PTextEdit::getTheme()
|
|||||||
|
|
||||||
if (str.contains("dark", Qt::CaseInsensitive)) {
|
if (str.contains("dark", Qt::CaseInsensitive)) {
|
||||||
fDarkMenuIcon = true;
|
fDarkMenuIcon = true;
|
||||||
if (str.contains("ubuntu", Qt::CaseInsensitive)) {
|
if (str.contains("ubuntu", Qt::CaseInsensitive) ||
|
||||||
fDarkMenuIcon = false;
|
str.contains("xfce", Qt::CaseInsensitive) ||
|
||||||
fDarkToolBarIcon = false;
|
str.contains("mx", Qt::CaseInsensitive)) {
|
||||||
} else if (str.contains("xfce", Qt::CaseInsensitive)) {
|
|
||||||
fDarkMenuIcon = false;
|
fDarkMenuIcon = false;
|
||||||
fDarkToolBarIcon = false;
|
fDarkToolBarIcon = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#ifndef _PTEXTEDIT_H_
|
#ifndef _PTEXTEDIT_H_
|
||||||
#define _PTEXTEDIT_H_
|
#define _PTEXTEDIT_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
@ -46,8 +48,6 @@
|
|||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "PAdmin.h"
|
#include "PAdmin.h"
|
||||||
#include "musredit.h"
|
#include "musredit.h"
|
||||||
|
|
||||||
@ -86,6 +86,7 @@ private:
|
|||||||
void setupTextActions();
|
void setupTextActions();
|
||||||
void setupMusrActions();
|
void setupMusrActions();
|
||||||
void setupHelpActions();
|
void setupHelpActions();
|
||||||
|
void setupJumpToBlock();
|
||||||
void load( const QString &f, const int index=-1 );
|
void load( const QString &f, const int index=-1 );
|
||||||
PSubTextEdit *currentEditor() const;
|
PSubTextEdit *currentEditor() const;
|
||||||
void doConnections( PSubTextEdit *e );
|
void doConnections( PSubTextEdit *e );
|
||||||
@ -167,16 +168,18 @@ private slots:
|
|||||||
void fileChanged(const QString &fileName);
|
void fileChanged(const QString &fileName);
|
||||||
void setFileSystemWatcherActive();
|
void setFileSystemWatcherActive();
|
||||||
|
|
||||||
|
void jumpToBlock(int idx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool fDarkMenuIcon; ///< flag indicating if a dark or plain icon shall be used in the menu pull-downs
|
bool fDarkMenuIcon{false}; ///< flag indicating if a dark or plain icon shall be used in the menu pull-downs
|
||||||
bool fDarkToolBarIcon; ///< flag indicating if a dark or plain icon shall be used in the toolbar
|
bool fDarkToolBarIcon{false}; ///< flag indicating if a dark or plain icon shall be used in the toolbar
|
||||||
std::unique_ptr<PAdmin> fAdmin; ///< pointer to the xml-startup file informations. Needed for different purposes like default working- and executable directories etc.
|
std::unique_ptr<PAdmin> fAdmin; ///< pointer to the xml-startup file informations. Needed for different purposes like default working- and executable directories etc.
|
||||||
std::unique_ptr<QFileSystemWatcher> fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
|
std::unique_ptr<QFileSystemWatcher> fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
|
||||||
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
|
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
|
||||||
QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling
|
QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling
|
||||||
QString fLastDirInUse; ///< string holding the path from where the last file was loaded.
|
QString fLastDirInUse{QString("")}; ///< string holding the path from where the last file was loaded.
|
||||||
QStringList fMusrFTPrevCmd;
|
QStringList fMusrFTPrevCmd;
|
||||||
int fEditW, fEditH;
|
int fEditW{900}, fEditH{800};
|
||||||
|
|
||||||
QMap<QString, QAction*> fActions;
|
QMap<QString, QAction*> fActions;
|
||||||
std::unique_ptr<QAction> fMusrT0Action;
|
std::unique_ptr<QAction> fMusrT0Action;
|
||||||
@ -186,7 +189,8 @@ private:
|
|||||||
|
|
||||||
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
||||||
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
||||||
bool fFontChanging; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
bool fFontChanging{false}; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
||||||
|
std::unique_ptr<QComboBox> fJumpToBlock; ///< combo box used to jump to the msr-file blocks
|
||||||
|
|
||||||
std::unique_ptr<QTabWidget> fTabWidget; ///< tab widget in which the text editor(s) are placed
|
std::unique_ptr<QTabWidget> fTabWidget; ///< tab widget in which the text editor(s) are placed
|
||||||
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>452</width>
|
<width>460</width>
|
||||||
<height>180</height>
|
<height>200</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -20,20 +20,13 @@
|
|||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
|
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget_0">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>5</y>
|
|
||||||
<width>451</width>
|
|
||||||
<height>171</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="fTabWidget">
|
<widget class="QTabWidget" name="fTabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="fGeneral_tab">
|
<widget class="QWidget" name="fGeneral_tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -43,7 +36,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>70</y>
|
<y>80</y>
|
||||||
<width>421</width>
|
<width>421</width>
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -52,13 +45,13 @@
|
|||||||
<string>Change Default Search Paths</string>
|
<string>Change Default Search Paths</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>12</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>415</width>
|
<width>416</width>
|
||||||
<height>62</height>
|
<height>61</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
@ -87,6 +80,13 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fIgnoreThemeAutoDetection_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ignore Theme Auto Detect</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="fDarkThemeIconsMenu_checkBox">
|
<widget class="QCheckBox" name="fDarkThemeIconsMenu_checkBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>170</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>171</width>
|
<width>161</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -167,7 +167,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>170</x>
|
||||||
<y>35</y>
|
<y>35</y>
|
||||||
<width>241</width>
|
<width>181</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>170</x>
|
||||||
<y>60</y>
|
<y>60</y>
|
||||||
<width>101</width>
|
<width>171</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -191,7 +191,7 @@
|
|||||||
<widget class="QCheckBox" name="fYamlOut_checkBox">
|
<widget class="QCheckBox" name="fYamlOut_checkBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>360</x>
|
<x>350</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>85</width>
|
<width>85</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
@ -305,7 +305,8 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>fTabWidget</tabstop>
|
<tabstop>fTabWidget</tabstop>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
<musrview_show_avg>n</musrview_show_avg>
|
<musrview_show_avg>n</musrview_show_avg>
|
||||||
<musrview_show_one_to_one>n</musrview_show_one_to_one>
|
<musrview_show_one_to_one>n</musrview_show_one_to_one>
|
||||||
<enable_musrt0>y</enable_musrt0>
|
<enable_musrt0>y</enable_musrt0>
|
||||||
|
<ignore_theme_auto_detection>n</ignore_theme_auto_detection>
|
||||||
<dark_theme_icons_menu>n</dark_theme_icons_menu>
|
<dark_theme_icons_menu>n</dark_theme_icons_menu>
|
||||||
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>
|
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>
|
||||||
<edit_w>900</edit_w>
|
<edit_w>900</edit_w>
|
||||||
|
Reference in New Issue
Block a user