some more work, including the PSI-BIN write routines which are officially not released yet.

This commit is contained in:
nemu 2011-02-07 06:02:56 +00:00
parent 20665da9eb
commit 90ed9df1b6
11 changed files with 3639 additions and 2130 deletions

View File

@ -6,6 +6,7 @@
changes since 0.8.0 changes since 0.8.0
=================================== ===================================
NEW any2many: some more work, including the PSI-BIN write routines which are officially not released yet.
NEW extended global mode in msr2data NEW extended global mode in msr2data
NEW any2many: an attempt to write the universial musr-data-file converter. Just started, needs still some work. NEW any2many: an attempt to write the universial musr-data-file converter. Just started, needs still some work.
NEW musrt0: added the possibility to show the t0 saved in the data file 's'. Furthermore added the option NEW musrt0: added the possibility to show the t0 saved in the data file 's'. Furthermore added the option

View File

@ -314,6 +314,8 @@ int main(int argc, char *argv[])
if (!strcmp(argv[i], "-p")) { if (!strcmp(argv[i], "-p")) {
if (i+1 < argc) { if (i+1 < argc) {
info.outPath = argv[i+1]; info.outPath = argv[i+1];
if (!info.outPath.EndsWith("/"))
info.outPath += "/";
} else { } else {
cerr << endl << ">> any2many **ERROR** found output option '-p' without any argument." << endl; cerr << endl << ">> any2many **ERROR** found output option '-p' without any argument." << endl;
show_syntax = true; show_syntax = true;
@ -396,7 +398,6 @@ int main(int argc, char *argv[])
show_syntax = true; show_syntax = true;
} }
/*
cout << endl << "debug> info.year='" << info.year << "', info.year.length()=" << info.year.Length(); cout << endl << "debug> info.year='" << info.year << "', info.year.length()=" << info.year.Length();
cout << endl << "debug> info.useStandardOutput=" << info.useStandardOutput; cout << endl << "debug> info.useStandardOutput=" << info.useStandardOutput;
cout << endl << "debug> info.inFormat=" << info.inFormat; cout << endl << "debug> info.inFormat=" << info.inFormat;
@ -414,7 +415,6 @@ cout << endl << "debug> info.inFileName=";
for (unsigned int i=0; i<info.inFileName.size(); i++) for (unsigned int i=0; i<info.inFileName.size(); i++)
cout << info.inFileName[i] << ", "; cout << info.inFileName[i] << ", ";
cout << endl; cout << endl;
*/
if (show_syntax) { if (show_syntax) {
info.runList.clear(); info.runList.clear();

View File

@ -225,6 +225,12 @@ PRawRunData::PRawRunData()
fRunNumber = -1; fRunNumber = -1;
fRunTitle = TString(""); fRunTitle = TString("");
fSetup = TString(""); fSetup = TString("");
fStartTime = TString("");
fStartDate = TString("");
fStartDateTimeSec = 0;
fStopTime = TString("");
fStopDate = TString("");
fStopDateTimeSec = 0;
fField = PMUSR_UNDEFINED; fField = PMUSR_UNDEFINED;
fEnergy = PMUSR_UNDEFINED; fEnergy = PMUSR_UNDEFINED;
fTransport = PMUSR_UNDEFINED; fTransport = PMUSR_UNDEFINED;

View File

@ -30,6 +30,7 @@
***************************************************************************/ ***************************************************************************/
#include <cstdio> #include <cstdio>
#include <ctime>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string> #include <string>
@ -474,10 +475,13 @@ Bool_t PRunDataHandler::ReadWriteFilesList()
} }
system(cmd); system(cmd);
} }
if (fAny2ManyInfo->compressionTag == 1) // gzip if (fAny2ManyInfo->compressionTag == 1) { // gzip
sprintf(cmd, "gzip %s", fln.Data()); sprintf(cmd, "gzip %s", fln.Data());
else fln += ".gz";
} else {
sprintf(cmd, "bzip2 -z %s", fln.Data()); sprintf(cmd, "bzip2 -z %s", fln.Data());
fln += ".bz2";
}
system(cmd); system(cmd);
} }
@ -919,6 +923,80 @@ Bool_t PRunDataHandler::ReadRootFile(UInt_t tag)
// get setup // get setup
runData.SetSetup(runHeader->GetLemSetup().GetString()); runData.SetSetup(runHeader->GetLemSetup().GetString());
// get start time/date
// start date
time_t idt = (time_t)runHeader->GetStartTime();
runData.SetStartDateTime(idt);
struct tm *dt = localtime(&idt);
TString stime("");
Int_t yy = dt->tm_year;
if (yy > 100)
yy -= 100;
if (yy < 10)
stime += "0";
stime += yy;
stime += "-";
stime += GetMonth(dt->tm_mon);
stime += "-";
if (dt->tm_mday < 10)
stime += "0";
stime += dt->tm_mday;
runData.SetStartDate(stime);
// start time
if (dt->tm_hour == 0)
stime = "00";
else if (dt->tm_hour < 10)
stime = "0";
else
stime = "";
stime += dt->tm_hour;
stime += ":";
if (dt->tm_min < 10)
stime += "0";
stime += dt->tm_min;
stime += ":";
if (dt->tm_sec < 10)
stime += "0";
stime += dt->tm_sec;
runData.SetStartTime(stime);
// get stop time/date
// stop date
idt = (time_t)runHeader->GetStopTime();
runData.SetStopDateTime(idt);
dt = localtime(&idt);
stime = "";
yy = dt->tm_year;
if (yy > 100)
yy -= 100;
if (yy < 10)
stime += "0";
stime += yy;
stime += "-";
stime += GetMonth(dt->tm_mon);
stime += "-";
if (dt->tm_mday < 10)
stime += "0";
stime += dt->tm_mday;
runData.SetStopDate(stime);
// stop time
if (dt->tm_hour == 0)
stime = "00";
else if (dt->tm_hour < 10)
stime = "0";
else
stime = "";
stime += dt->tm_hour;
stime += ":";
if (dt->tm_min < 10)
stime += "0";
stime += dt->tm_min;
stime += ":";
if (dt->tm_sec < 10)
stime += "0";
stime += dt->tm_sec;
runData.SetStopTime(stime);
// get time resolution // get time resolution
runData.SetTimeResolution(runHeader->GetTimeResolution()); runData.SetTimeResolution(runHeader->GetTimeResolution());
@ -1486,7 +1564,11 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
// get run number // get run number
runData.SetRunNumber(psiBin.get_runNumber_int()); runData.SetRunNumber(psiBin.get_runNumber_int());
// get setup // get setup
runData.SetSetup(TString(psiBin.get_orient().c_str())); runData.SetSetup(TString(psiBin.get_comment().c_str()));
// get sample
runData.SetSample(TString(psiBin.get_sample().c_str()));
// get orientation
runData.SetOrientation(TString(psiBin.get_orient().c_str()));
// set LEM specific information to default value since it is not in the file and not used... // set LEM specific information to default value since it is not in the file and not used...
runData.SetEnergy(PMUSR_UNDEFINED); runData.SetEnergy(PMUSR_UNDEFINED);
runData.SetTransport(PMUSR_UNDEFINED); runData.SetTransport(PMUSR_UNDEFINED);
@ -1523,6 +1605,22 @@ Bool_t PRunDataHandler::ReadPsiBinFile()
for (UInt_t i=0; i<ivec.size(); i++) for (UInt_t i=0; i<ivec.size(); i++)
runData.AppendT0(ivec[i]); runData.AppendT0(ivec[i]);
// get start/stop time
vector<string> sDateTime = psiBin.get_timeStart_vector();
if (sDateTime.size() < 2) {
cerr << endl << ">> **WARNING** psi-bin file: couldn't obtain run start date/time" << endl;
}
runData.SetStartDate(sDateTime[0]);
runData.SetStartTime(sDateTime[1]);
sDateTime.clear();
sDateTime = psiBin.get_timeStop_vector();
if (sDateTime.size() < 2) {
cerr << endl << ">> **WARNING** psi-bin file: couldn't obtain run stop date/time" << endl;
}
runData.SetStopDate(sDateTime[0]);
runData.SetStopTime(sDateTime[1]);
// fill raw data // fill raw data
PDoubleVector histoData; PDoubleVector histoData;
Int_t *histo; Int_t *histo;
@ -1598,6 +1696,84 @@ Bool_t PRunDataHandler::ReadMudFile()
runData.SetRunNumber((Int_t)val); runData.SetRunNumber((Int_t)val);
} }
// get start/stop time of the run
struct tm *dt;
TString stime("");
Int_t yy = 0;
success = MUD_getTimeBegin( fh, &val );
if (success) {
runData.SetStartDateTime((const time_t)val);
dt = localtime((const time_t*)&val);
yy = dt->tm_year;
if (yy > 100)
yy -= 100;
if (yy < 10)
stime += "0";
stime += yy;
stime += "-";
stime += GetMonth(dt->tm_mon);
stime += "-";
if (dt->tm_mday < 10)
stime += "0";
stime += dt->tm_mday;
runData.SetStartDate(stime);
// start time
if (dt->tm_hour == 0)
stime = "00";
else if (dt->tm_hour < 10)
stime = "0";
else
stime = "";
stime += dt->tm_hour;
stime += ":";
if (dt->tm_min < 10)
stime += "0";
stime += dt->tm_min;
stime += ":";
if (dt->tm_sec < 10)
stime += "0";
stime += dt->tm_sec;
runData.SetStartTime(stime);
}
stime = TString("");
success = MUD_getTimeEnd( fh, &val );
if (success) {
runData.SetStopDateTime((const time_t)val);
dt = localtime((const time_t*)&val);
stime = "";
yy = dt->tm_year;
if (yy > 100)
yy -= 100;
if (yy < 10)
stime += "0";
stime += yy;
stime += "-";
stime += GetMonth(dt->tm_mon);
stime += "-";
if (dt->tm_mday < 10)
stime += "0";
stime += dt->tm_mday;
runData.SetStopDate(stime);
// stop time
if (dt->tm_hour == 0)
stime = "00";
else if (dt->tm_hour < 10)
stime = "0";
else
stime = "";
stime += dt->tm_hour;
stime += ":";
if (dt->tm_min < 10)
stime += "0";
stime += dt->tm_min;
stime += ":";
if (dt->tm_sec < 10)
stime += "0";
stime += dt->tm_sec;
runData.SetStopTime(stime);
}
// get setup // get setup
TString setup; TString setup;
success = MUD_getLab( fh, str, sizeof(str) ); success = MUD_getLab( fh, str, sizeof(str) );
@ -1615,6 +1791,7 @@ Bool_t PRunDataHandler::ReadMudFile()
success = MUD_getSample( fh, str, sizeof(str) ); success = MUD_getSample( fh, str, sizeof(str) );
if (success) { if (success) {
setup += TString(str); setup += TString(str);
runData.SetSample(str);
} }
runData.SetSetup(setup); runData.SetSetup(setup);
@ -1783,6 +1960,7 @@ Bool_t PRunDataHandler::ReadMudFile()
histoData.push_back(pData[j]); histoData.push_back(pData[j]);
} }
runData.AppendDataBin(histoData); runData.AppendDataBin(histoData);
// estimate T0 from maximum of the data // estimate T0 from maximum of the data
Double_t maxVal = 0.0; Double_t maxVal = 0.0;
Int_t maxBin = 0; Int_t maxBin = 0;
@ -2807,9 +2985,6 @@ Bool_t PRunDataHandler::ReadDBFile()
*/ */
Bool_t PRunDataHandler::WriteRootFile(TString fln) Bool_t PRunDataHandler::WriteRootFile(TString fln)
{ {
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteRootFile(): writing a root data file ... " << endl;
// generate output file name if needed // generate output file name if needed
if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) { if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) {
if (fln.Length() == 0) { if (fln.Length() == 0) {
@ -2834,9 +3009,12 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
// keep the file name if compression is whished // keep the file name if compression is whished
fAny2ManyInfo->outPathFileName.push_back(fln); fAny2ManyInfo->outPathFileName.push_back(fln);
} else { } else {
fln = TString("__tmp.root"); fln = fAny2ManyInfo->outPath + TString("__tmp.root");
} }
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteRootFile(): writing a root data file (" << fln.Data() << ") ... " << endl;
// generate data file // generate data file
TFolder *histosFolder; TFolder *histosFolder;
TFolder *decayAnaModule; TFolder *decayAnaModule;
@ -2855,8 +3033,12 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
header->SetRunTitle(fData[0].GetRunTitle()->Data()); header->SetRunTitle(fData[0].GetRunTitle()->Data());
header->SetLemSetup(fData[0].GetSetup()->Data()); header->SetLemSetup(fData[0].GetSetup()->Data());
header->SetRunNumber(fData[0].GetRunNumber()); header->SetRunNumber(fData[0].GetRunNumber());
header->SetStartTime(0); TString dt = *fData[0].GetStartDate() + "/" + *fData[0].GetStartTime();
header->SetStopTime(1); header->SetStartTimeString(dt.Data());
dt = *fData[0].GetStopDate() + "/" + *fData[0].GetStopTime();
header->SetStopTimeString(dt.Data());
header->SetStartTime(fData[0].GetStartDateTime());
header->SetStopTime(fData[0].GetStopDateTime());
header->SetModeratorHV(-999.9, 0.0); header->SetModeratorHV(-999.9, 0.0);
header->SetSampleHV(-999.9, 0.0); header->SetSampleHV(-999.9, 0.0);
header->SetImpEnergy(-999.9); header->SetImpEnergy(-999.9);
@ -3020,8 +3202,6 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
*/ */
Bool_t PRunDataHandler::WriteWkmFile(TString fln) Bool_t PRunDataHandler::WriteWkmFile(TString fln)
{ {
cout << endl << ">> PRunDataHandler::WriteWkmFile(): writing a wkm data file... " << endl;
// generate output file name // generate output file name
if (fln.Length() == 0) { if (fln.Length() == 0) {
Int_t start = fRunPathName.Last('/'); Int_t start = fRunPathName.Last('/');
@ -3045,6 +3225,9 @@ Bool_t PRunDataHandler::WriteWkmFile(TString fln)
// keep the file name if compression is whished // keep the file name if compression is whished
fAny2ManyInfo->outPathFileName.push_back(fln); fAny2ManyInfo->outPathFileName.push_back(fln);
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteWkmFile(): writing a wkm data file (" << fln.Data() << ") ... " << endl;
// write ascii file // write ascii file
ofstream fout; ofstream fout;
streambuf* strm_buffer = 0; streambuf* strm_buffer = 0;
@ -3087,7 +3270,9 @@ Bool_t PRunDataHandler::WriteWkmFile(TString fln)
cout << endl << "Setup : " << fData[0].GetSetup()->Data(); cout << endl << "Setup : " << fData[0].GetSetup()->Data();
cout << endl << "Groups : " << fData[0].GetNoOfHistos(); cout << endl << "Groups : " << fData[0].GetNoOfHistos();
cout << endl << "Channels : " << static_cast<UInt_t>(fData[0].GetDataBin(0)->size()/fAny2ManyInfo->rebin); cout << endl << "Channels : " << static_cast<UInt_t>(fData[0].GetDataBin(0)->size()/fAny2ManyInfo->rebin);
cout.precision(10);
cout << endl << "Resolution : " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin; cout << endl << "Resolution : " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin;
cout.setf(ios::fixed,ios::floatfield); // floatfield set to fixed
// write data // write data
if (fAny2ManyInfo->rebin == 1) { if (fAny2ManyInfo->rebin == 1) {
@ -3145,24 +3330,178 @@ Bool_t PRunDataHandler::WriteWkmFile(TString fln)
Bool_t PRunDataHandler::WritePsiBinFile(TString fln) Bool_t PRunDataHandler::WritePsiBinFile(TString fln)
{ {
cout << endl << ">> PRunDataHandler::WritePsiBinFile(): will write a psi-bin data file. Not yet implemented ... " << endl; cout << endl << ">> PRunDataHandler::WritePsiBinFile(): will write a psi-bin data file. Not yet implemented ... " << endl;
return true;
}
//-------------------------------------------------------------------------- // generate output file name if needed
// WritePsiMduFile if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) {
//-------------------------------------------------------------------------- if (fln.Length() == 0) {
/** Int_t start = fRunPathName.Last('/');
* <p> Write the psi-mdu-file format. Int_t end = fRunPathName.Last('.');
* if (end == -1) {
* <b>return:</b> cerr << endl << ">> PRunDataHandler::WritePsiBinFile(): **ERROR** couldn't generate the output file name ..." << endl;
* - true on successful writting, return false;
* - otherwise false. }
* // cut out the filename (get rid of the extension, and the path)
* \param fln file name. If empty, the routine will try to construct one Char_t str1[1024], str2[1024];
*/ strncpy(str1, fRunPathName.Data(), sizeof(str1));
Bool_t PRunDataHandler::WritePsiMduFile(TString fln) for (Int_t i=0; i<end-start-1; i++) {
{ str2[i] = str1[i+start+1];
cout << endl << ">> PRunDataHandler::WritePsiMduFile(): will write a psi-mdu data file. Not yet implemented ... " << endl; }
str2[end-start-1] = 0;
fln = fAny2ManyInfo->outPath + str2 + ".bin";
} else {
fln.Prepend(fAny2ManyInfo->outPath);
}
// keep the file name if compression is whished
fAny2ManyInfo->outPathFileName.push_back(fln);
} else {
fln = fAny2ManyInfo->outPath + TString("__tmp.bin");
}
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WritePsiBinFile(): writing a psi-bin data file (" << fln.Data() << ") ... " << endl;
MuSR_td_PSI_bin psibin;
int status = 0;
// fill header information
// run number
psibin.put_runNumber_int(fData[0].GetRunNumber());
// length of histograms
psibin.put_histoLength_bin((int)(fData[0].GetDataBin(0)->size()));
// number of histograms
psibin.put_numberHisto_int((int)fData[0].GetNoOfHistos());
// run title = sample (10 char) / temp (10 char) / field (10 char) / orientation (10 char)
char cstr[11];
// sample
if (fData[0].GetSample()->Length() > 0)
strncpy(cstr, fData[0].GetSample()->Data(), 10);
else
strcpy(cstr, "??");
cstr[10] = '\0';
psibin.put_sample(cstr);
// temp
if (fData[0].GetNoOfTemperatures() > 0)
snprintf(cstr, 10, "%.1f K", fData[0].GetTemperature(0));
else
strcpy(cstr, "?? K");
cstr[10] = '\0';
psibin.put_temp(cstr);
// field
if (fData[0].GetField() > 0)
snprintf(cstr, 10, "%.1f G", fData[0].GetField());
else
strcpy(cstr, "?? G");
cstr[10] = '\0';
psibin.put_field(cstr);
// orientation
if (fData[0].GetOrientation()->Length() > 0)
strncpy(cstr, fData[0].GetOrientation()->Data(), 10);
else
strcpy(cstr, "??");
cstr[10] = '\0';
psibin.put_orient(cstr);
// setup
if (fData[0].GetSetup()->Length() > 0)
strncpy(cstr, fData[0].GetSetup()->Data(), 10);
else
strcpy(cstr, "??");
cstr[10] = '\0';
psibin.put_setup(cstr);
// run start date
vector<string> svec;
strncpy(cstr, fData[0].GetStartDate()->Data(), 9);
cstr[9] = '\0';
svec.push_back(cstr);
// run start time
strncpy(cstr, fData[0].GetStartTime()->Data(), 8);
cstr[8] = '\0';
svec.push_back(cstr);
psibin.put_timeStart_vector(svec);
svec.clear();
// run stop date
strncpy(cstr, fData[0].GetStopDate()->Data(), 9);
cstr[9] = '\0';
svec.push_back(cstr);
// run stop time
strncpy(cstr, fData[0].GetStopTime()->Data(), 8);
cstr[8] = '\0';
svec.push_back(cstr);
psibin.put_timeStop_vector(svec);
svec.clear();
// t0's
for (UInt_t i=0; i<fData[0].GetT0Size(); i++)
psibin.put_t0_int(i, fData[0].GetT0(i));
// first/last good bin
for (UInt_t i=0; i<fData[0].GetNoOfHistos(); i++) {
psibin.put_firstGood_int(i, fData[0].GetGoodDataBin(i).first);
psibin.put_lastGood_int(i, fData[0].GetGoodDataBin(i).second);
}
// number of measured temperatures
psibin.put_numberTemperature_int(fData[0].GetNoOfTemperatures());
// mean temperatures
vector<double> dvec;
for (UInt_t i=0; i<fData[0].GetNoOfTemperatures(); i++)
dvec.push_back(fData[0].GetTemperature(i));
psibin.put_temperatures_vector(dvec);
// standard deviation of temperatures
dvec.clear();
for (UInt_t i=0; i<fData[0].GetNoOfTemperatures(); i++)
dvec.push_back(fData[0].GetTempError(i));
psibin.put_devTemperatures_vector(dvec);
// write comment
psibin.put_comment(fData[0].GetRunTitle()->Data());
// write histogram labels
vector<string> histoLabel;
histoLabel.resize(fData[0].GetNoOfHistos());
char hl[32];
for (UInt_t i=0; i<fData[0].GetNoOfHistos(); i++) {
sprintf(hl, "h%d", i);
histoLabel[i] = hl;
}
psibin.put_histoNames_vector(histoLabel);
// write time resolution
psibin.put_binWidth_ns(fData[0].GetTimeResolution());
// write scaler dummies
psibin.put_numberScaler_int(0);
// fill histograms
vector< vector<int> > histo;
histo.resize(fData[0].GetNoOfHistos());
for (UInt_t i=0; i<fData[0].GetNoOfHistos(); i++) {
for (UInt_t j=0; j<fData[0].GetDataBin(i)->size(); j++)
histo[i].push_back((Int_t)fData[0].GetDataBin(i)->at(j));
}
status = psibin.put_histo_array_int(histo);
if (status != 0) {
cerr << endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.ConsistencyStatus() << endl;
return false;
}
if (!psibin.CheckDataConsistency()) {
cerr << endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.ConsistencyStatus() << endl;
return false;
}
// write data to file
status = psibin.write(fln.Data());
if (status != 0) {
cerr << endl << ">> PRunDataHandler::WritePsiBinFile(): " << psibin.WriteStatus() << endl;
return false;
}
return true; return true;
} }
@ -3180,9 +3519,6 @@ Bool_t PRunDataHandler::WritePsiMduFile(TString fln)
*/ */
Bool_t PRunDataHandler::WriteMudFile(TString fln) Bool_t PRunDataHandler::WriteMudFile(TString fln)
{ {
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteMudFile(): writing a mud data file ... " << endl;
// generate output file name if needed // generate output file name if needed
if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) { if (!fAny2ManyInfo->useStandardOutput || (fAny2ManyInfo->compressionTag > 0)) {
if (fln.Length() == 0) { if (fln.Length() == 0) {
@ -3210,6 +3546,9 @@ Bool_t PRunDataHandler::WriteMudFile(TString fln)
fln = TString("__tmp.msr"); fln = TString("__tmp.msr");
} }
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteMudFile(): writing a mud data file (" << fln.Data() << ") ... " << endl;
// generate the mud data file // generate the mud data file
int fd = MUD_openWrite((char*)fln.Data(), MUD_FMT_TRI_TD_ID); int fd = MUD_openWrite((char*)fln.Data(), MUD_FMT_TRI_TD_ID);
if (fd == -1) { if (fd == -1) {
@ -3224,8 +3563,8 @@ Bool_t PRunDataHandler::WriteMudFile(TString fln)
MUD_setExptNumber(fd, 0); MUD_setExptNumber(fd, 0);
MUD_setRunNumber(fd, fData[0].GetRunNumber()); MUD_setRunNumber(fd, fData[0].GetRunNumber());
MUD_setElapsedSec(fd, 0); MUD_setElapsedSec(fd, 0);
MUD_setTimeBegin(fd, 0); MUD_setTimeBegin(fd, fData[0].GetStartDateTime());
MUD_setTimeEnd(fd, 0); MUD_setTimeEnd(fd, fData[0].GetStopDateTime());
MUD_setTitle(fd, (char *)fData[0].GetRunTitle()->Data()); MUD_setTitle(fd, (char *)fData[0].GetRunTitle()->Data());
MUD_setLab(fd, dummy); MUD_setLab(fd, dummy);
MUD_setArea(fd, dummy); MUD_setArea(fd, dummy);
@ -3359,9 +3698,6 @@ Bool_t PRunDataHandler::WriteMudFile(TString fln)
*/ */
Bool_t PRunDataHandler::WriteAsciiFile(TString fln) Bool_t PRunDataHandler::WriteAsciiFile(TString fln)
{ {
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteAsciiFile(): writing an ascii data file... " << endl;
// generate output file name // generate output file name
if (fln.Length() == 0) { if (fln.Length() == 0) {
Int_t start = fRunPathName.Last('/'); Int_t start = fRunPathName.Last('/');
@ -3385,6 +3721,9 @@ Bool_t PRunDataHandler::WriteAsciiFile(TString fln)
// keep the file name if compression is whished // keep the file name if compression is whished
fAny2ManyInfo->outPathFileName.push_back(fln); fAny2ManyInfo->outPathFileName.push_back(fln);
if (!fAny2ManyInfo->useStandardOutput)
cout << endl << ">> PRunDataHandler::WriteAsciiFile(): writing an ascii data file (" << fln.Data() << ") ... " << endl;
// write ascii file // write ascii file
ofstream fout; ofstream fout;
streambuf* strm_buffer = 0; streambuf* strm_buffer = 0;
@ -3426,8 +3765,11 @@ Bool_t PRunDataHandler::WriteAsciiFile(TString fln)
cout << endl << "% energy : " << fData[0].GetEnergy() << " (keV)"; cout << endl << "% energy : " << fData[0].GetEnergy() << " (keV)";
if (fData[0].GetTransport() != PMUSR_UNDEFINED) if (fData[0].GetTransport() != PMUSR_UNDEFINED)
cout << endl << "% transport : " << fData[0].GetTransport() << " (kV)"; cout << endl << "% transport : " << fData[0].GetTransport() << " (kV)";
if (fData[0].GetTimeResolution() != PMUSR_UNDEFINED) if (fData[0].GetTimeResolution() != PMUSR_UNDEFINED) {
cout.precision(10);
cout << endl << "% time resolution : " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin << " (ns)"; cout << endl << "% time resolution : " << fData[0].GetTimeResolution()*fAny2ManyInfo->rebin << " (ns)";
cout.setf(ios::fixed,ios::floatfield); // floatfield set to fixed
}
if (fData[0].GetT0Size() > 0) { if (fData[0].GetT0Size() > 0) {
cout << endl << "% t0 : "; cout << endl << "% t0 : ";
for (UInt_t i=0; i<fData[0].GetT0Size()-1; i++) { for (UInt_t i=0; i<fData[0].GetT0Size()-1; i++) {
@ -3823,3 +4165,49 @@ TString PRunDataHandler::FileNameFromTemplate(TString &fileNameTemplate, Int_t r
return result; return result;
} }
//--------------------------------------------------------------------------
// GetMonth (private)
//--------------------------------------------------------------------------
/**
* <p>Spits out the month as MMM for a given numerical month 0..11
*
* <b>return:</b>
* - constructed file name from template, run number, and year
* - empty string
*
* \param template template string
*/
TString PRunDataHandler::GetMonth(Int_t month)
{
TString mm("");
if (month == 0)
mm = "JAN";
else if (month == 1)
mm = "FEB";
else if (month == 2)
mm = "MAR";
else if (month == 3)
mm = "APR";
else if (month == 4)
mm = "MAY";
else if (month == 5)
mm = "JUN";
else if (month == 6)
mm = "JUL";
else if (month == 7)
mm = "AUG";
else if (month == 8)
mm = "SEP";
else if (month == 9)
mm = "OCT";
else if (month == 10)
mm = "NOV";
else if (month == 11)
mm = "DEC";
else
mm = "???";
return mm;
}

File diff suppressed because it is too large Load Diff

View File

@ -40,11 +40,13 @@ using namespace std ;
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
const int MAXHISTO = 32; // maximum number of histos to process/store const int MAXHISTO = 32; // maximum number of histos to process/store
const int MAXSCALER = 32; // maximum number of scalers to proces/store const int MAXSCALER = 32; // maximum number of scalers to process/store
const int MAXTEMPER = 4; // maximum number of average temperatures const int MAXTEMPER = 4; // maximum number of average temperatures
const int MAXLABELSIZE = 12; // maximum size of labels const int MAXLABELSIZE = 12; // maximum size of labels
const int MAXREC = 4096; // maximum allowed data record size
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
class MuSR_td_PSI_bin { class MuSR_td_PSI_bin {
@ -58,48 +60,53 @@ class MuSR_td_PSI_bin {
string filename; string filename;
string readstatus; string readstatus;
string writestatus;
string consistencyStatus;
bool readingok; bool readingok;
bool writingok;
bool consistencyOk;
char format_id[3] ; char format_id[3];
int num_run ; int num_run;
char sample[11] ; char sample[11];
char temp[11] ; char temp[11];
char field[11] ; char field[11];
char orient[11] ; char orient[11];
char comment[63] ; char setup[11];
char comment[63];
char date_start[10] ; char date_start[10];
char date_stop[10] ; char date_stop[10];
char time_start[9] ; char time_start[9];
char time_stop[9] ; char time_stop[9];
float bin_width ; float bin_width;
int number_histo ; int number_histo;
int length_histo ; int length_histo;
char labels_histo[MAXHISTO][MAXLABELSIZE] ; char labels_histo[MAXHISTO][MAXLABELSIZE];
int total_events ; int total_events;
int events_per_histo[MAXHISTO] ; int events_per_histo[MAXHISTO];
int default_binning ; int default_binning;
float real_t0[MAXHISTO] ; float real_t0[MAXHISTO];
int integer_t0[MAXHISTO] ; int integer_t0[MAXHISTO];
int first_good[MAXHISTO] ; int first_good[MAXHISTO];
int last_good[MAXHISTO] ; int last_good[MAXHISTO];
int number_scaler ; int number_scaler;
int scalers[MAXSCALER] ; int scalers[MAXSCALER];
char labels_scalers[MAXSCALER][MAXLABELSIZE] ; char labels_scalers[MAXSCALER][MAXLABELSIZE];
int number_temper ; int number_temper;
float temper[MAXTEMPER] ; float temper[MAXTEMPER];
float temp_deviation[MAXTEMPER] ; float temp_deviation[MAXTEMPER];
int **histo ; int **histo;
public: public:
@ -118,12 +125,19 @@ class MuSR_td_PSI_bin {
public: public:
int read(const char* fileName); // generic read int read(const char* fileName); // generic read
int write(const char *fileName); // generic write
int readbin(const char* fileName); // read MuSR PSI bin format int readbin(const char* fileName); // read MuSR PSI bin format
int writebin(const char *fileName); // write MuSR PSI bin format
int readmdu(const char* fileName); // read MuSR mdu format int readmdu(const char* fileName); // read MuSR mdu format
int writemdu(const char* fileName); // write MuSR mdu format
bool readingOK() const; bool readingOK() const;
bool writingOK() const;
bool CheckDataConsistency(int tag=0); // tag: 0=reasonable, 1=strict
string ReadStatus() const; string ReadStatus() const;
string WriteStatus() const;
string ConsistencyStatus() const;
string Filename() const; string Filename() const;
int Show() const; int Show() const;
@ -133,43 +147,40 @@ class MuSR_td_PSI_bin {
double get_histo(int histo_num, int j); double get_histo(int histo_num, int j);
int *get_histo_array_int(int histo_num); int *get_histo_array_int(int histo_num);
double *get_histo_array(int histo_num , int binning) ; double *get_histo_array(int histo_num, int binning);
vector<double> get_histo_vector(int histo_num , int binning) ; int put_histo_array_int(vector< vector<int> > histo, int tag = 0);
vector<double> get_histo_vector_no0(int histo_num , int binning) ; vector<double> get_histo_vector(int histo_num, int binning);
vector<double> get_histo_vector_no0(int histo_num, int binning);
double *get_histo_fromt0_array(int histo_num , double *get_histo_fromt0_array(int histo_num, int binning, int offset = 0);
int binning ,
int offset = 0) ;
vector<double> get_histo_fromt0_vector(int histo_num , vector<double> get_histo_fromt0_vector(int histo_num, int binning, int offset = 0);
int binning ,
int offset = 0) ;
double *get_histo_goodBins_array(int histo_num , int binning) ; double *get_histo_goodBins_array(int histo_num, int binning);
vector<double> get_histo_goodBins_vector(int histo_num , int binning) ; vector<double> get_histo_goodBins_vector(int histo_num, int binning);
double *get_histo_fromt0_minus_bckgrd_array(int histo_num , double *get_histo_fromt0_minus_bckgrd_array(int histo_num,
int lower_bckgdr , int lower_bckgdr,
int higher_bckgdr , int higher_bckgdr,
int binning , int binning,
int offset = 0) ; int offset = 0);
vector<double> get_histo_fromt0_minus_bckgrd_vector(int histo_num , vector<double> get_histo_fromt0_minus_bckgrd_vector(int histo_num,
int lower_bckgdr , int lower_bckgdr,
int higher_bckgdr , int higher_bckgdr,
int binning , int binning,
int offset = 0) ; int offset = 0);
double *get_histo_goodBins_minus_bckgrd_array(int histo_num , double *get_histo_goodBins_minus_bckgrd_array(int histo_num,
int lower_bckgrd , int lower_bckgrd,
int higher_bckgrd , int higher_bckgrd,
int binning) ; int binning);
vector<double> get_histo_goodBins_minus_bckgrd_vector(int histo_num , vector<double> get_histo_goodBins_minus_bckgrd_vector(int histo_num,
int lower_bckgrd , int lower_bckgrd,
int higher_bckgrd , int higher_bckgrd,
int binning) ; int binning);
double *get_asymmetry_array(int histo_num_plus, double *get_asymmetry_array(int histo_num_plus,
int histo_num_minus, int histo_num_minus,
@ -178,88 +189,95 @@ class MuSR_td_PSI_bin {
int lower_bckgrd_plus, int lower_bckgrd_plus,
int higher_bckgrd_plus, int higher_bckgrd_plus,
int lower_bckgrd_minus, int lower_bckgrd_minus,
int higher_bckgrd_minus , int higher_bckgrd_minus,
int offset = 0, int offset = 0,
double y_offset = 0.) ; double y_offset = 0.);
vector<double> get_asymmetry_vector(int histo_num_plus , vector<double> get_asymmetry_vector(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus , int higher_bckgrd_minus,
int offset = 0 , int offset = 0,
double y_offset = 0.) ; double y_offset = 0.);
double *get_error_asymmetry_array(int histo_num_plus , double *get_error_asymmetry_array(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus , int higher_bckgrd_minus,
int offset = 0) ; int offset = 0);
vector<double> get_error_asymmetry_vector(int histo_num_plus , vector<double> get_error_asymmetry_vector(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus , int higher_bckgrd_minus,
int offset = 0) ; int offset = 0);
double *get_asymmetry_goodBins_array(int histo_num_plus , double *get_asymmetry_goodBins_array(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus) ; int higher_bckgrd_minus);
vector<double> get_asymmetry_goodBins_vector(int histo_num_plus , vector<double> get_asymmetry_goodBins_vector(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus) ; int higher_bckgrd_minus);
double *get_error_asymmetry_goodBins_array(int histo_num_plus , double *get_error_asymmetry_goodBins_array(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus) ; int higher_bckgrd_minus);
vector<double> get_error_asymmetry_goodBins_vector(int histo_num_plus , vector<double> get_error_asymmetry_goodBins_vector(int histo_num_plus,
int histo_num_minus , int histo_num_minus,
double alpha_param , double alpha_param,
int binning , int binning,
int lower_bckgrd_plus , int lower_bckgrd_plus,
int higher_bckgrd_plus , int higher_bckgrd_plus,
int lower_bckgrd_minus , int lower_bckgrd_minus,
int higher_bckgrd_minus) ; int higher_bckgrd_minus);
double get_binWidth_ps(); double get_binWidth_ps();
void put_binWidth_ps(double binWidth);
double get_binWidth_ns(); double get_binWidth_ns();
void put_binWidth_ns(double binWidth);
double get_binWidth_us(); double get_binWidth_us();
void put_binWidth_us(double binWidth);
int get_histoLength_bin(); int get_histoLength_bin();
void put_histoLength_bin(int val) { length_histo = val; }
int get_numberHisto_int(); int get_numberHisto_int();
void put_numberHisto_int(int val) { number_histo = val; }
string get_nameHisto(int i) ; string get_nameHisto(int i);
int put_nameHisto(string histoName, int i);
vector<string> get_histoNames_vector(); vector<string> get_histoNames_vector();
int put_histoNames_vector(vector<string> &histoNames);
long get_eventsHisto_long(int i); long get_eventsHisto_long(int i);
vector<long> get_eventsHisto_vector(); vector<long> get_eventsHisto_vector();
@ -267,52 +285,69 @@ class MuSR_td_PSI_bin {
long get_totalEvents_long(); long get_totalEvents_long();
int get_numberScaler_int(); int get_numberScaler_int();
vector<long> get_scalers_vector() ; int put_numberScaler_int(int val);
vector<string> get_scalersNames_vector() ; vector<long> get_scalers_vector();
int put_scalers_vector(vector<int> scalerData);
vector<string> get_scalersNames_vector();
int put_scalersNames_vector(vector<string> scalersName);
int get_default_binning() ; int get_default_binning();
int get_t0_int(int i) ; int get_t0_int(int i);
vector<int> get_t0_vector() ; int put_t0_int(int histoNo, int t0);
double get_t0_double(int i) ; vector<int> get_t0_vector();
int put_t0_vector(vector<int> &t0Data);
double get_t0_double(int i);
int get_max_t0_int () ; int get_max_t0_int ();
int get_max_2_t0_int (int k, int j) ; int get_max_2_t0_int (int k, int j);
int get_min_t0_int () ; int get_min_t0_int ();
int get_min_2_t0_int (int k, int j) ; int get_min_2_t0_int (int k, int j);
int get_firstGood_int(int i) ; int get_firstGood_int(int i);
vector<int> get_firstGood_vector() ; vector<int> get_firstGood_vector();
int put_firstGood_int(int i, int j) ; int put_firstGood_int(int i, int j);
int get_lastGood_int(int i) ; int get_lastGood_int(int i);
vector<int> get_lastGood_vector() ; vector<int> get_lastGood_vector();
int put_lastGood_int(int i, int j) ; int put_lastGood_int(int i, int j);
int get_max_lastGood_int () ; int get_max_lastGood_int ();
int get_max_2_lastGood_int (int k, int j) ; int get_max_2_lastGood_int (int k, int j);
int get_min_lastGood_int () ; int get_min_lastGood_int ();
int get_min_2_lastGood_int (int k, int j) ; int get_min_2_lastGood_int (int k, int j);
int get_runNumber_int() ; int get_runNumber_int();
int put_runNumber_int(int i) ; int put_runNumber_int(int i);
string get_sample() ; string get_sample();
string get_field() ; int put_sample(string sample);
string get_orient() ; string get_field();
string get_temp() ; int put_field(string field);
string get_comment() ; string get_orient();
int put_orient(string orientation);
string get_temp();
int put_temp(string temp);
string get_setup();
int put_setup(string setup);
string get_comment();
int put_comment(string comment);
vector<string> get_timeStart_vector() ; vector<string> get_timeStart_vector();
vector<string> get_timeStop_vector() ; int put_timeStart_vector(vector<string> timeStart);
vector<string> get_timeStop_vector();
int put_timeStop_vector(vector<string> timeStop);
int get_numberTemperature_int() ; int get_numberTemperature_int();
vector<double> get_temperatures_vector() ; int put_numberTemperature_int(int noOfTemps);
vector<double> get_devTemperatures_vector() ; vector<double> get_temperatures_vector();
int put_temperatures_vector(vector<double> &temps);
vector<double> get_devTemperatures_vector();
int put_devTemperatures_vector(vector<double> &devTemps);
private: private:
int tmax(int x, int y) ; int tmax(int x, int y);
int tmin(int x, int y) ; int tmin(int x, int y);
} ; } ;
#endif #endif

View File

@ -279,6 +279,14 @@ class PRawRunData {
virtual const Int_t GetRunNumber() { return fRunNumber; } virtual const Int_t GetRunNumber() { return fRunNumber; }
virtual const TString* GetRunTitle() { return &fRunTitle; } virtual const TString* GetRunTitle() { return &fRunTitle; }
virtual const TString* GetSetup() { return &fSetup; } virtual const TString* GetSetup() { return &fSetup; }
virtual const TString* GetStartTime() { return &fStartTime; }
virtual const TString* GetStartDate() { return &fStartDate; }
virtual const time_t GetStartDateTime() { return fStartDateTimeSec; }
virtual const TString* GetStopTime() { return &fStopTime; }
virtual const TString* GetStopDate() { return &fStopDate; }
virtual const time_t GetStopDateTime() { return fStopDateTimeSec; }
virtual const TString* GetSample() { return &fSample; }
virtual const TString* GetOrientation() { return &fOrientation; }
virtual const Double_t GetField() { return fField; } virtual const Double_t GetField() { return fField; }
virtual const UInt_t GetNoOfTemperatures() { return fTemp.size(); } virtual const UInt_t GetNoOfTemperatures() { return fTemp.size(); }
virtual const PDoublePairVector* GetTemperature() const { return &fTemp; } virtual const PDoublePairVector* GetTemperature() const { return &fTemp; }
@ -303,7 +311,15 @@ class PRawRunData {
virtual void SetRunNumber(const Int_t &val) { fRunNumber = val; } virtual void SetRunNumber(const Int_t &val) { fRunNumber = val; }
virtual void SetRunTitle(const TString str) { fRunTitle = str; } virtual void SetRunTitle(const TString str) { fRunTitle = str; }
virtual void SetSetup(const TString str) { fSetup = str; } virtual void SetSetup(const TString str) { fSetup = str; }
virtual void SetStartTime(const TString str) { fStartTime = str; }
virtual void SetStartDate(const TString str) { fStartDate = str; }
virtual void SetStartDateTime(const time_t val) { fStartDateTimeSec = val; }
virtual void SetStopTime(const TString str) { fStopTime = str; }
virtual void SetStopDate(const TString str) { fStopDate = str; }
virtual void SetStopDateTime(const time_t val) { fStopDateTimeSec = val; }
virtual void SetField(const Double_t dval) { fField = dval; } virtual void SetField(const Double_t dval) { fField = dval; }
virtual void SetSample(const TString str) { fSample = str; }
virtual void SetOrientation(const TString str) { fOrientation = str; }
virtual void ClearTemperature() { fTemp.clear(); } virtual void ClearTemperature() { fTemp.clear(); }
virtual void SetTemperature(const UInt_t idx, const Double_t temp, const Double_t errTemp); virtual void SetTemperature(const UInt_t idx, const Double_t temp, const Double_t errTemp);
virtual void SetTempError(const UInt_t idx, const Double_t errTemp); virtual void SetTempError(const UInt_t idx, const Double_t errTemp);
@ -326,6 +342,14 @@ class PRawRunData {
Int_t fRunNumber; ///< run number Int_t fRunNumber; ///< run number
TString fRunTitle; ///< run title TString fRunTitle; ///< run title
TString fSetup; ///< description of the setup of this run TString fSetup; ///< description of the setup of this run
TString fStartTime; ///< start time of the run
TString fStartDate; ///< start date of the run
time_t fStartDateTimeSec; ///< start run given as time_t object
TString fStopTime; ///< stop time of the run
TString fStopDate; ///< stop date of the run
time_t fStopDateTimeSec; ///< stop run given as time_t object
TString fSample; ///< description of the sample
TString fOrientation; ///< description of the orientation
Double_t fField; ///< magnetic field value Double_t fField; ///< magnetic field value
PDoublePairVector fTemp; ///< measured temperatures and standard deviations during the run PDoublePairVector fTemp; ///< measured temperatures and standard deviations during the run
Double_t fEnergy; ///< implantation energy of the muon Double_t fEnergy; ///< implantation energy of the muon

View File

@ -82,7 +82,6 @@ class PRunDataHandler
virtual Bool_t WriteNexusFile(TString fln=""); virtual Bool_t WriteNexusFile(TString fln="");
virtual Bool_t WriteWkmFile(TString fln=""); virtual Bool_t WriteWkmFile(TString fln="");
virtual Bool_t WritePsiBinFile(TString fln=""); virtual Bool_t WritePsiBinFile(TString fln="");
virtual Bool_t WritePsiMduFile(TString fln="");
virtual Bool_t WriteMudFile(TString fln=""); virtual Bool_t WriteMudFile(TString fln="");
virtual Bool_t WriteAsciiFile(TString fln=""); virtual Bool_t WriteAsciiFile(TString fln="");
@ -93,6 +92,7 @@ class PRunDataHandler
virtual Int_t GetDataTagIndex(TString &str, const PStringVector* fLabels); virtual Int_t GetDataTagIndex(TString &str, const PStringVector* fLabels);
virtual TString FileNameFromTemplate(TString &fileNameTemplate, Int_t run, TString &year, Bool_t &ok); virtual TString FileNameFromTemplate(TString &fileNameTemplate, Int_t run, TString &year, Bool_t &ok);
virtual TString GetMonth(Int_t month);
}; };
#endif // _PRUNDATAHANDLER_H_ #endif // _PRUNDATAHANDLER_H_

View File

@ -2,24 +2,24 @@ Sn-210042 B=~48(G)/1.50(A), T=3.31(K), Tr=18.02(kV), Sa=-4.70(kV), En=21.97(keV)
############################################################### ###############################################################
FITPARAMETER FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries # Nr. Name Value Step Pos_Error Boundaries
1 one 1 0 none 1 one 1.0 0.0 none
2 zero 0 0 none 2 zero 0.0 0.0 none
3 Asy 0.207938 0.00663241 none 0 0.33 3 Asy 0.2079 0.0066 none 0 0.33
4 energy 22 0 none 4 energy 22.0 0.0 none
5 redTemp 0.8683 0 none 5 redTemp 0.9 0.0 none
6 thickness 5000 0 none 6 thickness 5000.0 0.0 none
7 ell 12000 0 none 7 ell 12000.0 0.0 none
8 xi 94 0 none 8 xi 94.0 0.0 none
9 lambdaL 45.9973 1.19932 none 9 lambdaL 46.0 1.2 none
10 Bext 47.11 0 none 10 Bext 47.1 0.0 none
11 deadLayer 20.7296 0.054242 none 0 none 11 deadLayer 20.730 0.051 none 0 none
12 RateSmear 0.327307 0.0222695 none 12 RateSmear 0.327 0.022 none
13 N0_L 297.975 1.29352 none 13 N0_L 298.0 1.3 none
14 Bkg_L 24.582 0.122645 none 14 Bkg_L 24.58 0.12 none
15 Phase_L 31.2249 2.7339 none 15 Phase_L 31.2 2.7 none
16 Alpha_LR 1.08146 0.00759253 none 16 Alpha_LR 1.0815 0.0076 none
17 Bkg_R 27.5568 0.123419 none 17 Bkg_R 27.56 0.12 none
18 RelPhase_R 152.704 1.58788 none 18 RelPhase_R 152.7 1.6 none
############################################################### ###############################################################
THEORY THEORY
@ -42,7 +42,7 @@ map 1 2 0 0 0 0 0 0 0 0
forward 1 forward 1
data 3289 65000 data 3289 65000
t0 3289 t0 3289
fit 0.2 9.2 fit 0.2 9.2
packing 250 packing 250
RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-format) RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
@ -54,7 +54,7 @@ map 16 18 0 0 0 0 0 0 0 0
forward 3 forward 3
data 3289 65000 data 3289 65000
t0 3289 t0 3289
fit 0.2 9.2 fit 0.2 9.2
packing 250 packing 250
############################################################### ###############################################################
@ -66,7 +66,7 @@ SAVE
############################################################### ###############################################################
PLOT 0 (single histo plot) PLOT 0 (single histo plot)
runs 1 2 runs 1 2
range 0.00 9.00 -0.30 0.30 range 0 9 -0.3 0.3
view_packing 500 view_packing 500
############################################################### ###############################################################
@ -75,13 +75,13 @@ units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 10 fourier_power 10
apodization STRONG # NONE, WEAK, MEDIUM, STRONG apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8.50 phase 8.5
#range_for_phase_correction 50.0 70.0 #range_for_phase_correction 50.0 70.0
range 0.00 200.00 range 0.0 200.0
############################################################### ###############################################################
STATISTIC --- 2010-11-07 16:46:59 STATISTIC --- 2011-02-06 14:54:40
chisq = 417.37802066449291, NDF = 358, chisq/NDF = 1.1658603929175779 chisq = 417.37802066738652, NDF = 358, chisq/NDF = 1.1658603929256606

View File

@ -1,11 +1,11 @@
Test asymmetry plot, MUD data file MgB12H12 No2 ZF T=150
############################################################### ###############################################################
FITPARAMETER FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries # Nr. Name Value Step Pos_Error Boundaries
1 alpha 1 0 none 0 2 1 alpha 1.0 0.0 none 0 2
2 asy 0.175103 -0.000818844 0.00083464 0 0.33 2 asy 0.17503 -0.00081 0.00083 0 0.33
3 rate 0.165184 -0.0015983 0.00159512 0 none 3 rate 0.1649 -0.0016 0.0016 0 none
4 beta 0.888935 -0.0159792 0.0161548 0.5 2 4 beta 0.892 -0.016 0.016 0.5 2
############################################################### ###############################################################
THEORY THEORY
@ -20,12 +20,12 @@ RUN data/000100 XXXX TRIUMF MUD (name beamline institute data-file-format)
fittype 2 (asymmetry fit) fittype 2 (asymmetry fit)
alpha 1 alpha 1
map 0 0 0 0 0 0 0 0 0 0 0 map 0 0 0 0 0 0 0 0 0 0 0
forward 1 forward 1
backward 2 backward 2
background 79 391 80 409 background 79 391 80 409
data 438 12785 436 12787 data 438 12785 436 12787
t0 432 431 t0 432 431
fit 0.00 8.00 fit 0 8
packing 100 packing 100
############################################################### ###############################################################
@ -41,15 +41,15 @@ units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 12 fourier_power 12
apodization NONE # NONE, WEAK, MEDIUM, STRONG apodization NONE # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8.50 phase 8
#range_for_phase_correction 50.0 70.0 #range_for_phase_correction 50.0 70.0
range 0.00 200.00 range 0 200
############################################################### ###############################################################
PLOT 2 (asymmetry plot) PLOT 2 (asymmetry plot)
runs 1 runs 1
range 0.00 8.00 0.00 0.25 range 0 8 0 0.25
############################################################### ###############################################################
STATISTIC --- 2010-01-08 14:45:37 STATISTIC --- 2011-02-06 15:03:19
chisq = 132.25963, NDF = 99, chisq/NDF = 1.33595586 chisq = 133.92904274288378, NDF = 99, chisq/NDF = 1.3528186135644826

View File

@ -1,13 +1,13 @@
Test single histogram plot (with life time correction), ROOT-NPP data file LSCO (492-494) ZFC T=4.59(K),E=12.49(keV),B=~28(G)/0.89(A),Tr/Sa=15.02/1.63(kV),RAL-RAR=-0.08(kV),RAT-RAB=0.08(kV)
############################################################### ###############################################################
FITPARAMETER FITPARAMETER
# No Name Value Step Pos_Error Boundaries # No Name Value Step Pos_Error Boundaries
1 phase 15.1669 -1.62019 1.60987 0 100 1 phase 15.2 -1.6 1.6 0 100
2 freq 0.373322 -0.00240381 0.00239767 0 300 2 freq 0.3733 -0.0024 0.0024 0 300
3 asym 0.11972 -0.0037553 0.00385333 0 0.3 3 asym 0.1196 -0.0037 0.0039 0 0.3
4 rate 0.142788 -0.0169095 0.0175212 0 100 4 rate 0.142 -0.017 0.018 0 100
5 Norm_L 432.91 -0.718487 0.722474 5 Norm_L 432.87 -0.72 0.72
6 BG_L 29.377 -0.102773 0.102472 6 BG_L 29.38 -0.10 0.10
############################################################### ###############################################################
THEORY THEORY
@ -25,10 +25,10 @@ norm 5
backgr.fit 6 backgr.fit 6
lifetimecorrection lifetimecorrection
map 0 0 0 0 0 0 0 0 0 0 map 0 0 0 0 0 0 0 0 0 0
forward 1 forward 1
data 3419 66000 data 3419 66000
t0 3419 t0 3419
fit 0.10 10.00 fit 0.1 10
packing 250 packing 250
############################################################### ###############################################################
@ -40,8 +40,8 @@ SAVE
############################################################### ###############################################################
PLOT 0 (single histo plot) PLOT 0 (single histo plot)
runs 1 runs 1
range 0.00 8.00 -0.30 0.30 range 0 8 -0.3 0.3
############################################################### ###############################################################
STATISTIC --- 2010-01-08 14:45:50 STATISTIC --- 2011-02-06 14:52:54
chisq = 247.622035, NDF = 197, chisq/NDF = 1.25696464 chisq = 248.83532814099809, NDF = 197, chisq/NDF = 1.2631234931015132