Merge branch 'master' into root6
This commit is contained in:
commit
0a59e6b4d9
@ -5,7 +5,14 @@
|
|||||||
changes since 0.14.0
|
changes since 0.14.0
|
||||||
===================================
|
===================================
|
||||||
NEW 2015-02-23 implemented an average-per-data-set option for musrFT.
|
NEW 2015-02-23 implemented an average-per-data-set option for musrFT.
|
||||||
NEW 2015-02-21 add proper Mac icon to musredit
|
NEW 2015-02-21 add proper Mac icon to musredit
|
||||||
|
FIXED 2015-09-17 in PMsr2Data::PrepareGlobalInputFile() there seem to be 'unmotivated'
|
||||||
|
break; commands in some loops. They prevent a proper map handling.
|
||||||
|
Since this is a real puzzle I contacted BMW for clarification.
|
||||||
|
2015-09-18: there is only one unmotivated break; cleaned up the code
|
||||||
|
accordingly.
|
||||||
|
FIXED 2015-09-14 any2many export of MusrRoot crashed when first histo group was != 0.
|
||||||
|
This happend when exporting to PSI-BIN or WKM. This is fixed now.
|
||||||
FIXED 2015-09-08 fixed error in view_packing for single histo (wrong norm of the theory).
|
FIXED 2015-09-08 fixed error in view_packing for single histo (wrong norm of the theory).
|
||||||
FIXED 2015-09-04 minor change in Fourier-block output (PMsrHandler::WriteMsrLogFile
|
FIXED 2015-09-04 minor change in Fourier-block output (PMsrHandler::WriteMsrLogFile
|
||||||
and PMsrHandler::WriteMsrLogFile) to avoid truncated range labels.
|
and PMsrHandler::WriteMsrLogFile) to avoid truncated range labels.
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2014 by Bastian M. Wojek / Andreas Suter *
|
* Copyright (C) 2009-2015 by Bastian M. Wojek / Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -170,7 +170,7 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
string::size_type loc = firstOnLine.rfind(tempRunNumber.str());
|
||||||
if ( loc != string::npos ) {
|
if ( loc != string::npos ) {
|
||||||
while ( loc > 0 ) {
|
while ( loc > 0 ) {
|
||||||
if(isdigit(firstOnLine.at(--loc))) {
|
if (isdigit(firstOnLine.at(--loc))) {
|
||||||
++fRunNumberDigits;
|
++fRunNumberDigits;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
@ -731,7 +731,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu
|
|||||||
msrParamList->at(i).fIsGlobal = true;
|
msrParamList->at(i).fIsGlobal = true;
|
||||||
++fNumGlobalParam;
|
++fNumGlobalParam;
|
||||||
}
|
}
|
||||||
//cout << msrParamList->at(i).fNo << " is global: " << msrParamList->at(i).fIsGlobal << endl;
|
// cout << "debug> " << msrParamList->at(i).fNo << ": " << msrParamList->at(i).fName.Data() << " is global: " << msrParamList->at(i).fIsGlobal << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if parameters have been sorted correctly from the beginning
|
// check if parameters have been sorted correctly from the beginning
|
||||||
@ -760,7 +760,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu
|
|||||||
bool mapExists(false);
|
bool mapExists(false);
|
||||||
for (unsigned int i(0); i < tempLines->size(); ++i) {
|
for (unsigned int i(0); i < tempLines->size(); ++i) {
|
||||||
line = (*tempLines)[i].fLine.Data();
|
line = (*tempLines)[i].fLine.Data();
|
||||||
split( tempVec, line, is_any_of(" \t") ); // split the theory line at spaces
|
split( tempVec, line, is_any_of(" \t"), token_compress_on ); // split the theory line at spaces
|
||||||
for (unsigned int j(1); j < tempVec.size(); ++j) {
|
for (unsigned int j(1); j < tempVec.size(); ++j) {
|
||||||
try {
|
try {
|
||||||
tempPar = boost::lexical_cast<unsigned int>(tempVec[j]);
|
tempPar = boost::lexical_cast<unsigned int>(tempVec[j]);
|
||||||
@ -1060,12 +1060,11 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu
|
|||||||
tempLines = fMsrHandler->GetMsrTheory();
|
tempLines = fMsrHandler->GetMsrTheory();
|
||||||
for (unsigned int i(0); i < tempLines->size(); ++i) {
|
for (unsigned int i(0); i < tempLines->size(); ++i) {
|
||||||
line = (*tempLines)[i].fLine.Data();
|
line = (*tempLines)[i].fLine.Data();
|
||||||
split( tempVec, line, is_any_of(" \t") ); // split the theory line at spaces
|
split( tempVec, line, is_any_of(" \t"), token_compress_on ); // split the theory line at spaces
|
||||||
|
|
||||||
for (unsigned int j(1); j < tempVec.size(); ++j) {
|
for (unsigned int j(1); j < tempVec.size(); ++j) {
|
||||||
try {
|
try {
|
||||||
tempPar = boost::lexical_cast<unsigned int>(tempVec[j]);
|
tempPar = boost::lexical_cast<unsigned int>(tempVec[j]);
|
||||||
|
|
||||||
if (!msrParamList->at(tempPar - 1).fIsGlobal) {
|
if (!msrParamList->at(tempPar - 1).fIsGlobal) {
|
||||||
cerr << endl << ">> msr2data: **WARNING** The parameter " << msrParamList->at(tempPar - 1).fName.Data() \
|
cerr << endl << ">> msr2data: **WARNING** The parameter " << msrParamList->at(tempPar - 1).fName.Data() \
|
||||||
<< " is recognized as run specific!";
|
<< " is recognized as run specific!";
|
||||||
@ -1112,7 +1111,6 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu
|
|||||||
lineChanged = true;
|
lineChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
catch(boost::bad_lexical_cast &) {
|
catch(boost::bad_lexical_cast &) {
|
||||||
// in case the cast does not work: do nothing - this means the entry is not a simple parameter
|
// in case the cast does not work: do nothing - this means the entry is not a simple parameter
|
||||||
|
@ -4780,18 +4780,22 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
|||||||
|
|
||||||
// add all data to fMultiGraphData
|
// add all data to fMultiGraphData
|
||||||
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
||||||
// the next two lines are ugly but needed for the following reasons:
|
// the next three lines are ugly but needed for the following reasons:
|
||||||
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
||||||
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleanup
|
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleanup
|
||||||
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].data));
|
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].data));
|
||||||
|
// Data points and model curves should be fixed on the graph and not dragged around using, e.g., the mouse.
|
||||||
|
ge->SetEditable(false);
|
||||||
fMultiGraphData->Add(ge, "p");
|
fMultiGraphData->Add(ge, "p");
|
||||||
}
|
}
|
||||||
// add all the theory to fMultiGraphData
|
// add all the theory to fMultiGraphData
|
||||||
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
||||||
// the next two lines are ugly but needed for the following reasons:
|
// the next three lines are ugly but needed for the following reasons:
|
||||||
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
||||||
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleanup
|
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleanup
|
||||||
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].theory));
|
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].theory));
|
||||||
|
// Data points and model curves should be fixed on the graph and not dragged around using, e.g., the mouse.
|
||||||
|
ge->SetEditable(false);
|
||||||
fMultiGraphData->Add(ge, "l");
|
fMultiGraphData->Add(ge, "l");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4836,6 +4840,11 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
|||||||
if (fMultiGraphLegend)
|
if (fMultiGraphLegend)
|
||||||
fMultiGraphLegend->Draw();
|
fMultiGraphLegend->Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// report canvas status events in non-musr plots
|
||||||
|
if (!fMainCanvas->GetShowEventStatus()) {
|
||||||
|
fMainCanvas->ToggleEventStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fDataTheoryPad->Update();
|
fDataTheoryPad->Update();
|
||||||
@ -5018,10 +5027,12 @@ void PMusrCanvas::PlotDifference(Bool_t unzoom)
|
|||||||
|
|
||||||
// add all diff data to fMultiGraphDiff
|
// add all diff data to fMultiGraphDiff
|
||||||
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
for (UInt_t i=0; i<fNonMusrData.size(); i++) {
|
||||||
// the next two lines are ugly but needed for the following reasons:
|
// the next three lines are ugly but needed for the following reasons:
|
||||||
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
// TMultiGraph is taking ownership of the TGraphErrors, hence a deep copy is needed.
|
||||||
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleaing
|
// This is not resulting in a memory leak, since the TMultiGraph object will do the cleaing
|
||||||
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].diff));
|
TGraphErrors *ge = new TGraphErrors(*(fNonMusrData[i].diff));
|
||||||
|
// Data points and model curves should be fixed on the graph and not dragged around using, e.g., the mouse.
|
||||||
|
ge->SetEditable(false);
|
||||||
fMultiGraphDiff->Add(ge, "p");
|
fMultiGraphDiff->Add(ge, "p");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1744,7 +1744,7 @@ Bool_t PRunDataHandler::ReadRootFile()
|
|||||||
for (UInt_t i=0; i<fAny2ManyInfo->groupHistoList.size(); i++) {
|
for (UInt_t i=0; i<fAny2ManyInfo->groupHistoList.size(); i++) {
|
||||||
found = false;
|
found = false;
|
||||||
for (UInt_t j=0; j<ivec.size(); j++) {
|
for (UInt_t j=0; j<ivec.size(); j++) {
|
||||||
if (fAny2ManyInfo->groupHistoList[i] == ivec[i])
|
if (fAny2ManyInfo->groupHistoList[i] == ivec[j])
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
@ -5084,7 +5084,11 @@ Bool_t PRunDataHandler::WriteWkmFile(TString fln)
|
|||||||
if (lem_wkm_style)
|
if (lem_wkm_style)
|
||||||
cout << endl << "TOF(M3S1): nocut";
|
cout << endl << "TOF(M3S1): nocut";
|
||||||
cout << endl << "Groups: " << fData[0].GetNoOfHistos();
|
cout << endl << "Groups: " << fData[0].GetNoOfHistos();
|
||||||
cout << endl << "Channels: " << static_cast<UInt_t>(fData[0].GetDataBin(1)->size()/fAny2ManyInfo->rebin);
|
UInt_t histo0 = 1;
|
||||||
|
if (fAny2ManyInfo->groupHistoList.size() != 0) { // red/green list found
|
||||||
|
histo0 = fAny2ManyInfo->groupHistoList[0]+1; // take the first available red/green entry
|
||||||
|
}
|
||||||
|
cout << endl << "Channels: " << static_cast<UInt_t>(fData[0].GetDataBin(histo0)->size()/fAny2ManyInfo->rebin);
|
||||||
cout.precision(10);
|
cout.precision(10);
|
||||||
cout << endl << "Resolution: " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin/1.0e3; // ns->us
|
cout << endl << "Resolution: " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin/1.0e3; // ns->us
|
||||||
cout.setf(ios::fixed,ios::floatfield); // floatfield set to fixed
|
cout.setf(ios::fixed,ios::floatfield); // floatfield set to fixed
|
||||||
@ -5173,7 +5177,11 @@ Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
|
|||||||
// run number
|
// run number
|
||||||
psibin.put_runNumber_int(fData[0].GetRunNumber());
|
psibin.put_runNumber_int(fData[0].GetRunNumber());
|
||||||
// length of histograms
|
// length of histograms
|
||||||
psibin.put_histoLength_bin((int)(fData[0].GetDataBin(1)->size()/fAny2ManyInfo->rebin));
|
UInt_t histo0 = 1;
|
||||||
|
if (fAny2ManyInfo->groupHistoList.size() != 0) { // red/green list found
|
||||||
|
histo0 = fAny2ManyInfo->groupHistoList[0]+1; // take the first available red/green entry
|
||||||
|
}
|
||||||
|
psibin.put_histoLength_bin((int)(fData[0].GetDataBin(histo0)->size()/fAny2ManyInfo->rebin));
|
||||||
// number of histograms
|
// number of histograms
|
||||||
psibin.put_numberHisto_int((int)fData[0].GetNoOfHistos());
|
psibin.put_numberHisto_int((int)fData[0].GetNoOfHistos());
|
||||||
// run title = sample (10 char) / temp (10 char) / field (10 char) / orientation (10 char)
|
// run title = sample (10 char) / temp (10 char) / field (10 char) / orientation (10 char)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user