first ready version of musrt0

This commit is contained in:
nemu 2009-03-31 11:22:20 +00:00
parent 41264e9eee
commit 4b561aa598
5 changed files with 14 additions and 12 deletions

View File

@ -309,7 +309,7 @@ cout << endl;
/**
* <p>
*/
int PMsrHandler::WriteMsrLogFile()
int PMsrHandler::WriteMsrLogFile(TString ext)
{
const unsigned int prec = 6; // output precision for float/doubles
@ -327,7 +327,10 @@ int PMsrHandler::WriteMsrLogFile()
ostr = dynamic_cast<TObjString*>(tokens->At(i));
str += ostr->GetString() + TString(".");
}
str += "mlog";
if (ext.Length() != 0)
str += ext;
else
str += "mlog";
// clean up
if (tokens) {
@ -1874,7 +1877,7 @@ bool PMsrHandler::HandleCommandsEntry(PMsrLines &lines)
PMsrLines::iterator iter;
if (lines.empty()) {
cout << endl << "WARNING: There is no COMMANDS block! Do you really want this?";
cout << endl << "**WARNING**: There is no COMMANDS block! Do you really want this?";
cout << endl;
}
@ -1918,14 +1921,14 @@ void PMsrHandler::InitFourierParameterStructure(PMsrFourierStructure &fourier)
*/
bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
{
cout << endl << ">> in PMsrHandler::HandleFourierEntry ...";
//cout << endl << ">> in PMsrHandler::HandleFourierEntry ...";
bool error = false;
if (lines.empty()) // no fourier block present
return true;
cout << endl << ">> in PMsrHandler::HandleFourierEntry, Fourier block present ...";
//cout << endl << ">> in PMsrHandler::HandleFourierEntry, Fourier block present ...";
PMsrFourierStructure fourier;
@ -2149,7 +2152,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
TString str2;
if (lines.empty()) {
cout << endl << "WARNING: There is no PLOT block! Do you really want this?";
cout << endl << "**WARNING**: There is no PLOT block! Do you really want this?";
cout << endl;
}

View File

@ -86,7 +86,7 @@ PMusrT0::PMusrT0()
*/
PMusrT0::PMusrT0(PRawRunData *rawRunData, int runNo, int histoNo, int detectorTag, int addRunNo)
{
cout << endl << "run Name = " << rawRunData->fRunName.Data() << ", histoNo = " << histoNo << endl;
// cout << endl << "run Name = " << rawRunData->fRunName.Data() << ", histoNo = " << histoNo << endl;
fStatus = 0; // default is quit locally
@ -289,7 +289,6 @@ void PMusrT0::InitDataAndBkg()
fData->Draw("p0 9 hist same");
// feed background histo
int fBkgRange[2];
switch (fDetectorTag) {
case DETECTOR_TAG_FORWARD:
fBkgRange[0] = fMsrHandler->GetMsrRunList()->at(fRunNo).fBkgRange[0 + fAddRunNo * fAddRunOffset];
@ -653,8 +652,6 @@ void PMusrT0::SetBkgLastChannel()
*/
void PMusrT0::UnZoom()
{
cout << endl << ">> in UnZoom ..." << endl;
fHisto->GetXaxis()->UnZoom();
fMainCanvas->Modified(); // needed that Update is actually working

View File

@ -436,7 +436,6 @@ bool PRunAsymmetry::PrepareData()
}
// subtract background from histogramms ------------------------------------------
cout << endl << ">> fBkgFix.size() = " << fRunInfo->fBkgFix.size() << ", fBkgRange.size() = " << fRunInfo->fBkgRange.size() << endl;
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given
if (fRunInfo->fBkgRange.size() != 0) {
if (!SubtractEstimatedBkg())

View File

@ -51,7 +51,7 @@ class PMsrHandler
virtual ~PMsrHandler();
virtual int ReadMsrFile();
virtual int WriteMsrLogFile();
virtual int WriteMsrLogFile(TString ext=TString(""));
virtual TString* GetMsrTitle() { return &fTitle; }
virtual PMsrParamList* GetMsrParamList() { return &fParam; }

View File

@ -286,6 +286,9 @@ int main(int argc, char *argv[])
}
cout << endl;
// write msr-file
msrHandler->WriteMsrLogFile("msr");
// clean up
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);