Merged muonspin/musrfit/root6 into master
This commit is contained in:
commit
3141548262
@ -130,6 +130,8 @@ NEW 2015-02-13 first implementation of a standalone Fourier transform/plotter:
|
|||||||
A first simple minded lifetime correction is implemented as well.
|
A first simple minded lifetime correction is implemented as well.
|
||||||
NEW 2015-02-04 Integration of libBNMR for fitting beta-NMR relaxation data
|
NEW 2015-02-04 Integration of libBNMR for fitting beta-NMR relaxation data
|
||||||
into automake of musrfit.
|
into automake of musrfit.
|
||||||
|
NEW 2015-01-17 adding a branch for ROOT 6.x. This needs some minor adaptations due
|
||||||
|
to the new rootcint/rootclang and the stricter c++11.
|
||||||
NEW 2014-12-18 first implementation of a GLOBAL block which allows to shorten
|
NEW 2014-12-18 first implementation of a GLOBAL block which allows to shorten
|
||||||
a typical msr-file. Duplicate entries from the RUN blocks can be
|
a typical msr-file. Duplicate entries from the RUN blocks can be
|
||||||
added here. Furthermore, the 'lifetimecorrection' flag is
|
added here. Furthermore, the 'lifetimecorrection' flag is
|
||||||
|
@ -1119,6 +1119,9 @@ case "${host_cpu}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CXXFLAGS="-std=c++11 ${CXXFLAGS}"
|
||||||
|
AC_SUBST(CXXFLAGS)
|
||||||
|
|
||||||
LOCAL_BIN_CXXFLAGS="${CPUFLAGS} -Wall -Wno-trigraphs"
|
LOCAL_BIN_CXXFLAGS="${CPUFLAGS} -Wall -Wno-trigraphs"
|
||||||
LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}"
|
LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}"
|
||||||
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS}"
|
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS}"
|
||||||
@ -1143,7 +1146,7 @@ case "$host" in
|
|||||||
;;
|
;;
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
ARCH=DARWIN
|
ARCH=DARWIN
|
||||||
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D__linux__"
|
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D_Darwin_"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
ARCH=OTHERUNIX
|
ARCH=OTHERUNIX
|
||||||
|
@ -84,6 +84,14 @@ dict_cpp_sources = \
|
|||||||
dict_cpp_sources_userFcn = \
|
dict_cpp_sources_userFcn = \
|
||||||
PUserFcnBaseDict.cpp
|
PUserFcnBaseDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PFourierCanvasDict_rdict.pcm \
|
||||||
|
PMusrCanvasDict_rdict.pcm \
|
||||||
|
PMusrT0Dict_rdict.pcm \
|
||||||
|
PStartupHandlerDict_rdict.pcm \
|
||||||
|
PUserFcnBaseDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources) $(h_sources_userFcn)
|
include_HEADERS = $(h_sources) $(h_sources_userFcn)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(h_linkdef_userFcn) $(dict_h_sources_userFcn)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(h_linkdef_userFcn) $(dict_h_sources_userFcn)
|
||||||
|
|
||||||
@ -92,7 +100,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) $(dict_cpp_sources_userFcn) $(dict_h_sources_userFcn)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) $(dict_cpp_sources_userFcn) $(dict_h_sources_userFcn)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
@ -507,7 +507,7 @@ TH1F* PFourier::GetPhaseOptRealFourier(const TH1F *re, const TH1F *im, vector<Do
|
|||||||
|
|
||||||
phase.resize(2); // c0, c1
|
phase.resize(2); // c0, c1
|
||||||
|
|
||||||
TAxis *axis = re->GetXaxis();
|
const TAxis *axis = re->GetXaxis();
|
||||||
|
|
||||||
Int_t minBin = 1;
|
Int_t minBin = 1;
|
||||||
Int_t maxBin = axis->GetNbins();
|
Int_t maxBin = axis->GetNbins();
|
||||||
|
@ -757,8 +757,8 @@ Bool_t PRunAsymmetry::SubtractEstimatedBkg()
|
|||||||
beamPeriod = 0.0;
|
beamPeriod = 0.0;
|
||||||
|
|
||||||
// check if start and end are in proper order
|
// check if start and end are in proper order
|
||||||
UInt_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)};
|
Int_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)};
|
||||||
UInt_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)};
|
Int_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)};
|
||||||
for (UInt_t i=0; i<2; i++) {
|
for (UInt_t i=0; i<2; i++) {
|
||||||
if (end[i] < start[i]) {
|
if (end[i] < start[i]) {
|
||||||
cout << endl << "PRunAsymmetry::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!";
|
cout << endl << "PRunAsymmetry::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!";
|
||||||
|
@ -746,8 +746,8 @@ Bool_t PRunAsymmetryRRF::SubtractEstimatedBkg()
|
|||||||
beamPeriod = 0.0;
|
beamPeriod = 0.0;
|
||||||
|
|
||||||
// check if start and end are in proper order
|
// check if start and end are in proper order
|
||||||
UInt_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)};
|
UInt_t start[2] = {(UInt_t)fRunInfo->GetBkgRange(0), (UInt_t)fRunInfo->GetBkgRange(2)};
|
||||||
UInt_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)};
|
UInt_t end[2] = {(UInt_t)fRunInfo->GetBkgRange(1), (UInt_t)fRunInfo->GetBkgRange(3)};
|
||||||
for (UInt_t i=0; i<2; i++) {
|
for (UInt_t i=0; i<2; i++) {
|
||||||
if (end[i] < start[i]) {
|
if (end[i] < start[i]) {
|
||||||
cout << endl << "PRunAsymmetryRRF::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!";
|
cout << endl << "PRunAsymmetryRRF::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!";
|
||||||
|
@ -929,13 +929,20 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool found_fln = false;
|
bool found_fln = false;
|
||||||
// 1st check if the file name is found in the current directory
|
|
||||||
string pathFln("");
|
string pathFln("");
|
||||||
pathFln = "./" + fileName;
|
// 1st check if the file name is the full path-file name and the file exists
|
||||||
|
pathFln = fileName;
|
||||||
if (dump_file_exists(pathFln))
|
if (dump_file_exists(pathFln))
|
||||||
found_fln = true;
|
found_fln = true;
|
||||||
|
|
||||||
// 2nd check if file name is found in any default search paths if not already found in the current directory
|
// 2nd check if the file name is found in the current directory
|
||||||
|
if (!found_fln) {
|
||||||
|
pathFln = "./" + fileName;
|
||||||
|
if (dump_file_exists(pathFln))
|
||||||
|
found_fln = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3rd check if file name is found in any default search paths if not already found in the current directory
|
||||||
if (!found_fln) {
|
if (!found_fln) {
|
||||||
PStringVector pathList = startupHandler->GetDataPathList();
|
PStringVector pathList = startupHandler->GetDataPathList();
|
||||||
for (unsigned int i=0; i<pathList.size(); i++) {
|
for (unsigned int i=0; i<pathList.size(); i++) {
|
||||||
|
5
src/external/BMWtools/Makefile.am
vendored
5
src/external/BMWtools/Makefile.am
vendored
@ -19,6 +19,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
BMWStartupHandlerDict.cpp
|
BMWStartupHandlerDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = BMWStartupHandlerDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -27,7 +30,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
|
||||||
|
7
src/external/MagProximity/Makefile.am
vendored
7
src/external/MagProximity/Makefile.am
vendored
@ -23,6 +23,11 @@ dict_cpp_sources = \
|
|||||||
PMagProximityFitterDict.cpp \
|
PMagProximityFitterDict.cpp \
|
||||||
PMPStartupHandlerDict.cpp
|
PMPStartupHandlerDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PMagProximityFitterDict_rdict.pcm \
|
||||||
|
PMPStartupHandlerDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -31,7 +36,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
## Process this file with automake to create Makefile.in
|
## Process this file with automake to create Makefile.in
|
||||||
## $Id$
|
|
||||||
|
|
||||||
h_sources = MuSR_td_PSI_bin.h
|
h_sources = MuSR_td_PSI_bin.h
|
||||||
cpp_sources = MuSR_td_PSI_bin.cpp
|
cpp_sources = MuSR_td_PSI_bin.cpp
|
||||||
|
@ -205,7 +205,7 @@ typedef long int Int32;
|
|||||||
#else /* other operating system */
|
#else /* other operating system */
|
||||||
|
|
||||||
/* 32 bit word length */
|
/* 32 bit word length */
|
||||||
#if (defined(_WIN32) || defined(__linux__) || defined(_WIN32GCC))
|
#if (defined(_WIN32) || defined(__linux__) || defined(_Darwin_) || defined(_WIN32GCC))
|
||||||
typedef short Int16;
|
typedef short Int16;
|
||||||
typedef int Int32;
|
typedef int Int32;
|
||||||
#else
|
#else
|
||||||
|
5
src/external/MusrRoot/Makefile.am
vendored
5
src/external/MusrRoot/Makefile.am
vendored
@ -15,6 +15,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
TMusrRunHeaderDict.cpp
|
TMusrRunHeaderDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = TMusrRunHeaderDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $^
|
||||||
|
7
src/external/Nonlocal/Makefile.am
vendored
7
src/external/Nonlocal/Makefile.am
vendored
@ -23,6 +23,11 @@ dict_cpp_sources = \
|
|||||||
PNL_PippardFitterDict.cpp \
|
PNL_PippardFitterDict.cpp \
|
||||||
PNL_StartupHandlerDict.cpp
|
PNL_StartupHandlerDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PNL_PippardFitterDict_rdict.pcm \
|
||||||
|
PNL_StartupHandlerDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -31,7 +36,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
7
src/external/TLemRunHeader/Makefile.am
vendored
7
src/external/TLemRunHeader/Makefile.am
vendored
@ -20,6 +20,11 @@ dict_cpp_sources = \
|
|||||||
TLemStatsDict.cxx \
|
TLemStatsDict.cxx \
|
||||||
TLemRunHeaderDict.cxx
|
TLemRunHeaderDict.cxx
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
TLemStatsDict_rdict.pcm \
|
||||||
|
TLemRunHeaderDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -28,7 +33,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dist_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cxx *Dict.h *~ core
|
CLEANFILES = *Dict.cxx *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cxx %Dict.h: %.h %LinkDef.h
|
%Dict.cxx %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cxx -c -p $(INCLUDES) $^
|
@ROOTCINT@ -v -f $*Dict.cxx -c -p $(INCLUDES) $^
|
||||||
|
@ -15,6 +15,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
TCalcMeanFieldsLEMDict.cpp
|
TCalcMeanFieldsLEMDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = TCalcMeanFieldsLEMDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
8
src/external/libFitPofB/classes/Makefile.am
vendored
8
src/external/libFitPofB/classes/Makefile.am
vendored
@ -33,6 +33,12 @@ dict_cpp_sources = \
|
|||||||
TSkewedGssDict.cpp \
|
TSkewedGssDict.cpp \
|
||||||
TVortexDict.cpp
|
TVortexDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
TLondon1DDict_rdict.pcm \
|
||||||
|
TSkewedGssDict_rdict.pcm \
|
||||||
|
TVortexDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -41,7 +47,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ ../include/*~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ ../include/*~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
5
src/external/libGapIntegrals/Makefile.am
vendored
5
src/external/libGapIntegrals/Makefile.am
vendored
@ -15,6 +15,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
TGapIntegralsDict.cpp
|
TGapIntegralsDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = TGapIntegralsDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
5
src/external/libLFRelaxation/Makefile.am
vendored
5
src/external/libLFRelaxation/Makefile.am
vendored
@ -15,6 +15,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
TLFRelaxationDict.cpp
|
TLFRelaxationDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = TLFRelaxationDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
@ -20,6 +20,11 @@ dict_cpp_sources = \
|
|||||||
PStartupHandler_PMDict.cpp \
|
PStartupHandler_PMDict.cpp \
|
||||||
PPhotoMeissnerDict.cpp
|
PPhotoMeissnerDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PPhotoMeissnerDict_rdict.pcm \
|
||||||
|
PStartupHandler_PMDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ class PPhotoMeissner : public PUserFcnBase
|
|||||||
|
|
||||||
Bool_t fValid; ///< flag indicating if initialization went through smoothly
|
Bool_t fValid; ///< flag indicating if initialization went through smoothly
|
||||||
|
|
||||||
static const Double_t fDegToRad = 0.0174532925199432955;
|
constexpr static const Double_t fDegToRad = 0.0174532925199432955;
|
||||||
static const Double_t fTwoPi = 6.28318530717958623;
|
constexpr static const Double_t fTwoPi = 6.28318530717958623;
|
||||||
|
|
||||||
Double_t InuMinus(const Double_t nu, const Double_t x) const;
|
Double_t InuMinus(const Double_t nu, const Double_t x) const;
|
||||||
Double_t FieldFilm(const Double_t z, const vector<Double_t> &par) const;
|
Double_t FieldFilm(const Double_t z, const vector<Double_t> &par) const;
|
||||||
|
@ -20,6 +20,11 @@ dict_cpp_sources = \
|
|||||||
PStartupHandler_SVDict.cpp \
|
PStartupHandler_SVDict.cpp \
|
||||||
PSkewedLorentzianDict.cpp
|
PSkewedLorentzianDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PStartupHandler_SVDict_rdict.pcm \
|
||||||
|
PSkewedLorentzianDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
|
@ -59,8 +59,8 @@ class PSkewedLorentzian : public PUserFcnBase
|
|||||||
UInt_t fNoOfFields; ///< number of sampling points in field around the Lorentzian peak
|
UInt_t fNoOfFields; ///< number of sampling points in field around the Lorentzian peak
|
||||||
Double_t fRange; ///< range in which the sampling points are placed, given in units of \beta(1\pm\Delta)
|
Double_t fRange; ///< range in which the sampling points are placed, given in units of \beta(1\pm\Delta)
|
||||||
|
|
||||||
static const Double_t fDegToRad = 0.0174532925199432955;
|
constexpr static const Double_t fDegToRad = 0.0174532925199432955;
|
||||||
static const Double_t fTwoPi = 6.28318530717958623;
|
constexpr static const Double_t fTwoPi = 6.28318530717958623;
|
||||||
|
|
||||||
// definition of the class for the ROOT dictionary
|
// definition of the class for the ROOT dictionary
|
||||||
ClassDef(PSkewedLorentzian, 1)
|
ClassDef(PSkewedLorentzian, 1)
|
||||||
|
5
src/external/libZFRelaxation/Makefile.am
vendored
5
src/external/libZFRelaxation/Makefile.am
vendored
@ -15,6 +15,9 @@ cpp_sources = \
|
|||||||
dict_cpp_sources = \
|
dict_cpp_sources = \
|
||||||
ZFRelaxationDict.cpp
|
ZFRelaxationDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = ZFRelaxationDict_rdict.pcm
|
||||||
|
|
||||||
include_HEADERS = $(h_sources)
|
include_HEADERS = $(h_sources)
|
||||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
|||||||
|
|
||||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||||
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
%Dict.cpp %Dict.h: %.h %LinkDef.h
|
||||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
@ -68,7 +68,7 @@ using namespace boost::algorithm;
|
|||||||
*/
|
*/
|
||||||
bool isNumber(const string &s)
|
bool isNumber(const string &s)
|
||||||
{
|
{
|
||||||
unsigned int number;
|
unsigned int number(0);
|
||||||
try {
|
try {
|
||||||
number = boost::lexical_cast<unsigned int>(s);
|
number = boost::lexical_cast<unsigned int>(s);
|
||||||
return true;
|
return true;
|
||||||
@ -123,8 +123,10 @@ void msr2data_syntax()
|
|||||||
cout << endl << " the successive files are generated using the musrfit output from the preceding runs";
|
cout << endl << " the successive files are generated using the musrfit output from the preceding runs";
|
||||||
cout << endl << " msr-<template> : same as above without calling musrfit";
|
cout << endl << " msr-<template> : same as above without calling musrfit";
|
||||||
cout << endl << " In case any fitting option is present, this option is ignored!";
|
cout << endl << " In case any fitting option is present, this option is ignored!";
|
||||||
cout << endl << " -k : if fitting is used, pass the option --keep-mn2-output to musrfit";
|
cout << endl << " -k, --keep-mn2-output : if fitting is used, pass the option --keep-mn2-output to musrfit";
|
||||||
cout << endl << " -t : if fitting is used, pass the option --title-from-data-file to musrfit";
|
cout << endl << " -t, --title-from-data-file : if fitting is used, pass the option --title-from-data-file to musrfit";
|
||||||
|
cout << endl << " -e, --estimateN0: estimate N0 for single histogram fits.";
|
||||||
|
cout << endl << " -p, --per-run-block-chisq: will per run block chisq to the msr-file.";
|
||||||
cout << endl;
|
cout << endl;
|
||||||
cout << endl << " global : switch on the global-fit mode";
|
cout << endl << " global : switch on the global-fit mode";
|
||||||
cout << endl << " Within that mode all specified runs will be united in a single msr file!";
|
cout << endl << " Within that mode all specified runs will be united in a single msr file!";
|
||||||
@ -216,7 +218,10 @@ string msr2data_validArguments(const vector<string> &arg)
|
|||||||
|
|
||||||
for (vector<string>::const_iterator iter(arg.begin()); iter != arg.end(); ++iter) {
|
for (vector<string>::const_iterator iter(arg.begin()); iter != arg.end(); ++iter) {
|
||||||
if ( (!iter->compare("header")) || (!iter->compare("noheader")) || (!iter->compare("nosummary")) \
|
if ( (!iter->compare("header")) || (!iter->compare("noheader")) || (!iter->compare("nosummary")) \
|
||||||
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("-t")) \
|
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("--keep-mn2-output")) \
|
||||||
|
|| (!iter->compare("-t")) || (!iter->compare("--title-from-data-file")) \
|
||||||
|
|| (!iter->compare("-e")) || (!iter->compare("--estimateN0")) \
|
||||||
|
|| (!iter->compare("-p")) || (!iter->compare("--per-run-block-chisq")) \
|
||||||
|| (!iter->compare("data")) || (!iter->substr(0,4).compare("msr-")) || (!iter->compare("global")) \
|
|| (!iter->compare("data")) || (!iter->substr(0,4).compare("msr-")) || (!iter->compare("global")) \
|
||||||
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) \
|
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) \
|
||||||
|| !iter->compare("paramList") )
|
|| !iter->compare("paramList") )
|
||||||
@ -265,6 +270,7 @@ string msr2data_outputfile(vector<string> &arg, bool db = true)
|
|||||||
if (!iter->compare("-o")) {
|
if (!iter->compare("-o")) {
|
||||||
if ((iterNext != arg.end()) && (iterNext->compare("header")) && (iterNext->compare("noheader")) && (iterNext->compare("nosummary")) \
|
if ((iterNext != arg.end()) && (iterNext->compare("header")) && (iterNext->compare("noheader")) && (iterNext->compare("nosummary")) \
|
||||||
&& (iterNext->substr(0,3).compare("fit")) && (iterNext->compare("-k")) && (iterNext->compare("-t")) \
|
&& (iterNext->substr(0,3).compare("fit")) && (iterNext->compare("-k")) && (iterNext->compare("-t")) \
|
||||||
|
&& (iterNext->compare("-e")) && (iterNext->compare("-p")) \
|
||||||
&& (iterNext->compare("data")) && (iterNext->substr(0,3).compare("msr")) && (iterNext->compare("global")) \
|
&& (iterNext->compare("data")) && (iterNext->substr(0,3).compare("msr")) && (iterNext->compare("global")) \
|
||||||
&& (iterNext->compare("global+")) && (iterNext->compare("global+!")) && (iterNext->compare("new"))) {
|
&& (iterNext->compare("global+")) && (iterNext->compare("global+!")) && (iterNext->compare("new"))) {
|
||||||
outputFile = *iterNext;
|
outputFile = *iterNext;
|
||||||
@ -741,10 +747,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// check if any options should be passed to musrfit
|
// check if any options should be passed to musrfit
|
||||||
if (temp) {
|
if (temp) {
|
||||||
if (!msr2data_useOption(arg, "-k"))
|
if (!msr2data_useOption(arg, "-k") || !msr2data_useOption(arg, "--keep-mn2-output"))
|
||||||
musrfitOptions.append("-k ");
|
musrfitOptions.append("-k ");
|
||||||
if (!msr2data_useOption(arg, "-t"))
|
if (!msr2data_useOption(arg, "-t") || !msr2data_useOption(arg, "--title-from-data-file"))
|
||||||
musrfitOptions.append("-t ");
|
musrfitOptions.append("-t ");
|
||||||
|
if (!msr2data_useOption(arg, "-e") || !msr2data_useOption(arg, "--estimateN0"))
|
||||||
|
musrfitOptions.append("-e ");
|
||||||
|
if (!msr2data_useOption(arg, "-p") || !msr2data_useOption(arg, "--per-run-block-chisq"))
|
||||||
|
musrfitOptions.append("-p ");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no fitting should be done, check if only the input files should be created
|
// if no fitting should be done, check if only the input files should be created
|
||||||
|
@ -294,6 +294,7 @@ bool PAdminXMLParser::characters(const QString& str)
|
|||||||
flag = true;
|
flag = true;
|
||||||
else
|
else
|
||||||
flag = false;
|
flag = false;
|
||||||
|
fAdmin->fMsr2DataParam.estimateN0 = flag;
|
||||||
fAdmin->setEstimateN0Flag(flag);
|
fAdmin->setEstimateN0Flag(flag);
|
||||||
break;
|
break;
|
||||||
case eChisqPreRunBlock:
|
case eChisqPreRunBlock:
|
||||||
@ -301,6 +302,7 @@ bool PAdminXMLParser::characters(const QString& str)
|
|||||||
flag = true;
|
flag = true;
|
||||||
else
|
else
|
||||||
flag = false;
|
flag = false;
|
||||||
|
fAdmin->fMsr2DataParam.perRunBlockChisq = flag;
|
||||||
fAdmin->setChisqPerRunBlockFlag(flag);
|
fAdmin->setChisqPerRunBlockFlag(flag);
|
||||||
break;
|
break;
|
||||||
case eRecentFile:
|
case eRecentFile:
|
||||||
@ -631,8 +633,6 @@ PAdmin::PAdmin() : QObject()
|
|||||||
fEstimateN0 = true;
|
fEstimateN0 = true;
|
||||||
fChisqPreRunBlock = false;
|
fChisqPreRunBlock = false;
|
||||||
|
|
||||||
fMsr2DataParam.firstRun = -1;
|
|
||||||
fMsr2DataParam.lastRun = -1;
|
|
||||||
fMsr2DataParam.runList = QString("");
|
fMsr2DataParam.runList = QString("");
|
||||||
fMsr2DataParam.runListFileName = QString("");
|
fMsr2DataParam.runListFileName = QString("");
|
||||||
fMsr2DataParam.msrFileExtension = QString("");
|
fMsr2DataParam.msrFileExtension = QString("");
|
||||||
@ -641,10 +641,12 @@ PAdmin::PAdmin() : QObject()
|
|||||||
fMsr2DataParam.writeDbHeader = true;
|
fMsr2DataParam.writeDbHeader = true;
|
||||||
fMsr2DataParam.ignoreDataHeaderInfo = false;
|
fMsr2DataParam.ignoreDataHeaderInfo = false;
|
||||||
fMsr2DataParam.keepMinuit2Output = false;
|
fMsr2DataParam.keepMinuit2Output = false;
|
||||||
|
fMsr2DataParam.estimateN0 = fEstimateN0;
|
||||||
fMsr2DataParam.writeColumnData = false;
|
fMsr2DataParam.writeColumnData = false;
|
||||||
fMsr2DataParam.recreateDbFile = false;
|
fMsr2DataParam.recreateDbFile = false;
|
||||||
fMsr2DataParam.chainFit = true;
|
fMsr2DataParam.chainFit = true;
|
||||||
fMsr2DataParam.openFilesAfterFitting = true;
|
fMsr2DataParam.openFilesAfterFitting = true;
|
||||||
|
fMsr2DataParam.perRunBlockChisq = fChisqPreRunBlock;
|
||||||
fMsr2DataParam.titleFromDataFile = true;
|
fMsr2DataParam.titleFromDataFile = true;
|
||||||
fMsr2DataParam.createMsrFileOnly = false;
|
fMsr2DataParam.createMsrFileOnly = false;
|
||||||
fMsr2DataParam.fitOnly = false;
|
fMsr2DataParam.fitOnly = false;
|
||||||
|
@ -54,18 +54,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
|
|
||||||
fRunTag = -1;
|
fRunTag = -1;
|
||||||
|
|
||||||
fFirst_lineEdit->setValidator( new QIntValidator(fFirst_lineEdit) );
|
|
||||||
if (fMsr2DataParam->firstRun != -1) {
|
|
||||||
str = QString("%1").arg(fMsr2DataParam->firstRun);
|
|
||||||
fFirst_lineEdit->setText(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
fLast_lineEdit->setValidator( new QIntValidator(fLast_lineEdit) );
|
|
||||||
if (fMsr2DataParam->lastRun != -1) {
|
|
||||||
str = QString("%1").arg(fMsr2DataParam->lastRun);
|
|
||||||
fLast_lineEdit->setText(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fMsr2DataParam->runListFileName.isEmpty()) {
|
if (!fMsr2DataParam->runListFileName.isEmpty()) {
|
||||||
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
|
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
|
||||||
}
|
}
|
||||||
@ -95,10 +83,12 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
|
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
|
||||||
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
|
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
|
||||||
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
|
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
|
||||||
|
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
|
||||||
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
|
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
|
||||||
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
|
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
|
||||||
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
|
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
|
||||||
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
|
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
|
||||||
|
fWritePerRunBlockChisq_checkBox->setChecked(fMsr2DataParam->perRunBlockChisq);
|
||||||
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
|
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
|
||||||
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
|
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
|
||||||
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
|
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
|
||||||
@ -115,16 +105,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
*/
|
*/
|
||||||
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
||||||
{
|
{
|
||||||
if (fFirst_lineEdit->text().isEmpty()) {
|
|
||||||
fMsr2DataParam->firstRun = -1;
|
|
||||||
} else {
|
|
||||||
fMsr2DataParam->firstRun = fFirst_lineEdit->text().toInt();
|
|
||||||
}
|
|
||||||
if (fLast_lineEdit->text().isEmpty()) {
|
|
||||||
fMsr2DataParam->lastRun = -1;
|
|
||||||
} else {
|
|
||||||
fMsr2DataParam->lastRun = fLast_lineEdit->text().toInt();
|
|
||||||
}
|
|
||||||
fMsr2DataParam->runList = fRunList_lineEdit->text();
|
fMsr2DataParam->runList = fRunList_lineEdit->text();
|
||||||
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
|
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
|
||||||
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
|
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
|
||||||
@ -138,10 +118,12 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
|||||||
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
|
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
|
||||||
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
|
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
|
||||||
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
|
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
|
||||||
|
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
|
||||||
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
|
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
|
||||||
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
|
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
|
||||||
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
|
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
|
||||||
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
|
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
|
||||||
|
fMsr2DataParam->perRunBlockChisq = fWritePerRunBlockChisq_checkBox->isChecked();
|
||||||
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
|
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
|
||||||
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
|
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
|
||||||
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
|
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
|
||||||
@ -151,50 +133,6 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
|||||||
return fMsr2DataParam;
|
return fMsr2DataParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'First' text field is activated. It clears any
|
|
||||||
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
|
|
||||||
*
|
|
||||||
* \param str string content of the QTextEdit field.
|
|
||||||
*/
|
|
||||||
void PMsr2DataDialog::runFirstEntered(const QString &str)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (str.length() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
fRunTag = 0;
|
|
||||||
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
|
||||||
fRunList_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
|
||||||
fRunListFileName_lineEdit->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'Last' text field is activated. It clears any
|
|
||||||
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
|
|
||||||
*
|
|
||||||
* \param str string content of the QTextEdit field.
|
|
||||||
*/
|
|
||||||
void PMsr2DataDialog::runLastEntered(const QString &str)
|
|
||||||
{
|
|
||||||
if (str.length() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
fRunTag = 0;
|
|
||||||
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
|
||||||
fRunList_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
|
||||||
fRunListFileName_lineEdit->clear();
|
|
||||||
|
|
||||||
if (fLast_lineEdit->text().length() == 1)
|
|
||||||
fLast_lineEdit->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
|
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
|
||||||
@ -207,12 +145,8 @@ void PMsr2DataDialog::runListEntered(const QString &str)
|
|||||||
if (str.length() == 0)
|
if (str.length() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fRunTag = 1;
|
fRunTag = 0;
|
||||||
|
|
||||||
if (!fFirst_lineEdit->text().isEmpty())
|
|
||||||
fFirst_lineEdit->clear();
|
|
||||||
if (!fLast_lineEdit->text().isEmpty())
|
|
||||||
fLast_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
if (!fRunListFileName_lineEdit->text().isEmpty())
|
||||||
fRunListFileName_lineEdit->clear();
|
fRunListFileName_lineEdit->clear();
|
||||||
}
|
}
|
||||||
@ -229,12 +163,8 @@ void PMsr2DataDialog::runListFileNameEntered(const QString &str)
|
|||||||
if (str.length() == 0)
|
if (str.length() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fRunTag = 2;
|
fRunTag = 1;
|
||||||
|
|
||||||
if (!fFirst_lineEdit->text().isEmpty())
|
|
||||||
fFirst_lineEdit->clear();
|
|
||||||
if (!fLast_lineEdit->text().isEmpty())
|
|
||||||
fLast_lineEdit->clear();
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
if (!fRunList_lineEdit->text().isEmpty())
|
||||||
fRunList_lineEdit->clear();
|
fRunList_lineEdit->clear();
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,6 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
|
|||||||
virtual PMsr2DataParam* getMsr2DataParam();
|
virtual PMsr2DataParam* getMsr2DataParam();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void runFirstEntered(const QString&);
|
|
||||||
void runLastEntered(const QString&);
|
|
||||||
void runListEntered(const QString&);
|
void runListEntered(const QString&);
|
||||||
void runListFileNameEntered(const QString&);
|
void runListFileNameEntered(const QString&);
|
||||||
void templateRunEntered(const QString&);
|
void templateRunEntered(const QString&);
|
||||||
@ -65,7 +63,7 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
|
|||||||
void globalPlusOptionSet(bool checked);
|
void globalPlusOptionSet(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int fRunTag; ///< -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
|
int fRunTag; ///< -1 = not valid, 0 = run list, 1 = run list file name
|
||||||
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
|
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
|
||||||
QString fHelpUrl; ///< help url for the Fourier block
|
QString fHelpUrl; ///< help url for the Fourier block
|
||||||
};
|
};
|
||||||
|
@ -1853,6 +1853,8 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// init fMsr2DataParam
|
// init fMsr2DataParam
|
||||||
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
||||||
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
||||||
|
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
|
||||||
|
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
|
||||||
|
|
||||||
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
||||||
|
|
||||||
@ -1874,6 +1876,8 @@ void PTextEdit::musrMsr2Data()
|
|||||||
fMsr2DataParam = dlg->getMsr2DataParam();
|
fMsr2DataParam = dlg->getMsr2DataParam();
|
||||||
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
||||||
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
||||||
|
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
|
||||||
|
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
|
||||||
|
|
||||||
// analyze parameters
|
// analyze parameters
|
||||||
switch (dlg->getRunTag()) {
|
switch (dlg->getRunTag()) {
|
||||||
@ -1883,20 +1887,10 @@ void PTextEdit::musrMsr2Data()
|
|||||||
QMessageBox::Ok, QMessageBox::NoButton);
|
QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 0: // first last
|
case 0: // run list
|
||||||
first = QString("%1").arg(fMsr2DataParam->firstRun);
|
|
||||||
last = QString("%1").arg(fMsr2DataParam->lastRun);
|
|
||||||
if (first.isEmpty() || last.isEmpty()) {
|
|
||||||
QMessageBox::critical(this, "**ERROR**",
|
|
||||||
"If you choose the first/last option,\nfirst AND last needs to be provided.",
|
|
||||||
QMessageBox::Ok, QMessageBox::NoButton);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
runList = fMsr2DataParam->runList;
|
runList = fMsr2DataParam->runList;
|
||||||
break;
|
break;
|
||||||
case 2: // run list file name
|
case 1: // run list file name
|
||||||
runListFileName = fMsr2DataParam->runListFileName;
|
runListFileName = fMsr2DataParam->runListFileName;
|
||||||
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
|
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
|
||||||
if (!fi.exists()) {
|
if (!fi.exists()) {
|
||||||
@ -1923,10 +1917,6 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// run list argument
|
// run list argument
|
||||||
switch (dlg->getRunTag()) {
|
switch (dlg->getRunTag()) {
|
||||||
case 0:
|
case 0:
|
||||||
cmd.append(first);
|
|
||||||
cmd.append(last);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end = 0;
|
end = 0;
|
||||||
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
|
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
|
||||||
end++;
|
end++;
|
||||||
@ -1947,7 +1937,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
cmd.append(str);
|
cmd.append(str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1:
|
||||||
cmd.append(runListFileName);
|
cmd.append(runListFileName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -2012,6 +2002,16 @@ void PTextEdit::musrMsr2Data()
|
|||||||
cmd.append("-t");
|
cmd.append("-t");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// estimate N0 (for single histo and muMinus). Add flag only if a fit is done
|
||||||
|
if (fMsr2DataParam->estimateN0 && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
|
||||||
|
cmd.append("-e");
|
||||||
|
}
|
||||||
|
|
||||||
|
// write per-run-block chisq. Add flag only if a fit is done
|
||||||
|
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
|
||||||
|
cmd.append("-p");
|
||||||
|
}
|
||||||
|
|
||||||
// DB output wished
|
// DB output wished
|
||||||
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
|
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
|
||||||
str = "-o" + fMsr2DataParam->dbOutputFileName;
|
str = "-o" + fMsr2DataParam->dbOutputFileName;
|
||||||
@ -2056,19 +2056,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
if (!fMsr2DataParam->global) { // standard fits
|
if (!fMsr2DataParam->global) { // standard fits
|
||||||
|
|
||||||
switch(dlg->getRunTag()) {
|
switch(dlg->getRunTag()) {
|
||||||
case 0: // first run / last run list
|
case 0: // run list
|
||||||
if (fMsr2DataParam->firstRun != -1) {
|
|
||||||
for (int i=fMsr2DataParam->firstRun; i<=fMsr2DataParam->lastRun; i++) {
|
|
||||||
if (fMsr2DataParam->msrFileExtension.isEmpty())
|
|
||||||
fln = QString("%1").arg(i) + ".msr";
|
|
||||||
else
|
|
||||||
fln = QString("%1").arg(i) + fMsr2DataParam->msrFileExtension + ".msr";
|
|
||||||
|
|
||||||
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
list = getRunList(runList, ok);
|
list = getRunList(runList, ok);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
@ -2082,7 +2070,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // run list file
|
case 1: // run list file
|
||||||
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
||||||
if (!file->open(QIODevice::ReadOnly)) {
|
if (!file->open(QIODevice::ReadOnly)) {
|
||||||
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
||||||
@ -2118,13 +2106,10 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// get the first run number needed to build the global fit file name
|
// get the first run number needed to build the global fit file name
|
||||||
fln = QString("");
|
fln = QString("");
|
||||||
switch(dlg->getRunTag()) {
|
switch(dlg->getRunTag()) {
|
||||||
case 0: // first/last run
|
case 0: // run list
|
||||||
fln = QString("%1").arg(fMsr2DataParam->firstRun) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
||||||
break;
|
break;
|
||||||
case 2: // run list file name
|
case 1: // run list file name
|
||||||
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
||||||
if (!file->open(QIODevice::ReadOnly)) {
|
if (!file->open(QIODevice::ReadOnly)) {
|
||||||
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
||||||
@ -2403,6 +2388,7 @@ void PTextEdit::musrDump()
|
|||||||
QVector<QString> cmd;
|
QVector<QString> cmd;
|
||||||
QString str = fAdmin->getExecPath() + "/dump_header";
|
QString str = fAdmin->getExecPath() + "/dump_header";
|
||||||
cmd.append(str);
|
cmd.append(str);
|
||||||
|
cmd.append("-fn");
|
||||||
cmd.append(fileName);
|
cmd.append(fileName);
|
||||||
|
|
||||||
PDumpOutputHandler dumpOutputHandler(cmd);
|
PDumpOutputHandler dumpOutputHandler(cmd);
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>552</width>
|
<width>584</width>
|
||||||
<height>599</height>
|
<height>578</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -25,8 +25,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>131</height>
|
<height>111</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -47,93 +47,13 @@
|
|||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>11</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>97</height>
|
<height>70</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fFirst_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>First</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="fFirst_lineEdit">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>start run number</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>start run number</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fLast_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Last</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="fLast_lineEdit">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>end run number</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>end run number</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fOrFirstLast_label">
|
|
||||||
<property name="text">
|
|
||||||
<string><b>OR</b></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::AutoText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -232,8 +152,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>130</y>
|
<y>110</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -245,8 +165,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
@ -262,9 +182,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>30</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -297,8 +220,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>200</y>
|
<y>180</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -311,7 +234,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>531</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
@ -364,8 +287,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>280</y>
|
<y>260</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -378,7 +301,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>531</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
@ -419,8 +342,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>360</y>
|
<y>340</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>172</height>
|
<height>172</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -432,7 +355,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>6</x>
|
<x>6</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>541</width>
|
<width>571</width>
|
||||||
<height>116</height>
|
<height>116</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -473,6 +396,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fEstimateN0_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Estimate N0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -517,6 +447,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fWritePerRunBlockChisq_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Write per-run-block Chisq</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -601,21 +538,24 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>170</x>
|
||||||
<y>140</y>
|
<y>140</y>
|
||||||
<width>371</width>
|
<width>401</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string>parameter numbers to be exported, e.g. 1-16, or 1 3-7, etc.</string>
|
<string>parameter numbers to be exported, e.g. 1-16, or 1 3-7, etc.</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>5</x>
|
<x>5</x>
|
||||||
<y>540</y>
|
<y>520</y>
|
||||||
<width>541</width>
|
<width>571</width>
|
||||||
<height>51</height>
|
<height>51</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -669,8 +609,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>fFirst_lineEdit</tabstop>
|
|
||||||
<tabstop>fLast_lineEdit</tabstop>
|
|
||||||
<tabstop>fRunList_lineEdit</tabstop>
|
<tabstop>fRunList_lineEdit</tabstop>
|
||||||
<tabstop>fRunListFileName_lineEdit</tabstop>
|
<tabstop>fRunListFileName_lineEdit</tabstop>
|
||||||
<tabstop>fMsrFileExtension_lineEdit</tabstop>
|
<tabstop>fMsrFileExtension_lineEdit</tabstop>
|
||||||
@ -744,38 +682,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>fFirst_lineEdit</sender>
|
|
||||||
<signal>textChanged(QString)</signal>
|
|
||||||
<receiver>PMsr2DataDialog</receiver>
|
|
||||||
<slot>runFirstEntered(QString)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>82</x>
|
|
||||||
<y>44</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>113</x>
|
|
||||||
<y>504</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>fLast_lineEdit</sender>
|
|
||||||
<signal>textChanged(QString)</signal>
|
|
||||||
<receiver>PMsr2DataDialog</receiver>
|
|
||||||
<slot>runLastEntered(QString)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>229</x>
|
|
||||||
<y>44</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>348</x>
|
|
||||||
<y>500</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>fRunList_lineEdit</sender>
|
<sender>fRunList_lineEdit</sender>
|
||||||
<signal>textChanged(QString)</signal>
|
<signal>textChanged(QString)</signal>
|
||||||
|
@ -41,8 +41,6 @@
|
|||||||
* parameters see <code>msr2data --help</code> and the online documentation.
|
* parameters see <code>msr2data --help</code> and the online documentation.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int firstRun; ///< first run number of a sequence of runs (usage 2 of msr2data)
|
|
||||||
int lastRun; ///< last run number of a sequence of runs (usage 2 of msr2data)
|
|
||||||
QString runList; ///< list of run numbers (usage 3 of msr2data)
|
QString runList; ///< list of run numbers (usage 3 of msr2data)
|
||||||
QString runListFileName; ///< run list filename (usage 4 of msr2data)
|
QString runListFileName; ///< run list filename (usage 4 of msr2data)
|
||||||
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
|
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
|
||||||
@ -57,6 +55,8 @@ typedef struct {
|
|||||||
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
|
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
|
||||||
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
|
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
|
||||||
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
|
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
|
||||||
|
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
|
||||||
|
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
|
||||||
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
|
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
|
||||||
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
|
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
|
||||||
bool global; ///< flag: true = 'global' option
|
bool global; ///< flag: true = 'global' option
|
||||||
|
@ -2,4 +2,3 @@
|
|||||||
|
|
||||||
CLEANFILES = *~ core moc_* ui_*
|
CLEANFILES = *~ core moc_* ui_*
|
||||||
|
|
||||||
|
|
||||||
|
@ -296,6 +296,7 @@ bool PAdminXMLParser::characters(const QString& str)
|
|||||||
flag = true;
|
flag = true;
|
||||||
else
|
else
|
||||||
flag = false;
|
flag = false;
|
||||||
|
fAdmin->fMsr2DataParam.estimateN0 = flag;
|
||||||
fAdmin->setEstimateN0Flag(flag);
|
fAdmin->setEstimateN0Flag(flag);
|
||||||
break;
|
break;
|
||||||
case eChisqPreRunBlock:
|
case eChisqPreRunBlock:
|
||||||
@ -303,6 +304,7 @@ bool PAdminXMLParser::characters(const QString& str)
|
|||||||
flag = true;
|
flag = true;
|
||||||
else
|
else
|
||||||
flag = false;
|
flag = false;
|
||||||
|
fAdmin->fMsr2DataParam.perRunBlockChisq = flag;
|
||||||
fAdmin->setChisqPerRunBlockFlag(flag);
|
fAdmin->setChisqPerRunBlockFlag(flag);
|
||||||
break;
|
break;
|
||||||
case eRecentFile:
|
case eRecentFile:
|
||||||
@ -641,8 +643,6 @@ PAdmin::PAdmin() : QObject()
|
|||||||
fEstimateN0 = true;
|
fEstimateN0 = true;
|
||||||
fChisqPreRunBlock = false;
|
fChisqPreRunBlock = false;
|
||||||
|
|
||||||
fMsr2DataParam.firstRun = -1;
|
|
||||||
fMsr2DataParam.lastRun = -1;
|
|
||||||
fMsr2DataParam.runList = QString("");
|
fMsr2DataParam.runList = QString("");
|
||||||
fMsr2DataParam.runListFileName = QString("");
|
fMsr2DataParam.runListFileName = QString("");
|
||||||
fMsr2DataParam.msrFileExtension = QString("");
|
fMsr2DataParam.msrFileExtension = QString("");
|
||||||
@ -651,10 +651,12 @@ PAdmin::PAdmin() : QObject()
|
|||||||
fMsr2DataParam.writeDbHeader = true;
|
fMsr2DataParam.writeDbHeader = true;
|
||||||
fMsr2DataParam.ignoreDataHeaderInfo = false;
|
fMsr2DataParam.ignoreDataHeaderInfo = false;
|
||||||
fMsr2DataParam.keepMinuit2Output = false;
|
fMsr2DataParam.keepMinuit2Output = false;
|
||||||
|
fMsr2DataParam.estimateN0 = fEstimateN0;
|
||||||
fMsr2DataParam.writeColumnData = false;
|
fMsr2DataParam.writeColumnData = false;
|
||||||
fMsr2DataParam.recreateDbFile = false;
|
fMsr2DataParam.recreateDbFile = false;
|
||||||
fMsr2DataParam.chainFit = true;
|
fMsr2DataParam.chainFit = true;
|
||||||
fMsr2DataParam.openFilesAfterFitting = true;
|
fMsr2DataParam.openFilesAfterFitting = true;
|
||||||
|
fMsr2DataParam.perRunBlockChisq = fChisqPreRunBlock;
|
||||||
fMsr2DataParam.titleFromDataFile = true;
|
fMsr2DataParam.titleFromDataFile = true;
|
||||||
fMsr2DataParam.createMsrFileOnly = false;
|
fMsr2DataParam.createMsrFileOnly = false;
|
||||||
fMsr2DataParam.fitOnly = false;
|
fMsr2DataParam.fitOnly = false;
|
||||||
|
331
src/musredit_qt5/PChangeDefaultPathsDialog.cpp
Normal file
331
src/musredit_qt5/PChangeDefaultPathsDialog.cpp
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
|
||||||
|
PChangeDefaultPathsDialog.cpp
|
||||||
|
|
||||||
|
Author: Andreas Suter
|
||||||
|
e-mail: andreas.suter@psi.ch
|
||||||
|
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2010-2017 by Andreas Suter *
|
||||||
|
* andreas.suter@psi.ch *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QListWidgetItem>
|
||||||
|
|
||||||
|
#include "PChangeDefaultPathsDialog.h"
|
||||||
|
|
||||||
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
/**
|
||||||
|
* @brief PDefaultPathsXMLParser::PDefaultPathsXMLParser
|
||||||
|
* @param defaultPaths
|
||||||
|
*/
|
||||||
|
PDefaultPathsXMLParser::PDefaultPathsXMLParser(PDefaultPaths *defaultPaths) :
|
||||||
|
fDefaultPaths(defaultPaths)
|
||||||
|
{
|
||||||
|
fKeyWord = eEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Routine called at the beginning of the XML parsing process.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::startDocument()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Routine called when a new XML tag is found. Here it is used
|
||||||
|
* to set a tag for filtering afterwards the content.
|
||||||
|
*
|
||||||
|
* \param qName name of the XML tag.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::startElement( const QString&, const QString&,
|
||||||
|
const QString& qName,
|
||||||
|
const QXmlAttributes& )
|
||||||
|
{
|
||||||
|
if (qName == "data_path") {
|
||||||
|
fKeyWord = eDataPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Routine called when the end XML tag is found. It is used to
|
||||||
|
* put the filtering tag to 'empty'.
|
||||||
|
*
|
||||||
|
* \param qName name of the element.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::endElement( const QString&, const QString&, const QString & )
|
||||||
|
{
|
||||||
|
fKeyWord = eEmpty;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>This routine delivers the content of an XML tag. It fills the
|
||||||
|
* content into the load data structure.
|
||||||
|
*
|
||||||
|
* \param str keeps the content of the XML tag.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::characters(const QString& str)
|
||||||
|
{
|
||||||
|
switch (fKeyWord) {
|
||||||
|
case eDataPath:
|
||||||
|
fDefaultPaths->appendDefaultPath(str);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Called at the end of the XML parse process. It checks if default paths
|
||||||
|
* contain system variables, and if so expand them for the further use.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::endDocument()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Report XML warnings.
|
||||||
|
*
|
||||||
|
* \param exception holds the information of the XML warning
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::warning( const QXmlParseException & exception )
|
||||||
|
{
|
||||||
|
QString msg;
|
||||||
|
|
||||||
|
msg = QString("**WARNING** while parsing musrfit_startup.xml in line no %1\n").arg(exception.lineNumber());
|
||||||
|
msg += QString("**WARNING MESSAGE** ") + exception.message();
|
||||||
|
|
||||||
|
qWarning() << endl << msg << endl;
|
||||||
|
|
||||||
|
QMessageBox::warning(0, "WARNING", msg, QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Report recoverable XML errors.
|
||||||
|
*
|
||||||
|
* \param exception holds the information of the XML recoverable errors.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::error( const QXmlParseException & exception )
|
||||||
|
{
|
||||||
|
QString msg;
|
||||||
|
|
||||||
|
msg = QString("**ERROR** while parsing musrfit_startup.xml in line no %1\n").arg(exception.lineNumber());
|
||||||
|
msg += QString("**ERROR MESSAGE** ") + exception.message();
|
||||||
|
|
||||||
|
qWarning() << endl << msg << endl;
|
||||||
|
|
||||||
|
QMessageBox::critical(0, "ERROR", msg, QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Report fatal XML errors.
|
||||||
|
*
|
||||||
|
* \param exception holds the information of the XML fatal errors.
|
||||||
|
*/
|
||||||
|
bool PDefaultPathsXMLParser::fatalError( const QXmlParseException & exception )
|
||||||
|
{
|
||||||
|
QString msg;
|
||||||
|
|
||||||
|
msg = QString("**FATAL ERROR** while parsing musrfit_startup.xml in line no %1\n").arg(exception.lineNumber());
|
||||||
|
msg += QString("**FATAL ERROR MESSAGE** ") + exception.message();
|
||||||
|
|
||||||
|
qWarning() << endl << msg << endl;
|
||||||
|
|
||||||
|
QMessageBox::critical(0, "FATAL ERROR", msg, QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
PDefaultPaths::PDefaultPaths() : QObject()
|
||||||
|
{
|
||||||
|
fValid = true;
|
||||||
|
|
||||||
|
// XML Parser part
|
||||||
|
// 1st: check local directory
|
||||||
|
QString path = QString("./");
|
||||||
|
QString fln = QString("musrfit_startup.xml");
|
||||||
|
QString pathFln = path + fln;
|
||||||
|
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
|
||||||
|
if (!QFile::exists(pathFln)) {
|
||||||
|
// 2nd: check $HOME/.musrfit/musrfit_startup.xml
|
||||||
|
path = procEnv.value("HOME", "");
|
||||||
|
pathFln = path + "/.musrfit/" + fln;
|
||||||
|
if (!QFile::exists(pathFln)) {
|
||||||
|
// 3rd: check $MUSRFITPATH/musrfit_startup.xml
|
||||||
|
path = procEnv.value("MUSRFITPATH", "");
|
||||||
|
pathFln = path + "/" + fln;
|
||||||
|
if (!QFile::exists(pathFln)) {
|
||||||
|
// 4th: check $ROOTSYS/bin/musrfit_startup.xml
|
||||||
|
path = procEnv.value("ROOTSYS", "");
|
||||||
|
pathFln = path + "/bin/" + fln;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fPrefPathName = pathFln;
|
||||||
|
|
||||||
|
// read musrfit_startup.xml and extract default data file search paths
|
||||||
|
PDefaultPathsXMLParser handler(this);
|
||||||
|
QFile xmlFile(fPrefPathName);
|
||||||
|
QXmlInputSource source( &xmlFile );
|
||||||
|
QXmlSimpleReader reader;
|
||||||
|
reader.setContentHandler( &handler );
|
||||||
|
reader.setErrorHandler( &handler );
|
||||||
|
if (!reader.parse( source )) {
|
||||||
|
fValid = false;
|
||||||
|
QMessageBox::critical(0, "ERROR",
|
||||||
|
"Error parsing musrfit_startup.xml settings file.\nProbably a few things will not work porperly.\nPlease fix this first.",
|
||||||
|
QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
/**
|
||||||
|
* <p>Constructor.
|
||||||
|
*
|
||||||
|
* \param fAdmin keeps all the needed flags
|
||||||
|
*/
|
||||||
|
PChangeDefaultPathsDialog::PChangeDefaultPathsDialog()
|
||||||
|
{
|
||||||
|
fDefaultPath = 0;
|
||||||
|
fDefaultPath = new PDefaultPaths();
|
||||||
|
if (!fDefaultPath->isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QStringList *strList = fDefaultPath->getDefaultPathList();
|
||||||
|
if (strList == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
setupUi(this);
|
||||||
|
|
||||||
|
setModal(true);
|
||||||
|
|
||||||
|
// populate default search paths
|
||||||
|
for (int i=0; i<strList->count(); i++) {
|
||||||
|
fSearchPath_listWidget->addItem(strList->at(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
QObject::connect(fDelete_pushButton, SIGNAL(clicked()), this, SLOT(deleteItem()));
|
||||||
|
QObject::connect(fAdd_pushButton, SIGNAL(clicked()), this, SLOT(addItem()));
|
||||||
|
QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveDefaultPathList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief PChangeDefaultPathsDialog::addItem
|
||||||
|
*/
|
||||||
|
void PChangeDefaultPathsDialog::addItem()
|
||||||
|
{
|
||||||
|
// call QFileDialog in order to get the proper directory
|
||||||
|
QString dirName = QFileDialog::getExistingDirectory(this, tr("Data File Directory"), "",
|
||||||
|
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||||
|
if (dirName == "")
|
||||||
|
return;
|
||||||
|
|
||||||
|
// insert the new directory in fSearchPath_listWidget
|
||||||
|
QListWidgetItem *item = new QListWidgetItem;
|
||||||
|
if (item == 0) {
|
||||||
|
QMessageBox::critical(this, "ERROR", "Couldn't invoke QListWidgetItem! Won't do anything.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item->setText(dirName);
|
||||||
|
fSearchPath_listWidget->insertItem(fSearchPath_listWidget->currentRow()+1, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief PChangeDefaultPathsDialog::deleteItem
|
||||||
|
*/
|
||||||
|
void PChangeDefaultPathsDialog::deleteItem()
|
||||||
|
{
|
||||||
|
QListWidgetItem *item = fSearchPath_listWidget->takeItem(fSearchPath_listWidget->currentRow());
|
||||||
|
if (item != 0)
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* @brief PChangeDefaultPathsDialog::saveDefaultPathList
|
||||||
|
*/
|
||||||
|
void PChangeDefaultPathsDialog::saveDefaultPathList()
|
||||||
|
{
|
||||||
|
// read the used musrfit_startup.xml
|
||||||
|
QFile fileIn(fDefaultPath->getPrefPathName());
|
||||||
|
if (!fileIn.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
QMessageBox::critical(this, "ERROR", QString("Cannot read '%1'. Won't do anything.").arg(fDefaultPath->getPrefPathName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTextStream in(&fileIn);
|
||||||
|
QStringList fileContent;
|
||||||
|
while (!in.atEnd()) {
|
||||||
|
fileContent << in.readLine();
|
||||||
|
}
|
||||||
|
fileIn.close();
|
||||||
|
|
||||||
|
// write the new musrfit_startup.xml
|
||||||
|
QFile fileOut(fDefaultPath->getPrefPathName());
|
||||||
|
if (!fileOut.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
QMessageBox::critical(this, "ERROR", QString("Cannot write to '%1'.").arg(fDefaultPath->getPrefPathName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTextStream out(&fileOut);
|
||||||
|
QString str;
|
||||||
|
bool first = true;
|
||||||
|
for (int i=0; i<fileContent.count(); i++) {
|
||||||
|
str = fileContent[i];
|
||||||
|
if (!str.trimmed().startsWith("<data_path>")) {
|
||||||
|
out << fileContent[i] << endl;
|
||||||
|
} else {
|
||||||
|
if (first) {
|
||||||
|
first = false;
|
||||||
|
for (int j=0; j<fSearchPath_listWidget->count(); j++)
|
||||||
|
out << " <data_path>" << fSearchPath_listWidget->item(j)->text() << "</data_path>" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileOut.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
// END
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
104
src/musredit_qt5/PChangeDefaultPathsDialog.h
Normal file
104
src/musredit_qt5/PChangeDefaultPathsDialog.h
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
|
||||||
|
PChangeDefaultPathsDialog.h
|
||||||
|
|
||||||
|
Author: Andreas Suter
|
||||||
|
e-mail: andreas.suter@psi.ch
|
||||||
|
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2010-2017 by Andreas Suter *
|
||||||
|
* andreas.suter@psi.ch *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _PCHANGEDEFAULTPATHSDIALOG_H_
|
||||||
|
#define _PCHANGEDEFAULTPATHSDIALOG_H_
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QtXml>
|
||||||
|
|
||||||
|
#include "ui_PChangeDefaultPathsDialog.h"
|
||||||
|
|
||||||
|
class PDefaultPaths;
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class PDefaultPathsXMLParser : public QXmlDefaultHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PDefaultPathsXMLParser(PDefaultPaths *defaultPaths);
|
||||||
|
virtual ~PDefaultPathsXMLParser() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum EAdminKeyWords {eEmpty, eDataPath};
|
||||||
|
|
||||||
|
bool startDocument();
|
||||||
|
bool startElement( const QString&, const QString&, const QString& ,
|
||||||
|
const QXmlAttributes& );
|
||||||
|
bool endElement( const QString&, const QString&, const QString& );
|
||||||
|
|
||||||
|
bool characters(const QString&);
|
||||||
|
bool endDocument();
|
||||||
|
|
||||||
|
bool warning( const QXmlParseException & exception );
|
||||||
|
bool error( const QXmlParseException & exception );
|
||||||
|
bool fatalError( const QXmlParseException & exception );
|
||||||
|
|
||||||
|
EAdminKeyWords fKeyWord; ///< key word tag to know how to handle the content
|
||||||
|
PDefaultPaths *fDefaultPaths; ///< keeps the default search paths for the data files
|
||||||
|
};
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class PDefaultPaths : public QObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PDefaultPaths();
|
||||||
|
virtual ~PDefaultPaths() {}
|
||||||
|
|
||||||
|
virtual bool isValid() { return fValid; }
|
||||||
|
virtual void appendDefaultPath(QString str) { fDefaultPath << str; }
|
||||||
|
virtual QStringList *getDefaultPathList() { return &fDefaultPath; }
|
||||||
|
virtual QString getPrefPathName() { return fPrefPathName; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class PDefaultPathsXMLParser;
|
||||||
|
|
||||||
|
bool fValid;
|
||||||
|
QString fPrefPathName;
|
||||||
|
QStringList fDefaultPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class PChangeDefaultPathsDialog : public QDialog, private Ui::PChangeDefaultPathsDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
PChangeDefaultPathsDialog();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void deleteItem();
|
||||||
|
void addItem();
|
||||||
|
void saveDefaultPathList();
|
||||||
|
|
||||||
|
private:
|
||||||
|
PDefaultPaths *fDefaultPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _PCHANGEDEFAULTPATHSDIALOG_H_
|
@ -60,6 +60,11 @@ PDumpOutputHandler::PDumpOutputHandler(QVector<QString> &cmd)
|
|||||||
// QProcess related code
|
// QProcess related code
|
||||||
fProc = new QProcess( this );
|
fProc = new QProcess( this );
|
||||||
|
|
||||||
|
// make sure that the system environment variables are properly set
|
||||||
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
|
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" + env.value("LD_LIBRARY_PATH"));
|
||||||
|
fProc->setProcessEnvironment(env);
|
||||||
|
|
||||||
// Set up the command and arguments.
|
// Set up the command and arguments.
|
||||||
QString program = cmd[0];
|
QString program = cmd[0];
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
@ -69,6 +74,7 @@ PDumpOutputHandler::PDumpOutputHandler(QVector<QString> &cmd)
|
|||||||
connect( fProc, SIGNAL( readyReadStandardOutput() ), this, SLOT( readFromStdOut() ) );
|
connect( fProc, SIGNAL( readyReadStandardOutput() ), this, SLOT( readFromStdOut() ) );
|
||||||
connect( fProc, SIGNAL( readyReadStandardError() ), this, SLOT( readFromStdErr() ) );
|
connect( fProc, SIGNAL( readyReadStandardError() ), this, SLOT( readFromStdErr() ) );
|
||||||
|
|
||||||
|
|
||||||
fProc->start(program, arguments);
|
fProc->start(program, arguments);
|
||||||
if ( !fProc->waitForStarted() ) {
|
if ( !fProc->waitForStarted() ) {
|
||||||
// error handling
|
// error handling
|
||||||
|
@ -54,18 +54,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
|
|
||||||
fRunTag = -1;
|
fRunTag = -1;
|
||||||
|
|
||||||
fFirst_lineEdit->setValidator( new QIntValidator(fFirst_lineEdit) );
|
|
||||||
if (fMsr2DataParam->firstRun != -1) {
|
|
||||||
str = QString("%1").arg(fMsr2DataParam->firstRun);
|
|
||||||
fFirst_lineEdit->setText(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
fLast_lineEdit->setValidator( new QIntValidator(fLast_lineEdit) );
|
|
||||||
if (fMsr2DataParam->lastRun != -1) {
|
|
||||||
str = QString("%1").arg(fMsr2DataParam->lastRun);
|
|
||||||
fLast_lineEdit->setText(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fMsr2DataParam->runListFileName.isEmpty()) {
|
if (!fMsr2DataParam->runListFileName.isEmpty()) {
|
||||||
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
|
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
|
||||||
}
|
}
|
||||||
@ -95,10 +83,12 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
|
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
|
||||||
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
|
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
|
||||||
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
|
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
|
||||||
|
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
|
||||||
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
|
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
|
||||||
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
|
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
|
||||||
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
|
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
|
||||||
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
|
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
|
||||||
|
fWritePerRunBlockChisq_checkBox->setChecked(fMsr2DataParam->perRunBlockChisq);
|
||||||
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
|
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
|
||||||
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
|
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
|
||||||
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
|
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
|
||||||
@ -117,16 +107,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
|||||||
*/
|
*/
|
||||||
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
||||||
{
|
{
|
||||||
if (fFirst_lineEdit->text().isEmpty()) {
|
|
||||||
fMsr2DataParam->firstRun = -1;
|
|
||||||
} else {
|
|
||||||
fMsr2DataParam->firstRun = fFirst_lineEdit->text().toInt();
|
|
||||||
}
|
|
||||||
if (fLast_lineEdit->text().isEmpty()) {
|
|
||||||
fMsr2DataParam->lastRun = -1;
|
|
||||||
} else {
|
|
||||||
fMsr2DataParam->lastRun = fLast_lineEdit->text().toInt();
|
|
||||||
}
|
|
||||||
fMsr2DataParam->runList = fRunList_lineEdit->text();
|
fMsr2DataParam->runList = fRunList_lineEdit->text();
|
||||||
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
|
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
|
||||||
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
|
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
|
||||||
@ -140,10 +120,12 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
|||||||
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
|
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
|
||||||
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
|
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
|
||||||
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
|
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
|
||||||
|
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
|
||||||
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
|
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
|
||||||
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
|
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
|
||||||
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
|
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
|
||||||
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
|
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
|
||||||
|
fMsr2DataParam->perRunBlockChisq = fWritePerRunBlockChisq_checkBox->isChecked();
|
||||||
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
|
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
|
||||||
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
|
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
|
||||||
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
|
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
|
||||||
@ -153,50 +135,6 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
|||||||
return fMsr2DataParam;
|
return fMsr2DataParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'First' text field is activated. It clears any
|
|
||||||
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
|
|
||||||
*
|
|
||||||
* \param str string content of the QTextEdit field.
|
|
||||||
*/
|
|
||||||
void PMsr2DataDialog::runFirstEntered(const QString &str)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (str.length() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
fRunTag = 0;
|
|
||||||
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
|
||||||
fRunList_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
|
||||||
fRunListFileName_lineEdit->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'Last' text field is activated. It clears any
|
|
||||||
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
|
|
||||||
*
|
|
||||||
* \param str string content of the QTextEdit field.
|
|
||||||
*/
|
|
||||||
void PMsr2DataDialog::runLastEntered(const QString &str)
|
|
||||||
{
|
|
||||||
if (str.length() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
fRunTag = 0;
|
|
||||||
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
|
||||||
fRunList_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
|
||||||
fRunListFileName_lineEdit->clear();
|
|
||||||
|
|
||||||
if (fLast_lineEdit->text().length() == 1)
|
|
||||||
fLast_lineEdit->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
|
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
|
||||||
@ -209,12 +147,8 @@ void PMsr2DataDialog::runListEntered(const QString &str)
|
|||||||
if (str.length() == 0)
|
if (str.length() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fRunTag = 1;
|
fRunTag = 0;
|
||||||
|
|
||||||
if (!fFirst_lineEdit->text().isEmpty())
|
|
||||||
fFirst_lineEdit->clear();
|
|
||||||
if (!fLast_lineEdit->text().isEmpty())
|
|
||||||
fLast_lineEdit->clear();
|
|
||||||
if (!fRunListFileName_lineEdit->text().isEmpty())
|
if (!fRunListFileName_lineEdit->text().isEmpty())
|
||||||
fRunListFileName_lineEdit->clear();
|
fRunListFileName_lineEdit->clear();
|
||||||
}
|
}
|
||||||
@ -231,12 +165,8 @@ void PMsr2DataDialog::runListFileNameEntered(const QString &str)
|
|||||||
if (str.length() == 0)
|
if (str.length() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fRunTag = 2;
|
fRunTag = 1;
|
||||||
|
|
||||||
if (!fFirst_lineEdit->text().isEmpty())
|
|
||||||
fFirst_lineEdit->clear();
|
|
||||||
if (!fLast_lineEdit->text().isEmpty())
|
|
||||||
fLast_lineEdit->clear();
|
|
||||||
if (!fRunList_lineEdit->text().isEmpty())
|
if (!fRunList_lineEdit->text().isEmpty())
|
||||||
fRunList_lineEdit->clear();
|
fRunList_lineEdit->clear();
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,6 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
|
|||||||
virtual PMsr2DataParam* getMsr2DataParam();
|
virtual PMsr2DataParam* getMsr2DataParam();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void runFirstEntered(const QString&);
|
|
||||||
void runLastEntered(const QString&);
|
|
||||||
void runListEntered(const QString&);
|
void runListEntered(const QString&);
|
||||||
void runListFileNameEntered(const QString&);
|
void runListFileNameEntered(const QString&);
|
||||||
void templateRunEntered(const QString&);
|
void templateRunEntered(const QString&);
|
||||||
@ -65,7 +63,7 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
|
|||||||
void globalPlusOptionSet(bool checked);
|
void globalPlusOptionSet(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int fRunTag; ///< -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
|
int fRunTag; ///< -1 = not valid, 0 = run list, 1 = run list file name
|
||||||
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
|
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
|
||||||
QString fHelpUrl; ///< help url for the Fourier block
|
QString fHelpUrl; ///< help url for the Fourier block
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "PChangeDefaultPathsDialog.h"
|
||||||
#include "PPrefsDialog.h"
|
#include "PPrefsDialog.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -66,6 +67,8 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
|
|||||||
|
|
||||||
fTimeout_lineEdit->setText(QString("%1").arg(fAdmin->getTimeout()));
|
fTimeout_lineEdit->setText(QString("%1").arg(fAdmin->getTimeout()));
|
||||||
fTimeout_lineEdit->setValidator(new QIntValidator(fTimeout_lineEdit));
|
fTimeout_lineEdit->setValidator(new QIntValidator(fTimeout_lineEdit));
|
||||||
|
|
||||||
|
QObject::connect(fDefaultPath_pushButton, SIGNAL(clicked()), this, SLOT(handleDefaultPaths()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -106,6 +109,22 @@ void PPrefsDialog::dumpRoot()
|
|||||||
fDumpAscii_checkBox->setChecked(false);
|
fDumpAscii_checkBox->setChecked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
*<p>SLOT: called when the QPushButton 'Change Default Search Paths' is clicked. Will call a
|
||||||
|
* dialog which allows to deal with the default search paths to look for data files.
|
||||||
|
*/
|
||||||
|
void PPrefsDialog::handleDefaultPaths()
|
||||||
|
{
|
||||||
|
PChangeDefaultPathsDialog *dlg = new PChangeDefaultPathsDialog();
|
||||||
|
|
||||||
|
if (dlg->exec() == QDialog::Accepted) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
delete dlg;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// END
|
// END
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2010-2016 by Andreas Suter *
|
* Copyright (C) 2010-2017 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -59,6 +59,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
|
|||||||
public slots:
|
public slots:
|
||||||
void dumpAscii();
|
void dumpAscii();
|
||||||
void dumpRoot();
|
void dumpRoot();
|
||||||
|
void handleDefaultPaths();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PAdmin *fAdmin;
|
PAdmin *fAdmin;
|
||||||
|
@ -850,7 +850,9 @@ void PTextEdit::fileOpen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// in case there is a 1st empty tab "noname", remove it
|
// in case there is a 1st empty tab "noname", remove it
|
||||||
if (fTabWidget->tabText(0) == "noname") { // has to be the first, otherwise do nothing
|
QString tabStr = fTabWidget->tabText(0);
|
||||||
|
tabStr.remove('&'); // this is needed since the QTabWidget adds short-cut info as '&' to the tab name
|
||||||
|
if (tabStr == "noname") { // has to be the first, otherwise do nothing
|
||||||
fFileSystemWatcher->removePath("noname");
|
fFileSystemWatcher->removePath("noname");
|
||||||
|
|
||||||
delete fTabWidget->widget(0);
|
delete fTabWidget->widget(0);
|
||||||
@ -864,12 +866,15 @@ void PTextEdit::fileOpen()
|
|||||||
void PTextEdit::fileOpenRecent()
|
void PTextEdit::fileOpenRecent()
|
||||||
{
|
{
|
||||||
QAction *action = qobject_cast<QAction *>(sender());
|
QAction *action = qobject_cast<QAction *>(sender());
|
||||||
|
|
||||||
if (action) {
|
if (action) {
|
||||||
// check if this file is already open and if so, switch the tab
|
// check if this file is already open and if so, switch the tab
|
||||||
QFileInfo finfo1, finfo2;
|
QFileInfo finfo1, finfo2;
|
||||||
QString tabFln;
|
QString tabFln;
|
||||||
bool alreadyOpen = false;
|
bool alreadyOpen = false;
|
||||||
finfo1.setFile(action->text());
|
QString fln = action->text();
|
||||||
|
fln.remove('&');
|
||||||
|
finfo1.setFile(fln);
|
||||||
|
|
||||||
for (int i=0; i<fTabWidget->count(); i++) {
|
for (int i=0; i<fTabWidget->count(); i++) {
|
||||||
tabFln = *fFilenames.find( dynamic_cast<PSubTextEdit*>(fTabWidget->widget(i)));
|
tabFln = *fFilenames.find( dynamic_cast<PSubTextEdit*>(fTabWidget->widget(i)));
|
||||||
@ -881,18 +886,26 @@ void PTextEdit::fileOpenRecent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!alreadyOpen)
|
if (!alreadyOpen) {
|
||||||
load(action->text());
|
// make sure the file exists
|
||||||
else
|
if (!finfo1.exists()) {
|
||||||
|
QMessageBox::critical(this, "ERROR", QString("File '%1' does not exist.\nWill not do anything.").arg(fln));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
load(fln);
|
||||||
|
} else {
|
||||||
fileReload();
|
fileReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
// in case there is a 1st empty tab "noname", remove it
|
// in case there is a 1st empty tab "noname", remove it
|
||||||
if (fTabWidget->tabText(0) == "noname") { // has to be the first, otherwise do nothing
|
fln = fTabWidget->tabText(0);
|
||||||
|
fln.remove("&");
|
||||||
|
if (fln == "noname") { // has to be the first, otherwise do nothing
|
||||||
fFileSystemWatcher->removePath("noname");
|
fFileSystemWatcher->removePath("noname");
|
||||||
|
|
||||||
delete fTabWidget->widget(0);
|
delete fTabWidget->widget(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
@ -1866,6 +1879,8 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// init fMsr2DataParam
|
// init fMsr2DataParam
|
||||||
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
|
||||||
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
|
||||||
|
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
|
||||||
|
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
|
||||||
|
|
||||||
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
|
||||||
|
|
||||||
@ -1887,6 +1902,8 @@ void PTextEdit::musrMsr2Data()
|
|||||||
fMsr2DataParam = dlg->getMsr2DataParam();
|
fMsr2DataParam = dlg->getMsr2DataParam();
|
||||||
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
|
||||||
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
|
||||||
|
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
|
||||||
|
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
|
||||||
|
|
||||||
// analyze parameters
|
// analyze parameters
|
||||||
switch (dlg->getRunTag()) {
|
switch (dlg->getRunTag()) {
|
||||||
@ -1896,20 +1913,10 @@ void PTextEdit::musrMsr2Data()
|
|||||||
QMessageBox::Ok, QMessageBox::NoButton);
|
QMessageBox::Ok, QMessageBox::NoButton);
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case 0: // first last
|
case 0: // run list
|
||||||
first = QString("%1").arg(fMsr2DataParam->firstRun);
|
|
||||||
last = QString("%1").arg(fMsr2DataParam->lastRun);
|
|
||||||
if (first.isEmpty() || last.isEmpty()) {
|
|
||||||
QMessageBox::critical(this, "**ERROR**",
|
|
||||||
"If you choose the first/last option,\nfirst AND last needs to be provided.",
|
|
||||||
QMessageBox::Ok, QMessageBox::NoButton);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
runList = fMsr2DataParam->runList;
|
runList = fMsr2DataParam->runList;
|
||||||
break;
|
break;
|
||||||
case 2: // run list file name
|
case 1: // run list file name
|
||||||
runListFileName = fMsr2DataParam->runListFileName;
|
runListFileName = fMsr2DataParam->runListFileName;
|
||||||
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
|
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
|
||||||
if (!fi.exists()) {
|
if (!fi.exists()) {
|
||||||
@ -1936,10 +1943,6 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// run list argument
|
// run list argument
|
||||||
switch (dlg->getRunTag()) {
|
switch (dlg->getRunTag()) {
|
||||||
case 0:
|
case 0:
|
||||||
cmd.append(first);
|
|
||||||
cmd.append(last);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end = 0;
|
end = 0;
|
||||||
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
|
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
|
||||||
end++;
|
end++;
|
||||||
@ -1960,7 +1963,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
cmd.append(str);
|
cmd.append(str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1:
|
||||||
cmd.append(runListFileName);
|
cmd.append(runListFileName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -2025,6 +2028,16 @@ void PTextEdit::musrMsr2Data()
|
|||||||
cmd.append("-t");
|
cmd.append("-t");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// estimate N0 (makes sence for single histo and muMinus fits only). Add flag only if a fit is done
|
||||||
|
if (fMsr2DataParam->estimateN0 && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
|
||||||
|
cmd.append("-e");
|
||||||
|
}
|
||||||
|
|
||||||
|
// write per-run-block chisq. Add flag only if a fit is done
|
||||||
|
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
|
||||||
|
cmd.append("-p");
|
||||||
|
}
|
||||||
|
|
||||||
// DB output wished
|
// DB output wished
|
||||||
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
|
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
|
||||||
str = "-o" + fMsr2DataParam->dbOutputFileName;
|
str = "-o" + fMsr2DataParam->dbOutputFileName;
|
||||||
@ -2068,19 +2081,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
|
|
||||||
if (!fMsr2DataParam->global) { // standard fits
|
if (!fMsr2DataParam->global) { // standard fits
|
||||||
switch(dlg->getRunTag()) {
|
switch(dlg->getRunTag()) {
|
||||||
case 0: // first run / last run list
|
case 0: // run list
|
||||||
if (fMsr2DataParam->firstRun != -1) {
|
|
||||||
for (int i=fMsr2DataParam->firstRun; i<=fMsr2DataParam->lastRun; i++) {
|
|
||||||
if (fMsr2DataParam->msrFileExtension.isEmpty())
|
|
||||||
fln = QString("%1").arg(i) + ".msr";
|
|
||||||
else
|
|
||||||
fln = QString("%1").arg(i) + fMsr2DataParam->msrFileExtension + ".msr";
|
|
||||||
|
|
||||||
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
list = getRunList(runList, ok);
|
list = getRunList(runList, ok);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return;
|
return;
|
||||||
@ -2094,7 +2095,7 @@ void PTextEdit::musrMsr2Data()
|
|||||||
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // run list file
|
case 1: // run list file
|
||||||
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
||||||
if (!file->open(QIODevice::ReadOnly)) {
|
if (!file->open(QIODevice::ReadOnly)) {
|
||||||
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
||||||
@ -2130,13 +2131,10 @@ void PTextEdit::musrMsr2Data()
|
|||||||
// get the first run number needed to build the global fit file name
|
// get the first run number needed to build the global fit file name
|
||||||
fln = QString("");
|
fln = QString("");
|
||||||
switch(dlg->getRunTag()) {
|
switch(dlg->getRunTag()) {
|
||||||
case 0: // first/last run
|
case 0: // run list
|
||||||
fln = QString("%1").arg(fMsr2DataParam->firstRun) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
|
||||||
break;
|
|
||||||
case 1: // run list
|
|
||||||
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
|
||||||
break;
|
break;
|
||||||
case 2: // run list file name
|
case 1: // run list file name
|
||||||
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
|
||||||
if (!file->open(QIODevice::ReadOnly)) {
|
if (!file->open(QIODevice::ReadOnly)) {
|
||||||
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
|
||||||
@ -2237,7 +2235,7 @@ void PTextEdit::musrView()
|
|||||||
tr("Quit") );
|
tr("Quit") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
@ -2490,6 +2488,7 @@ void PTextEdit::musrDump()
|
|||||||
QVector<QString> cmd;
|
QVector<QString> cmd;
|
||||||
QString str = fAdmin->getExecPath() + "/dump_header";
|
QString str = fAdmin->getExecPath() + "/dump_header";
|
||||||
cmd.append(str);
|
cmd.append(str);
|
||||||
|
cmd.append("-fn");
|
||||||
cmd.append(fileName);
|
cmd.append(fileName);
|
||||||
|
|
||||||
PDumpOutputHandler dumpOutputHandler(cmd);
|
PDumpOutputHandler dumpOutputHandler(cmd);
|
||||||
|
114
src/musredit_qt5/forms/PChangeDefaultPathsDialog.ui
Normal file
114
src/musredit_qt5/forms/PChangeDefaultPathsDialog.ui
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PChangeDefaultPathsDialog</class>
|
||||||
|
<widget class="QDialog" name="PChangeDefaultPathsDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>528</width>
|
||||||
|
<height>363</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>512</width>
|
||||||
|
<height>341</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="fSearchPath_listWidget"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>328</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="fAdd_pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="fDelete_pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>PChangeDefaultPathsDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>228</x>
|
||||||
|
<y>332</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>PChangeDefaultPathsDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>296</x>
|
||||||
|
<y>338</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -9,7 +9,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>552</width>
|
<width>585</width>
|
||||||
<height>594</height>
|
<height>594</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -25,8 +25,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>131</height>
|
<height>111</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -44,96 +44,16 @@
|
|||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>97</height>
|
<height>70</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fFirst_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>First</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="fFirst_lineEdit">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>start run number</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>start run number</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fLast_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Last</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="fLast_lineEdit">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>end run number</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>end run number</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="fOrFirstLast_label">
|
|
||||||
<property name="text">
|
|
||||||
<string><b>OR</b></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::AutoText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -219,8 +139,8 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>130</y>
|
<y>110</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -232,8 +152,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
@ -249,9 +169,12 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>30</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -284,8 +207,8 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>200</y>
|
<y>180</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -297,8 +220,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
@ -346,8 +269,8 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>280</y>
|
<y>260</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>80</height>
|
<height>80</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -359,8 +282,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>30</y>
|
<y>30</y>
|
||||||
<width>531</width>
|
<width>561</width>
|
||||||
<height>29</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
@ -401,9 +324,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>360</y>
|
<y>340</y>
|
||||||
<width>551</width>
|
<width>581</width>
|
||||||
<height>171</height>
|
<height>191</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -414,8 +337,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>6</x>
|
<x>6</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>541</width>
|
<width>560</width>
|
||||||
<height>116</height>
|
<height>131</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
@ -451,6 +374,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fEstimateN0_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Estimate N0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -485,6 +415,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fWritePerRunBlockChisq_checkBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Write per-run-block Chisq</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -551,7 +488,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>9</x>
|
<x>9</x>
|
||||||
<y>143</y>
|
<y>160</y>
|
||||||
<width>141</width>
|
<width>141</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -566,9 +503,9 @@
|
|||||||
<widget class="QLineEdit" name="fParamList_lineEdit">
|
<widget class="QLineEdit" name="fParamList_lineEdit">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>164</x>
|
||||||
<y>140</y>
|
<y>157</y>
|
||||||
<width>395</width>
|
<width>401</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -582,7 +519,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>5</x>
|
<x>5</x>
|
||||||
<y>540</y>
|
<y>540</y>
|
||||||
<width>541</width>
|
<width>571</width>
|
||||||
<height>51</height>
|
<height>51</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -636,8 +573,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>fFirst_lineEdit</tabstop>
|
|
||||||
<tabstop>fLast_lineEdit</tabstop>
|
|
||||||
<tabstop>fRunList_lineEdit</tabstop>
|
<tabstop>fRunList_lineEdit</tabstop>
|
||||||
<tabstop>fRunListFileName_lineEdit</tabstop>
|
<tabstop>fRunListFileName_lineEdit</tabstop>
|
||||||
<tabstop>fMsrFileExtension_lineEdit</tabstop>
|
<tabstop>fMsrFileExtension_lineEdit</tabstop>
|
||||||
@ -712,38 +647,6 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>fFirst_lineEdit</sender>
|
|
||||||
<signal>textChanged(QString)</signal>
|
|
||||||
<receiver>PMsr2DataDialog</receiver>
|
|
||||||
<slot>runFirstEntered(QString)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>82</x>
|
|
||||||
<y>44</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>113</x>
|
|
||||||
<y>504</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>fLast_lineEdit</sender>
|
|
||||||
<signal>textChanged(QString)</signal>
|
|
||||||
<receiver>PMsr2DataDialog</receiver>
|
|
||||||
<slot>runLastEntered(QString)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>229</x>
|
|
||||||
<y>44</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>348</x>
|
|
||||||
<y>500</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>fRunList_lineEdit</sender>
|
<sender>fRunList_lineEdit</sender>
|
||||||
<signal>textChanged(QString)</signal>
|
<signal>textChanged(QString)</signal>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>421</width>
|
<width>421</width>
|
||||||
<height>25</height>
|
<height>35</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
@ -74,6 +74,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="fDefaultPath_pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>421</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Change Default Search Paths</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="fMusrfit_tab">
|
<widget class="QWidget" name="fMusrfit_tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -121,9 +134,9 @@
|
|||||||
<widget class="QCheckBox" name="fTitleFromData_checkBox">
|
<widget class="QCheckBox" name="fTitleFromData_checkBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>190</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>171</width>
|
<width>241</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -134,9 +147,9 @@
|
|||||||
<widget class="QCheckBox" name="fPerRunBlockChisq_checkBox">
|
<widget class="QCheckBox" name="fPerRunBlockChisq_checkBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>190</x>
|
||||||
<y>35</y>
|
<y>35</y>
|
||||||
<width>191</width>
|
<width>241</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -147,9 +160,9 @@
|
|||||||
<widget class="QCheckBox" name="fEstimateN0_checkBox">
|
<widget class="QCheckBox" name="fEstimateN0_checkBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>170</x>
|
<x>190</x>
|
||||||
<y>60</y>
|
<y>60</y>
|
||||||
<width>161</width>
|
<width>241</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -167,7 +180,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>141</width>
|
<width>421</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -180,7 +193,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>40</y>
|
<y>40</y>
|
||||||
<width>231</width>
|
<width>421</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -41,8 +41,6 @@
|
|||||||
* parameters see <code>msr2data --help</code> and the online documentation.
|
* parameters see <code>msr2data --help</code> and the online documentation.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int firstRun; ///< first run number of a sequence of runs (usage 2 of msr2data)
|
|
||||||
int lastRun; ///< last run number of a sequence of runs (usage 2 of msr2data)
|
|
||||||
QString runList; ///< list of run numbers (usage 3 of msr2data)
|
QString runList; ///< list of run numbers (usage 3 of msr2data)
|
||||||
QString runListFileName; ///< run list filename (usage 4 of msr2data)
|
QString runListFileName; ///< run list filename (usage 4 of msr2data)
|
||||||
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
|
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
|
||||||
@ -57,6 +55,8 @@ typedef struct {
|
|||||||
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
|
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
|
||||||
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
|
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
|
||||||
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
|
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
|
||||||
|
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
|
||||||
|
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
|
||||||
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
|
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
|
||||||
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
|
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
|
||||||
bool global; ///< flag: true = 'global' option
|
bool global; ///< flag: true = 'global' option
|
||||||
|
@ -104,6 +104,7 @@ HEADERS = musredit.h \
|
|||||||
PGetFourierBlockDialog.h \
|
PGetFourierBlockDialog.h \
|
||||||
PGetPlotBlockDialog.h \
|
PGetPlotBlockDialog.h \
|
||||||
PMsr2DataDialog.h \
|
PMsr2DataDialog.h \
|
||||||
|
PChangeDefaultPathsDialog.h \
|
||||||
PMusrEditAbout.h
|
PMusrEditAbout.h
|
||||||
|
|
||||||
SOURCES = PHelp.cpp \
|
SOURCES = PHelp.cpp \
|
||||||
@ -128,6 +129,7 @@ SOURCES = PHelp.cpp \
|
|||||||
PGetFourierBlockDialog.cpp \
|
PGetFourierBlockDialog.cpp \
|
||||||
PGetPlotBlockDialog.cpp \
|
PGetPlotBlockDialog.cpp \
|
||||||
PMsr2DataDialog.cpp \
|
PMsr2DataDialog.cpp \
|
||||||
|
PChangeDefaultPathsDialog.cpp \
|
||||||
PMusrEditAbout.cpp \
|
PMusrEditAbout.cpp \
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
@ -147,7 +149,8 @@ FORMS = forms/PFindDialog.ui \
|
|||||||
forms/PGetNonMusrRunBlockDialog.ui \
|
forms/PGetNonMusrRunBlockDialog.ui \
|
||||||
forms/PGetFourierBlockDialog.ui \
|
forms/PGetFourierBlockDialog.ui \
|
||||||
forms/PGetPlotBlockDialog.ui \
|
forms/PGetPlotBlockDialog.ui \
|
||||||
forms/PMsr2DataDialog.ui
|
forms/PMsr2DataDialog.ui \
|
||||||
|
forms/PChangeDefaultPathsDialog.ui
|
||||||
|
|
||||||
RESOURCES = musredit.qrc
|
RESOURCES = musredit.qrc
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void* musrfit_timeout(void *args)
|
|||||||
void musrfit_syntax()
|
void musrfit_syntax()
|
||||||
{
|
{
|
||||||
cout << endl << "usage: musrfit [<msr-file> [-k, --keep-mn2-ouput] [-c, --chisq-only] [-t, --title-from-data-file]";
|
cout << endl << "usage: musrfit [<msr-file> [-k, --keep-mn2-ouput] [-c, --chisq-only] [-t, --title-from-data-file]";
|
||||||
cout << endl << " [-e, --estimateN0 <flag>] [-p, --per-run-block-chisq <flag>]";
|
cout << endl << " [-e, --estimateN0] [-p, --per-run-block-chisq]";
|
||||||
cout << endl << " [--dump <type>] [--timeout <timeout_tag>] | --version | --help";
|
cout << endl << " [--dump <type>] [--timeout <timeout_tag>] | --version | --help";
|
||||||
cout << endl << " <msr-file>: msr input file";
|
cout << endl << " <msr-file>: msr input file";
|
||||||
cout << endl << " 'musrfit <msr-file>' will execute musrfit";
|
cout << endl << " 'musrfit <msr-file>' will execute musrfit";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user