diff --git a/src/classes/PStartupHandler.cpp b/src/classes/PStartupHandler.cpp index 5660ea88..6ce00364 100644 --- a/src/classes/PStartupHandler.cpp +++ b/src/classes/PStartupHandler.cpp @@ -178,10 +178,6 @@ void PStartupHandler::OnStartDocument() fFourierDefaults.fPlotRange[0] = -1.0; fFourierDefaults.fPlotRange[1] = -1.0; fFourierDefaults.fPhaseIncrement = 1.0; - - fStartupOptions.writeExpectedChisq = false; - fStartupOptions.estimateN0 = true; - fStartupOptions.alphaEstimateN0 = 0.0; } //-------------------------------------------------------------------------- @@ -210,12 +206,6 @@ void PStartupHandler::OnStartElement(const Char_t *str, const TList *attributes) { if (!strcmp(str, "data_path")) { fKey = eDataPath; - } else if (!strcmp(str, "write_per_run_block_chisq")) { - fKey = eWritePerRunBlockChisq; - } else if (!strcmp(str, "estimate_n0")) { - fKey = eEstimateN0; - } else if (!strcmp(str, "alpha_estimate_n0")) { - fKey = eAlphaEstimateN0; } else if (!strcmp(str, "marker")) { fKey = eMarker; } else if (!strcmp(str, "color")) { @@ -270,21 +260,6 @@ void PStartupHandler::OnCharacters(const Char_t *str) // add str to the path list fDataPathList.push_back(str); break; - case eWritePerRunBlockChisq: - tstr = TString(str); - if (tstr.BeginsWith("y") || tstr.BeginsWith("Y")) - fStartupOptions.writeExpectedChisq = true; - break; - case eEstimateN0: - tstr = TString(str); - if (tstr.BeginsWith("n") || tstr.BeginsWith("N")) - fStartupOptions.estimateN0 = false; - break; - case eAlphaEstimateN0: - tstr = TString(str); - if (tstr.IsFloat()) - fStartupOptions.alphaEstimateN0 = tstr.Atof(); - break; case eMarker: // check that str is a number tstr = TString(str); diff --git a/src/include/PMusr.h b/src/include/PMusr.h index 96df487f..d093cbfa 100644 --- a/src/include/PMusr.h +++ b/src/include/PMusr.h @@ -815,12 +815,11 @@ typedef struct { //------------------------------------------------------------- /** - *

Holds the informations for the any2many converter program + *

Holds the informations */ typedef struct { Bool_t writeExpectedChisq; ///< if set to true, expected chisq per block will be written Bool_t estimateN0; ///< if set to true, for single histogram fits N0 will be estimated - Double_t alphaEstimateN0; ///< relates the Bkg to N0, i.e. Bkg = alpha*N0 } PStartupOptions; //------------------------------------------------------------- diff --git a/src/include/PStartupHandler.h b/src/include/PStartupHandler.h index 9125a67b..89602014 100644 --- a/src/include/PStartupHandler.h +++ b/src/include/PStartupHandler.h @@ -73,17 +73,15 @@ class PStartupHandler : public TObject, public TQObject virtual void CheckLists(); - virtual PStartupOptions* GetStartupOptions() { return &fStartupOptions; } ///< returns the startup options virtual PMsrFourierStructure GetFourierDefaults() { return fFourierDefaults; } ///< returns the Fourier defaults virtual const PStringVector GetDataPathList() const { return fDataPathList; } ///< returns the search data path list virtual const PIntVector GetMarkerList() const { return fMarkerList; } ///< returns the marker list virtual const PIntVector GetColorList() const { return fColorList; } ///< returns the color list - virtual void SetStartupOptions(const PStartupOptions opt) { fStartupOptions = opt; } - private: - enum EKeyWords {eEmpty, eComment, eDataPath, eOptions, eWritePerRunBlockChisq, eEstimateN0, eAlphaEstimateN0, - eFourierSettings, eUnits, eFourierPower, eApodization, ePlot, ePhase, ePhaseIncrement, + enum EKeyWords {eEmpty, eComment, eDataPath, eOptions, + eFourierSettings, eUnits, eFourierPower, + eApodization, ePlot, ePhase, ePhaseIncrement, eRootSettings, eMarkerList, eMarker, eColorList, eColor}; EKeyWords fKey; ///< xml filter key @@ -94,7 +92,6 @@ class PStartupHandler : public TObject, public TQObject PStringVector fDataPathList; ///< search data path list PIntVector fMarkerList; ///< marker list PIntVector fColorList; ///< color list - PStartupOptions fStartupOptions; ///< collects all startup options which will be requested by PMsrFileHandler Bool_t StartupFileExists(Char_t *fln); diff --git a/src/musrfit.cpp b/src/musrfit.cpp index 0bb0bd2d..aa6200a1 100644 --- a/src/musrfit.cpp +++ b/src/musrfit.cpp @@ -104,9 +104,8 @@ void musrfit_syntax() cout << endl << " -t, --title-from-data-file: will replace the run title by the"; cout << endl << " run title of the FIRST run of the run block, if a run title"; cout << endl << " is present in the data file."; - cout << endl << " -e, --estimateN0: estimate N0 for single histogram fits flag. can have the values 'yes' or 'no'."; + cout << endl << " -e, --estimateN0: estimate N0 for single histogram fits."; cout << endl << " -p, --per-run-block-chisq: will write per run block chisq to the msr-file."; - cout << endl << " can have the values 'yes' or 'no'."; cout << endl << " --dump is writing a data file with the fit data and the theory"; cout << endl << " can be 'ascii', 'root'"; cout << endl << " --timeout : overwrites to predefined timeout of " << timeout << " (sec)."; @@ -444,8 +443,7 @@ int main(int argc, char *argv[]) bool timeout_enabled = true; PStartupOptions startup_options; startup_options.writeExpectedChisq = false; - startup_options.estimateN0 = true; - startup_options.alphaEstimateN0 = 0.0; + startup_options.estimateN0 = false; TString dump(""); char filename[1024]; @@ -496,39 +494,9 @@ int main(int argc, char *argv[]) break; } } else if (!strcmp(argv[i], "-e") || !strcmp(argv[i], "--estimateN0")) { - if (i with unsupported = " << argv[i+1] << endl; - show_syntax = true; - break; - } - i++; - } else { - cerr << endl << "musrfit: **ERROR** found option --estimateN0 without " << endl; - show_syntax = true; - break; - } + startup_options.estimateN0 = true; } else if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "--per-run-block-chisq")) { - if (i with unsupported = " << argv[i+1] << endl; - show_syntax = true; - break; - } - i++; - } else { - cerr << endl << "musrfit: **ERROR** found option --per-run-block-chisq without " << endl; - show_syntax = true; - break; - } + startup_options.writeExpectedChisq = true; } else if (!strcmp(argv[i], "--timeout")) { if (iSetStartupOptions(startup_options); // read msr-file PMsrHandler *msrHandler = 0; if (startupHandler) - msrHandler = new PMsrHandler(filename, startupHandler->GetStartupOptions()); + msrHandler = new PMsrHandler(filename, &startup_options); else msrHandler = new PMsrHandler(filename); status = msrHandler->ReadMsrFile(); diff --git a/src/musrfit_startup.xml b/src/musrfit_startup.xml index daf13703..3aa5ab57 100644 --- a/src/musrfit_startup.xml +++ b/src/musrfit_startup.xml @@ -14,11 +14,6 @@ /afs/psi.ch/project/bulkmusr/data/alc /afs/psi.ch/project/bulkmusr/data/hifi /afs/psi.ch/project/bulkmusr/data/lem - - n - yes - 0.0 - Gauss 0