merge master

This commit is contained in:
2016-08-09 14:05:40 +02:00
128 changed files with 1421 additions and 517 deletions

View File

@ -1643,13 +1643,23 @@ bool PMsr2Data::PrepareNewSortedInputFile(unsigned int tempRun) const
* - -2 if a fit has not converged (and the data is not appended to the output file)
*
* \param outfile name of the DB/ASCII output file
* \param paramList parameter list which shall be written to the output file
* \param db DB or plain ASCII output
* \param withHeader write output file header or not
* \param global global mode or not
* \param counter counter used within the global mode to determine how many runs have been processed already
*/
int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHeader, bool global, unsigned int counter) const
int PMsr2Data::WriteOutput(const string &outfile, const vector<unsigned int>& paramList, bool db,
unsigned int withHeader, bool global, unsigned int counter) const
{
// make sure that the parameter number of the parameter list stays within proper bounds
for (unsigned int i=0; i<paramList.size(); i++) {
if (paramList[i] > fMsrHandler->GetMsrParamList()->size()) {
cerr << "msr2data: **ERROR** found parameter " << paramList[i] << " which is out of bound (>" << fMsrHandler->GetMsrParamList()->size() << ")." << endl;
return -1;
}
}
if (!to_lower_copy(outfile).compare("none")) {
fRunVectorIter++;
return PMUSR_SUCCESS;
@ -2008,7 +2018,7 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
if (fDataHandler) {
for (unsigned int i(0); i < dataParamLabels.size(); ++i) {
outFile << dataParamLabels[i] << endl;
outFile << dataParamLabels[i] << endl;
}
}
@ -2022,22 +2032,26 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
if (global) {
string tempName;
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
outFile << (*msrParamList)[i].fName.Data() << endl;
if (InParameterList(i, paramList))
outFile << (*msrParamList)[i].fName.Data() << endl;
}
for (unsigned int i(0); i < fNumSpecParam; ++i) {
tempName = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << tempName.substr(0, loc) << endl;
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
if (InParameterList(fNumGlobalParam + fNumSpecParam*counter + i, paramList)) {
tempName = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << tempName.substr(0, loc) << endl;
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
outFile << (*msrParamList)[i].fName.Data() << endl;
if (InParameterList(i, paramList))
outFile << (*msrParamList)[i].fName.Data() << endl;
}
}
@ -2073,22 +2087,26 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
if (global) {
string tempName;
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
outFile << " " << (*msrParamList)[i].fName.Data();
if (InParameterList(i, paramList))
outFile << " " << (*msrParamList)[i].fName.Data();
}
for (unsigned int i(0); i < fNumSpecParam; ++i) {
tempName = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << " " << tempName.substr(0, loc);
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
if (InParameterList(i, paramList)) {
tempName = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << " " << tempName.substr(0, loc);
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
outFile << " " << (*msrParamList)[i].fName.Data();
if (InParameterList(i, paramList))
outFile << " " << (*msrParamList)[i].fName.Data();
}
}
@ -2132,61 +2150,67 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
string tempName;
unsigned int idx;
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
outFile << (*msrParamList)[i].fName.Data() << " = ";
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[i].fValue << ", ";
}
if (InParameterList(i, paramList)) {
outFile << (*msrParamList)[i].fName.Data() << " = ";
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[i].fValue << ", ";
}
if ((*msrParamList)[i].fPosErrorPresent)
outFile << (*msrParamList)[i].fPosError << ", ";
else
outFile << fabs((*msrParamList)[i].fStep) << ", ";
outFile << fabs((*msrParamList)[i].fStep) << ",\\" << endl;
if ((*msrParamList)[i].fPosErrorPresent)
outFile << (*msrParamList)[i].fPosError << ", ";
else
outFile << fabs((*msrParamList)[i].fStep) << ", ";
outFile << fabs((*msrParamList)[i].fStep) << ",\\" << endl;
}
}
for (unsigned int i(0); i < fNumSpecParam; ++i) {
idx = fNumGlobalParam + fNumSpecParam*counter + i;
tempName = (*msrParamList)[idx].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << tempName.substr(0, loc) << " = ";
if ((*msrParamList)[idx].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[idx].fValue, (*msrParamList)[idx].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[idx].fValue << ", ";
}
if ((*msrParamList)[idx].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[idx].fPosError, (*msrParamList)[idx].fPosError, outFile.width(), db);
outFile << ", ";
} else {
if (InParameterList(idx, paramList)) {
tempName = (*msrParamList)[idx].fName.Data();
string::size_type loc = tempName.rfind(curRunNumber.str());
if (loc == tempName.length() - fRunNumberDigits) {
outFile << tempName.substr(0, loc) << " = ";
if ((*msrParamList)[idx].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[idx].fValue, (*msrParamList)[idx].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[idx].fValue << ", ";
}
if ((*msrParamList)[idx].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[idx].fPosError, (*msrParamList)[idx].fPosError, outFile.width(), db);
outFile << ", ";
} else {
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, outFile.width(), db);
outFile << ", ";
}
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, outFile.width(), db);
outFile << ", ";
outFile << ",\\" << endl;
}
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, outFile.width(), db);
outFile << ",\\" << endl;
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
outFile << (*msrParamList)[i].fName.Data() << " = ";
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[i].fValue << ", ";
}
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
if (InParameterList(i, paramList)) {
outFile << (*msrParamList)[i].fName.Data() << " = ";
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
outFile << (*msrParamList)[i].fValue << ", ";
}
if ((*msrParamList)[i].fPosErrorPresent) {
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, outFile.width(), db);
outFile << ", ";
} else {
WriteValue(outFile, (*msrParamList)[i].fStep, (*msrParamList)[i].fStep, outFile.width(), db);
outFile << ", ";
}
WriteValue(outFile, (*msrParamList)[i].fStep, (*msrParamList)[i].fStep, outFile.width(), db);
outFile << ", ";
outFile << ",\\" << endl;
}
WriteValue(outFile, (*msrParamList)[i].fStep, (*msrParamList)[i].fStep, outFile.width(), db);
outFile << ",\\" << endl;
}
}
@ -2221,30 +2245,38 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
string s;
if (global) {
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
s = (*msrParamList)[i].fName.Data();
length = s.length();
if (length > maxlength)
maxlength = length;
}
for (unsigned int i(0); i < fNumSpecParam; ++i) {
s = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = s.rfind(curRunNumber.str());
if (loc == s.length() - fRunNumberDigits) {
length = s.length() - fRunNumberDigits;
if (InParameterList(i, paramList)) {
s = (*msrParamList)[i].fName.Data();
length = s.length();
if (length > maxlength)
maxlength = length;
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
unsigned int idx;
for (unsigned int i(0); i < fNumSpecParam; ++i) {
idx = fNumGlobalParam + fNumSpecParam*counter + i;
if (InParameterList(idx, paramList)) {
s = (*msrParamList)[idx].fName.Data();
string::size_type loc = s.rfind(curRunNumber.str());
if (loc == s.length() - fRunNumberDigits) {
length = s.length() - fRunNumberDigits;
if (length > maxlength)
maxlength = length;
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
s = (*msrParamList)[i].fName.Data();
length = s.length();
if (length > maxlength)
maxlength = length;
if (InParameterList(i, paramList)) {
s = (*msrParamList)[i].fName.Data();
length = s.length();
if (length > maxlength)
maxlength = length;
}
}
}
if (maxlength < 13)
@ -2274,31 +2306,39 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
// in the GLOBAL mode write only global parameters and those which belong to the actual run - in the NORMAL mode write all parameters
if (global) {
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
s = (*msrParamList)[i].fName.Data();
outFile << setw(maxlength) << left << s \
<< setw(maxlength + 6) << left << s + "PosErr" \
<< setw(maxlength + 6) << left << s + "NegErr";
}
for (unsigned int i(0); i < fNumSpecParam; ++i) {
s = (*msrParamList)[fNumGlobalParam + fNumSpecParam*counter + i].fName.Data();
string::size_type loc = s.rfind(curRunNumber.str());
if (loc == s.length() - fRunNumberDigits) {
s = s.substr(0, loc);
if (InParameterList(i, paramList)) {
s = (*msrParamList)[i].fName.Data();
outFile << setw(maxlength) << left << s \
<< setw(maxlength + 6) << left << s + "PosErr" \
<< setw(maxlength + 6) << left << s + "NegErr";
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
unsigned int idx;
for (unsigned int i(0); i < fNumSpecParam; ++i) {
idx = fNumGlobalParam + fNumSpecParam*counter + i;
if (InParameterList(idx, paramList)) {
s = (*msrParamList)[idx].fName.Data();
string::size_type loc = s.rfind(curRunNumber.str());
if (loc == s.length() - fRunNumberDigits) {
s = s.substr(0, loc);
outFile << setw(maxlength) << left << s \
<< setw(maxlength + 6) << left << s + "PosErr" \
<< setw(maxlength + 6) << left << s + "NegErr";
} else {
cerr << endl << ">> msr2data: **ERROR** The run index of some parameter does not match the run number being processed!";
cerr << endl << ">> msr2data: **ERROR** The output will be flawed!";
cerr << endl;
}
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
s = (*msrParamList)[i].fName.Data();
outFile << setw(maxlength) << left << s \
<< setw(maxlength + 6) << left << s + "PosErr" \
<< setw(maxlength + 6) << left << s + "NegErr";
if (InParameterList(i, paramList)) {
s = (*msrParamList)[i].fName.Data();
outFile << setw(maxlength) << left << s \
<< setw(maxlength + 6) << left << s + "PosErr" \
<< setw(maxlength + 6) << left << s + "NegErr";
}
}
}
s.clear();
@ -2340,46 +2380,52 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead
// in the GLOBAL mode write only global parameters and those which belong to the actual run - in the NORMAL mode write all parameters
if (global) {
for (unsigned int i(0); i < fNumGlobalParam; ++i) {
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[i].fValue, maxlength);
if (InParameterList(i, paramList)) {
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[i].fValue, maxlength);
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, fabs((*msrParamList)[i].fStep), (*msrParamList)[i].fStep, maxlength, db);
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, fabs((*msrParamList)[i].fStep), (*msrParamList)[i].fStep, maxlength, db);
WriteValue(outFile, fabs((*msrParamList)[i].fStep), (*msrParamList)[i].fStep, maxlength, db);
}
}
unsigned int idx;
for (unsigned int i(0); i < fNumSpecParam; ++i) {
idx = fNumGlobalParam + fNumSpecParam*counter + i;
if ((*msrParamList)[idx].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[idx].fValue, (*msrParamList)[idx].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[idx].fValue, maxlength);
if (InParameterList(idx, paramList)) {
if ((*msrParamList)[idx].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[idx].fValue, (*msrParamList)[idx].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[idx].fValue, maxlength);
if ((*msrParamList)[idx].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[idx].fPosError, (*msrParamList)[idx].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, maxlength, db);
if ((*msrParamList)[idx].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[idx].fPosError, (*msrParamList)[idx].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, maxlength, db);
WriteValue(outFile, (*msrParamList)[idx].fStep, (*msrParamList)[idx].fStep, maxlength, db);
}
}
} else {
for (unsigned int i(0); i < msrNoOfParams; ++i) {
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[i].fValue, maxlength);
if (InParameterList(i, paramList)) {
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fValue, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, (*msrParamList)[i].fValue, maxlength);
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, fabs((*msrParamList)[i].fStep), fabs((*msrParamList)[i].fStep), maxlength, db);
if ((*msrParamList)[i].fPosErrorPresent)
WriteValue(outFile, (*msrParamList)[i].fPosError, (*msrParamList)[i].fPosError, maxlength, db);
else
WriteValue(outFile, fabs((*msrParamList)[i].fStep), fabs((*msrParamList)[i].fStep), maxlength, db);
WriteValue(outFile, fabs((*msrParamList)[i].fStep), fabs((*msrParamList)[i].fStep), maxlength, db);
}
}
}
@ -2505,6 +2551,24 @@ int PMsr2Data::GetFirstSignificantDigit(const double &value) const
return prec+1;
}
//-------------------------------------------------------------
/**
*
*/
bool PMsr2Data::InParameterList(const unsigned int &paramValue, const vector<unsigned int> &paramList) const
{
// if paramList.size() == 0, i.e. use ALL parameters
if (paramList.size() == 0)
return true;
for (unsigned int i=0; i<paramList.size(); i++) {
if (paramValue+1 == paramList[i])
return true;
}
return false;
}
//-------------------------------------------------------------------------------------------------------
// end
//-------------------------------------------------------------------------------------------------------

View File

@ -187,15 +187,7 @@ Double_t PRunAsymmetryRRF::CalcChiSquare(const std::vector<Double_t>& par)
// calculate chi square
Double_t time(1.0);
Int_t i, N(static_cast<Int_t>(fData.GetValue()->size()));
// In order not to have an IF in the next loop, determine the start and end bins for the fit range now
Int_t startTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (startTimeBin < 0)
startTimeBin = 0;
Int_t endTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (endTimeBin > N)
endTimeBin = N;
Int_t i;
// Calculate the theory function once to ensure one function evaluation for the current set of parameters.
// This is needed for the LF and user functions where some non-thread-save calculations only need to be calculated once
@ -204,12 +196,12 @@ Double_t PRunAsymmetryRRF::CalcChiSquare(const std::vector<Double_t>& par)
asymFcnValue = fTheory->Func(time, par, fFuncValues);
#ifdef HAVE_GOMP
Int_t chunk = (endTimeBin - startTimeBin)/omp_get_num_procs();
Int_t chunk = (fEndTimeBin - fStartTimeBin)/omp_get_num_procs();
if (chunk < 10)
chunk = 10;
#pragma omp parallel for default(shared) private(i,time,diff,asymFcnValue,a,b,f) schedule(dynamic,chunk) reduction(+:chisq)
#endif
for (i=startTimeBin; i<endTimeBin; ++i) {
for (i=fStartTimeBin; i<fEndTimeBin; ++i) {
time = fData.GetDataTimeStart() + (Double_t)i*fData.GetDataTimeStep();
switch (fAlphaBetaTag) {
case 1: // alpha == 1, beta == 1
@ -387,15 +379,15 @@ void PRunAsymmetryRRF::SetFitRangeBin(const TString fitRange)
void PRunAsymmetryRRF::CalcNoOfFitBins()
{
// In order not having to loop over all bins and to stay consistent with the chisq method, calculate the start and end bins explicitly
Int_t startTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (startTimeBin < 0)
startTimeBin = 0;
Int_t endTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (endTimeBin > static_cast<Int_t>(fData.GetValue()->size()))
endTimeBin = fData.GetValue()->size();
fStartTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (fStartTimeBin < 0)
fStartTimeBin = 0;
fEndTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (fEndTimeBin > static_cast<Int_t>(fData.GetValue()->size()))
fEndTimeBin = fData.GetValue()->size();
if (endTimeBin > startTimeBin)
fNoOfFitBins = endTimeBin - startTimeBin;
if (fEndTimeBin > fStartTimeBin)
fNoOfFitBins = fEndTimeBin - fStartTimeBin;
else
fNoOfFitBins = 0;
}

View File

@ -58,13 +58,16 @@ using namespace std;
PRunSingleHistoRRF::PRunSingleHistoRRF() : PRunBase()
{
fNoOfFitBins = 0;
fBackground = 0;
fBackground = 0.0;
fBkgErr = 1.0;
fRRFPacking = -1;
// the 2 following variables are need in case fit range is given in bins, and since
// the fit range can be changed in the command block, these variables need to be accessible
fGoodBins[0] = -1;
fGoodBins[1] = -1;
fN0EstimateEndTime = 1.0; // end time in (us) over which N0 is estimated.
}
//--------------------------------------------------------------------------
@ -112,6 +115,8 @@ PRunSingleHistoRRF::PRunSingleHistoRRF(PMsrHandler *msrInfo, PRunDataHandler *ra
fGoodBins[0] = -1;
fGoodBins[1] = -1;
fN0EstimateEndTime = 1.0; // end time in (us) over which N0 is estimated.
if (!PrepareData()) {
cerr << endl << ">> PRunSingleHistoRRF::PRunSingleHistoRRF(): **SEVERE ERROR**: Couldn't prepare data for fitting!";
cerr << endl << ">> This is very bad :-(, will quit ...";
@ -155,15 +160,7 @@ Double_t PRunSingleHistoRRF::CalcChiSquare(const std::vector<Double_t>& par)
// calculate chi square
Double_t time(1.0);
Int_t i, N(static_cast<Int_t>(fData.GetValue()->size()));
// In order not to have an IF in the next loop, determine the start and end bins for the fit range now
Int_t startTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (startTimeBin < 0)
startTimeBin = 0;
Int_t endTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (endTimeBin > N)
endTimeBin = N;
Int_t i;
// Calculate the theory function once to ensure one function evaluation for the current set of parameters.
// This is needed for the LF and user functions where some non-thread-save calculations only need to be calculated once
@ -172,12 +169,12 @@ Double_t PRunSingleHistoRRF::CalcChiSquare(const std::vector<Double_t>& par)
time = fTheory->Func(time, par, fFuncValues);
#ifdef HAVE_GOMP
Int_t chunk = (endTimeBin - startTimeBin)/omp_get_num_procs();
Int_t chunk = (fEndTimeBin - fStartTimeBin)/omp_get_num_procs();
if (chunk < 10)
chunk = 10;
#pragma omp parallel for default(shared) private(i,time,diff) schedule(dynamic,chunk) reduction(+:chisq)
#endif
for (i=startTimeBin; i<endTimeBin; ++i) {
for (i=fStartTimeBin; i<fEndTimeBin; ++i) {
time = fData.GetDataTimeStart() + (Double_t)i*fData.GetDataTimeStep();
diff = fData.GetValue()->at(i) - fTheory->Func(time, par, fFuncValues);
chisq += diff*diff / (fData.GetError()->at(i)*fData.GetError()->at(i));
@ -211,15 +208,7 @@ Double_t PRunSingleHistoRRF::CalcChiSquareExpected(const std::vector<Double_t>&
// calculate chi square
Double_t time(1.0);
Int_t i, N(static_cast<Int_t>(fData.GetValue()->size()));
// In order not to have an IF in the next loop, determine the start and end bins for the fit range now
Int_t startTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (startTimeBin < 0)
startTimeBin = 0;
Int_t endTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (endTimeBin > N)
endTimeBin = N;
Int_t i;
// Calculate the theory function once to ensure one function evaluation for the current set of parameters.
// This is needed for the LF and user functions where some non-thread-save calculations only need to be calculated once
@ -228,12 +217,12 @@ Double_t PRunSingleHistoRRF::CalcChiSquareExpected(const std::vector<Double_t>&
time = fTheory->Func(time, par, fFuncValues);
#ifdef HAVE_GOMP
Int_t chunk = (endTimeBin - startTimeBin)/omp_get_num_procs();
Int_t chunk = (fEndTimeBin - fStartTimeBin)/omp_get_num_procs();
if (chunk < 10)
chunk = 10;
#pragma omp parallel for default(shared) private(i,time,diff) schedule(dynamic,chunk) reduction(+:chisq)
#endif
for (i=startTimeBin; i < endTimeBin; ++i) {
for (i=fStartTimeBin; i < fEndTimeBin; ++i) {
time = fData.GetDataTimeStart() + (Double_t)i*fData.GetDataTimeStep();
theo = fTheory->Func(time, par, fFuncValues);
diff = fData.GetValue()->at(i) - theo;
@ -408,15 +397,15 @@ void PRunSingleHistoRRF::SetFitRangeBin(const TString fitRange)
void PRunSingleHistoRRF::CalcNoOfFitBins()
{
// In order not having to loop over all bins and to stay consistent with the chisq method, calculate the start and end bins explicitly
Int_t startTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (startTimeBin < 0)
startTimeBin = 0;
Int_t endTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (endTimeBin > static_cast<Int_t>(fData.GetValue()->size()))
endTimeBin = fData.GetValue()->size();
fStartTimeBin = static_cast<Int_t>(ceil((fFitStartTime - fData.GetDataTimeStart())/fData.GetDataTimeStep()));
if (fStartTimeBin < 0)
fStartTimeBin = 0;
fEndTimeBin = static_cast<Int_t>(floor((fFitEndTime - fData.GetDataTimeStart())/fData.GetDataTimeStep())) + 1;
if (fEndTimeBin > static_cast<Int_t>(fData.GetValue()->size()))
fEndTimeBin = fData.GetValue()->size();
if (endTimeBin > startTimeBin)
fNoOfFitBins = endTimeBin - startTimeBin;
if (fEndTimeBin > fStartTimeBin)
fNoOfFitBins = fEndTimeBin - fStartTimeBin;
else
fNoOfFitBins = 0;
}
@ -604,6 +593,9 @@ Bool_t PRunSingleHistoRRF::PrepareFitData(PRawRunData* runData, const UInt_t his
if (!EstimateBkg(histoNo))
return false;
}
// subtract background from fForward
for (UInt_t i=0; i<fForward.size(); i++)
fForward[i] -= fBackground;
} else { // fixed background given
for (UInt_t i=0; i<fForward.size(); i++) {
fForward[i] -= fRunInfo->GetBkgFix(0);
@ -624,7 +616,7 @@ Bool_t PRunSingleHistoRRF::PrepareFitData(PRawRunData* runData, const UInt_t his
exp_t_tau = exp(time_tau);
fForward[i] *= exp_t_tau;
fM.push_back(fForward[i]); // i.e. M(t) = [N(t)-Nbkg] exp(+t/tau); needed to estimate N0 later on
fMerr.push_back(exp_t_tau*sqrt(rawNt[i]-fBackground));
fMerr.push_back(exp_t_tau*sqrt(rawNt[i]+fBkgErr*fBkgErr));
}
// calculate weights
@ -632,7 +624,7 @@ Bool_t PRunSingleHistoRRF::PrepareFitData(PRawRunData* runData, const UInt_t his
if (fMerr[i] > 0.0)
fW.push_back(1.0/(fMerr[i]*fMerr[i]));
else
fW.push_back(0.0);
fW.push_back(1.0);
}
// now fForward = exp(+t/tau) [N(t)-Nbkg] = M(t)
@ -1071,6 +1063,9 @@ Double_t PRunSingleHistoRRF::GetMainFrequency(PDoubleVector &data)
if (power->GetBinContent(i)>power->GetBinContent(i+1))
continue;
}
// ignore everything below 10 MHz
if (power->GetBinCenter(i) < 10.0)
continue;
// check for maximum
if (power->GetBinContent(i) > maxFreqVal) {
maxFreqVal = power->GetBinContent(i);
@ -1101,15 +1096,17 @@ Double_t PRunSingleHistoRRF::EstimateN0(Double_t &errN0, Double_t freqMax)
{
// endBin is estimated such that the number of full cycles (according to the maximum frequency of the data)
// is approximately the time fN0EstimateEndTime.
Int_t endBin = (Int_t)round(fN0EstimateEndTime / fTimeResolution * ceil(freqMax)/freqMax);
Int_t endBin = (Int_t)round(ceil(fN0EstimateEndTime*freqMax/TMath::TwoPi()) * (TMath::TwoPi()/freqMax) / fTimeResolution);
Double_t n0 = 0.0;
Double_t wN = 0.0;
for (Int_t i=0; i<endBin; i++) {
n0 += fW[i]*fM[i];
// n0 += fW[i]*fM[i];
n0 += fM[i];
wN += fW[i];
}
n0 /= wN;
// n0 /= wN;
n0 /= endBin;
errN0 = 0.0;
for (Int_t i=0; i<endBin; i++) {
@ -1197,7 +1194,12 @@ Bool_t PRunSingleHistoRRF::EstimateBkg(UInt_t histoNo)
fBackground = bkg; // keep background (per bin)
cout << endl << "info> fBackground=" << fBackground << endl;
bkg = 0.0;
for (UInt_t i=start; i<end; i++)
bkg += pow(fForward[i]-fBackground, 2.0);
fBkgErr = sqrt(bkg/(static_cast<Double_t>(end - start)));
cout << endl << "info> fBackground=" << fBackground << "(" << fBkgErr << ")" << endl;
fRunInfo->SetBkgEstimated(fBackground, 0);

View File

@ -97,7 +97,6 @@ PStartupHandler::PStartupHandler()
Char_t *home=0;
Char_t musrpath[128];
Char_t startup_path_name[128];
Bool_t found = false;
strncpy(musrpath, "", sizeof(musrpath));
@ -106,32 +105,39 @@ PStartupHandler::PStartupHandler()
if (StartupFileExists(startup_path_name)) {
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
} else { // startup file is not found in the current directory
}
if (!fStartupFileFound) { // startup file not found in the current directory
// check if the startup file is found under $HOME/.musrfit
home = getenv("HOME");
if (home != 0) {
sprintf(musrpath, "%s/.musrfit", home);
found = true;
}
pmusrpath = getenv("MUSRFITPATH");
if (!found) {
// check if the MUSRFITPATH system variable is set
if (pmusrpath != 0) {
if (strcmp(pmusrpath, "")) { // MUSRFITPATH variable set but empty
found = true;
}
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
if (StartupFileExists(startup_path_name)) {
fStartupFilePath = TString(startup_path_name);
fStartupFileFound = true;
}
}
if (!found) { // MUSRFITPATH not set or empty, will try default one
home = getenv("ROOTSYS");
}
if (!fStartupFileFound) { // startup file not found in $HOME/.musrfit
// check if the MUSRFITPATH system variable is set
pmusrpath = getenv("MUSRFITPATH");
if (pmusrpath != 0) {
sprintf(startup_path_name, "%s/musrfit_startup.xml", pmusrpath);
if (StartupFileExists(startup_path_name)) {
fStartupFilePath = TString(startup_path_name);
fStartupFileFound = true;
}
}
}
if (!fStartupFileFound) { // MUSRFITPATH not set or empty, will try $ROOTSYS/bin
home = getenv("ROOTSYS");
if (home != 0) {
sprintf(musrpath, "%s/bin", home);
cerr << endl << "**WARNING** MUSRFITPATH environment variable not set will try " << musrpath << endl;
}
sprintf(startup_path_name, "%s/musrfit_startup.xml", musrpath);
fStartupFilePath = TString(startup_path_name);
if (StartupFileExists(startup_path_name)) {
fStartupFileFound = true;
sprintf(startup_path_name, "%s/musrfit_startup.xml", musrpath);
if (StartupFileExists(startup_path_name)) {
fStartupFilePath = TString(startup_path_name);
fStartupFileFound = true;
}
}
}
}

View File

@ -71,7 +71,7 @@ class PMsr2Data
bool PrepareNewInputFile(unsigned int, bool) const; // template
bool PrepareGlobalInputFile(unsigned int, const string&, unsigned int) const; // generate msr-input file for a global fit
int WriteOutput(const string&, bool, unsigned int, bool global = false, unsigned int counter = 0) const;
int WriteOutput(const string&, const vector<unsigned int>&, bool, unsigned int, bool global = false, unsigned int counter = 0) const;
private:
bool PrepareNewSortedInputFile(unsigned int) const; // template
@ -80,6 +80,7 @@ class PMsr2Data
void WriteValue(fstream &outFile, const double &value, const unsigned int &width) const;
void WriteValue(fstream &outFile, const double &value, const double &errValue, const unsigned int &width, const bool &db) const;
int GetFirstSignificantDigit(const double &value) const;
bool InParameterList(const unsigned int &paramValue, const vector<unsigned int>&) const;
string fFileExtension;
vector<unsigned int> fRunVector;

View File

@ -52,6 +52,9 @@ class PRunAsymmetryRRF : public PRunBase
virtual void SetFitRangeBin(const TString fitRange);
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
protected:
virtual void CalcNoOfFitBins();
virtual Bool_t PrepareData();
@ -70,6 +73,9 @@ class PRunAsymmetryRRF : public PRunBase
Int_t fGoodBins[4]; ///< keep first/last good bins. 0=fgb, 1=lgb (forward); 2=fgb, 3=lgb (backward)
Int_t fStartTimeBin; ///< bin at which the fit starts
Int_t fEndTimeBin; ///< bin at which the fit ends
Bool_t SubtractFixBkg();
Bool_t SubtractEstimatedBkg();

View File

@ -51,6 +51,9 @@ class PRunSingleHistoRRF : public PRunBase
virtual void SetFitRangeBin(const TString fitRange);
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
protected:
virtual void CalcNoOfFitBins();
virtual Bool_t PrepareData();
@ -58,14 +61,18 @@ class PRunSingleHistoRRF : public PRunBase
virtual Bool_t PrepareViewData(PRawRunData* runData, const UInt_t histoNo);
private:
static constexpr Double_t fN0EstimateEndTime = 1.0; ///< end time in (us) over which N0 is estimated. Should eventually be estimated automatically ...
Double_t fN0EstimateEndTime; ///< end time in (us) over which N0 is estimated.
UInt_t fNoOfFitBins; ///< number of bins to be fitted
Double_t fBackground; ///< needed if background range is given (units: 1/bin)
Double_t fBkgErr; ///< estimate error on the estimated background
Int_t fRRFPacking; ///< RRF packing for this particular run. Given in the GLOBAL-block.
Int_t fGoodBins[2]; ///< keep first/last good bins. 0=fgb, 1=lgb
Int_t fStartTimeBin; ///< bin at which the fit starts
Int_t fEndTimeBin; ///< bin at which the fit ends
PDoubleVector fForward; ///< forward histo data
PDoubleVector fM; ///< vector holding M(t) = [N(t)-N_bkg] exp(+t/tau). Needed to estimate N0.
PDoubleVector fMerr; ///< vector holding the error of M(t): M_err = exp(+t/tau) sqrt(N(t)).

View File

@ -49,6 +49,7 @@
using namespace std;
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() in std::string
using namespace boost::algorithm;
@ -84,14 +85,10 @@ bool isNumber(const string &s)
void msr2data_syntax()
{
cout << endl << "usage 0: msr2data [--version] | [--help]";
cout << endl << "usage 1: msr2data <run> <extension> [-o<outputfile>] [new] [data] [[no]header] [nosummary] [global[+[!]]]";
cout << endl << " [fit [-k] [-t] | fit-<template>[!] [-k] [-t] | msr-<template>]";
cout << endl << "usage 2: msr2data <run1> <run2> <extension> [-o<outputfile>] [new] [data] [[no]header] [nosummary] [global[+[!]]]";
cout << endl << " [fit [-k] [-t] | fit-<template>[!] [-k] [-t] | msr-<template>]";
cout << endl << "usage 3: msr2data \\[<runList>\\] <extension> [-o<outputfile> ] [new] [data] [[no]header] [nosummary] [global[+[!]]]";
cout << endl << " [fit [-k] [-t] | fit-<template>[!] [-k] [-t] | msr-<template>]";
cout << endl << "usage 4: msr2data <runlist> <extension> [-o<outputfile>] [new] [data] [[no]header] [nosummary] [global[+[!]]]";
cout << endl << " [fit [-k] [-t] | fit-<template>[!] [-k] [-t] | msr-<template>]";
cout << endl << "usage 1: msr2data <run> <extension> options";
cout << endl << "usage 2: msr2data <run1> <run2> <extension> options";
cout << endl << "usage 3: msr2data \\[<runList>\\] <extension> options";
cout << endl << "usage 4: msr2data <runListFileName> <extension> options";
cout << endl;
cout << endl << " <runList> can be:";
cout << endl << " (i) <run0>, <run1>, <run2>, ... <runN> : run numbers, e.g. 123 124";
@ -99,7 +96,12 @@ void msr2data_syntax()
cout << endl << " (iii) <run0>:<runN>:<step> : a sequence, e.g. 123:127:2 -> 123 125 127";
cout << endl << " <step> will give the step width and has to be a positive number!";
cout << endl << " a <runList> can also combine (i)-(iii), e.g. 123 128-130 133, etc.";
cout << endl << " <runListFileName> : an ASCII file containing a list of run numbers and optional";
cout << endl << " external parameters is passed to msr2data. For details see";
cout << endl << " the online documentation: http://lmu.web.psi.ch/musrfit/user/MUSR/Msr2Data.html";
cout << endl << " <extension> : msr-file extension, e.g. _tf_h13 for the file name 8472_tf_h13.msr";
cout << endl;
cout << endl << "options:";
cout << endl << " -o<outputfile> : specify the name of the DB or column-data output file; default: out.db/out.dat";
cout << endl << " if the option '-o none' is used, no output file will be written.";
cout << endl << " new : before writing a new output file, delete the contents of any existing file with the same name";
@ -109,6 +111,10 @@ void msr2data_syntax()
cout << endl << " If either none or both of the header options are given, the file header will be written";
cout << endl << " if a new file is created, but not if the output file exists already!";
cout << endl << " nosummary : no additional data from the run data file is written to the output file";
cout << endl << " paramList <param> : option used to select the parameters which shall be exported.";
cout << endl << " <param> is a list of parameter numbers to be exported. Allowed lists are:";
cout << endl << " 1-16 will export parameters 1 to 16. 1 3 5 will export parameters 1 3 5.";
cout << endl << " A combination of both is possible, e.g. 1-16 19 31 62, and so on.";
cout << endl << " fit : invoke musrfit to fit the specified runs";
cout << endl << " All msr input files are assumed to be present, none is newly generated!";
cout << endl << " fit-<template>! : generate msr files for the runs to be processed from the <template> run";
@ -149,6 +155,10 @@ void msr2data_syntax()
cout << endl << " will use 2045_tf_histo.msr as templete, and subsequently generating msr-files from the run-list:";
cout << endl << " 2047 2049 2051 2053 2056 (2047_tf_histo.msr etc.) and fit them.";
cout << endl;
cout << endl << " msr2data 2046 2058 _tf_histo paramList 1-12 data -o fitParam.dat";
cout << endl << " will export the parameters number 1 trough 12 in a column like fashion of the runs 2046 to 2058,";
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";
@ -208,7 +218,8 @@ string msr2data_validArguments(const vector<string> &arg)
if ( (!iter->compare("header")) || (!iter->compare("noheader")) || (!iter->compare("nosummary")) \
|| (!iter->substr(0,3).compare("fit")) || (!iter->compare("-k")) || (!iter->compare("-t")) \
|| (!iter->compare("data")) || (!iter->substr(0,4).compare("msr-")) || (!iter->compare("global")) \
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) )
|| (!iter->compare("global+")) || (!iter->compare("global+!")) || (!iter->compare("new")) \
|| !iter->compare("paramList") )
word.clear();
else if (!iter->substr(0,2).compare("-o")) {
word.clear();
@ -393,6 +404,91 @@ int msr2data_doInputCreation(vector<string> &arg, bool &inputOnly)
return temp;
}
//--------------------------------------------------------------------------
/**
* <p>
*
*/
int msr2data_paramList(vector<string> &arg, vector<unsigned int> &paramList)
{
paramList.clear(); // make sure paramList is empty
unsigned int idx=0;
// check if paramList tag is present
for (unsigned int i=0; i<arg.size(); i++) {
if (!arg[i].compare("paramList")) {
idx = i+1;
break;
}
}
if (idx == 0) { // paramList tag NOT present
return 0;
}
// make sure there are parameter list elements to follow
if (idx == arg.size()) {
cerr << endl << "**ERROR** found paramList without any arguments!" << endl;
msr2data_syntax();
return -1;
}
// paramList tag present and further elements present: collect them
vector<string> str;
unsigned int idx_end=0;
size_t pos=string::npos;
for (unsigned int i=idx; i<arg.size(); i++) {
pos = arg[i].find("-");
if (pos == 0) { // likely something like -o, -k, etc.
idx_end = i;
break;
} else if (pos != string::npos) { // looks like a parameter list like n0-n1
boost::split(str, arg[i], boost::is_any_of("-"));
if (str.size() != 2) { // something is wrong, since the structure n0-n1 is expected
cerr << endl << "**ERROR** found token " << arg[i] << " in paramList command which cannot be handled." << endl;
msr2data_syntax();
return -1;
}
if (!str[0].compare("fit") || !str[0].compare("msr")) {
idx_end = i;
break;
}
if (!isNumber(str[0]) || !isNumber(str[1])) {
cerr << endl << "**ERROR** found token " << arg[i] << " in paramList command which cannot be handled." << endl;
msr2data_syntax();
return -1;
}
unsigned int start=boost::lexical_cast<unsigned int>(str[0]);
unsigned int end=boost::lexical_cast<unsigned int>(str[1]);
for (unsigned int j=start; j<=end; j++)
paramList.push_back(j);
} else if (isNumber(arg[i])) { // a single number
paramList.push_back(boost::lexical_cast<unsigned int>(arg[i]));
} else { // likely the next argument not related to paramList
idx_end = i;
break;
}
}
if (idx_end == 0)
idx_end = arg.size();
// remove all the paramList arguments for arg
arg.erase(arg.begin()+idx-1, arg.begin()+idx_end);
// go through the parameter list and make sure the values are unique
for (unsigned int i=0; i<paramList.size(); i++) {
for (unsigned int j=i+1; j<paramList.size(); j++) {
if (paramList[i] == paramList[j]) {
cerr << endl << "**ERROR** the parameter list numbers have to be unique. Found " << paramList[i] << " at least 2 times." << endl;
msr2data_syntax();
return -1;
}
}
}
return paramList.size();
}
//--------------------------------------------------------------------------
/**
* <p>msr2data is used to generate msr-files based on template msr-files, automatically fit these new msr-files,
@ -441,6 +537,7 @@ int main(int argc, char *argv[])
vector<unsigned int> run_vec;
string run_list;
string msrExtension;
vector<unsigned int> param_vec;
try {
if (arg[0].at(0) == '[') { // In case a list of runs is given by [...]
@ -557,7 +654,14 @@ int main(int argc, char *argv[])
return -1;
}
// check the validity of the command line given command line arguments
// check if parameter list is given
int noParamList(msr2data_paramList(arg, param_vec));
if (noParamList == -1) {
arg.clear();
return -1;
}
// check the validity of the command line given command line arguments
string wrongArgument(msr2data_validArguments(arg));
if (!wrongArgument.empty()) {
cerr << endl;
@ -567,18 +671,18 @@ int main(int argc, char *argv[])
return -1;
}
// check if the output format is DB or data
// check if the output format is DB or data
bool db(msr2data_useOption(arg, "data"));
// check the arguments for the "-o" option and set the output filename
// check the arguments for the "-o" option and set the output filename
string outputFile(msr2data_outputfile(arg, db));
// introduce check, if no output should be generated - in that case we do not need msrfile and rundata handlers later
// introduce check, if no output should be generated - in that case we do not need msrfile and rundata handlers later
bool realOutput(true);
if (!to_lower_copy(outputFile).compare("none"))
realOutput = false;
// create the msr2data-object and set the run numbers according to the runTAG above
// create the msr2data-object and set the run numbers according to the runTAG above
PMsr2Data *msr2dataHandler = new PMsr2Data(msrExtension);
int status;
@ -615,7 +719,7 @@ int main(int argc, char *argv[])
run_vec.clear();
// check if fitting should be done and in case, which template run number to use
// check if fitting should be done and in case, which template run number to use
int temp(0);
bool chainfit(true), onlyInputCreation(false);
string musrfitOptions;
@ -635,7 +739,7 @@ int main(int argc, char *argv[])
}
// check if any options should be passed to musrfit
// check if any options should be passed to musrfit
if (temp) {
if (!msr2data_useOption(arg, "-k"))
musrfitOptions.append("-k ");
@ -643,9 +747,8 @@ int main(int argc, char *argv[])
musrfitOptions.append("-t ");
}
// if no fitting should be done, check if only the input files should be created
if(!temp) {
// if no fitting should be done, check if only the input files should be created
if (!temp) {
temp = msr2data_doInputCreation(arg, onlyInputCreation);
if (onlyInputCreation) {
// if only input files should be created, do not write data to an output file (no matter, what has been determined earlier)
@ -672,8 +775,8 @@ int main(int argc, char *argv[])
globalMode = 2;
}
// At this point it should be clear if any template for input-file generation is given or not.
// Therefore, the number of digits in the run number format is determined only here.
// At this point it should be clear if any template for input-file generation is given or not.
// Therefore, the number of digits in the run number format is determined only here.
if(temp > 0) {
status = msr2dataHandler->DetermineRunNumberDigits(temp, setNormalMode);
} else {
@ -685,7 +788,7 @@ int main(int argc, char *argv[])
return status;
}
// Check if all given run numbers are covered by the formatting of the data file name
// Check if all given run numbers are covered by the formatting of the data file name
status = msr2dataHandler->CheckRunNumbersInRange();
if(status) {
cerr << endl;
@ -736,7 +839,7 @@ int main(int argc, char *argv[])
}
}
// GLOBAL MODE
// GLOBAL MODE
if (!setNormalMode) {
ostringstream strInfile;
strInfile << msr2dataHandler->GetPresentRun() << "+global" << msrExtension << ".msr";
@ -798,7 +901,7 @@ int main(int argc, char *argv[])
while (msr2dataHandler->GetPresentRun()) {
// write DB or dat file
status = msr2dataHandler->WriteOutput(outputFile, db, writeHeader, !setNormalMode, counter);
status = msr2dataHandler->WriteOutput(outputFile, param_vec, db, writeHeader, !setNormalMode, counter);
if (status == -1) {
msr2data_cleanup(msr2dataHandler, arg);
return status;
@ -842,7 +945,7 @@ int main(int argc, char *argv[])
}
}
// and do the fitting
// and do the fitting
if (!onlyInputCreation) {
// check if MUSRFITPATH is set, if not issue a warning
string path("");
@ -866,12 +969,12 @@ int main(int argc, char *argv[])
}
}
// read msr-file
// read msr-file
if (realOutput) {
status = msr2dataHandler->ReadMsrFile(strInfile.str());
if (status != PMUSR_SUCCESS) {
// if the msr-file cannot be read, write no output but proceed to the next run
status = msr2dataHandler->WriteOutput("none", db, writeHeader);
status = msr2dataHandler->WriteOutput("none", param_vec, db, writeHeader);
if (status == -1) {
msr2data_cleanup(msr2dataHandler, arg);
return status;
@ -881,12 +984,12 @@ int main(int argc, char *argv[])
}
}
// read data files
// read data files
if (writeSummary)
status = msr2dataHandler->ReadRunDataFile();
// write DB or dat file
status = msr2dataHandler->WriteOutput(outputFile, db, writeHeader);
// write DB or dat file
status = msr2dataHandler->WriteOutput(outputFile, param_vec, db, writeHeader);
if (status == -1) {
msr2data_cleanup(msr2dataHandler, arg);
return status;
@ -899,7 +1002,7 @@ int main(int argc, char *argv[])
// Unfortunately, this can be done in a coherent way only on that level
// Unfortunately, there are also problems with boost::filesystem::exists(outputFile)
// Therefore, first try to open the file for reading and if this works, write to it - not clean but it works
if(realOutput) {
if (realOutput) {
fileOutput = new fstream;
fileOutput->open(outputFile.c_str(), ios::in);
if (fileOutput->is_open()) {

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2012-2014 by Andreas Suter *
* Copyright (C) 2012-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2012-2014 by Andreas Suter *
* Copyright (C) 2012-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2015 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2015 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -88,6 +88,10 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fDataOutputFileName_lineEdit->setText(fMsr2DataParam->dbOutputFileName);
}
if (!fMsr2DataParam->paramList.isEmpty()) {
fParamList_lineEdit->setText(fMsr2DataParam->paramList);
}
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
@ -129,6 +133,7 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
} else {
fMsr2DataParam->templateRunNo = fTemplateRunNumber_lineEdit->text().toInt();
}
fMsr2DataParam->paramList = fParamList_lineEdit->text();
fMsr2DataParam->dbOutputFileName = fDataOutputFileName_lineEdit->text();
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -1870,6 +1870,8 @@ void PTextEdit::musrMsr2Data()
QFileInfo fi;
QString str;
int i, end;
QStringList list;
bool ok;
fMsr2DataParam = dlg->getMsr2DataParam();
fAdmin->setKeepMinuit2OutputFlag(fMsr2DataParam->keepMinuit2Output);
@ -1963,6 +1965,14 @@ void PTextEdit::musrMsr2Data()
// options
// parameter export list
if (!fMsr2DataParam->paramList.isEmpty()) {
cmd.append("paramList");
QStringList list = fMsr2DataParam->paramList.split(' ');
for (int i=0; i<list.size(); i++)
cmd.append(list[i]);
}
// no header flag?
if (!fMsr2DataParam->writeDbHeader)
cmd.append("noheader");
@ -2061,12 +2071,11 @@ void PTextEdit::musrMsr2Data()
}
break;
case 1: // run list
end = 0;
while (!runList.section(' ', end, end, QString::SectionSkipEmpty).isEmpty()) {
end++;
}
for (int i=0; i<end; i++) {
fln = runList.section(' ', i, i, QString::SectionSkipEmpty);
list = getRunList(runList, ok);
if (!ok)
return;
for (int i=0; i<list.size(); i++) {
fln = list[i];
if (fMsr2DataParam->msrFileExtension.isEmpty())
fln += ".msr";
else
@ -2636,6 +2645,58 @@ void PTextEdit::fillRecentFiles()
}
}
//----------------------------------------------------------------------------------------------------
/**
* <p> run list is split (space separated) and expanded (start-end -> start, start+1, ..., end) to a list
*
* \param runListStr list to be split and expanded
* \param ok true if everything is fine; false if an error has been encountered
*
* \return fully expanded run list
*/
QStringList PTextEdit::getRunList(QString runListStr, bool &ok)
{
QStringList result;
bool isInt;
QString str;
ok = true;
// first split space separated parts
QStringList tok = runListStr.split(' ', QString::SkipEmptyParts);
for (int i=0; i<tok.size(); i++) {
if (tok[i].contains('-')) { // list given, hence need to expand
QStringList runListTok = tok[i].split('-', QString::SkipEmptyParts);
if (runListTok.size() != 2) { // error
ok = false;
result.clear();
return result;
}
int start=0, end=0;
start = runListTok[0].toInt(&isInt);
if (!isInt) {
ok = false;
result.clear();
return result;
}
end = runListTok[1].toInt(&isInt);
if (!isInt) {
ok = false;
result.clear();
return result;
}
for (int i=start; i<=end; i++) {
str = QString("%1").arg(i);
result << str;
}
} else { // keep it
result << tok[i];
}
}
return result;
}
//----------------------------------------------------------------------------------------------------
// END
//----------------------------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -31,6 +31,8 @@
#define _PTEXTEDIT_H_
#include <QMainWindow>
#include <QString>
#include <QStringList>
#include <QMap>
#include <QTimer>
#include <QString>
@ -175,6 +177,7 @@ private:
QAction *fRecentFilesAction[MAX_RECENT_FILES]; ///< array of the recent file actions
void fillRecentFiles();
QStringList getRunList(QString runListStr, bool &ok);
};

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>552</width>
<height>551</height>
<height>599</height>
</rect>
</property>
<property name="windowTitle">
@ -64,7 +64,14 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fFirst_lineEdit"/>
<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">
@ -90,7 +97,14 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fLast_lineEdit"/>
<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">
@ -130,7 +144,19 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fRunList_lineEdit"/>
<widget class="QLineEdit" name="fRunList_lineEdit">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The run list consists of a collection of run number. Accepted input formats are:&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(i) &amp;lt;run0&amp;gt; &amp;lt;run1&amp;gt; ... &amp;lt;runN&amp;gt;, e.g. 124 126 129&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(ii) &amp;lt;run0&amp;gt;-&amp;lt;runN&amp;gt;, e.g. 124-126, i.e. 124 125 126&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(iii) &amp;lt;run0&amp;gt;:&amp;lt;runN&amp;gt;:&amp;lt;step&amp;gt;, e.g 124:128:2, i.e. 124 126 128&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;or combination of those three.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
@ -170,7 +196,16 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fRunListFileName_lineEdit"/>
<widget class="QLineEdit" name="fRunListFileName_lineEdit">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;an ASCII file containing a list of run numbers and optional external parameters is passed to msr2data. &lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;For details see the online documentation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
@ -236,7 +271,11 @@
</spacer>
</item>
<item>
<widget class="QLineEdit" name="fMsrFileExtension_lineEdit"/>
<widget class="QLineEdit" name="fMsrFileExtension_lineEdit">
<property name="whatsThis">
<string>the extension will be used together with the run number to generate the msr-file name. For example: the run number being 123 and the extension _tf_h13, an msr-file name 123_tf_h13.msr will result.</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
@ -284,10 +323,22 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fTemplateRunNumber_lineEdit"/>
<widget class="QLineEdit" name="fTemplateRunNumber_lineEdit">
<property name="whatsThis">
<string>the run number given here will be used as a msr-file template number to generate/fit the run's given in the 'Run List Input'.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="fChainFit_checkBox">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;unselected means: all msr-files generated and fitted will start from the given template.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;selected means: the msr-files generated and fitted will use the previously fitted msr-file as an input. This makes sense if the run list given has continously changing parameters, e.g. as function of the temperature.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Chain Fit</string>
</property>
@ -339,7 +390,11 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="fDataOutputFileName_lineEdit"/>
<widget class="QLineEdit" name="fDataOutputFileName_lineEdit">
<property name="whatsThis">
<string>db- or dat-output file name for the parameter files.</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
@ -366,7 +421,7 @@
<x>0</x>
<y>360</y>
<width>551</width>
<height>141</height>
<height>172</height>
</rect>
</property>
<property name="title">
@ -386,6 +441,9 @@
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QCheckBox" name="fWriteDataHeader_checkBox">
<property name="whatsThis">
<string>For db-files, a Data Header will be written.</string>
</property>
<property name="text">
<string>Write Data Header</string>
</property>
@ -393,6 +451,13 @@
</item>
<item>
<widget class="QCheckBox" name="fIgnoreDataHeaderInfo_checkBox">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This tag is used in conjunction with LEM. If &lt;span style=&quot; font-weight:600;&quot;&gt;not&lt;/span&gt; selected, it will try to extract experiment specific parameters from the data file like implantation energy, transport HV settings, etc.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Ignore Data Header Info</string>
</property>
@ -400,6 +465,9 @@
</item>
<item>
<widget class="QCheckBox" name="fKeepMinuit2Output_checkBox">
<property name="whatsThis">
<string>selected: for each run fitted, two additional files will be written, namely a &lt;msr-filename&gt;-mn2.output and &lt;msr-filename&gt;-mn2.root, which contain a richer set of information about fit, i.e. the covariance matrix, the correlation coefficients, etc.</string>
</property>
<property name="text">
<string>Keep Minuit2 Output</string>
</property>
@ -411,6 +479,14 @@
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="fWriteColumnData_checkBox">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;unselected: the output parameter file is written in so called db-format.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;selected: the output parameter file is written in column like ascii-format.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Write Column Data</string>
</property>
@ -418,6 +494,14 @@
</item>
<item>
<widget class="QCheckBox" name="fRecreateDataFile_checkBox">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;unselected: if the parameter output file already exists, the parameters will be appended.&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;selected: if the parameter output file already exists: it will be deleted and a new one will be written.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Recreate Data File</string>
</property>
@ -425,6 +509,9 @@
</item>
<item>
<widget class="QCheckBox" name="fOpenFilesAfterFitting_checkBox">
<property name="whatsThis">
<string>selected: the newly generated msr-files will be opened in musredit after the fit took place.</string>
</property>
<property name="text">
<string>Open Files after Fitting</string>
</property>
@ -436,6 +523,9 @@
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QCheckBox" name="fTitleFromData_checkBox">
<property name="whatsThis">
<string>if selected: the run title of the generated msr-file will be the one given in the muSR data file.</string>
</property>
<property name="text">
<string>Take Data File Title</string>
</property>
@ -443,6 +533,13 @@
</item>
<item>
<widget class="QCheckBox" name="fCreateMsrFileOnly_checkBox">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;if selected: the msr-files will be created, but &lt;span style=&quot; font-weight:600;&quot;&gt;no &lt;/span&gt;fitting will take place.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Create msr-File only</string>
</property>
@ -450,6 +547,9 @@
</item>
<item>
<widget class="QCheckBox" name="fFitOnly_checkBox">
<property name="whatsThis">
<string>selected: it is assumed that the msr-files already exist, and only musrfit is called.</string>
</property>
<property name="text">
<string>Fit Only</string>
</property>
@ -459,6 +559,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QCheckBox" name="fGlobal_checkBox">
<property name="whatsThis">
<string>selected: will generate a msr-file for a global fit. Please check the online documentation for further details.</string>
</property>
<property name="text">
<string>Global</string>
</property>
@ -466,6 +569,9 @@
</item>
<item>
<widget class="QCheckBox" name="fGlobalPlus_checkBox">
<property name="whatsThis">
<string>selected: will generate a msr-file for a global fit. The difference between Global and Global+ is that for Global+ the input parameters of the msr-file are originating from the single run fits. Please check the online documentation for further details.</string>
</property>
<property name="text">
<string>Global+</string>
</property>
@ -477,12 +583,38 @@
</item>
</layout>
</widget>
<widget class="QLabel" name="fParamList_label">
<property name="geometry">
<rect>
<x>10</x>
<y>143</y>
<width>161</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Parameter Export List</string>
</property>
</widget>
<widget class="QLineEdit" name="fParamList_lineEdit">
<property name="geometry">
<rect>
<x>170</x>
<y>140</y>
<width>371</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>
</widget>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>5</x>
<y>500</y>
<y>540</y>
<width>541</width>
<height>51</height>
</rect>

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -5,12 +5,10 @@
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
$Id$
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -49,6 +47,7 @@ typedef struct {
QString runListFileName; ///< run list filename (usage 4 of msr2data)
QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13'
int templateRunNo; ///< fit template run number
QString paramList; ///< parameter list to be exported.
QString dbOutputFileName; ///< output file name for the generated (trumf-like) db-file.
bool writeDbHeader; ///< flag indicating if a db header shall be generated (== !noheader in msr2data)
bool ignoreDataHeaderInfo; ///< flag indicating if data header info (like temp.) shall be ignored (== nosummary in msr2data)

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2012-2014 by Andreas Suter *
* Copyright (C) 2012-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2012-2014 by Andreas Suter *
* Copyright (C) 2012-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2015 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2015 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2015 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@ -88,6 +88,10 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
fDataOutputFileName_lineEdit->setText(fMsr2DataParam->dbOutputFileName);
}
if (!fMsr2DataParam->paramList.isEmpty()) {
fParamList_lineEdit->setText(fMsr2DataParam->paramList);
}
fWriteDataHeader_checkBox->setChecked(fMsr2DataParam->writeDbHeader);
fIgnoreDataHeaderInfo_checkBox->setChecked(fMsr2DataParam->ignoreDataHeaderInfo);
fKeepMinuit2Output_checkBox->setChecked(fMsr2DataParam->keepMinuit2Output);
@ -129,6 +133,7 @@ PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
} else {
fMsr2DataParam->templateRunNo = fTemplateRunNumber_lineEdit->text().toInt();
}
fMsr2DataParam->paramList = fParamList_lineEdit->text();
fMsr2DataParam->dbOutputFileName = fDataOutputFileName_lineEdit->text();
fMsr2DataParam->writeDbHeader = fWriteDataHeader_checkBox->isChecked();
fMsr2DataParam->ignoreDataHeaderInfo = fIgnoreDataHeaderInfo_checkBox->isChecked();

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2010-2014 by Andreas Suter *
* Copyright (C) 2010-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
*****************************************************************************/
/***************************************************************************
* Copyright (C) 2009-2014 by Andreas Suter *
* Copyright (C) 2009-2016 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

Some files were not shown because too many files have changed in this diff Show More