Merged muonspin/musrfit:root6 into master
This commit is contained in:
@ -7,26 +7,31 @@ root_generate_dictionary(
|
||||
PFourierCanvasDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PFourierCanvas.h
|
||||
LINKDEF ${MUSRFIT_INC}/PFourierCanvasLinkDef.h
|
||||
MODULE PFourierCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrCanvasDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrCanvas.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrCanvasLinkDef.h
|
||||
MODULE PMusrCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMusrT0Dict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrT0.h
|
||||
LINKDEF ${MUSRFIT_INC}/PMusrT0LinkDef.h
|
||||
MODULE PMusrT0
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandlerDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PStartupHandler.h
|
||||
LINKDEF ${MUSRFIT_INC}/PStartupHandlerLinkDef.h
|
||||
MODULE PStartupHandler
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PUserFcnBaseDict
|
||||
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PUserFcnBase.h
|
||||
LINKDEF ${MUSRFIT_INC}/PUserFcnBaseLinkDef.h
|
||||
MODULE PUserFcnBase
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -140,16 +145,16 @@ install(TARGETS PMusr DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPFourierCanvasDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPFourierCanvasDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvasDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvasDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0Dict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0Dict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandlerDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandlerDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBaseDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBaseDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPFourierCanvas_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPFourierCanvas.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvas_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvas.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBase_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBase.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/BMWtools/CMakeLists.txt
vendored
5
src/external/BMWtools/CMakeLists.txt
vendored
@ -9,6 +9,7 @@ root_generate_dictionary(
|
||||
-I${MUSRFIT_INC}
|
||||
BMWStartupHandler.h
|
||||
LINKDEF BMWStartupHandlerLinkDef.h
|
||||
MODULE BMWStartupHandler
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -53,8 +54,8 @@ install(TARGETS BMWtools DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libBMWStartupHandlerDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libBMWStartupHandlerDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libBMWStartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libBMWStartupHandler.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
10
src/external/MagProximity/CMakeLists.txt
vendored
10
src/external/MagProximity/CMakeLists.txt
vendored
@ -8,12 +8,14 @@ root_generate_dictionary(
|
||||
-I${MUSRFIT_INC}
|
||||
PMagProximityFitter.h
|
||||
LINKDEF PMagProximityFitterLinkDef.h
|
||||
MODULE PMagProximityFitter
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMPStartupHandlerDict
|
||||
-I${MUSRFIT_INC}
|
||||
PMPStartupHandler.h
|
||||
LINKDEF PMPStartupHandlerLinkDef.h
|
||||
MODULE PMPStartupHandler
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -55,10 +57,10 @@ install(TARGETS PMagProximityFitter DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPMagProximityFitterDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMagProximityFitterDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMPStartupHandlerDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMPStartupHandlerDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPMagProximityFitter_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMagProximityFitter.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMPStartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMPStartupHandler.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/MusrRoot/CMakeLists.txt
vendored
5
src/external/MusrRoot/CMakeLists.txt
vendored
@ -3,6 +3,7 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
root_generate_dictionary(
|
||||
TMusrRunHeaderDict TMusrRunHeader.h LINKDEF TMusrRunHeaderLinkDef.h
|
||||
MODULE TMusrRunHeader
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -38,8 +39,8 @@ install(TARGETS TMusrRunHeader DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeaderDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeaderDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeader_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTMusrRunHeader.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
10
src/external/Nonlocal/CMakeLists.txt
vendored
10
src/external/Nonlocal/CMakeLists.txt
vendored
@ -9,9 +9,11 @@ root_generate_dictionary(
|
||||
-I${MUSRFIT_INC}
|
||||
PNL_PippardFitter.h
|
||||
LINKDEF PNL_PippardFitterLinkDef.h
|
||||
MODULE PNL_PippardFitter
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PNL_StartupHandlerDict PNL_StartupHandler.h LINKDEF PNL_StartupHandlerLinkDef.h
|
||||
MODULE PNL_StartupHandler
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -53,10 +55,10 @@ install(TARGETS PNL_PippardFitter DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPNL_PippardFitterDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_PippardFitterDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_StartupHandlerDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_StartupHandlerDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPNL_PippardFitter_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_PippardFitter.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_StartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPNL_StartupHandler.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
12
src/external/TLemRunHeader/CMakeLists.txt
vendored
12
src/external/TLemRunHeader/CMakeLists.txt
vendored
@ -3,9 +3,11 @@
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
root_generate_dictionary(
|
||||
TLemRunHeaderDict TLemRunHeader.h LINKDEF TLemRunHeaderLinkDef.h
|
||||
MODULE TLemRunHeader
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TLemStatsDict TLemStats.h LINKDEF TLemStatsLinkDef.h
|
||||
TLemStatsDict TLemStats.h LINKDEF TLemStatsLinkDef.h
|
||||
MODULE TLemStats
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -44,10 +46,10 @@ install(TARGETS TLemRunHeader DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeaderDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeaderDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemStatsDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemStatsDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeader_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemRunHeader.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemStats_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLemStats.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/libBNMR/CMakeLists.txt
vendored
5
src/external/libBNMR/CMakeLists.txt
vendored
@ -9,6 +9,7 @@ root_generate_dictionary(
|
||||
-I${MUSRFIT_INC}
|
||||
TBNMR.h
|
||||
LINKDEF TBNMRLinkDef.h
|
||||
MODULE TBNMR
|
||||
)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
@ -38,8 +39,8 @@ install(TARGETS BNMR DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTBNMRDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTBNMRDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTBNMR_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTBNMR.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
@ -13,6 +13,7 @@ root_generate_dictionary(
|
||||
-I${POFB_INC}
|
||||
TCalcMeanFieldsLEM.h
|
||||
LINKDEF TCalcMeanFieldsLEMLinkDef.h
|
||||
MODULE TCalcMeanFieldsLEM
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -58,8 +59,8 @@ install(TARGETS CalcMeanFieldsLEM DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTCalcMeanFieldsLEMDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTCalcMeanFieldsLEMDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTCalcMeanFieldsLEM_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTCalcMeanFieldsLEM.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
15
src/external/libFitPofB/classes/CMakeLists.txt
vendored
15
src/external/libFitPofB/classes/CMakeLists.txt
vendored
@ -14,6 +14,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TLondon1D.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TLondon1DLinkDef.h
|
||||
MODULE TLondon1D
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TVortexDict
|
||||
@ -24,6 +25,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TVortex.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TVortexLinkDef.h
|
||||
MODULE TVortex
|
||||
)
|
||||
root_generate_dictionary(
|
||||
TSkewedGssDict
|
||||
@ -34,6 +36,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
TSkewedGss.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TSkewedGssLinkDef.h
|
||||
MODULE TSkewedGss
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -99,12 +102,12 @@ install(TARGETS FitPofB DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLondon1DDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLondon1DDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTVortexDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTVortexDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTSkewedGssDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTSkewedGssDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLondon1D_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLondon1D.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTVortex_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTVortex.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTSkewedGss_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTSkewedGss.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/libGapIntegrals/CMakeLists.txt
vendored
5
src/external/libGapIntegrals/CMakeLists.txt
vendored
@ -11,6 +11,7 @@ root_generate_dictionary(
|
||||
-I${BMW_TOOLS_INC}
|
||||
TGapIntegrals.h
|
||||
LINKDEF TGapIntegralsLinkDef.h
|
||||
MODULE TGapIntegrals
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -56,8 +57,8 @@ install(TARGETS GapIntegrals DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTGapIntegralsDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTGapIntegralsDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTGapIntegrals_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTGapIntegrals.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/libLFRelaxation/CMakeLists.txt
vendored
5
src/external/libLFRelaxation/CMakeLists.txt
vendored
@ -11,6 +11,7 @@ root_generate_dictionary(
|
||||
-I${BMW_TOOLS_INC}
|
||||
TLFRelaxation.h
|
||||
LINKDEF TLFRelaxationLinkDef.h
|
||||
MODULE TLFRelaxation
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -65,8 +66,8 @@ install(TARGETS LFRelaxation DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLFRelaxationDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLFRelaxationDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libTLFRelaxation_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libTLFRelaxation.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
@ -10,6 +10,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PPhotoMeissner.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PPhotoMeissnerLinkDef.h
|
||||
MODULE PPhotoMeissner
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandler_PMDict
|
||||
@ -17,6 +18,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PStartupHandler_PM.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_PMLinkDef.h
|
||||
MODULE PStartupHandler_PM
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -60,10 +62,10 @@ install(TARGETS PPhotoMeissner DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissnerDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissnerDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PMDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PMDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissner_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissner.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PM_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PM.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
10
src/external/libSpinValve/classes/CMakeLists.txt
vendored
10
src/external/libSpinValve/classes/CMakeLists.txt
vendored
@ -10,12 +10,14 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PSkewedLorentzian.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PSkewedLorentzianLinkDef.h
|
||||
MODULE PSkewedLorentzian
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PStartupHandler_SVDict
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
PStartupHandler_SV.h
|
||||
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_SVLinkDef.h
|
||||
MODULE PStartupHandler_SV
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -57,10 +59,10 @@ install(TARGETS PSpinValve DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPSkewedLorentzianDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPSkewedLorentzianDict.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_SVDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_SVDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPSkewedLorentzian_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPSkewedLorentzian.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_SV_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_SV.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
5
src/external/libZFRelaxation/CMakeLists.txt
vendored
5
src/external/libZFRelaxation/CMakeLists.txt
vendored
@ -11,6 +11,7 @@ root_generate_dictionary(
|
||||
-I${BMW_TOOLS_INC}
|
||||
ZFRelaxation.h
|
||||
LINKDEF ZFRelaxationLinkDef.h
|
||||
MODULE ZFRelaxation
|
||||
)
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
@ -63,8 +64,8 @@ install(TARGETS ZFRelaxation DESTINATION lib)
|
||||
|
||||
#--- install root pcm's and rootmaps ------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libZFRelaxationDict_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libZFRelaxationDict.rootmap
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libZFRelaxation_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libZFRelaxation.rootmap
|
||||
DESTINATION lib
|
||||
)
|
||||
|
||||
|
@ -162,8 +162,7 @@ void msr2data_syntax()
|
||||
cout << endl << " collected form the msr-files 2046_tf_histo.msr and so on.";
|
||||
cout << endl;
|
||||
cout << endl << " For further information please refer to";
|
||||
cout << endl << " http://lmu.web.psi.ch/musrfit/user/MUSR/Msr2Data.html";
|
||||
cout << endl << " https://intranet.psi.ch/MUSR/Msr2Data";
|
||||
cout << endl << " http://lmu.web.psi.ch/musrfit/user/html/msr2data.html#msr2data";
|
||||
cout << endl << endl;
|
||||
}
|
||||
|
||||
@ -499,9 +498,9 @@ int msr2data_paramList(vector<string> &arg, vector<unsigned int> ¶mList)
|
||||
/**
|
||||
* <p>msr2data is used to generate msr-files based on template msr-files, automatically fit these new msr-files,
|
||||
* collect fitting parameters, etc. For a detailed description see
|
||||
* \htmlonly <a href="https://intranet.psi.ch/MUSR/Msr2Data">musr2data online help</a>
|
||||
* \htmlonly <a href="http://lmu.web.psi.ch/musrfit/user/html/msr2data.html#msr2data">musr2data online help</a>
|
||||
* \endhtmlonly
|
||||
* \latexonly msr2data online help: \texttt{https://intranet.psi.ch/MUSR/Msr2Data}
|
||||
* \latexonly msr2data online help: \texttt{http://lmu.web.psi.ch/musrfit/user/html/msr2data.html#msr2data}
|
||||
* \endlatexonly
|
||||
*
|
||||
* \param argc number of arguments
|
||||
|
@ -43,7 +43,7 @@ class PAdmin;
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>This structure is keeping informations necessary to handle musrfit
|
||||
* theory functions (see also <code>https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block</code>).
|
||||
* theory functions (see also <code>http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block</code>).
|
||||
*/
|
||||
typedef struct {
|
||||
QString name;
|
||||
|
@ -682,7 +682,7 @@ void PTextEdit::doConnections( PSubTextEdit *e )
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file title. See also https://intranet.psi.ch/MUSR/MusrFit#4_1_The_Title
|
||||
* <p>Start the dialog to enter a msr-file title. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-title
|
||||
*/
|
||||
void PTextEdit::insertTitle()
|
||||
{
|
||||
@ -691,7 +691,7 @@ void PTextEdit::insertTitle()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file fit-parameter block. See also https://intranet.psi.ch/MUSR/MusrFit#4_2_The_FITPARAMETER_Block
|
||||
* <p>Start the dialog to enter a msr-file fit-parameter block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-fitparameter-block
|
||||
*/
|
||||
void PTextEdit::insertParameterBlock()
|
||||
{
|
||||
@ -700,7 +700,7 @@ void PTextEdit::insertParameterBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file theory block. See also https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block
|
||||
* <p>Start the dialog to enter a msr-file theory block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block
|
||||
*/
|
||||
void PTextEdit::insertTheoryBlock()
|
||||
{
|
||||
@ -709,7 +709,7 @@ void PTextEdit::insertTheoryBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Insert a selected theory function. See also https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block
|
||||
* <p>Insert a selected theory function. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block
|
||||
*
|
||||
* \param a action of the selected theory function
|
||||
*/
|
||||
@ -720,7 +720,7 @@ void PTextEdit::insertTheoryFunction(QAction *a)
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file function block. See also https://intranet.psi.ch/MUSR/MusrFit#4_4_The_FUNCTIONS_Block
|
||||
* <p>Start the dialog to enter a msr-file function block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-functions-block
|
||||
*/
|
||||
void PTextEdit::insertFunctionBlock()
|
||||
{
|
||||
@ -729,7 +729,7 @@ void PTextEdit::insertFunctionBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file asymmetry run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file asymmetry run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertAsymRunBlock()
|
||||
{
|
||||
@ -738,7 +738,7 @@ void PTextEdit::insertAsymRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file single histogram run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file single histogram run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertSingleHistRunBlock()
|
||||
{
|
||||
@ -747,7 +747,7 @@ void PTextEdit::insertSingleHistRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file nonMusr run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file nonMusr run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertNonMusrRunBlock()
|
||||
{
|
||||
@ -756,7 +756,7 @@ void PTextEdit::insertNonMusrRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Inserts a default command block. See also https://intranet.psi.ch/MUSR/MusrFit#4_6_The_COMMANDS_Block
|
||||
* <p>Inserts a default command block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-commands-block
|
||||
*/
|
||||
void PTextEdit::insertCommandBlock()
|
||||
{
|
||||
@ -765,7 +765,7 @@ void PTextEdit::insertCommandBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file Fourier block. See also https://intranet.psi.ch/MUSR/MusrFit#4_7_The_FOURIER_Block
|
||||
* <p>Start the dialog to enter a msr-file Fourier block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-fourier-block
|
||||
*/
|
||||
void PTextEdit::insertFourierBlock()
|
||||
{
|
||||
@ -774,7 +774,7 @@ void PTextEdit::insertFourierBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file plot block. See also https://intranet.psi.ch/MUSR/MusrFit#4_7_The_PLOT_Block
|
||||
* <p>Start the dialog to enter a msr-file plot block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-plot-block
|
||||
*/
|
||||
void PTextEdit::insertPlotBlock()
|
||||
{
|
||||
@ -783,7 +783,7 @@ void PTextEdit::insertPlotBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Inserts a default statistics block. See also https://intranet.psi.ch/MUSR/MusrFit#4_9_The_STATISTIC_Block
|
||||
* <p>Inserts a default statistics block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-statistic-block
|
||||
*/
|
||||
void PTextEdit::insertStatisticBlock()
|
||||
{
|
||||
|
@ -180,9 +180,10 @@ void PParamDataHandler::NewCollection(const QString name)
|
||||
* @param collectionName
|
||||
* @param arg
|
||||
* @param workDir
|
||||
* @param errorMsg
|
||||
* @return
|
||||
*/
|
||||
bool PParamDataHandler::analyzeFileList(const QStringList &fln, QString &collectionName, QStringList &arg, QString &workDir)
|
||||
bool PParamDataHandler::analyzeFileList(const QStringList &fln, QString &collectionName, QStringList &arg, QString &workDir, QString &errorMsg)
|
||||
{
|
||||
// 1) check all the msr-files have the same structure: <runNo><extension>.msr with <extension> the same
|
||||
// for all msr-files present.
|
||||
@ -205,16 +206,16 @@ bool PParamDataHandler::analyzeFileList(const QStringList &fln, QString &collect
|
||||
// get index of position between <run> and <extenstion>
|
||||
pos0 = flnCurrent.indexOf("_");
|
||||
if (pos0 == -1) {
|
||||
QMessageBox::critical(0, "ERROR", "msr-file name has a structure which cannot be handled.\n\
|
||||
It should be <run><extension>, where <run> is the run number\n\
|
||||
and <extension> needs to start with a '_'.");
|
||||
errorMsg = "msr-file name has a structure which cannot be handled.\n\
|
||||
It should be <run><extension>, where <run> is the run number\n\
|
||||
and <extension> needs to start with a '_'.";
|
||||
return false;
|
||||
}
|
||||
pos1 = flnCurrent.lastIndexOf(".");
|
||||
if ((pos1 == -1) || (pos1 < pos0)) {
|
||||
QMessageBox::critical(0, "ERROR", "msr-file name has a structure which cannot be handled.\n\
|
||||
It should be <run><extension>.msr, where <run> is the run number\n\
|
||||
and <extension> needs to start with a '_'.");
|
||||
errorMsg = "msr-file name has a structure which cannot be handled.\n\
|
||||
It should be <run><extension>.msr, where <run> is the run number\n\
|
||||
and <extension> needs to start with a '_'.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -222,7 +223,7 @@ and <extension> needs to start with a '_'.");
|
||||
runStr = flnCurrent.left(pos0);
|
||||
runStr.toInt(&ok); // output not needed, only check that it is a number
|
||||
if (!ok) {
|
||||
QMessageBox::critical(0, "ERROR", QString("Found run number string '%1' which is not a number.").arg(runStr));
|
||||
errorMsg = QString("Found run number string '%1' which is not a number.").arg(runStr);
|
||||
return false;
|
||||
}
|
||||
run << runStr;
|
||||
@ -235,7 +236,7 @@ and <extension> needs to start with a '_'.");
|
||||
|
||||
// make sure all extensions are identical
|
||||
if ((i>0) && (ext != extCurrent)) {
|
||||
QMessageBox::critical(0, "ERROR", "Currently mixed msr-file extensions cannot be handled.");
|
||||
errorMsg = "Currently mixed msr-file extensions cannot be handled.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -255,9 +256,10 @@ and <extension> needs to start with a '_'.");
|
||||
/**
|
||||
* @brief PParamDataHandler::ReadParamFile
|
||||
* @param fln
|
||||
* @param errorMsg
|
||||
* @return
|
||||
*/
|
||||
bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
bool PParamDataHandler::ReadParamFile(const QStringList fln, QString &errorMsg)
|
||||
{
|
||||
bool valid = true;
|
||||
PmuppRun run;
|
||||
@ -278,7 +280,7 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
// analyse file name list to get the appropriate parts for msr2data
|
||||
QStringList arg;
|
||||
QString workDir("./");
|
||||
if (!analyzeFileList(fln, collName, arg, workDir))
|
||||
if (!analyzeFileList(fln, collName, arg, workDir, errorMsg))
|
||||
return false;
|
||||
|
||||
// make sure that the system environment variables are properly set
|
||||
@ -295,7 +297,7 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
// try ROOTSYS
|
||||
cmd = env.value("ROOTSYS") + QString("/bin/msr2data");
|
||||
if (!QFile::exists(cmd)) {
|
||||
QMessageBox::critical(0, "ERROR", "cannot find msr2data need here.");
|
||||
errorMsg = "cannot find msr2data need here.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -306,18 +308,13 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
fProc->setWorkingDirectory(workDir);
|
||||
fProc->start(cmd, arg);
|
||||
if (!fProc->waitForFinished()) {
|
||||
// error handling
|
||||
QString msg(tr("Could not execute the output command: ")+cmd[0]);
|
||||
QMessageBox::critical( 0,
|
||||
tr("Fatal error"),
|
||||
msg,
|
||||
tr("Quit") );
|
||||
errorMsg = QString(tr("Could not execute the output command: ")+cmd[0]);
|
||||
return false;
|
||||
}
|
||||
|
||||
// since the db-file should now be present, just load it
|
||||
collection = ReadDbFile(pathName, valid);
|
||||
if (!valid) {
|
||||
collection = ReadDbFile(pathName, valid, errorMsg);
|
||||
if (!valid) {
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** read db-file failure (" << pathName.toLatin1().data() << "." << endl;
|
||||
@ -331,21 +328,18 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
} else { // db-, dat-file list
|
||||
for (int i=0; i<fln.size(); i++) {
|
||||
if (fln[i].endsWith(".db")) {
|
||||
collection = ReadDbFile(fln[i], valid);
|
||||
collection = ReadDbFile(fln[i], valid, errorMsg);
|
||||
if (!valid) {
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** read db-file failure." << endl;
|
||||
cerr << "----" << endl;
|
||||
return false;
|
||||
}
|
||||
if (!fln[i].startsWith("/")) { // file name only, or relative path
|
||||
if (fln[i].startsWith("..")) { // relative path
|
||||
int idx = fln[i].lastIndexOf("/");
|
||||
if (idx == -1) { // should never happen
|
||||
errorMsg = QString("found '%1' which shouldn't be possible!").arg(fln[i]);
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** found '" << fln[i].toLatin1().data() << "' which shouldn't be possible" << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
return false;
|
||||
}
|
||||
@ -369,19 +363,16 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
collection.SetName(collName);
|
||||
fCollection.push_back(collection);
|
||||
} else if (fln[i].endsWith(".dat") || fln[i].endsWith(".txt")) {
|
||||
collection = ReadColumnParamFile(fln[i], valid);
|
||||
collection = ReadColumnParamFile(fln[i], valid, errorMsg);
|
||||
if (!valid) {
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** read db-file failure." << endl;
|
||||
cerr << "----" << endl;
|
||||
return false;
|
||||
}
|
||||
fCollection.push_back(collection);
|
||||
} else {
|
||||
errorMsg = QString("unkown file type for ")+fln[i];
|
||||
cerr << endl;
|
||||
cerr << "*********" << endl;
|
||||
cerr << "**ERROR** unkown file type for " << fln[i].toLatin1().data() << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "*********" << endl;
|
||||
return false;
|
||||
}
|
||||
@ -398,17 +389,20 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln)
|
||||
/**
|
||||
* @brief PParamDataHandler::ReadDbFile
|
||||
* @param fln
|
||||
* @param valid
|
||||
* @param errorMsg
|
||||
* @return
|
||||
*/
|
||||
PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid)
|
||||
PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid, QString &errorMsg)
|
||||
{
|
||||
PmuppCollection collection;
|
||||
PmuppRun run;
|
||||
QFile file(fln);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
errorMsg = QString("couldn't open ") + fln;
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** couldn't open " << fln.toLatin1().data() << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
valid = false;
|
||||
return collection;
|
||||
@ -434,9 +428,10 @@ PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid)
|
||||
token.clear();
|
||||
token = line.split(",", QString::SkipEmptyParts);
|
||||
if (token.size()==0) {
|
||||
errorMsg = fln + QString(". No parameter tokens.");
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** in" << fln.toLatin1().data() <<". No parameter tokens." << endl;
|
||||
cerr << "**ERROR** in " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
file.close();
|
||||
valid = false;
|
||||
@ -450,6 +445,22 @@ PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid)
|
||||
title += token[i];
|
||||
title = title.trimmed();
|
||||
run.SetName(title);
|
||||
// check that the number of parameters is the same for all runs
|
||||
if (collection.GetNoOfRuns() > 0) {
|
||||
if (collection.GetRun(0).GetNoOfParam() != run.GetNoOfParam()) {
|
||||
errorMsg = fln + QString(".\n");
|
||||
errorMsg += QString(" first run (#%1) has %2 params.\n").arg(collection.GetRun(0).GetNumber()).arg(collection.GetRun(0).GetNoOfParam());
|
||||
errorMsg += QString(" current run (#%1) has %2 params.\n").arg(run.GetNumber()).arg(run.GetNoOfParam());
|
||||
errorMsg += QString(" Inspect your db-file!");
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** in " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
file.close();
|
||||
valid = false;
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
collection.AddRun(run);
|
||||
run.Clear();
|
||||
} else { // parameter
|
||||
@ -534,9 +545,11 @@ PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid)
|
||||
/**
|
||||
* @brief PParamDataHandler::ReadColumnParamFile
|
||||
* @param fln
|
||||
* @param valid
|
||||
* @param errorMsg
|
||||
* @return
|
||||
*/
|
||||
PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &valid)
|
||||
PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &valid, QString &errorMsg)
|
||||
{
|
||||
PmuppCollection collection;
|
||||
PmuppRun run;
|
||||
@ -544,9 +557,10 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
||||
|
||||
QFile file(fln);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
errorMsg = QString("couldn't open ")+fln;
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** couldn't open " << fln.toLatin1().data() << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
valid = false;
|
||||
return collection;
|
||||
@ -594,9 +608,10 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
||||
token = line.split(QRegExp("\\s+"), QString::SkipEmptyParts);
|
||||
// paranoia check
|
||||
if (token.size() != headerInfo.size()) {
|
||||
errorMsg = QString("size mismatch between header and parameter int line: %1 (header=%2 / param=%3)").arg(lineNo).arg(headerInfo.size()).arg(token.size());
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** size mismatch between header and parameter int line: " << lineNo << " (header=" << headerInfo.size() << " / param=" << token.size() << ")." << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
valid = false;
|
||||
file.close();
|
||||
@ -608,9 +623,10 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool &
|
||||
else
|
||||
dval = token[i].toDouble(&ok);
|
||||
if (!ok) {
|
||||
errorMsg = QString("unrecognized token ('%1') in line %2 (line number: %3)").arg(token[i].toLatin1().data()).arg(line.toLatin1().data()).arg(lineNo);
|
||||
cerr << endl;
|
||||
cerr << "----" << endl;
|
||||
cerr << "**ERROR** unrecognized token ('" << token[i].toLatin1().data() << "') in line " << line.toLatin1().data() << "(line number: " << lineNo << ")" << endl;
|
||||
cerr << "**ERROR** " << errorMsg.toLatin1().data() << endl;
|
||||
cerr << "----" << endl;
|
||||
valid = false;
|
||||
file.close();
|
||||
|
@ -113,9 +113,9 @@ class PParamDataHandler : public QObject {
|
||||
int GetNoOfCollections() { return fCollection.size(); }
|
||||
void NewCollection(const QString name);
|
||||
|
||||
bool ReadParamFile(const QStringList fln);
|
||||
PmuppCollection ReadDbFile(const QString fln, bool &valid);
|
||||
PmuppCollection ReadColumnParamFile(const QString fln, bool &valid);
|
||||
bool ReadParamFile(const QStringList fln, QString &errorMsg);
|
||||
PmuppCollection ReadDbFile(const QString fln, bool &valid, QString &errorMsg);
|
||||
PmuppCollection ReadColumnParamFile(const QString fln, bool &valid, QString &errorMsg);
|
||||
|
||||
PmuppCollection GetCollection(const int idx, bool &valid);
|
||||
PmuppCollection GetCollection(const QString name, bool &valid);
|
||||
@ -140,7 +140,7 @@ class PParamDataHandler : public QObject {
|
||||
QProcess *fProc;
|
||||
QVector<PmuppCollection> fCollection;
|
||||
|
||||
bool analyzeFileList(const QStringList &fln, QString &collectionName, QStringList &arg, QString &workDir);
|
||||
bool analyzeFileList(const QStringList &fln, QString &collectionName, QStringList &arg, QString &workDir, QString &errorMsg);
|
||||
|
||||
private slots:
|
||||
void readFromStdOut();
|
||||
|
@ -108,7 +108,9 @@ bool PmuppAdminXMLParser::startElement( const QString&, const QString&,
|
||||
const QString& qName,
|
||||
const QXmlAttributes& )
|
||||
{
|
||||
if (qName == "marker") {
|
||||
if (qName == "path_file_name") {
|
||||
fKeyWord = eRecentFile;
|
||||
} else if (qName == "marker") {
|
||||
fKeyWord = eMarker;
|
||||
} else if (qName == "color") {
|
||||
fKeyWord = eColor;
|
||||
@ -148,6 +150,9 @@ bool PmuppAdminXMLParser::characters(const QString& str)
|
||||
QStringList tok;
|
||||
|
||||
switch (fKeyWord) {
|
||||
case eRecentFile:
|
||||
fAdmin->addRecentFile(QString(str.toLatin1()).trimmed());
|
||||
break;
|
||||
case eMarker:
|
||||
tok = str.split(",", QString::SkipEmptyParts);
|
||||
|
||||
@ -330,7 +335,42 @@ PmuppAdmin::PmuppAdmin() : QObject()
|
||||
*/
|
||||
PmuppAdmin::~PmuppAdmin()
|
||||
{
|
||||
// nothing to be done for now
|
||||
saveRecentFiles();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Add recent path-file name to the internal ring-buffer.
|
||||
*
|
||||
* \param str recent path-file name to be added
|
||||
*/
|
||||
void PmuppAdmin::addRecentFile(const QString str)
|
||||
{
|
||||
// check if file name is not already present
|
||||
for (int i=0; i<fRecentFile.size(); i++) {
|
||||
if (str == fRecentFile[i])
|
||||
return;
|
||||
}
|
||||
|
||||
fRecentFile.push_front(str);
|
||||
if (fRecentFile.size() > MAX_RECENT_FILES)
|
||||
fRecentFile.resize(MAX_RECENT_FILES);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PmuppAdmin::getRecentFile
|
||||
* @param idx
|
||||
* @return
|
||||
*/
|
||||
QString PmuppAdmin::getRecentFile(int idx)
|
||||
{
|
||||
QString str("");
|
||||
|
||||
if ((idx >= 0) && (idx < fRecentFile.size()))
|
||||
str = fRecentFile[idx];
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@ -439,6 +479,76 @@ void PmuppAdmin::setColor(int r, int g, int b, QString name)
|
||||
fColor.push_back(color);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Merges the recent file ring buffer into mupp_startup.xml and saves it.
|
||||
* If a local copy is present it will be saved there, otherwise the master file
|
||||
* will be used.
|
||||
*/
|
||||
void PmuppAdmin::saveRecentFiles()
|
||||
{
|
||||
// check if mupp_startup.xml is present in the current directory, and if yes, use this file to
|
||||
// save the recent file names otherwise use the "master" mupp_startup.xml
|
||||
|
||||
QString str("");
|
||||
QString fln = QString("./mupp_startup.xml");
|
||||
if (!QFile::exists(fln)) {
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
fln = QString("%1/.musrfit/mupp/mupp_startup.xml").arg(env.value("HOME"));
|
||||
}
|
||||
|
||||
if (QFile::exists(fln)) { // administration file present
|
||||
QVector<QString> data;
|
||||
QFile file(fln);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
cerr << endl << ">> PmuppAdmin::saveRecentFile: **ERROR** Cannot open " << fln.toLatin1().data() << " for reading." << endl;
|
||||
return;
|
||||
}
|
||||
QTextStream fin(&file);
|
||||
while (!fin.atEnd()) {
|
||||
data.push_back(fin.readLine());
|
||||
}
|
||||
file.close();
|
||||
|
||||
// remove <path_file_name> from data
|
||||
for (QVector<QString>::iterator it = data.begin(); it != data.end(); ++it) {
|
||||
if (it->contains("<path_file_name>")) {
|
||||
it = data.erase(it);
|
||||
--it;
|
||||
}
|
||||
}
|
||||
|
||||
// add recent files
|
||||
int i;
|
||||
for (i=0; i<data.size(); i++) {
|
||||
if (data[i].contains("<recent_files>"))
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == data.size()) {
|
||||
cerr << endl << ">> PmuppAdmin::saveRecentFile: **ERROR** " << fln.toLatin1().data() << " seems to be corrupt." << endl;
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
for (int j=0; j<fRecentFile.size(); j++) {
|
||||
str = " <path_file_name>" + fRecentFile[j] + "</path_file_name>";
|
||||
data.insert(i++, str);
|
||||
}
|
||||
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
cerr << endl << ">> PmuppAdmin::saveRecentFile: **ERROR** Cannot open " << fln.toLatin1().data() << " for reading." << endl;
|
||||
return;
|
||||
}
|
||||
fin.setDevice(&file);
|
||||
for (int i=0; i<data.size(); i++)
|
||||
fin << data[i] << endl;
|
||||
file.close();
|
||||
} else {
|
||||
QString msg("Failed to write mupp_startup.xml. Neither a local nor a global copy found.");
|
||||
QMessageBox::warning(0, "WARNING", msg, QMessageBox::Ok, QMessageBox::NoButton);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PmuppAdmin::createMuppStartupFile
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include <QPixmap>
|
||||
#include <QtXml>
|
||||
|
||||
#include "mupp.h"
|
||||
|
||||
class PmuppAdmin;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -96,7 +98,7 @@ class PmuppAdminXMLParser : public QXmlDefaultHandler
|
||||
virtual ~PmuppAdminXMLParser() {}
|
||||
|
||||
private:
|
||||
enum EAdminKeyWords {eEmpty, eMarker, eColor};
|
||||
enum EAdminKeyWords {eEmpty, eRecentFile, eMarker, eColor};
|
||||
|
||||
bool startDocument();
|
||||
bool startElement( const QString&, const QString&, const QString& ,
|
||||
@ -127,6 +129,10 @@ class PmuppAdmin : public QObject
|
||||
PmuppAdmin();
|
||||
virtual ~PmuppAdmin();
|
||||
|
||||
void addRecentFile(const QString str);
|
||||
int getNumRecentFiles() { return fRecentFile.size(); }
|
||||
QString getRecentFile(int idx);
|
||||
|
||||
int getNoOfMarkers() { return fMarker.size(); }
|
||||
QVector<PmuppMarker> getMarkers() { return fMarker; }
|
||||
PmuppMarker getMarker(int idx);
|
||||
@ -142,9 +148,12 @@ class PmuppAdmin : public QObject
|
||||
private:
|
||||
friend class PmuppAdminXMLParser;
|
||||
|
||||
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
||||
|
||||
QVector<PmuppMarker> fMarker;
|
||||
QVector<PmuppColor> fColor;
|
||||
|
||||
void saveRecentFiles(); ///< save recent file list
|
||||
void createMuppStartupFile(); ///< create default mupp_startup.xml
|
||||
};
|
||||
|
||||
|
@ -205,6 +205,7 @@ PmuppGui::PmuppGui( QStringList fln, QWidget *parent, Qt::WindowFlags f )
|
||||
{
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
fDatime = dt.toTime_t();
|
||||
fMuppInstance = -1;
|
||||
|
||||
fMuppPlot = 0;
|
||||
|
||||
@ -223,8 +224,9 @@ PmuppGui::PmuppGui( QStringList fln, QWidget *parent, Qt::WindowFlags f )
|
||||
QString collName = QString("collName0");
|
||||
fParamDataHandler->NewCollection(collName);
|
||||
}
|
||||
if (!fParamDataHandler->ReadParamFile(fln)) {
|
||||
// parameter file(s) is/are not valid
|
||||
QString errorMsg("");
|
||||
if (!fParamDataHandler->ReadParamFile(fln, errorMsg)) {
|
||||
QMessageBox::critical(this, "ERROR", errorMsg);
|
||||
} else {
|
||||
dataAtStartup = true; // delay to deal with the data sets until the GUI is ready to do so
|
||||
}
|
||||
@ -413,8 +415,12 @@ void PmuppGui::aboutToQuit()
|
||||
|
||||
// clean up temporary plot files
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString pathName = QString("%1/.musrfit/mupp/_mupp_%2.dat").arg(env.value("HOME")).arg(fDatime);
|
||||
pathName = QString("%1/.musrfit/mupp/_mupp_ftok.dat").arg(env.value("HOME"));
|
||||
if (fMuppInstance != -1) {
|
||||
QString pathName = QString("%1/.musrfit/mupp/_mupp_%2.dat").arg(env.value("HOME")).arg(fDatime);
|
||||
QFile::remove(pathName);
|
||||
pathName = QString("%1/.musrfit/mupp/_mupp_ftok_%2.dat").arg(env.value("HOME")).arg(fMuppInstance);
|
||||
QFile::remove(pathName);
|
||||
}
|
||||
|
||||
// needed for clean up and to save the cmd history
|
||||
writeCmdHistory();
|
||||
@ -464,6 +470,15 @@ void PmuppGui::setupFileActions()
|
||||
}
|
||||
tb->addAction(a);
|
||||
|
||||
fRecentFilesMenu = menu->addMenu( tr("Recent Files") );
|
||||
for (int i=0; i<MAX_RECENT_FILES; i++) {
|
||||
fRecentFilesAction[i] = new QAction(fRecentFilesMenu);
|
||||
fRecentFilesAction[i]->setVisible(false);
|
||||
connect( fRecentFilesAction[i], SIGNAL(triggered()), this, SLOT(fileOpenRecent()));
|
||||
fRecentFilesMenu->addAction(fRecentFilesAction[i]);
|
||||
}
|
||||
fillRecentFiles();
|
||||
|
||||
a = new QAction( tr( "E&xit" ), this );
|
||||
a->setShortcut( tr("Ctrl+Q") );
|
||||
a->setStatusTip( tr("Exit Program") );
|
||||
@ -571,7 +586,38 @@ void PmuppGui::fileOpen()
|
||||
return;
|
||||
}
|
||||
|
||||
fParamDataHandler->ReadParamFile(list);
|
||||
QString errorMsg("");
|
||||
if (!fParamDataHandler->ReadParamFile(list, errorMsg)) {
|
||||
QMessageBox::critical(this, "ERROR", errorMsg);
|
||||
return;
|
||||
}
|
||||
|
||||
// populate the recent files
|
||||
if (msrPresent || dbPresent) {
|
||||
for (int i=0; i<list.size(); i++) {
|
||||
fAdmin->addRecentFile(list[i]); // keep it in admin
|
||||
fillRecentFiles(); // update menu
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PmuppGui::fileOpenRecent
|
||||
*/
|
||||
void PmuppGui::fileOpenRecent()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
|
||||
if (action) {
|
||||
QStringList fln;
|
||||
fln << action->text();
|
||||
QString errorMsg("");
|
||||
if (!fParamDataHandler->ReadParamFile(fln, errorMsg)) {
|
||||
QMessageBox::critical(this, "ERROR", errorMsg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -580,7 +626,7 @@ void PmuppGui::fileOpen()
|
||||
*/
|
||||
void PmuppGui::fileExit()
|
||||
{
|
||||
qApp->quit();
|
||||
aboutToQuit();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -718,6 +764,18 @@ void PmuppGui::getTheme()
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>fill the recent file list in the menu.
|
||||
*/
|
||||
void PmuppGui::fillRecentFiles()
|
||||
{
|
||||
for (int i=0; i<fAdmin->getNumRecentFiles(); i++) {
|
||||
fRecentFilesAction[i]->setText(fAdmin->getRecentFile(i));
|
||||
fRecentFilesAction[i]->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PmuppGui::readCmdHistory
|
||||
@ -817,17 +875,21 @@ void PmuppGui::refresh()
|
||||
PmuppCollection coll;
|
||||
bool ok=false;
|
||||
if (pathName.endsWith(".db")) {
|
||||
coll = fParamDataHandler->ReadDbFile(pathName, ok);
|
||||
QString errorMsg("");
|
||||
coll = fParamDataHandler->ReadDbFile(pathName, ok, errorMsg);
|
||||
if (!ok) {
|
||||
QMessageBox::critical(this, "ERROR - REFRESH",
|
||||
QString("Couldn't refresh %1\nFile corrupted?!").arg(fParamDataHandler->GetCollection(collIdx)->GetName()));
|
||||
QString("Couldn't refresh %1\nFile corrupted?!\n").arg(fParamDataHandler->GetCollection(collIdx)->GetName())+
|
||||
errorMsg);
|
||||
return;
|
||||
}
|
||||
} else if (pathName.endsWith(".dat")) {
|
||||
coll = fParamDataHandler->ReadColumnParamFile(pathName, ok);
|
||||
QString errorMsg("");
|
||||
coll = fParamDataHandler->ReadColumnParamFile(pathName, ok, errorMsg);
|
||||
if (!ok) {
|
||||
QMessageBox::critical(this, "ERROR - REFRESH",
|
||||
QString("Couldn't refresh %1\nFile corrupted?!").arg(fParamDataHandler->GetCollection(collIdx)->GetName()));
|
||||
QString("Couldn't refresh %1\nFile corrupted?!\n").arg(fParamDataHandler->GetCollection(collIdx)->GetName())+
|
||||
errorMsg);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -1608,13 +1670,16 @@ void PmuppGui::plot()
|
||||
|
||||
file.close();
|
||||
|
||||
// get first free mupp instance
|
||||
fMuppInstance = getFirstAvailableMuppInstance();
|
||||
|
||||
// issue a system message to inform to ROOT parameter plotter (rpp) that new data are available
|
||||
key_t key;
|
||||
struct mbuf msg;
|
||||
int flags, msqid;
|
||||
|
||||
// generate the ICP message queue key
|
||||
QString tmpPathName = QString("%1/.musrfit/mupp/_mupp_ftok.dat").arg(env.value("HOME"));
|
||||
QString tmpPathName = QString("%1/.musrfit/mupp/_mupp_ftok_%2.dat").arg(env.value("HOME")).arg(fMuppInstance);
|
||||
file.setFileName(tmpPathName);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
QMessageBox::critical(this, "ERROR", "Couldn't write necessary temporary file!");
|
||||
@ -1624,7 +1689,7 @@ void PmuppGui::plot()
|
||||
fout << QCoreApplication::applicationFilePath().toLatin1().data() << endl;
|
||||
file.close();
|
||||
|
||||
key = ftok(QCoreApplication::applicationFilePath().toLatin1().data(), 1);
|
||||
key = ftok(QCoreApplication::applicationFilePath().toLatin1().data(), fMuppInstance);
|
||||
if (key == -1) {
|
||||
QMessageBox::critical(this, "ERROR", "Couldn't obtain necessary key to install the IPC message queue.");
|
||||
return;
|
||||
@ -1669,11 +1734,14 @@ void PmuppGui::startMuppPlot()
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString cmd = QString("%1/bin/mupp_plot").arg(MUPP_PREFIX);
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
|
||||
cmd = QString("/Applications/mupp.app/Contents/MacOS/mupp_plot"); // as35 not yet ready
|
||||
cmd = QString("/Applications/mupp.app/Contents/MacOS/mupp_plot");
|
||||
#endif
|
||||
QString workDir = QString("./");
|
||||
QStringList arg;
|
||||
|
||||
// feed the mupp instance
|
||||
arg << QString("%1").arg(fMuppInstance);
|
||||
|
||||
fMuppPlot = new QProcess(this);
|
||||
if (fMuppPlot == nullptr) {
|
||||
QMessageBox::critical(0, "**ERROR**", "Couldn't invoke QProcess for mupp_plot!");
|
||||
@ -1988,3 +2056,27 @@ void PmuppGui::selectCollection(QString cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PmuppGui::getFirstAvailableMuppInstance
|
||||
* @return
|
||||
*/
|
||||
uint PmuppGui::getFirstAvailableMuppInstance()
|
||||
{
|
||||
// if fMuppInstance already set, i.e. != -1, do nothing
|
||||
if (fMuppInstance != -1)
|
||||
return fMuppInstance;
|
||||
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString fln("");
|
||||
uint i=0;
|
||||
for (i=0; i<256; i++) {
|
||||
fln = QString("%1/.musrfit/mupp/_mupp_ftok_%2.dat").arg(env.value("HOME")).arg(i);
|
||||
if (!QFile::exists(fln))
|
||||
break;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
public slots:
|
||||
void aboutToQuit();
|
||||
void fileOpen();
|
||||
void fileOpenRecent();
|
||||
void fileExit();
|
||||
|
||||
void toolDumpCollections();
|
||||
@ -129,6 +130,7 @@ private:
|
||||
bool fDarkToolBarIcon;
|
||||
|
||||
uint fDatime;
|
||||
uint fMuppInstance;
|
||||
|
||||
PParamDataHandler *fParamDataHandler;
|
||||
QVector<PmuppXY> fXY;
|
||||
@ -138,6 +140,9 @@ private:
|
||||
|
||||
QWidget *fCentralWidget;
|
||||
|
||||
QMenu *fRecentFilesMenu; ///< recent file menu
|
||||
QAction *fRecentFilesAction[MAX_RECENT_FILES]; ///< array of the recent file actions
|
||||
|
||||
QBoxLayout *fBoxLayout_Main; // top->bottom (0)
|
||||
QBoxLayout *fBoxLayout_Top; // left->right (1)
|
||||
QGridLayout *fGridLayout_Left; // 2 columns, 3 rows
|
||||
@ -173,6 +178,8 @@ private:
|
||||
|
||||
void getTheme();
|
||||
|
||||
void fillRecentFiles();
|
||||
|
||||
void readCmdHistory();
|
||||
void writeCmdHistory();
|
||||
|
||||
@ -181,6 +188,7 @@ private:
|
||||
void getMinMax(QVector<double> &data, double &min, double &max);
|
||||
QString substituteDefaultLabels(QString label);
|
||||
void selectCollection(QString cmd);
|
||||
uint getFirstAvailableMuppInstance();
|
||||
|
||||
private slots:
|
||||
void refresh();
|
||||
|
@ -204,7 +204,8 @@ int PmuppScript::loadCollection(const QString str)
|
||||
QStringList flnList;
|
||||
flnList << fln;
|
||||
|
||||
fParamDataHandler->ReadParamFile(flnList);
|
||||
QString errorMsg("");
|
||||
fParamDataHandler->ReadParamFile(flnList, errorMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This is a comment
|
||||
|
||||
loadPath $HOME/Apps/mupp/examples
|
||||
loadPath ./
|
||||
|
||||
load YBCO-40nm-T5K-FC150mT-Escan.db
|
||||
load YBCO-40nm-T30K-FC150mT-Escan.db
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <sys/msg.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define MAX_RECENT_FILES 5
|
||||
|
||||
#define PMUPP_MAX_MTEXT 512
|
||||
|
||||
struct mbuf {
|
||||
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mupp xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/WebHome.html">
|
||||
<comment>
|
||||
Defines default settings for the mupp helper program for musrfit
|
||||
</comment>
|
||||
<recent_files>
|
||||
</recent_files>
|
||||
<root_settings>
|
||||
<marker_list>
|
||||
<!-- Root marker numbers -->
|
||||
|
@ -32,6 +32,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
PMuppCanvas.h
|
||||
LINKDEF PMuppCanvasLinkDef.h
|
||||
MODULE PMuppCanvas
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PMuppStartupHandlerDict
|
||||
@ -39,6 +40,7 @@ root_generate_dictionary(
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
PMuppStartupHandler.h
|
||||
LINKDEF PMuppStartupHandlerLinkDef.h
|
||||
MODULE PMuppStartupHandler
|
||||
)
|
||||
|
||||
#--- define all the dictonary cxx ---------------------------------------------
|
||||
|
@ -88,7 +88,9 @@ PMuppCanvas::PMuppCanvas()
|
||||
*/
|
||||
PMuppCanvas::PMuppCanvas(const Char_t *title, Int_t wtopx, Int_t wtopy,
|
||||
Int_t ww, Int_t wh, const PIntVector markerSytleList,
|
||||
const PDoubleVector markerSizeList, const PIntVector colorList) :
|
||||
const PDoubleVector markerSizeList, const PIntVector colorList,
|
||||
const int mupp_instance) :
|
||||
fMuppInstance(mupp_instance),
|
||||
fMarkerStyleList(markerSytleList),
|
||||
fMarkerSizeList(markerSizeList),
|
||||
fColorList(colorList)
|
||||
@ -303,7 +305,8 @@ void PMuppCanvas::CheckIPCMsgQueue()
|
||||
cerr << "**ERROR** couldn't get value of the environment variable HOME." << endl << endl;
|
||||
return;
|
||||
}
|
||||
strncat(str, "/.musrfit/mupp/_mupp_ftok.dat", sizeof(str)-1);
|
||||
memset(str, '\0', sizeof(str));
|
||||
snprintf(str, sizeof(str), "%s/.musrfit/mupp/_mupp_ftok_%d.dat", getenv("HOME"), fMuppInstance);
|
||||
ifstream fin(str, ifstream::in);
|
||||
if (!fin.is_open()) {
|
||||
cerr << endl;
|
||||
@ -315,7 +318,7 @@ void PMuppCanvas::CheckIPCMsgQueue()
|
||||
fFtokName = str;
|
||||
}
|
||||
|
||||
key = ftok(fFtokName.Data(), 1);
|
||||
key = ftok(fFtokName.Data(), fMuppInstance);
|
||||
flags = IPC_CREAT;
|
||||
msqid = msgget(key, flags | S_IRUSR | S_IWUSR);
|
||||
if (msqid == -1) {
|
||||
|
@ -74,7 +74,8 @@ public:
|
||||
PMuppCanvas(const Char_t* title,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||
const PIntVector markerSytleList, const PDoubleVector markerSizeList,
|
||||
const PIntVector colorList);
|
||||
const PIntVector colorList,
|
||||
const int mupp_instance);
|
||||
virtual ~PMuppCanvas();
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
@ -89,6 +90,7 @@ public:
|
||||
|
||||
private:
|
||||
Bool_t fValid;
|
||||
Int_t fMuppInstance;
|
||||
|
||||
TString fFtokName;
|
||||
TTimer *fCheckMsgQueue; ///< timer needed to check if a message in the IPC message queue is pending
|
||||
|
@ -46,6 +46,14 @@ using namespace std;
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2) {
|
||||
return -1;
|
||||
}
|
||||
int mupp_instance = (int)strtol(argv[1], NULL, 10);
|
||||
if ((mupp_instance < 0) || (mupp_instance > 255)) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
// read startup file
|
||||
char startup_path_name[128];
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
@ -93,7 +101,8 @@ int main(int argc, char *argv[])
|
||||
PMuppCanvas *muppCanvas = new PMuppCanvas("mupp", 10, 10, 600, 800,
|
||||
startupHandler->GetMarkerStyleList(),
|
||||
startupHandler->GetMarkerSizeList(),
|
||||
startupHandler->GetColorList());
|
||||
startupHandler->GetColorList(),
|
||||
mupp_instance);
|
||||
|
||||
if (muppCanvas != 0) {
|
||||
if (muppCanvas->IsValid()) {
|
||||
|
@ -81,9 +81,26 @@ PModSelect::PModSelect(QWidget *parent) :
|
||||
|
||||
setLayout(main);
|
||||
|
||||
connect(fAbsVal, SIGNAL(stateChanged(int)), this, SLOT(absoluteValueStateChanged(int)));
|
||||
connect(fScaleAutomatic, SIGNAL(pressed()), this, SLOT(scaleAuto()));
|
||||
connect(fScaleByFactor, SIGNAL(pressed()), this, SLOT(getFactor()));
|
||||
connect(fCancel, SIGNAL(pressed()), this, SLOT(reject()));
|
||||
connect(fCancel, SIGNAL(pressed()), this, SLOT(reject()));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PModSelect::absoluteValueStateChanged
|
||||
* @param ival
|
||||
*/
|
||||
void PModSelect::absoluteValueStateChanged(int ival)
|
||||
{
|
||||
if (ival == Qt::Unchecked) {
|
||||
fFactorLabel->setText("Factor");
|
||||
fScaleByFactor->setText("Scale by &Factor");
|
||||
} else if (ival == Qt::Checked) {
|
||||
fFactorLabel->setText("Value");
|
||||
fScaleByFactor->setText("Set Abs. Value");
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@ -60,6 +60,7 @@ class PModSelect : public QDialog
|
||||
void scale(bool automatic, double factor, bool absVal);
|
||||
|
||||
private slots:
|
||||
void absoluteValueStateChanged(int);
|
||||
void scaleAuto();
|
||||
void getFactor();
|
||||
|
||||
|
@ -43,7 +43,7 @@ class PAdmin;
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>This structure is keeping informations necessary to handle musrfit
|
||||
* theory functions (see also <code>https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block</code>).
|
||||
* theory functions (see also <code>http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block</code>).
|
||||
*/
|
||||
typedef struct {
|
||||
QString name;
|
||||
|
@ -925,7 +925,7 @@ void PTextEdit::doConnections( PSubTextEdit *e )
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file title. See also https://intranet.psi.ch/MUSR/MusrFit#4_1_The_Title
|
||||
* <p>Start the dialog to enter a msr-file title. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-title
|
||||
*/
|
||||
void PTextEdit::insertTitle()
|
||||
{
|
||||
@ -934,7 +934,7 @@ void PTextEdit::insertTitle()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file fit-parameter block. See also https://intranet.psi.ch/MUSR/MusrFit#4_2_The_FITPARAMETER_Block
|
||||
* <p>Start the dialog to enter a msr-file fit-parameter block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-fitparameter-block
|
||||
*/
|
||||
void PTextEdit::insertParameterBlock()
|
||||
{
|
||||
@ -943,7 +943,7 @@ void PTextEdit::insertParameterBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file theory block. See also https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block
|
||||
* <p>Start the dialog to enter a msr-file theory block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block
|
||||
*/
|
||||
void PTextEdit::insertTheoryBlock()
|
||||
{
|
||||
@ -952,7 +952,7 @@ void PTextEdit::insertTheoryBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Insert a selected theory function. See also https://intranet.psi.ch/MUSR/MusrFit#4_3_The_THEORY_Block
|
||||
* <p>Insert a selected theory function. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block
|
||||
*
|
||||
* \param a action of the selected theory function
|
||||
*/
|
||||
@ -963,7 +963,7 @@ void PTextEdit::insertTheoryFunction(QAction *a)
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file function block. See also https://intranet.psi.ch/MUSR/MusrFit#4_4_The_FUNCTIONS_Block
|
||||
* <p>Start the dialog to enter a msr-file function block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-functions-block
|
||||
*/
|
||||
void PTextEdit::insertFunctionBlock()
|
||||
{
|
||||
@ -972,7 +972,7 @@ void PTextEdit::insertFunctionBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file asymmetry run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file asymmetry run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertAsymRunBlock()
|
||||
{
|
||||
@ -981,7 +981,7 @@ void PTextEdit::insertAsymRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file single histogram run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file single histogram run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertSingleHistRunBlock()
|
||||
{
|
||||
@ -990,7 +990,7 @@ void PTextEdit::insertSingleHistRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file nonMusr run block. See also https://intranet.psi.ch/MUSR/MusrFit#4_5_The_RUN_Block
|
||||
* <p>Start the dialog to enter a msr-file nonMusr run block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-run-block
|
||||
*/
|
||||
void PTextEdit::insertNonMusrRunBlock()
|
||||
{
|
||||
@ -999,7 +999,7 @@ void PTextEdit::insertNonMusrRunBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Inserts a default command block. See also https://intranet.psi.ch/MUSR/MusrFit#4_6_The_COMMANDS_Block
|
||||
* <p>Inserts a default command block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-commands-block
|
||||
*/
|
||||
void PTextEdit::insertCommandBlock()
|
||||
{
|
||||
@ -1008,7 +1008,7 @@ void PTextEdit::insertCommandBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file Fourier block. See also https://intranet.psi.ch/MUSR/MusrFit#4_7_The_FOURIER_Block
|
||||
* <p>Start the dialog to enter a msr-file Fourier block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-fourier-block
|
||||
*/
|
||||
void PTextEdit::insertFourierBlock()
|
||||
{
|
||||
@ -1017,7 +1017,7 @@ void PTextEdit::insertFourierBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Start the dialog to enter a msr-file plot block. See also https://intranet.psi.ch/MUSR/MusrFit#4_7_The_PLOT_Block
|
||||
* <p>Start the dialog to enter a msr-file plot block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-plot-block
|
||||
*/
|
||||
void PTextEdit::insertPlotBlock()
|
||||
{
|
||||
@ -1026,7 +1026,7 @@ void PTextEdit::insertPlotBlock()
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Inserts a default statistics block. See also https://intranet.psi.ch/MUSR/MusrFit#4_9_The_STATISTIC_Block
|
||||
* <p>Inserts a default statistics block. See also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-statistic-block
|
||||
*/
|
||||
void PTextEdit::insertStatisticBlock()
|
||||
{
|
||||
@ -2745,9 +2745,9 @@ void PTextEdit::mupp()
|
||||
{
|
||||
QString cmd("");
|
||||
cmd = fAdmin->getExecPath() + "/mupp";
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
|
||||
cmd = QString("/Applications/mupp.app/Contents/MacOS/mupp");
|
||||
#endif
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
|
||||
cmd = QString("/Applications/mupp.app/Contents/MacOS/mupp");
|
||||
#endif
|
||||
|
||||
QProcess *proc = new QProcess(this);
|
||||
|
||||
|
@ -22,18 +22,18 @@
|
||||
<path_file_name>@DOCDIR@/examples/test-histo-PSI-BIN.msr</path_file_name>
|
||||
</recent_files>
|
||||
<help_section>
|
||||
<musr_web_main>file://@DOCDIR@/html/user/MUSR/MusrFit.html</musr_web_main>
|
||||
<musr_web_title>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>
|
||||
<musr_web_parameters>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>
|
||||
<musr_web_theory>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>
|
||||
<musr_web_functions>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>
|
||||
<musr_web_run>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>
|
||||
<musr_web_command>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>
|
||||
<musr_web_fourier>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>
|
||||
<musr_web_plot>file://@DOCDIR@/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>
|
||||
<musr_web_statistic>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>
|
||||
<musr_web_msr2data>file://@DOCDIR@/html/user/MUSR/Msr2Data.html</musr_web_msr2data>
|
||||
<musr_web_musrFT>file://@DOCDIR@/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>
|
||||
<musr_web_main>file://@DOCDIR@/html/index.html</musr_web_main>
|
||||
<musr_web_title>file://@DOCDIR@/html/user-manual.html#the-title</musr_web_title>
|
||||
<musr_web_parameters>file://@DOCDIR@/html/user-manual.html#the-fitparameter-block</musr_web_parameters>
|
||||
<musr_web_theory>file://@DOCDIR@/html/user-manual.html#the-theory-block</musr_web_theory>
|
||||
<musr_web_functions>file://@DOCDIR@/html/user-manual.html#the-functions-block</musr_web_functions>
|
||||
<musr_web_run>file://@DOCDIR@/html/user-manual.html#the-run-block</musr_web_run>
|
||||
<musr_web_command>file://@DOCDIR@/html/user-manual.html#the-commands-block</musr_web_command>
|
||||
<musr_web_fourier>file://@DOCDIR@/html/user-manual.html#the-fourier-block</musr_web_fourier>
|
||||
<musr_web_plot>file://@DOCDIR@/html/user-manual.html#the-plot-block</musr_web_plot>
|
||||
<musr_web_statistic>file://@DOCDIR@/html/user-manual.html#the-statistic-block</musr_web_statistic>
|
||||
<musr_web_msr2data>file://@DOCDIR@/html/msr2data.html</musr_web_msr2data>
|
||||
<musr_web_musrFT>file://@DOCDIR@/html/user-manual.html#musrft</musr_web_musrFT>
|
||||
</help_section>
|
||||
<font_settings>
|
||||
<font_name>Monospace</font_name>
|
||||
|
@ -422,9 +422,9 @@ void musrfit_dump_root(char *fileName, PRunListCollection *runList)
|
||||
/**
|
||||
* <p>The musrfit program is used to fit muSR data.
|
||||
* For a detailed description/usage of the program, please see
|
||||
* \htmlonly <a href="https://intranet.psi.ch/MUSR/MusrFit">musrfit online help</a>
|
||||
* \htmlonly <a href="http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrfit">musrfit online help</a>
|
||||
* \endhtmlonly
|
||||
* \latexonly musrfit online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit}
|
||||
* \latexonly musrfit online help: \texttt{http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrfit}
|
||||
* \endlatexonly
|
||||
*
|
||||
* <b>return:</b>
|
||||
|
@ -198,9 +198,9 @@ Int_t musrt0_getMaxBin(const PDoubleVector *data)
|
||||
/**
|
||||
* <p>The musrt0 program is used to set graphically t0's, data- and background-ranges.
|
||||
* For a detailed description/usage of the program, please see
|
||||
* \htmlonly <a href="https://intranet.psi.ch/MUSR/MusrFit">musrt0 online help</a>
|
||||
* \htmlonly <a href="http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrt0">musrt0 online help</a>
|
||||
* \endhtmlonly
|
||||
* \latexonly musrt0 online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit}
|
||||
* \latexonly musrt0 online help: \texttt{http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrt0}
|
||||
* \endlatexonly
|
||||
*
|
||||
* <b>return:</b>
|
||||
|
@ -83,9 +83,9 @@ void musrview_syntax()
|
||||
* <p>The musrview program is used to show muSR fit results in graphical form.
|
||||
* From it also Fourier transforms, difference between data an theory can be formed.
|
||||
* For a detailed description/usage of the program, please see
|
||||
* \htmlonly <a href="https://intranet.psi.ch/MUSR/MusrFit">musrview online help</a>
|
||||
* \htmlonly <a href="http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrview">musrview online help</a>
|
||||
* \endhtmlonly
|
||||
* \latexonly musrview online help: \texttt{https://intranet.psi.ch/MUSR/MusrFit}
|
||||
* \latexonly musrview online help: \texttt{http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#musrview}
|
||||
* \endlatexonly
|
||||
*
|
||||
* <b>return:</b>
|
||||
|
Reference in New Issue
Block a user