mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Ctbgui det (#58)
* WIP * WIP * WIP * WIP * WIP * WIP * defs added * ctb gui: tengiga bug fix * WIP * WIP
This commit is contained in:
@ -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++)
|
||||
|
Reference in New Issue
Block a user