Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
5c3accc6ed | |||
6f8b0a2341 | |||
4febdb42b4 | |||
ae95a5dc1c | |||
c3f531e0d5 | |||
0b61130e28 | |||
d1cd63dcb0 | |||
7838901fbe | |||
00b012d0dd | |||
d2984d8923 | |||
58889614e5 | |||
c9fc373862 | |||
ebefcf7af9 |
@ -1,7 +1,7 @@
|
||||
# - musrfit
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(musrfit VERSION 1.9.5 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.9.6 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
|
@ -9,7 +9,7 @@ set(MUSRFIT_VERSION "@MUSRFIT_VERSION@")
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${SRC_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
@ -17,7 +17,7 @@ execute_process(
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --pretty="%h, %ci"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${SRC_DIR}
|
||||
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
||||
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
|
||||
# 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '1.9.4',
|
||||
VERSION: '1.9.5',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -213,7 +213,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -211,7 +211,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -225,7 +225,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -525,7 +525,7 @@ Between detectors, there will be an empty line.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -775,7 +775,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -307,7 +307,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -540,7 +540,7 @@ fit serves as template for the second and so on. The template field stays empty
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +430,7 @@ SCRIPT COMMANDS:
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1029,7 +1029,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -656,7 +656,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -207,7 +207,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
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">
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -430,7 +430,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -1147,7 +1147,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -549,7 +549,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@ -2874,7 +2894,7 @@ The syntax here is attribute driven</li>
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2023, Andreas Suter.
|
||||
Last updated on Jun 08, 2024.
|
||||
Last updated on Jun 24, 2024.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -2896,7 +2916,7 @@ The syntax here is attribute driven</li>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'1.9.4',
|
||||
VERSION:'1.9.5',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
|
@ -188,13 +188,28 @@ void PFunction::FillFuncEvalTree(iter_t const& i, PFuncTreeNode &node)
|
||||
node.fID = PFunctionGrammar::constGammaMuID; // keep the ID
|
||||
node.fDvalue = GAMMA_BAR_MUON; // keep the value
|
||||
} 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
|
||||
} 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
|
||||
} else if (i->value.id() == PFunctionGrammar::constTempID) { // handle constant temperature from meta data
|
||||
str = std::string(i->value.begin(), i->value.end()); // get string
|
||||
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.fIvalue = ivalue; // Temp idx
|
||||
} 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) {
|
||||
return node.fDvalue;
|
||||
} 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) {
|
||||
if (fMetaData.fEnergy == PMUSR_UNDEFINED) {
|
||||
std::cerr << std::endl << "**PANIC ERROR**: PFunction::EvalNode: energy meta data not available." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
return fMetaData.fEnergy;
|
||||
Double_t dval = fMetaData.fEnergy;
|
||||
if (node.fSign)
|
||||
dval *= -1.0;
|
||||
return dval;
|
||||
} else if (node.fID == PFunctionGrammar::constTempID) {
|
||||
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;
|
||||
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) {
|
||||
Double_t dval;
|
||||
if (node.fSign)
|
||||
@ -610,9 +634,9 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i, bool funcFlag)
|
||||
} else if (i->value.id() == PFunctionGrammar::constGammaMuID) {
|
||||
fFuncString += "gamma_mu";
|
||||
} 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) {
|
||||
fFuncString += "EN";
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
} else if (i->value.id() == PFunctionGrammar::constTempID) {
|
||||
assert(i->children.size() == 0);
|
||||
fFuncString += boost::algorithm::trim_copy(std::string(i->value.begin(), i->value.end())).c_str();
|
||||
|
@ -697,6 +697,14 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
// 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
|
||||
bool wasSorted(true);
|
||||
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
|
||||
|
@ -939,6 +939,7 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
||||
|
||||
if (fBatchMode) {
|
||||
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
|
||||
fAveragedView = fStartWithAvg;
|
||||
HandleAverage();
|
||||
PlotAverage(true);
|
||||
}
|
||||
|
@ -3697,6 +3697,8 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
||||
{
|
||||
Bool_t success = true;
|
||||
|
||||
std::cout << "as35> in ReadAsciiFile() ..." << std::endl;
|
||||
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
@ -3848,7 +3850,14 @@ Bool_t PRunDataHandler::ReadAsciiFile()
|
||||
break;
|
||||
}
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -4357,7 +4366,7 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
// open file
|
||||
std::ifstream f;
|
||||
|
||||
// open db-file
|
||||
// open dat-file
|
||||
f.open(fRunPathName.Data(), std::ifstream::in);
|
||||
if (!f.is_open()) {
|
||||
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++;
|
||||
} else { // error value
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -4470,11 +4485,11 @@ Bool_t PRunDataHandler::ReadDatFile()
|
||||
|
||||
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++) {
|
||||
if (runData.fDataNonMusr.GetErrData()->at(i).size() == 0) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
src/external/libZFRelaxation/CMakeLists.txt
vendored
10
src/external/libZFRelaxation/CMakeLists.txt
vendored
@ -53,14 +53,10 @@ target_include_directories(
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
if (OpenMP_FOUND)
|
||||
target_compile_options(ZFRelaxation PUBLIC ${OpenMP_CXX_FLAGS})
|
||||
endif (OpenMP_FOUND)
|
||||
|
||||
set(gomp "")
|
||||
if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
set(gomp gomp)
|
||||
endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux))
|
||||
if (OpenMP_FOUND)
|
||||
set(gomp OpenMP::OpenMP_CXX)
|
||||
endif (OpenMP_FOUND)
|
||||
target_link_libraries(ZFRelaxation
|
||||
${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_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 ] ) ];
|
||||
|
||||
|
@ -656,12 +656,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
||||
param.SetName(headerInfo[i]);
|
||||
param.SetValue(dval);
|
||||
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.SetPosErr(0.0);
|
||||
run.AddParam(param);
|
||||
param.ResetParam();
|
||||
}
|
||||
} else { // last token
|
||||
param.SetNegErr(0.0);
|
||||
param.SetPosErr(0.0);
|
||||
run.AddParam(param);
|
||||
param.ResetParam();
|
||||
}
|
||||
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
||||
param.SetPosErr(dval);
|
||||
|
@ -985,7 +985,8 @@ void PmuppGui::refresh()
|
||||
|
||||
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
||||
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;
|
||||
break;
|
||||
}
|
||||
@ -1014,7 +1015,7 @@ void PmuppGui::refresh()
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,7 @@ PTextEdit::PTextEdit( QWidget *parent )
|
||||
setupEditActions();
|
||||
setupTextActions();
|
||||
setupMusrActions();
|
||||
setupJumpToBlock();
|
||||
setupHelpActions();
|
||||
|
||||
fTabWidget = std::make_unique<QTabWidget>( this );
|
||||
@ -958,6 +959,31 @@ void PTextEdit::setupHelpActions()
|
||||
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.
|
||||
@ -974,6 +1000,7 @@ void PTextEdit::load( const QString &f, const int index )
|
||||
// create a new text edit object
|
||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||
edit->setCenterOnScroll(true);
|
||||
|
||||
// place the text edit object at the appropriate tab position
|
||||
if (index == -1)
|
||||
@ -1158,6 +1185,7 @@ void PTextEdit::fileNew()
|
||||
{
|
||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||
edit->setCenterOnScroll(true);
|
||||
doConnections( edit );
|
||||
fTabWidget->addTab( edit, tr( "noname" ) );
|
||||
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
||||
@ -3304,6 +3332,26 @@ void PTextEdit::setFileSystemWatcherActive()
|
||||
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
|
||||
|
@ -86,6 +86,7 @@ private:
|
||||
void setupTextActions();
|
||||
void setupMusrActions();
|
||||
void setupHelpActions();
|
||||
void setupJumpToBlock();
|
||||
void load( const QString &f, const int index=-1 );
|
||||
PSubTextEdit *currentEditor() const;
|
||||
void doConnections( PSubTextEdit *e );
|
||||
@ -167,6 +168,8 @@ private slots:
|
||||
void fileChanged(const QString &fileName);
|
||||
void setFileSystemWatcherActive();
|
||||
|
||||
void jumpToBlock(int idx);
|
||||
|
||||
private:
|
||||
bool fDarkMenuIcon; ///< 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
|
||||
@ -187,6 +190,7 @@ private:
|
||||
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
||||
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
|
||||
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
|
||||
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
||||
|
@ -645,12 +645,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
||||
param.SetName(headerInfo[i]);
|
||||
param.SetValue(dval);
|
||||
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.SetPosErr(0.0);
|
||||
run.AddParam(param);
|
||||
param.ResetParam();
|
||||
}
|
||||
} else { // last token
|
||||
param.SetNegErr(0.0);
|
||||
param.SetPosErr(0.0);
|
||||
run.AddParam(param);
|
||||
param.ResetParam();
|
||||
}
|
||||
} else if (headerCode[i] == PMUPP_POSNEGERR) {
|
||||
param.SetPosErr(dval);
|
||||
|
@ -973,7 +973,8 @@ void PmuppGui::refresh()
|
||||
|
||||
for (int i=0; i<fParamDataHandler->GetNoOfCollections(); i++) {
|
||||
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;
|
||||
break;
|
||||
}
|
||||
|
@ -127,6 +127,7 @@ PTextEdit::PTextEdit( QWidget *parent )
|
||||
setupEditActions();
|
||||
setupTextActions();
|
||||
setupMusrActions();
|
||||
setupJumpToBlock();
|
||||
setupHelpActions();
|
||||
|
||||
fTabWidget = std::make_unique<QTabWidget>( this );
|
||||
@ -965,6 +966,31 @@ void PTextEdit::setupHelpActions()
|
||||
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.
|
||||
@ -981,6 +1007,7 @@ void PTextEdit::load( const QString &f, const int index )
|
||||
// create a new text edit object
|
||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||
edit->setCenterOnScroll(true);
|
||||
|
||||
// place the text edit object at the appropriate tab position
|
||||
if (index == -1)
|
||||
@ -1165,6 +1192,8 @@ void PTextEdit::fileNew()
|
||||
{
|
||||
PSubTextEdit *edit = new PSubTextEdit( fAdmin.get() );
|
||||
edit->setFont(QFont(fAdmin->getFontName(), fAdmin->getFontSize()));
|
||||
edit->setCenterOnScroll(true);
|
||||
|
||||
doConnections( edit );
|
||||
fTabWidget->addTab( edit, tr( "noname" ) );
|
||||
fTabWidget->setCurrentIndex(fTabWidget->indexOf(edit));
|
||||
@ -3291,6 +3320,26 @@ void PTextEdit::setFileSystemWatcherActive()
|
||||
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
|
||||
|
@ -86,6 +86,7 @@ private:
|
||||
void setupTextActions();
|
||||
void setupMusrActions();
|
||||
void setupHelpActions();
|
||||
void setupJumpToBlock();
|
||||
void load( const QString &f, const int index=-1 );
|
||||
PSubTextEdit *currentEditor() const;
|
||||
void doConnections( PSubTextEdit *e );
|
||||
@ -167,6 +168,8 @@ private slots:
|
||||
void fileChanged(const QString &fileName);
|
||||
void setFileSystemWatcherActive();
|
||||
|
||||
void jumpToBlock(int idx);
|
||||
|
||||
private:
|
||||
bool fDarkMenuIcon; ///< 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
|
||||
@ -187,6 +190,7 @@ private:
|
||||
std::unique_ptr<QComboBox> fComboFont; ///< combo box for the font selector
|
||||
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
|
||||
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
|
||||
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
||||
|
Reference in New Issue
Block a user