diff --git a/ChangeLog b/ChangeLog index 9e53e308..2b4ec9ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ NEW the chi^2 calculation in single-histogram and asymmetry fits is parallelized if musrfit is built using a compiler supporting OpenMP (e.g. GCC >= 4.2) Using --disable-omp this feature can be disabled on the configure level. NEW any2many: force the user to define the exact NeXus ouput format (HDF4,HDF5,XML) +FIXED crash of musrview in case the XML startup file is present but cannot be parsed correctly FIXED crash in case a non-existing userFcn is called from an existing library (MUSR-159) FIXED slightly wrong chisq since the 0-bin entries were treated wrongly for scaled N0/Bkg data (MUSR-193) FIXED the evaluation of the LF depolarization functions (before numerous unnecessary calculations were performed) diff --git a/configure.ac b/configure.ac index 2ccb5eaa..0af70d0f 100644 --- a/configure.ac +++ b/configure.ac @@ -370,6 +370,22 @@ else AC_MSG_ERROR([MathMore is not included in the ROOT installation... Please configure ROOT with the --enable-mathmore option and check that the feature is actually built!]) fi +AC_MSG_CHECKING([for XML support in ROOT]) +if test "x$(${ROOTCONF} --has-xml)" == "xyes"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([XML support is not included in the ROOT installation... Please configure ROOT with the --enable-xml option and check that the feature is actually built!]) +fi + +AC_MSG_CHECKING([for image processing support in ROOT]) +if test "x$(${ROOTCONF} --has-asimage)" == "xyes"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([image processing support is not included in the ROOT installation... Please configure ROOT with the --enable-asimage option and check that the feature is actually built!]) +fi + AC_SUBST(ROOT_LIBS) AC_SUBST(ROOT_CFLAGS) diff --git a/src/any2many.cpp b/src/any2many.cpp index 1373156f..78af4ccc 100644 --- a/src/any2many.cpp +++ b/src/any2many.cpp @@ -439,7 +439,7 @@ int main(int argc, char *argv[]) status = saxParser->ParseFile(startup_path_name); // check for parse errors if (status) { // error - cerr << endl << ">> any2many **WARNING** reading/parsing musrfit_startup.xml."; + cerr << endl << ">> any2many **WARNING** Reading/parsing musrfit_startup.xml failed."; cerr << endl; // clean up if (saxParser) { @@ -454,7 +454,11 @@ int main(int argc, char *argv[]) } // read all the necessary runs (raw data) - PRunDataHandler *dataHandler = new PRunDataHandler(&info, startupHandler->GetDataPathList()); + PRunDataHandler *dataHandler; + if (startupHandler) + dataHandler = new PRunDataHandler(&info, startupHandler->GetDataPathList()); + else + dataHandler = new PRunDataHandler(&info); bool success = dataHandler->IsAllDataAvailable(); if (!success) { diff --git a/src/classes/PMsr2Data.cpp b/src/classes/PMsr2Data.cpp index 89d94546..23e129cf 100644 --- a/src/classes/PMsr2Data.cpp +++ b/src/classes/PMsr2Data.cpp @@ -427,7 +427,7 @@ int PMsr2Data::ParseXmlStartupFile() status = fSaxParser->ParseFile(startup_path_name.c_str()); // check for parse errors if (status) { // error - cerr << endl << ">> msr2data: **WARNING** reading/parsing musrfit_startup.xml." << endl; + cerr << endl << ">> msr2data: **WARNING** Reading/parsing musrfit_startup.xml failed." << endl; // clean up if (fSaxParser) { delete fSaxParser; diff --git a/src/classes/PRunDataHandler.cpp b/src/classes/PRunDataHandler.cpp index 9f127ce7..fbd842b5 100644 --- a/src/classes/PRunDataHandler.cpp +++ b/src/classes/PRunDataHandler.cpp @@ -73,6 +73,24 @@ using namespace std; #define A2M_WKM 6 #define A2M_ASCII 7 +//-------------------------------------------------------------------------- +// Constructor +//-------------------------------------------------------------------------- +/** + *

Constructor, reading the data histogramm files. + * + * \param msrInfo pointer to the msr-file handler + */ +PRunDataHandler::PRunDataHandler(PAny2ManyInfo *any2ManyInfo) : fAny2ManyInfo(any2ManyInfo) +{ + fDataPath.clear(); + // read files + if (!ReadWriteFilesList()) // couldn't read file + fAllDataAvailable = false; + else + fAllDataAvailable = true; +} + //-------------------------------------------------------------------------- // Constructor //-------------------------------------------------------------------------- diff --git a/src/external/libFitPofB/classes/TLondon1D.cpp b/src/external/libFitPofB/classes/TLondon1D.cpp index 1f7af1b7..b53ca3c9 100644 --- a/src/external/libFitPofB/classes/TLondon1D.cpp +++ b/src/external/libFitPofB/classes/TLondon1D.cpp @@ -156,7 +156,7 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -304,7 +304,7 @@ TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -487,7 +487,7 @@ TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -657,7 +657,7 @@ TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -804,7 +804,7 @@ TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -973,7 +973,7 @@ TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -1142,7 +1142,7 @@ double TLondon1D3LS::operator()(double t, const vector &par) const { // int status (saxParser->ParseFile(startup_path_name.c_str())); // // check for parse errors // if (status) { // error -// cout << endl << "**WARNING** reading/parsing " << startup_path_name << " failed." << endl; +// cout << endl << "**WARNING** Reading/parsing " << startup_path_name << " failed." << endl; // } // // fNSteps = startupHandler->GetNSteps(); diff --git a/src/external/libFitPofB/classes/TVortex.cpp b/src/external/libFitPofB/classes/TVortex.cpp index 3a713ec9..79005f36 100644 --- a/src/external/libFitPofB/classes/TVortex.cpp +++ b/src/external/libFitPofB/classes/TVortex.cpp @@ -168,7 +168,7 @@ TBulkTriVortexLondon::TBulkTriVortexLondon() : fCalcNeeded(true), fFirstCall(tru int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -225,7 +225,7 @@ TBulkSqVortexLondon::TBulkSqVortexLondon() : fCalcNeeded(true), fFirstCall(true) int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -452,7 +452,7 @@ TBulkTriVortexML::TBulkTriVortexML() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -588,7 +588,7 @@ TBulkTriVortexAGL::TBulkTriVortexAGL() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -723,7 +723,7 @@ TBulkTriVortexAGLII::TBulkTriVortexAGLII() : fCalcNeeded(true), fFirstCall(true) int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -871,7 +871,7 @@ TBulkTriVortexNGL::TBulkTriVortexNGL() : fCalcNeeded(true), fFirstCall(true) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -1023,7 +1023,7 @@ TBulkAnisotropicTriVortexLondonGlobal::TBulkAnisotropicTriVortexLondonGlobal() : int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -1262,7 +1262,7 @@ TBulkAnisotropicTriVortexMLGlobal::TBulkAnisotropicTriVortexMLGlobal() : fCalcNe int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -1501,7 +1501,7 @@ TBulkAnisotropicTriVortexAGLGlobal::TBulkAnisotropicTriVortexAGLGlobal() : fCalc int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); diff --git a/src/external/libLFRelaxation/TLFRelaxation.cpp b/src/external/libLFRelaxation/TLFRelaxation.cpp index 9ef20c6b..23d783d6 100644 --- a/src/external/libLFRelaxation/TLFRelaxation.cpp +++ b/src/external/libLFRelaxation/TLFRelaxation.cpp @@ -204,7 +204,7 @@ TLFDynGssKT::TLFDynGssKT() : fCalcNeeded(true), fFirstCall(true), fCounter(0) { int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); @@ -526,7 +526,7 @@ TLFDynExpKT::TLFDynExpKT() : fCalcNeeded(true), fFirstCall(true), fCounter(0), f int status (saxParser->ParseFile(startup_path_name.c_str())); // check for parse errors if (status) { // error - cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \ + cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \ << endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \ << endl; assert(false); diff --git a/src/include/PRunDataHandler.h b/src/include/PRunDataHandler.h index 049afaf7..9ffc1f08 100644 --- a/src/include/PRunDataHandler.h +++ b/src/include/PRunDataHandler.h @@ -46,6 +46,7 @@ using namespace std; class PRunDataHandler { public: + PRunDataHandler(PAny2ManyInfo *any2ManyInfo); PRunDataHandler(PAny2ManyInfo *any2ManyInfo, const PStringVector dataPath); PRunDataHandler(PMsrHandler *msrInfo); PRunDataHandler(PMsrHandler *msrInfo, const PStringVector dataPath); diff --git a/src/musrfit.cpp b/src/musrfit.cpp index 851f6de8..1496285c 100644 --- a/src/musrfit.cpp +++ b/src/musrfit.cpp @@ -445,7 +445,7 @@ int main(int argc, char *argv[]) status = saxParser->ParseFile(startup_path_name); // check for parse errors if (status) { // error - cerr << endl << ">> musrfit **WARNING** reading/parsing musrfit_startup.xml."; + cerr << endl << ">> musrfit **WARNING** Reading/parsing musrfit_startup.xml failed."; cerr << endl; // clean up if (saxParser) { diff --git a/src/musrview.cpp b/src/musrview.cpp index 0c728707..0ea5bc14 100644 --- a/src/musrview.cpp +++ b/src/musrview.cpp @@ -179,7 +179,8 @@ int main(int argc, char *argv[]) status = saxParser->ParseFile(startup_path_name); // check for parse errors if (status) { // error - cerr << endl << ">> musrview **WARNING** reading/parsing musrfit_startup.xml."; + cerr << endl << ">> musrview **WARNING** Reading/parsing musrfit_startup.xml failed."; + cerr << endl << ">> Any graph will appear with random symbols and colors!"; cerr << endl; // clean up if (saxParser) { @@ -190,8 +191,9 @@ int main(int argc, char *argv[]) delete startupHandler; startupHandler = 0; } + } else { + startupHandler->CheckLists(); } - startupHandler->CheckLists(); } // read msr-file