implmented some startup features
This commit is contained in:
@ -33,10 +33,11 @@
|
||||
#include <fstream>
|
||||
using namespace std;
|
||||
|
||||
#include "TString.h"
|
||||
#include "TFile.h"
|
||||
#include "TCanvas.h"
|
||||
#include "TH1.h"
|
||||
#include <TSAXParser.h>
|
||||
#include <TString.h>
|
||||
#include <TFile.h>
|
||||
#include <TCanvas.h>
|
||||
#include <TH1.h>
|
||||
|
||||
#include "PMusr.h"
|
||||
#include "PStartupHandler.h"
|
||||
@ -501,7 +502,25 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// read startup file
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
PStartupHandler *startupHandler = new PStartupHandler();
|
||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
||||
status = saxParser->ParseFile("musrfit_startup.xml");
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
cout << endl << "**ERROR** reading/parsing musrfit_startup.xml. Fix it.";
|
||||
cout << endl;
|
||||
// clean up
|
||||
if (saxParser) {
|
||||
delete saxParser;
|
||||
saxParser = 0;
|
||||
}
|
||||
if (startupHandler) {
|
||||
delete startupHandler;
|
||||
startupHandler = 0;
|
||||
}
|
||||
return PMUSR_WRONG_STARTUP_SYNTAX;
|
||||
}
|
||||
|
||||
// read msr-file
|
||||
PMsrHandler *msrHandler = new PMsrHandler(argv[1]);
|
||||
@ -524,7 +543,7 @@ int main(int argc, char *argv[])
|
||||
musrfit_debug_info(msrHandler);
|
||||
|
||||
// read all the necessary runs (raw data)
|
||||
PRunDataHandler *dataHandler = new PRunDataHandler(msrHandler);
|
||||
PRunDataHandler *dataHandler = new PRunDataHandler(msrHandler, startupHandler->GetDataPathList());
|
||||
bool success = dataHandler->IsAllDataAvailable();
|
||||
if (!success) {
|
||||
cout << endl << "Couldn't read all data files, will quit ..." << endl;
|
||||
|
Reference in New Issue
Block a user