From 765d1a3faff4a5e6931cd238c38e9543581e741a Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Fri, 18 May 2012 09:05:47 +0000 Subject: [PATCH] Fix of: When changing from ROOT-NPP -> ROOT-PPC now, due to the change to MusrRoot, the forward histogram index should be changed automatically. However, this only works for the first RUN block but not for the rest. Furthermore updated some outdated error messages. --- ChangeLog | 1 + src/classes/PMsrHandler.cpp | 2 +- src/classes/PRunDataHandler.cpp | 16 +++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd1957dc..699c4bfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ NEW 2012-05-12 added dump_header. This is a little program which dumps the NEW 2012-04-24 added a first version for negative muon fitting. At the same time substaintial bug fixing has been carried out (mainly the logx/logy handling). +FIXED 2012-05-18 fixed wrong forward/backward tag for ROOT-PPC (MUSR-215) CHANGED 2012-05-10 prevent any2many from overwriting an input file. At the some additional bug fixing of any2many has be carried out. CHANGED 2012-05-08 updating docu diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index aef1e463..e110e1ee 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -3853,7 +3853,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines) cerr << endl; cerr << endl << "where is: 0=single histo asym,"; cerr << endl << " 2=forward-backward asym,"; - cerr << endl << " 4=mu minus singhle histo (not implemented yet),"; + cerr << endl << " 4=mu minus single histo,"; cerr << endl << " 8=non muSR."; cerr << endl << " is the list of runs, e.g. runs 1 3"; cerr << endl << "range is optional"; diff --git a/src/classes/PRunDataHandler.cpp b/src/classes/PRunDataHandler.cpp index f47b216f..55f888b3 100644 --- a/src/classes/PRunDataHandler.cpp +++ b/src/classes/PRunDataHandler.cpp @@ -220,13 +220,11 @@ Bool_t PRunDataHandler::ReadFilesMsr() for (UInt_t i=0; isize(); i++) { for (UInt_t j=0; jat(i).GetRunNameSize(); j++) { fRunName = *(runList->at(i).GetRunName(j)); - // check is file is already read - if (FileAlreadyRead(*(runList->at(i).GetRunName(j)))) - continue; // check if file actually exists if (!FileExistsCheck(runList->at(i), j)) return false; - // everything looks fine, hence try to read the data file + + // check special case for ROOT-NPP/ROOT-PPC (LEM) if (!runList->at(i).GetFileFormat(j)->CompareTo("root-npp")) { // not post pile up corrected histos // check if forward/backward histoNo are within proper bounds, i.e. < PRH_PPC_OFFSET for (UInt_t k=0; kat(i).GetForwardHistoNoSize(); k++) { @@ -237,7 +235,6 @@ Bool_t PRunDataHandler::ReadFilesMsr() if (runList->at(i).GetBackwardHistoNo(k) > PRH_PPC_OFFSET) runList->at(i).SetBackwardHistoNo(runList->at(i).GetBackwardHistoNo(k)-PRH_PPC_OFFSET, k); } - success = ReadRootFile(); } else if (!runList->at(i).GetFileFormat(j)->CompareTo("root-ppc")) { // post pile up corrected histos // check if forward/backward histoNo are within proper bounds, i.e. > PRH_PPC_OFFSET for (UInt_t k=0; kat(i).GetForwardHistoNoSize(); k++) { @@ -248,6 +245,15 @@ Bool_t PRunDataHandler::ReadFilesMsr() if (runList->at(i).GetBackwardHistoNo(k) < PRH_PPC_OFFSET) runList->at(i).SetBackwardHistoNo(runList->at(i).GetBackwardHistoNo(k)+PRH_PPC_OFFSET, k); } + } + + // check is file is already read + if (FileAlreadyRead(*(runList->at(i).GetRunName(j)))) + continue; + // everything looks fine, hence try to read the data file + if (!runList->at(i).GetFileFormat(j)->CompareTo("root-npp")) { // not post pile up corrected histos + success = ReadRootFile(); + } else if (!runList->at(i).GetFileFormat(j)->CompareTo("root-ppc")) { // post pile up corrected histos success = ReadRootFile(); } else if (!runList->at(i).GetFileFormat(j)->CompareTo("musr-root")) { // MusrRoot style file success = ReadRootFile();