#include #include #include "MyLabview2Root.h" #include "MyAnalyze.h" #include "MyFileProcessor.h" #include "MySettings.h" #include "MySetting.h" //_________________________________________________________________________________ MyLabview2Root::MyLabview2Root() { fp = new MyFileProcessor(); an = new MyAnalyze(); run(); } //_________________________________________________________________________________ MyLabview2Root::~MyLabview2Root() { delete fp; delete an; } //_________________________________________________________________________________ void MyLabview2Root::run() { //--ask for a root File name--// setRootFileName(); while(1) { //--change settings or get filename--// //--if true is returned quit here--// if(changeSettings()) { cout << "Ok, this was the last file..."<warnSettings(); //--process file--// fp->processFile(LMAFileName,an); } //--write root file--// an->writeRootFile(RootFileName); //--exit program--// delete this; } //_________________________________________________________________________________ void MyLabview2Root::setRootFileName() { while(1) { cout<< "Please give me a proper .root Filename"<> tmp; RootFileName = tmp; cout << "read good"<getSettings()->getNbrSettings();++i) { if (!an->getSettings()->getSetting(i)->getValue()) cout<getSettings()->getSetting(i)->getName()<<" is set to 0" << endl; } } //_________________________________________________________________________________ void MyLabview2Root::printSettings() { cout<getSettings()->getNbrSettings();++i) { cout << an->getSettings()->getSetting(i)->getName() << " is set to: " << an->getSettings()->getSetting(i)->getValue() << endl; } } //_________________________________________________________________________________ bool MyLabview2Root::changeSettings() { TString LeftHand; TString RightHand; //--print out some instructions--// cout <> tmp; LMAFileName = tmp; //--when q return true--// if (!LMAFileName.CompareTo("q")) return true; //--when there is a "=" then check wether a Parameter is changed--// if (LMAFileName.Contains("=")) { //--separate input into the lefthand and righthand side of the "="--// LeftHand = LMAFileName(0,LMAFileName.Index("=")); RightHand = LMAFileName(LMAFileName.Index("=")+1,LMAFileName.Length()); an->getSettings()->setSetting(LeftHand.Data(),atof(RightHand.Data())); } //--if there is a '#' its a commented line that should be printed--// else if ( LMAFileName.Contains("#") && LMAFileName.Contains("--") ) { // cout <