some more options for msr2data added to the GUI
This commit is contained in:
parent
254c79436e
commit
186b83d34b
@ -83,14 +83,15 @@ PFitOutputHandler::PFitOutputHandler(QString workingDirectory, QValueVector<QStr
|
||||
PFitOutputHandler::~PFitOutputHandler()
|
||||
{
|
||||
if (fProc->isRunning()) {
|
||||
qDebug("fProc still running");
|
||||
// qDebug("fProc still running");
|
||||
fProc->kill();
|
||||
}
|
||||
/*
|
||||
if (fProc->isRunning()) {
|
||||
QString msg = "fProc still running ...";
|
||||
qDebug(msg);
|
||||
}
|
||||
|
||||
*/
|
||||
if (fProc) {
|
||||
delete fProc;
|
||||
fProc = 0;
|
||||
|
@ -89,6 +89,8 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam) : fMsr2DataParam
|
||||
fChainFit_checkBox->setChecked(fMsr2DataParam->chainFit);
|
||||
fOpenAfterFitting_checkBox->setChecked(fMsr2DataParam->openFilesAfterFitting);
|
||||
fTitleFromData_checkBox->setChecked(fMsr2DataParam->titleFromDataFile);
|
||||
fCreateMsrFileOnly_checkBox->setChecked(fMsr2DataParam->createMsrFileOnly);
|
||||
fFitOnly_checkBox->setChecked(fMsr2DataParam->fitOnly);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -124,6 +126,8 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
||||
fMsr2DataParam->chainFit = fChainFit_checkBox->isChecked();
|
||||
fMsr2DataParam->openFilesAfterFitting = fOpenAfterFitting_checkBox->isChecked();
|
||||
fMsr2DataParam->titleFromDataFile = fTitleFromData_checkBox->isChecked();
|
||||
fMsr2DataParam->createMsrFileOnly = fCreateMsrFileOnly_checkBox->isChecked();
|
||||
fMsr2DataParam->fitOnly = fFitOnly_checkBox->isChecked();
|
||||
|
||||
return fMsr2DataParam;
|
||||
}
|
||||
@ -196,6 +200,40 @@ void PMsr2DataDialog::runListFileNameEntered(const QString &str)
|
||||
fRunListFileName_lineEdit->setText(str);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
void PMsr2DataDialog::templateRunEntered(const QString &str)
|
||||
{
|
||||
if (!str.isEmpty())
|
||||
fFitOnly_checkBox->setChecked(false);
|
||||
fTemplateRunNumber_lineEdit->setText(str);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
void PMsr2DataDialog::createMsrFileOnlyChanged(int buttonState)
|
||||
{
|
||||
if (buttonState == QButton::On) {
|
||||
fFitOnly_checkBox->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
void PMsr2DataDialog::fitOnlyChanged(int buttonState)
|
||||
{
|
||||
if (buttonState == QButton::On) {
|
||||
fCreateMsrFileOnly_checkBox->setChecked(false);
|
||||
fTemplateRunNumber_lineEdit->clear();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// END
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -48,6 +48,9 @@ class PMsr2DataDialog : public PMsr2DataDialogBase
|
||||
void runLastEntered(const QString&);
|
||||
void runListEntered(const QString&);
|
||||
void runListFileNameEntered(const QString&);
|
||||
void templateRunEntered(const QString&);
|
||||
void createMsrFileOnlyChanged(int);
|
||||
void fitOnlyChanged(int);
|
||||
|
||||
private:
|
||||
int fRunTag; // -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
|
||||
|
@ -1394,6 +1394,8 @@ void PTextEdit::musrMsr2Data()
|
||||
fMsr2DataParam->chainFit = true;
|
||||
fMsr2DataParam->openFilesAfterFitting = false;
|
||||
fMsr2DataParam->titleFromDataFile = fTitleFromDataFile;
|
||||
fMsr2DataParam->createMsrFileOnly = false;
|
||||
fMsr2DataParam->fitOnly = false;
|
||||
}
|
||||
|
||||
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam);
|
||||
@ -1510,8 +1512,8 @@ void PTextEdit::musrMsr2Data()
|
||||
if (!fMsr2DataParam->summaryFilePresent)
|
||||
cmd.append("nosummary");
|
||||
|
||||
// template run no
|
||||
if (fMsr2DataParam->templateRunNo != -1) {
|
||||
// template run no fitting but: (i) no fit only flag, (ii) no create msr-file only flag
|
||||
if ((fMsr2DataParam->templateRunNo != -1) && !fMsr2DataParam->fitOnly && !fMsr2DataParam->createMsrFileOnly) {
|
||||
str = QString("%1").arg(fMsr2DataParam->templateRunNo);
|
||||
str = "fit-" + str;
|
||||
if (!fMsr2DataParam->chainFit) {
|
||||
@ -1520,6 +1522,19 @@ void PTextEdit::musrMsr2Data()
|
||||
cmd.append(str);
|
||||
}
|
||||
|
||||
// template run no AND create msr-file only flag
|
||||
if ((fMsr2DataParam->templateRunNo != -1) && fMsr2DataParam->createMsrFileOnly) {
|
||||
str = QString("%1").arg(fMsr2DataParam->templateRunNo);
|
||||
str = "msr-" + str;
|
||||
cmd.append(str);
|
||||
}
|
||||
|
||||
// fit only
|
||||
if (fMsr2DataParam->fitOnly) {
|
||||
str = "fit";
|
||||
cmd.append(str);
|
||||
}
|
||||
|
||||
// keep minuit2 output
|
||||
if (fMsr2DataParam->keepMinuit2Output) {
|
||||
cmd.append("-k");
|
||||
|
@ -349,22 +349,6 @@
|
||||
<property name="title">
|
||||
<string>template run input</string>
|
||||
</property>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>fTemplateRunNumber_lineEdit</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>27</y>
|
||||
<width>140</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>e.g. 2089</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>fTemplateRunNumber_textLabel</cstring>
|
||||
@ -400,6 +384,22 @@
|
||||
<string>on: chain fit, off: always start from the template run</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>fTemplateRunNumber_lineEdit</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>27</y>
|
||||
<width>140</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>e.g. 2089</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox">
|
||||
<property name="name">
|
||||
@ -591,6 +591,38 @@
|
||||
<string>Take Data File Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>fCreateMsrFileOnly_checkBox</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>400</x>
|
||||
<y>50</y>
|
||||
<width>160</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create msr-File Only</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>fFitOnly_checkBox</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>400</x>
|
||||
<y>70</y>
|
||||
<width>103</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fit Only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<images>
|
||||
@ -635,6 +667,24 @@
|
||||
<receiver>PMsr2DataDialogBase</receiver>
|
||||
<slot>runListFileNameEntered(const QString&)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fCreateMsrFileOnly_checkBox</sender>
|
||||
<signal>stateChanged(int)</signal>
|
||||
<receiver>PMsr2DataDialogBase</receiver>
|
||||
<slot>createMsrFileOnlyChanged(int)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fFitOnly_checkBox</sender>
|
||||
<signal>stateChanged(int)</signal>
|
||||
<receiver>PMsr2DataDialogBase</receiver>
|
||||
<slot>fitOnlyChanged(int)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>fTemplateRunNumber_lineEdit</sender>
|
||||
<signal>textChanged(const QString&)</signal>
|
||||
<receiver>PMsr2DataDialogBase</receiver>
|
||||
<slot>templateRunEntered(const QString&)</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>fFirst_lineEdit</tabstop>
|
||||
@ -659,6 +709,9 @@
|
||||
<slot>runListEntered(const QString&)</slot>
|
||||
<slot>runListFileNameEntered(const QString&)</slot>
|
||||
<slot>runLastEntered(const QString&)</slot>
|
||||
<slot>createMsrFileOnlyChanged(int)</slot>
|
||||
<slot>fitOnlyChanged(int)</slot>
|
||||
<slot>templateRunEntered(const QString&)</slot>
|
||||
</slots>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
</UI>
|
||||
|
@ -50,6 +50,8 @@ typedef struct {
|
||||
bool chainFit;
|
||||
bool openFilesAfterFitting;
|
||||
bool titleFromDataFile;
|
||||
bool createMsrFileOnly;
|
||||
bool fitOnly;
|
||||
} PMsr2DataParam;
|
||||
|
||||
typedef struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user