Ctbgui det (#58)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* defs added

* ctb gui: tengiga bug fix

* WIP

* WIP
This commit is contained in:
Dhanya Thattil
2019-08-29 11:39:29 +02:00
committed by GitHub
parent 4f0634fe62
commit e23b3b0471
31 changed files with 795 additions and 1210 deletions

View File

@ -9,11 +9,11 @@
#include <fstream>
#include <string>
#include "multiSlsDetector.h"
#include "Detector.h"
#include "sls_detector_defs.h"
//#include "sls_receiver_defs.h"
#include "ctbMain.h"
#include "ctbDefs.h"
using namespace std;
@ -45,9 +45,9 @@ int main(int argc, char **argv) {
} else if (strcmp(argv[ia],"-par")==0) {
if (ia+1<argc) {
pfname=argv[ia+1];
pfname=argv[ia+1];
ia++;
pf=1;
pf=1;
}
@ -61,31 +61,27 @@ int main(int argc, char **argv) {
cout << " *** " << endl;
/****** Create detector ****************/
multiSlsDetector *myDet=new multiSlsDetector(id);
// myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
//cout << id << " " << myDet << " " << myDet->setOnline() << endl;
if (cf) {
myDet->readConfigurationFile(cfname);
} else
cout << "No config file specified" << endl;
cout << "aa" << endl;
cout << "Created multi detector id " << id << " hostname " << myDet->getHostname() << endl;
cout << "bb" << endl;
if (pf) {
myDet->retrieveDetectorSetup(pfname);
} else
cout << "No parameter file specified" << endl;
sls::Detector *myDet = nullptr;
try {
/****** Create detector ****************/
myDet=new sls::Detector(id);
cout << "Created multi detector id " << id << endl;
if (cf) {
myDet->loadConfig(cfname);
cout << "Config file loaded successfully" << endl;
} else {
cout << "No config file specified" << endl;
}
cout << "hostname " << myDet->getHostname() << endl;
if (pf) {
myDet->loadParameters(pfname);
cout << "Loaded parameter file successfully" << endl;
} else{
cout << "No parameter file specified" << endl;
}
} CATCH_DISPLAY ("Could not create detector/ load config/parameters.", "ctbGui::main")
/***********Create GUI stuff *******************/
TApplication theApp("App",&argc,argv);
@ -141,7 +137,7 @@ int main(int argc, char **argv) {
gROOT->ForceStyle();
ctbMain *mf=new ctbMain(gClient->GetRoot(),myDet);
ctbMain *mf=new ctbMain(gClient->GetRoot(), myDet);
cout << " *** " << argc << endl;
for (int ia=0; ia<argc; ia++)