added to msr2data the flags --estimateN0 and --per-run-block-chisq. Adopted the musredit dialog accordingly. Removed the first/last option form the msr2data dialog since this is handled by the runlist.

This commit is contained in:
suter_a 2017-01-11 17:58:50 +01:00
parent 238dbda037
commit 31f47f6214
13 changed files with 174 additions and 525 deletions

View File

@ -68,7 +68,7 @@ using namespace boost::algorithm;
*/
bool isNumber(const string &s)
{
unsigned int number;
unsigned int number(0);
try {
number = boost::lexical_cast<unsigned int>(s);
return true;
@ -123,8 +123,10 @@ void msr2data_syntax()
cout << endl << " the successive files are generated using the musrfit output from the preceding runs";
cout << endl << " msr-<template> : same as above without calling musrfit";
cout << endl << " In case any fitting option is present, this option is ignored!";
cout << endl << " -k : if fitting is used, pass the option --keep-mn2-output to musrfit";
cout << endl << " -t : if fitting is used, pass the option --title-from-data-file to musrfit";
cout << endl << " -k, --keep-mn2-output : if fitting is used, pass the option --keep-mn2-output to musrfit";
cout << endl << " -t, --title-from-data-file : if fitting is used, pass the option --title-from-data-file to musrfit";
cout << endl << " -e, --estimateN0: estimate N0 for single histogram fits.";
cout << endl << " -p, --per-run-block-chisq: will per run block chisq to the msr-file.";
cout << endl;
cout << endl << " global : switch on the global-fit mode";
cout << endl << " Within that mode all specified runs will be united in a single msr file!";
@ -216,7 +218,10 @@ string msr2data_validArguments(const vector<string> &arg)
for (vector<string>::const_iterator iter(arg.begin()); iter != arg.end(); ++iter) {
if ( (!iter->compare("header")) || (!iter->compare("noheader")) || (!iter->compare("nosummary")) \
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("-t")) \
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("--keep-mn2-output")) \
|| (!iter->compare("-t")) || (!iter->compare("--title-from-data-file")) \
|| (!iter->compare("-e")) || (!iter->compare("--estimateN0")) \
|| (!iter->compare("-p")) || (!iter->compare("--per-run-block-chisq")) \
|| (!iter->compare("data")) || (!iter->substr(0,4).compare("msr-")) || (!iter->compare("global")) \
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) \
|| !iter->compare("paramList") )
@ -265,6 +270,7 @@ string msr2data_outputfile(vector<string> &arg, bool db = true)
if (!iter->compare("-o")) {
if ((iterNext != arg.end()) && (iterNext->compare("header")) && (iterNext->compare("noheader")) && (iterNext->compare("nosummary")) \
&& (iterNext->substr(0,3).compare("fit")) && (iterNext->compare("-k")) && (iterNext->compare("-t")) \
&& (iterNext->compare("-e")) && (iterNext->compare("-p")) \
&& (iterNext->compare("data")) && (iterNext->substr(0,3).compare("msr")) && (iterNext->compare("global")) \
&& (iterNext->compare("global+")) && (iterNext->compare("global+!")) && (iterNext->compare("new"))) {
outputFile = *iterNext;
@ -741,10 +747,14 @@ int main(int argc, char *argv[])
// check if any options should be passed to musrfit
if (temp) {
if (!msr2data_useOption(arg, "-k"))
if (!msr2data_useOption(arg, "-k") || !msr2data_useOption(arg, "--keep-mn2-output"))
musrfitOptions.append("-k ");
if (!msr2data_useOption(arg, "-t"))
if (!msr2data_useOption(arg, "-t") || !msr2data_useOption(arg, "--title-from-data-file"))
musrfitOptions.append("-t ");
if (!msr2data_useOption(arg, "-e") || !msr2data_useOption(arg, "--estimateN0"))
musrfitOptions.append("-e ");
if (!msr2data_useOption(arg, "-p") || !msr2data_useOption(arg, "--per-run-block-chisq"))
musrfitOptions.append("-p ");
}
// if no fitting should be done, check if only the input files should be created

View File

@ -294,6 +294,7 @@ bool PAdminXMLParser::characters(const QString& str)
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.estimateN0 = flag;
fAdmin->setEstimateN0Flag(flag);
break;
case eChisqPreRunBlock:
@ -301,6 +302,7 @@ bool PAdminXMLParser::characters(const QString& str)
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.perRunBlockChisq = flag;
fAdmin->setChisqPerRunBlockFlag(flag);
break;
case eRecentFile:
@ -631,8 +633,6 @@ PAdmin::PAdmin() : QObject()
fEstimateN0 = true;
fChisqPreRunBlock = false;
fMsr2DataParam.firstRun = -1;
fMsr2DataParam.lastRun = -1;
fMsr2DataParam.runList = QString("");
fMsr2DataParam.runListFileName = QString("");
fMsr2DataParam.msrFileExtension = QString("");
@ -641,10 +641,12 @@ PAdmin::PAdmin() : QObject()
fMsr2DataParam.writeDbHeader = true;
fMsr2DataParam.ignoreDataHeaderInfo = false;
fMsr2DataParam.keepMinuit2Output = false;
fMsr2DataParam.estimateN0 = fEstimateN0;
fMsr2DataParam.writeColumnData = false;
fMsr2DataParam.recreateDbFile = false;
fMsr2DataParam.chainFit = true;
fMsr2DataParam.openFilesAfterFitting = true;
fMsr2DataParam.perRunBlockChisq = fChisqPreRunBlock;
fMsr2DataParam.titleFromDataFile = true;
fMsr2DataParam.createMsrFileOnly = false;
fMsr2DataParam.fitOnly = false;

View File

@ -54,18 +54,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fRunTag = -1;
fFirst_lineEdit->setValidator( new QIntValidator(fFirst_lineEdit) );
if (fMsr2DataParam->firstRun != -1) {
str = QString("%1").arg(fMsr2DataParam->firstRun);
fFirst_lineEdit->setText(str);
}
fLast_lineEdit->setValidator( new QIntValidator(fLast_lineEdit) );
if (fMsr2DataParam->lastRun != -1) {
str = QString("%1").arg(fMsr2DataParam->lastRun);
fLast_lineEdit->setText(str);
}
if (!fMsr2DataParam->runListFileName.isEmpty()) {
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
}
@ -95,10 +83,12 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
fWritePerRunBlockChisq_checkBox->setChecked(fMsr2DataParam->perRunBlockChisq);
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
@ -115,16 +105,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
*/
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
{
if (fFirst_lineEdit->text().isEmpty()) {
fMsr2DataParam->firstRun = -1;
} else {
fMsr2DataParam->firstRun = fFirst_lineEdit->text().toInt();
}
if (fLast_lineEdit->text().isEmpty()) {
fMsr2DataParam->lastRun = -1;
} else {
fMsr2DataParam->lastRun = fLast_lineEdit->text().toInt();
}
fMsr2DataParam->runList = fRunList_lineEdit->text();
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
@ -138,10 +118,12 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
fMsr2DataParam->perRunBlockChisq = fWritePerRunBlockChisq_checkBox->isChecked();
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
@ -151,50 +133,6 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
return fMsr2DataParam;
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'First' text field is activated. It clears any
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
*
* \param str string content of the QTextEdit field.
*/
void PMsr2DataDialog::runFirstEntered(const QString &str)
{
if (str.length() == 0)
return;
fRunTag = 0;
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'Last' text field is activated. It clears any
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
*
* \param str string content of the QTextEdit field.
*/
void PMsr2DataDialog::runLastEntered(const QString &str)
{
if (str.length() == 0)
return;
fRunTag = 0;
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
if (fLast_lineEdit->text().length() == 1)
fLast_lineEdit->update();
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
@ -207,12 +145,8 @@ void PMsr2DataDialog::runListEntered(const QString &str)
if (str.length() == 0)
return;
fRunTag = 1;
fRunTag = 0;
if (!fFirst_lineEdit->text().isEmpty())
fFirst_lineEdit->clear();
if (!fLast_lineEdit->text().isEmpty())
fLast_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
}
@ -229,12 +163,8 @@ void PMsr2DataDialog::runListFileNameEntered(const QString &str)
if (str.length() == 0)
return;
fRunTag = 2;
fRunTag = 1;
if (!fFirst_lineEdit->text().isEmpty())
fFirst_lineEdit->clear();
if (!fLast_lineEdit->text().isEmpty())
fLast_lineEdit->clear();
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
}

View File

@ -51,8 +51,6 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
virtual PMsr2DataParam* getMsr2DataParam();
public slots:
void runFirstEntered(const QString&);
void runLastEntered(const QString&);
void runListEntered(const QString&);
void runListFileNameEntered(const QString&);
void templateRunEntered(const QString&);
@ -65,7 +63,7 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
void globalPlusOptionSet(bool checked);
private:
int fRunTag; ///< -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
int fRunTag; ///< -1 = not valid, 0 = run list, 1 = run list file name
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
QString fHelpUrl; ///< help url for the Fourier block
};

View File

@ -1853,6 +1853,8 @@ void PTextEdit::musrMsr2Data()
// init fMsr2DataParam
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
@ -1874,6 +1876,8 @@ void PTextEdit::musrMsr2Data()
fMsr2DataParam = dlg->getMsr2DataParam();
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
// analyze parameters
switch (dlg->getRunTag()) {
@ -1883,20 +1887,10 @@ void PTextEdit::musrMsr2Data()
QMessageBox::Ok, QMessageBox::NoButton);
return;
break;
case 0: // first last
first = QString("%1").arg(fMsr2DataParam->firstRun);
last = QString("%1").arg(fMsr2DataParam->lastRun);
if (first.isEmpty() || last.isEmpty()) {
QMessageBox::critical(this, "**ERROR**",
"If you choose the first/last option,\nfirst AND last needs to be provided.",
QMessageBox::Ok, QMessageBox::NoButton);
return;
}
break;
case 1: // run list
case 0: // run list
runList = fMsr2DataParam->runList;
break;
case 2: // run list file name
case 1: // run list file name
runListFileName = fMsr2DataParam->runListFileName;
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
if (!fi.exists()) {
@ -1923,10 +1917,6 @@ void PTextEdit::musrMsr2Data()
// run list argument
switch (dlg->getRunTag()) {
case 0:
cmd.append(first);
cmd.append(last);
break;
case 1:
end = 0;
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
end++;
@ -1947,7 +1937,7 @@ void PTextEdit::musrMsr2Data()
cmd.append(str);
}
break;
case 2:
case 1:
cmd.append(runListFileName);
break;
default:
@ -2012,6 +2002,16 @@ void PTextEdit::musrMsr2Data()
cmd.append("-t");
}
// estimate N0 (for single histo and muMinus). Add flag only if a fit is done
if (fMsr2DataParam->estimateN0 && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-e");
}
// write per-run-block chisq. Add flag only if a fit is done
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-p");
}
// DB output wished
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
str = "-o" + fMsr2DataParam->dbOutputFileName;
@ -2056,19 +2056,7 @@ void PTextEdit::musrMsr2Data()
if (!fMsr2DataParam->global) { // standard fits
switch(dlg->getRunTag()) {
case 0: // first run / last run list
if (fMsr2DataParam->firstRun != -1) {
for (int i=fMsr2DataParam->firstRun; i<=fMsr2DataParam->lastRun; i++) {
if (fMsr2DataParam->msrFileExtension.isEmpty())
fln = QString("%1").arg(i) + ".msr";
else
fln = QString("%1").arg(i) + fMsr2DataParam->msrFileExtension + ".msr";
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
}
}
break;
case 1: // run list
case 0: // run list
list = getRunList(runList, ok);
if (!ok)
return;
@ -2082,7 +2070,7 @@ void PTextEdit::musrMsr2Data()
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
}
break;
case 2: // run list file
case 1: // run list file
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
if (!file->open(QIODevice::ReadOnly)) {
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
@ -2118,13 +2106,10 @@ void PTextEdit::musrMsr2Data()
// get the first run number needed to build the global fit file name
fln = QString("");
switch(dlg->getRunTag()) {
case 0: // first/last run
fln = QString("%1").arg(fMsr2DataParam->firstRun) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
break;
case 1: // run list
case 0: // run list
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
break;
case 2: // run list file name
case 1: // run list file name
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
if (!file->open(QIODevice::ReadOnly)) {
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);

View File

@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>552</width>
<height>599</height>
<width>584</width>
<height>578</height>
</rect>
</property>
<property name="windowTitle">
@ -25,8 +25,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>551</width>
<height>131</height>
<width>581</width>
<height>111</height>
</rect>
</property>
<property name="font">
@ -47,93 +47,13 @@
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<x>11</x>
<y>30</y>
<width>531</width>
<height>97</height>
<width>561</width>
<height>70</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="fFirst_label">
<property name="text">
<string>First</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="fFirst_lineEdit">
<property name="toolTip">
<string>start run number</string>
</property>
<property name="whatsThis">
<string>start run number</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fLast_label">
<property name="text">
<string>Last</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="fLast_lineEdit">
<property name="toolTip">
<string>end run number</string>
</property>
<property name="whatsThis">
<string>end run number</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>200</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fOrFirstLast_label">
<property name="text">
<string>&lt;b&gt;OR&lt;/b&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
@ -232,8 +152,8 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>0</x>
<y>130</y>
<width>551</width>
<y>110</y>
<width>581</width>
<height>71</height>
</rect>
</property>
@ -245,8 +165,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<width>561</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
@ -262,9 +182,12 @@ p, li { white-space: pre-wrap; }
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>30</width>
<height>20</height>
</size>
</property>
@ -297,8 +220,8 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>0</x>
<y>200</y>
<width>551</width>
<y>180</y>
<width>581</width>
<height>80</height>
</rect>
</property>
@ -311,7 +234,7 @@ p, li { white-space: pre-wrap; }
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
@ -364,8 +287,8 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>0</x>
<y>280</y>
<width>551</width>
<y>260</y>
<width>581</width>
<height>80</height>
</rect>
</property>
@ -378,7 +301,7 @@ p, li { white-space: pre-wrap; }
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
@ -419,8 +342,8 @@ p, li { white-space: pre-wrap; }
<property name="geometry">
<rect>
<x>0</x>
<y>360</y>
<width>551</width>
<y>340</y>
<width>581</width>
<height>172</height>
</rect>
</property>
@ -432,7 +355,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>6</x>
<y>20</y>
<width>541</width>
<width>571</width>
<height>116</height>
</rect>
</property>
@ -473,6 +396,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fEstimateN0_checkBox">
<property name="text">
<string>Estimate N0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -517,6 +447,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fWritePerRunBlockChisq_checkBox">
<property name="text">
<string>Write per-run-block Chisq</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -601,21 +538,24 @@ p, li { white-space: pre-wrap; }
<rect>
<x>170</x>
<y>140</y>
<width>371</width>
<width>401</width>
<height>23</height>
</rect>
</property>
<property name="whatsThis">
<string>parameter numbers to be exported, e.g. 1-16, or 1 3-7, etc.</string>
</property>
<property name="frame">
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>5</x>
<y>540</y>
<width>541</width>
<y>520</y>
<width>571</width>
<height>51</height>
</rect>
</property>
@ -669,8 +609,6 @@ p, li { white-space: pre-wrap; }
</widget>
</widget>
<tabstops>
<tabstop>fFirst_lineEdit</tabstop>
<tabstop>fLast_lineEdit</tabstop>
<tabstop>fRunList_lineEdit</tabstop>
<tabstop>fRunListFileName_lineEdit</tabstop>
<tabstop>fMsrFileExtension_lineEdit</tabstop>
@ -744,38 +682,6 @@ p, li { white-space: pre-wrap; }
</hint>
</hints>
</connection>
<connection>
<sender>fFirst_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runFirstEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>82</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>113</x>
<y>504</y>
</hint>
</hints>
</connection>
<connection>
<sender>fLast_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runLastEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>229</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>348</x>
<y>500</y>
</hint>
</hints>
</connection>
<connection>
<sender>fRunList_lineEdit</sender>
<signal>textChanged(QString)</signal>

View File

@ -41,8 +41,6 @@
* parameters see <code>msr2data --help</code> and the online documentation.
*/
typedef struct {
int firstRun; ///< first run number of a sequence of runs (usage 2 of msr2data)
int lastRun; ///< last run number of a sequence of runs (usage 2 of msr2data)
QString runList; ///< list of run numbers (usage 3 of msr2data)
QString runListFileName; ///< run list filename (usage 4 of msr2data)
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
@ -57,6 +55,8 @@ typedef struct {
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
bool global; ///< flag: true = 'global' option

View File

@ -296,6 +296,7 @@ bool PAdminXMLParser::characters(const QString& str)
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.estimateN0 = flag;
fAdmin->setEstimateN0Flag(flag);
break;
case eChisqPreRunBlock:
@ -303,6 +304,7 @@ bool PAdminXMLParser::characters(const QString& str)
flag = true;
else
flag = false;
fAdmin->fMsr2DataParam.perRunBlockChisq = flag;
fAdmin->setChisqPerRunBlockFlag(flag);
break;
case eRecentFile:
@ -641,8 +643,6 @@ PAdmin::PAdmin() : QObject()
fEstimateN0 = true;
fChisqPreRunBlock = false;
fMsr2DataParam.firstRun = -1;
fMsr2DataParam.lastRun = -1;
fMsr2DataParam.runList = QString("");
fMsr2DataParam.runListFileName = QString("");
fMsr2DataParam.msrFileExtension = QString("");
@ -651,10 +651,12 @@ PAdmin::PAdmin() : QObject()
fMsr2DataParam.writeDbHeader = true;
fMsr2DataParam.ignoreDataHeaderInfo = false;
fMsr2DataParam.keepMinuit2Output = false;
fMsr2DataParam.estimateN0 = fEstimateN0;
fMsr2DataParam.writeColumnData = false;
fMsr2DataParam.recreateDbFile = false;
fMsr2DataParam.chainFit = true;
fMsr2DataParam.openFilesAfterFitting = true;
fMsr2DataParam.perRunBlockChisq = fChisqPreRunBlock;
fMsr2DataParam.titleFromDataFile = true;
fMsr2DataParam.createMsrFileOnly = false;
fMsr2DataParam.fitOnly = false;

View File

@ -54,18 +54,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fRunTag = -1;
fFirst_lineEdit->setValidator( new QIntValidator(fFirst_lineEdit) );
if (fMsr2DataParam->firstRun != -1) {
str = QString("%1").arg(fMsr2DataParam->firstRun);
fFirst_lineEdit->setText(str);
}
fLast_lineEdit->setValidator( new QIntValidator(fLast_lineEdit) );
if (fMsr2DataParam->lastRun != -1) {
str = QString("%1").arg(fMsr2DataParam->lastRun);
fLast_lineEdit->setText(str);
}
if (!fMsr2DataParam->runListFileName.isEmpty()) {
fRunListFileName_lineEdit->setText(fMsr2DataParam->runListFileName);
}
@ -95,10 +83,12 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
fEstimateN0_checkBox->setChecked(fMsr2DataParam->estimateN0);
fWriteColumnData_checkBox->setChecked(fMsr2DataParam->writeColumnData);
fRecreateDataFile_checkBox->setChecked(fMsr2DataParam->recreateDbFile);
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
fOpenFilesAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
fWritePerRunBlockChisq_checkBox->setChecked(fMsr2DataParam->perRunBlockChisq);
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
@ -117,16 +107,6 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
*/
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
{
if (fFirst_lineEdit->text().isEmpty()) {
fMsr2DataParam->firstRun = -1;
} else {
fMsr2DataParam->firstRun = fFirst_lineEdit->text().toInt();
}
if (fLast_lineEdit->text().isEmpty()) {
fMsr2DataParam->lastRun = -1;
} else {
fMsr2DataParam->lastRun = fLast_lineEdit->text().toInt();
}
fMsr2DataParam->runList = fRunList_lineEdit->text();
fMsr2DataParam->runListFileName = fRunListFileName_lineEdit->text();
fMsr2DataParam->msrFileExtension = fMsrFileExtension_lineEdit->text();
@ -140,10 +120,12 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();
fMsr2DataParam->keepMinuit2Output = fKeepMinuit2Output_checkBox->isChecked();
fMsr2DataParam->estimateN0 = fEstimateN0_checkBox->isChecked();
fMsr2DataParam->writeColumnData = fWriteColumnData_checkBox->isChecked();
fMsr2DataParam->recreateDbFile = fRecreateDataFile_checkBox->isChecked();
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
fMsr2DataParam->openFilesAfterFitting = fOpenFilesAfterFitting_checkBox->isChecked();
fMsr2DataParam->perRunBlockChisq = fWritePerRunBlockChisq_checkBox->isChecked();
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
@ -153,50 +135,6 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
return fMsr2DataParam;
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'First' text field is activated. It clears any
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
*
* \param str string content of the QTextEdit field.
*/
void PMsr2DataDialog::runFirstEntered(const QString &str)
{
if (str.length() == 0)
return;
fRunTag = 0;
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'Last' text field is activated. It clears any
* entries in 'Run List' and 'Run List File Name'. It furthermore sets the run tag.
*
* \param str string content of the QTextEdit field.
*/
void PMsr2DataDialog::runLastEntered(const QString &str)
{
if (str.length() == 0)
return;
fRunTag = 0;
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
if (fLast_lineEdit->text().length() == 1)
fLast_lineEdit->update();
}
//----------------------------------------------------------------------------------------------------
/**
* <p>SLOT: called when in the 'Run List Input', the 'Run List' text field is activated. It clears any
@ -209,12 +147,8 @@ void PMsr2DataDialog::runListEntered(const QString &str)
if (str.length() == 0)
return;
fRunTag = 1;
fRunTag = 0;
if (!fFirst_lineEdit->text().isEmpty())
fFirst_lineEdit->clear();
if (!fLast_lineEdit->text().isEmpty())
fLast_lineEdit->clear();
if (!fRunListFileName_lineEdit->text().isEmpty())
fRunListFileName_lineEdit->clear();
}
@ -231,12 +165,8 @@ void PMsr2DataDialog::runListFileNameEntered(const QString &str)
if (str.length() == 0)
return;
fRunTag = 2;
fRunTag = 1;
if (!fFirst_lineEdit->text().isEmpty())
fFirst_lineEdit->clear();
if (!fLast_lineEdit->text().isEmpty())
fLast_lineEdit->clear();
if (!fRunList_lineEdit->text().isEmpty())
fRunList_lineEdit->clear();
}

View File

@ -51,8 +51,6 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
virtual PMsr2DataParam* getMsr2DataParam();
public slots:
void runFirstEntered(const QString&);
void runLastEntered(const QString&);
void runListEntered(const QString&);
void runListFileNameEntered(const QString&);
void templateRunEntered(const QString&);
@ -65,7 +63,7 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
void globalPlusOptionSet(bool checked);
private:
int fRunTag; ///< -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
int fRunTag; ///< -1 = not valid, 0 = run list, 1 = run list file name
PMsr2DataParam *fMsr2DataParam; ///< data structure used to handle the necessary input for msr2data.
QString fHelpUrl; ///< help url for the Fourier block
};

View File

@ -1866,6 +1866,8 @@ void PTextEdit::musrMsr2Data()
// init fMsr2DataParam
fMsr2DataParam->keepMinuit2Output = fAdmin->getKeepMinuit2OutputFlag();
fMsr2DataParam->titleFromDataFile = fAdmin->getTitleFromDataFileFlag();
fMsr2DataParam->estimateN0 = fAdmin->getEstimateN0Flag();
fMsr2DataParam->perRunBlockChisq = fAdmin->getChisqPerRunBlockFlag();
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
@ -1887,6 +1889,8 @@ void PTextEdit::musrMsr2Data()
fMsr2DataParam = dlg->getMsr2DataParam();
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
fAdmin->setTitleFromDataFileFlag(fMsr2DataParam->titleFromDataFile);
fAdmin->setEstimateN0Flag(fMsr2DataParam->estimateN0);
fAdmin->setChisqPerRunBlockFlag(fMsr2DataParam->perRunBlockChisq);
// analyze parameters
switch (dlg->getRunTag()) {
@ -1896,20 +1900,10 @@ void PTextEdit::musrMsr2Data()
QMessageBox::Ok, QMessageBox::NoButton);
return;
break;
case 0: // first last
first = QString("%1").arg(fMsr2DataParam->firstRun);
last = QString("%1").arg(fMsr2DataParam->lastRun);
if (first.isEmpty() || last.isEmpty()) {
QMessageBox::critical(this, "**ERROR**",
"If you choose the first/last option,\nfirst AND last needs to be provided.",
QMessageBox::Ok, QMessageBox::NoButton);
return;
}
break;
case 1: // run list
case 0: // run list
runList = fMsr2DataParam->runList;
break;
case 2: // run list file name
case 1: // run list file name
runListFileName = fMsr2DataParam->runListFileName;
fi.setFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + runListFileName);
if (!fi.exists()) {
@ -1936,10 +1930,6 @@ void PTextEdit::musrMsr2Data()
// run list argument
switch (dlg->getRunTag()) {
case 0:
cmd.append(first);
cmd.append(last);
break;
case 1:
end = 0;
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
end++;
@ -1960,7 +1950,7 @@ void PTextEdit::musrMsr2Data()
cmd.append(str);
}
break;
case 2:
case 1:
cmd.append(runListFileName);
break;
default:
@ -2025,6 +2015,16 @@ void PTextEdit::musrMsr2Data()
cmd.append("-t");
}
// estimate N0 (makes sence for single histo and muMinus fits only). Add flag only if a fit is done
if (fMsr2DataParam->estimateN0 && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-e");
}
// write per-run-block chisq. Add flag only if a fit is done
if (fMsr2DataParam->perRunBlockChisq && (fMsr2DataParam->fitOnly || fMsr2DataParam->templateRunNo != -1)) {
cmd.append("-p");
}
// DB output wished
if (!fMsr2DataParam->dbOutputFileName.isEmpty()) {
str = "-o" + fMsr2DataParam->dbOutputFileName;
@ -2068,19 +2068,7 @@ void PTextEdit::musrMsr2Data()
if (!fMsr2DataParam->global) { // standard fits
switch(dlg->getRunTag()) {
case 0: // first run / last run list
if (fMsr2DataParam->firstRun != -1) {
for (int i=fMsr2DataParam->firstRun; i<=fMsr2DataParam->lastRun; i++) {
if (fMsr2DataParam->msrFileExtension.isEmpty())
fln = QString("%1").arg(i) + ".msr";
else
fln = QString("%1").arg(i) + fMsr2DataParam->msrFileExtension + ".msr";
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
}
}
break;
case 1: // run list
case 0: // run list
list = getRunList(runList, ok);
if (!ok)
return;
@ -2094,7 +2082,7 @@ void PTextEdit::musrMsr2Data()
load(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fln);
}
break;
case 2: // run list file
case 1: // run list file
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
if (!file->open(QIODevice::ReadOnly)) {
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);
@ -2130,13 +2118,10 @@ void PTextEdit::musrMsr2Data()
// get the first run number needed to build the global fit file name
fln = QString("");
switch(dlg->getRunTag()) {
case 0: // first/last run
fln = QString("%1").arg(fMsr2DataParam->firstRun) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
break;
case 1: // run list
case 0: // run list
fln = runList.section(" ", 0, 0, QString::SectionSkipEmpty) + QString("+global") + fMsr2DataParam->msrFileExtension + QString(".msr");
break;
case 2: // run list file name
case 1: // run list file name
file = new QFile(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath() + "/" + fMsr2DataParam->runListFileName);
if (!file->open(QIODevice::ReadOnly)) {
str = QString("Couldn't open run list file %1, sorry.").arg(fMsr2DataParam->runListFileName);

View File

@ -9,7 +9,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>552</width>
<width>585</width>
<height>594</height>
</rect>
</property>
@ -25,8 +25,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>551</width>
<height>131</height>
<width>581</width>
<height>111</height>
</rect>
</property>
<property name="font">
@ -44,96 +44,16 @@
<property name="checkable">
<bool>false</bool>
</property>
<widget class="QWidget" name="layoutWidget">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>531</width>
<height>97</height>
<width>561</width>
<height>70</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="fFirst_label">
<property name="text">
<string>First</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="fFirst_lineEdit">
<property name="toolTip">
<string>start run number</string>
</property>
<property name="whatsThis">
<string>start run number</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fLast_label">
<property name="text">
<string>Last</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="fLast_lineEdit">
<property name="toolTip">
<string>end run number</string>
</property>
<property name="statusTip">
<string>end run number</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>200</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fOrFirstLast_label">
<property name="text">
<string>&lt;b&gt;OR&lt;/b&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
@ -219,8 +139,8 @@
<property name="geometry">
<rect>
<x>0</x>
<y>130</y>
<width>551</width>
<y>110</y>
<width>581</width>
<height>71</height>
</rect>
</property>
@ -232,8 +152,8 @@
<rect>
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<width>561</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
@ -249,9 +169,12 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>30</width>
<height>20</height>
</size>
</property>
@ -284,8 +207,8 @@
<property name="geometry">
<rect>
<x>0</x>
<y>200</y>
<width>551</width>
<y>180</y>
<width>581</width>
<height>80</height>
</rect>
</property>
@ -297,8 +220,8 @@
<rect>
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<width>561</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
@ -346,8 +269,8 @@
<property name="geometry">
<rect>
<x>0</x>
<y>280</y>
<width>551</width>
<y>260</y>
<width>581</width>
<height>80</height>
</rect>
</property>
@ -359,8 +282,8 @@
<rect>
<x>10</x>
<y>30</y>
<width>531</width>
<height>29</height>
<width>561</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
@ -401,9 +324,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>360</y>
<width>551</width>
<height>171</height>
<y>340</y>
<width>581</width>
<height>191</height>
</rect>
</property>
<property name="title">
@ -414,8 +337,8 @@
<rect>
<x>6</x>
<y>20</y>
<width>541</width>
<height>116</height>
<width>560</width>
<height>131</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
@ -451,6 +374,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fEstimateN0_checkBox">
<property name="text">
<string>Estimate N0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -485,6 +415,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fWritePerRunBlockChisq_checkBox">
<property name="text">
<string>Write per-run-block Chisq</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -551,7 +488,7 @@
<property name="geometry">
<rect>
<x>9</x>
<y>143</y>
<y>160</y>
<width>141</width>
<height>16</height>
</rect>
@ -566,9 +503,9 @@
<widget class="QLineEdit" name="fParamList_lineEdit">
<property name="geometry">
<rect>
<x>150</x>
<y>140</y>
<width>395</width>
<x>164</x>
<y>157</y>
<width>401</width>
<height>23</height>
</rect>
</property>
@ -582,7 +519,7 @@
<rect>
<x>5</x>
<y>540</y>
<width>541</width>
<width>571</width>
<height>51</height>
</rect>
</property>
@ -636,8 +573,6 @@
</widget>
</widget>
<tabstops>
<tabstop>fFirst_lineEdit</tabstop>
<tabstop>fLast_lineEdit</tabstop>
<tabstop>fRunList_lineEdit</tabstop>
<tabstop>fRunListFileName_lineEdit</tabstop>
<tabstop>fMsrFileExtension_lineEdit</tabstop>
@ -712,38 +647,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>fFirst_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runFirstEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>82</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>113</x>
<y>504</y>
</hint>
</hints>
</connection>
<connection>
<sender>fLast_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runLastEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>229</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>348</x>
<y>500</y>
</hint>
</hints>
</connection>
<connection>
<sender>fRunList_lineEdit</sender>
<signal>textChanged(QString)</signal>

View File

@ -41,8 +41,6 @@
* parameters see <code>msr2data --help</code> and the online documentation.
*/
typedef struct {
int firstRun; ///< first run number of a sequence of runs (usage 2 of msr2data)
int lastRun; ///< last run number of a sequence of runs (usage 2 of msr2data)
QString runList; ///< list of run numbers (usage 3 of msr2data)
QString runListFileName; ///< run list filename (usage 4 of msr2data)
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
@ -57,6 +55,8 @@ typedef struct {
bool chainFit; ///< flag: true = chain fit, i.e. the template for a fit is the preceeding run. false = the template is always the source for the new msr-file
bool openFilesAfterFitting; ///< flag: true = open msr-file after fit in musredit. false = do not open msr-file after fit.
bool titleFromDataFile; ///< flag indicating if the title for the msr-file shall be extracted from the data-file ('-t' in msr2data)
bool estimateN0; ///< flag indicating if the N0 shall be estimated for single histogram fitting
bool perRunBlockChisq; ///< flag indicating if per-run-block-chisq shall be dumped into the msr-file
bool createMsrFileOnly; ///< flag: true = just create the msr-files without any fitting ('msr-<template>' in msr2data)
bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data).
bool global; ///< flag: true = 'global' option