Compare commits
388 Commits
Author | SHA1 | Date | |
---|---|---|---|
3e8774798a | |||
975cbb576e | |||
4e429c0d77 | |||
bf4fab549d | |||
f7705eb1da | |||
839896c7e6 | |||
4a7e246604 | |||
7f293115c4 | |||
f59f40a659 | |||
64fd82f92c | |||
cd232fd732 | |||
572047b72d | |||
4b7743b8ad | |||
953e513a2d | |||
a7c180eb1c | |||
7745bf5e0c | |||
8c88de899a | |||
7a55866966 | |||
1044fc68ab | |||
36904db3ca | |||
4a7d7ec9e1 | |||
c940607088 | |||
d2240884b4 | |||
90d2e6b82a | |||
61d347b45d | |||
13aa0599af | |||
59d8584a9e | |||
0807e130e4 | |||
1a0550301b | |||
316ed783a8 | |||
6adc373e18 | |||
8eea853a9a | |||
aad1885bf5 | |||
020e1b43f9 | |||
13aa48e3ec | |||
d5f80831dd | |||
5d52e41e37 | |||
cf34103d1f | |||
079c7dc169 | |||
1f7fbcfae2 | |||
511d3e3970 | |||
c6c11f6740 | |||
3703d06684 | |||
08fd848504 | |||
4ac7df5b90 | |||
d13a76af25 | |||
e0c45f4afd | |||
b90ca7b864 | |||
de8f04a058 | |||
fb8f49985b | |||
597f5e5d2a | |||
1f9dc775f6 | |||
882202c2bc | |||
5b5e1e32b3 | |||
4c2d28943f | |||
cf74f9b138 | |||
5d3e925ed4 | |||
9139451127 | |||
180038e485 | |||
86308352cb | |||
843dbffcd8 | |||
6e4d4eed0e | |||
be516e34b2 | |||
cc896bd99c | |||
6b0814c907 | |||
d4dd7b5d8c | |||
7db1136e65 | |||
328139434d | |||
14c78dc500 | |||
e7dbbf4c1f | |||
6ad6c9e8bb | |||
1633cc3f01 | |||
615909f178 | |||
1230b63b29 | |||
d489b34824 | |||
700346fbbe | |||
b803f3a32a | |||
8ecc795574 | |||
da809171e9 | |||
73ebb2750c | |||
2ed8b46ad0 | |||
754d0b7911 | |||
1c41ea8898 | |||
5c5e9d349a | |||
b1a9689caf | |||
2d8ee637dc | |||
db5412e599 | |||
a5e18833de | |||
7b2934fb73 | |||
e035eeaf08 | |||
e0de23dd45 | |||
85416acbea | |||
5c14453c5d | |||
2c6f0c49a7 | |||
a37eb65dbc | |||
b091b7e1a9 | |||
71ad7ae2f0 | |||
848569b216 | |||
3fa5191705 | |||
4a755d96ce | |||
8dc41efad2 | |||
9b8325bd37 | |||
5acb1419af | |||
3d4b2e9fee | |||
13a54224eb | |||
056fb4e119 | |||
baf65e8318 | |||
92c56739d9 | |||
0d66e62d10 | |||
705a25c9e0 | |||
c33657f04d | |||
8a26eef0bf | |||
7c58d3db46 | |||
4d9bbeecc3 | |||
b256e0b9e3 | |||
0eaecc0e12 | |||
c985124b51 | |||
891c67f3d0 | |||
ea1878f848 | |||
9c5e2aa5b7 | |||
02c4a5e18e | |||
bf2d8937f4 | |||
ef983c151f | |||
36171dc5a0 | |||
6d708e620a | |||
c338de941d | |||
e7d22b1b39 | |||
d0b12f4197 | |||
69524e61f4 | |||
7ebd1643ee | |||
f768886308 | |||
534be9f942 | |||
28e0cae2e2 | |||
32e4af910d | |||
922c7ede92 | |||
78e6dccf46 | |||
f738b218e1 | |||
a1c58f152f | |||
635a33ea85 | |||
3731bfd51e | |||
5c1574ec90 | |||
6956ee3164 | |||
9f92f5cffa | |||
d421c0c9fe | |||
c32acebc35 | |||
b9fcbf4697 | |||
c7bc397098 | |||
4c662270cd | |||
38570080b9 | |||
a06a4ef8d7 | |||
5e4e52936b | |||
e3df740901 | |||
e7633f1e04 | |||
05d4290ace | |||
790966e3dd | |||
e6c94a1d62 | |||
88f0b089b4 | |||
3c30ef71cf | |||
22de76c8b0 | |||
d9444121b7 | |||
061bd4251c | |||
3c92f26be7 | |||
505328bcaa | |||
eb48b1c492 | |||
440b244b66 | |||
f2a77be1b2 | |||
113ee269d4 | |||
038d3c11df | |||
1274b5532c | |||
daae091945 | |||
d6dccef65c | |||
35d7359403 | |||
ae35542193 | |||
2c8df98bf8 | |||
4f2f7639af | |||
9cdbd74471 | |||
16b8bb967c | |||
676fe91e57 | |||
57e801e5ea | |||
77aec59da9 | |||
68f360e395 | |||
27a21cc258 | |||
6ea6f44824 | |||
b6145510ad | |||
d84f95456b | |||
12f48fb0d2 | |||
bca0799b84 | |||
0aef2f3b81 | |||
f618ed439d | |||
390ca76130 | |||
c0e735c0b9 | |||
019b231a8c | |||
6dfa75430c | |||
d49a5cd7b4 | |||
378f7715b9 | |||
b915844822 | |||
4f1dfe8b87 | |||
1129702738 | |||
141a982878 | |||
6aeacf7b13 | |||
014dfd7eed | |||
b0d8739439 | |||
bf77cc10b2 | |||
7624d301a4 | |||
0e22e9c03c | |||
acbb4774fc | |||
a843661d1b | |||
4214ef6be0 | |||
287a451904 | |||
4fdacefdbe | |||
e153c6fd58 | |||
7701531ff3 | |||
8e19beb410 | |||
675ab8ceca | |||
35f151775e | |||
4719fff09a | |||
c605c77037 | |||
050bec703d | |||
d56b2b480b | |||
10e47581e0 | |||
303d84b24a | |||
b7629f6c67 | |||
ebd6a9131b | |||
b0534f194a | |||
7352407968 | |||
3e81c16f38 | |||
9e1029185f | |||
db1aaf041a | |||
4ac8439202 | |||
f809657ec4 | |||
bef3745693 | |||
5c78f148b6 | |||
7675b47474 | |||
3e4f76ed07 | |||
ab41ffb6bf | |||
448f333b1e | |||
499cf4db56 | |||
8a87f17811 | |||
22b51032dd | |||
863b662c6b | |||
2fc324ab4b | |||
0682d23abd | |||
642d7d8c74 | |||
4814962347 | |||
f3eb9c924f | |||
aec136cf21 | |||
1d1e5e1202 | |||
6b311f931b | |||
2ead554b7b | |||
64208d5edd | |||
0c529e09fb | |||
b10fedb8f3 | |||
b94e9475a0 | |||
bb46b9afce | |||
6a3747638d | |||
ac79bb86fb | |||
0b05f67f9d | |||
74654b1ebc | |||
6560a325ce | |||
c21d674e89 | |||
dbad2a41d8 | |||
dd7385cd88 | |||
b59b54e004 | |||
46a4fee083 | |||
5bb8bc4574 | |||
adc52782f8 | |||
4ccb47203e | |||
27ef53da4a | |||
1e705df5dc | |||
bbb6e21607 | |||
382554afe9 | |||
0b8f6cc925 | |||
95741a1c33 | |||
90e219d402 | |||
29a9678d3b | |||
832287af9e | |||
f201a6a32b | |||
7a6bba3c77 | |||
6e529f1c06 | |||
854015532e | |||
ba923b55b7 | |||
716b3530e8 | |||
80e0cd7fa1 | |||
d083d80a29 | |||
3759b48c6e | |||
07ff5ce42d | |||
3e979fdece | |||
1d03067bd5 | |||
8715a416a0 | |||
6cec748335 | |||
04e04db2ad | |||
ce110a79c8 | |||
34b3a8b01b | |||
e104b1d529 | |||
863662a5eb | |||
353e9baa78 | |||
4ada872aaa | |||
51faab3c7c | |||
19b6ca2eda | |||
f4dc6aab22 | |||
ad171a3257 | |||
55f7145b1b | |||
87410f09de | |||
b703e52563 | |||
918765e06f | |||
9fc66d571e | |||
7eb48a300d | |||
887303c820 | |||
87f79a9327 | |||
1eb07b31f6 | |||
bdabf9e649 | |||
cfce337c46 | |||
f4bd585ba2 | |||
bc5fddbe1e | |||
c506fcf739 | |||
4e4b8b9beb | |||
4143c648d8 | |||
d56780d906 | |||
e6e991bc64 | |||
bf8a1ec0d2 | |||
a79c5c6183 | |||
197de5c995 | |||
96c805f7bf | |||
1273a3b1a1 | |||
cd0d1976bc | |||
8c250ed26a | |||
12eeebb439 | |||
4f1c03c879 | |||
d01852892b | |||
ee264e9b56 | |||
34d20aa712 | |||
4527e9f61b | |||
38451caa7c | |||
62b14f4199 | |||
f7078c3700 | |||
b85e03adfd | |||
c9db2c4272 | |||
a4a0237711 | |||
b67f3a83d8 | |||
e32c1de0af | |||
63fadd3633 | |||
a754e419fe | |||
f0217ce9b1 | |||
a25b74c9ab | |||
4686cb9c0e | |||
c4d478484b | |||
fa5817ab77 | |||
86ccd014ab | |||
c9ecec183f | |||
51e7feb605 | |||
ee3a54601c | |||
73152572a5 | |||
cc176ea404 | |||
1ce04ef785 | |||
40af9384b5 | |||
6c19d75359 | |||
b21b4d066c | |||
685e236828 | |||
92406bf6a8 | |||
423a47cd9e | |||
30c11d7589 | |||
63bfdb9cb9 | |||
a47d0a57f6 | |||
72c52de2fe | |||
bcb4710477 | |||
e88e24178c | |||
2dbdf8ff17 | |||
63f9d04981 | |||
111608bdc8 | |||
3b59d03526 | |||
d2b9b6ae1d | |||
6fb45c6c4b | |||
81ac62dd49 | |||
ec0878d008 | |||
824da9d4c4 | |||
b3de7a9051 | |||
31b65642cb | |||
69e6500522 | |||
8246154032 | |||
2b02f94fe3 | |||
ef41286bf0 | |||
06ec6558a1 | |||
7a218418d1 | |||
20cc6d9a90 | |||
216a9ada7c | |||
4624c65398 | |||
934bbbd0c8 | |||
9f851d6156 |
7
.gitignore
vendored
@ -8,3 +8,10 @@ slsReceiverSoftware/
|
||||
slsDetectorCalibration/
|
||||
slsImageReconstruction/
|
||||
.settings
|
||||
JCTBGui/
|
||||
*.aux
|
||||
*.log
|
||||
*.out
|
||||
*.toc
|
||||
build
|
||||
tests
|
||||
|
21
CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
find_package(Qt4)
|
||||
find_package(Qwt 6)
|
||||
find_package(CBF)
|
||||
find_package(Doxygen)
|
||||
|
||||
add_subdirectory(slsDetectorSoftware)
|
||||
add_subdirectory(slsReceiverSoftware)
|
||||
add_subdirectory(slsImageReconstruction)
|
||||
if (QT4_FOUND AND QWT_FOUND)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
endif()
|
||||
|
||||
if (DEFINED ENV{ROOTSYS})
|
||||
find_package(ROOT)
|
||||
if (ROOT_FOUND)
|
||||
add_subdirectory(calibrationWizards)
|
||||
endif()
|
||||
endif()
|
@ -1,157 +0,0 @@
|
||||
#include <TApplication.h>
|
||||
#include <TColor.h>
|
||||
|
||||
#include <TStyle.h>
|
||||
#include <TROOT.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
|
||||
#include "multiSlsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "sls_receiver_defs.h"
|
||||
#include "jctbMain.h"
|
||||
using namespace std;
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
|
||||
string afname, cfname, pfname;
|
||||
int id=0;
|
||||
|
||||
int af=0, cf=0, pf=0;
|
||||
|
||||
|
||||
cout << " *** " << argc << endl;
|
||||
for (int ia=0; ia<argc; ia++) {
|
||||
if (strcmp(argv[ia],"-alias")==0) {
|
||||
if (ia+1<argc) {
|
||||
afname=argv[ia+1];
|
||||
ia++;
|
||||
af=1;
|
||||
}
|
||||
|
||||
} else if (strcmp(argv[ia],"-config")==0) {
|
||||
if (ia+1<argc) {
|
||||
cfname=argv[ia+1];
|
||||
ia++;
|
||||
cf=1;
|
||||
}
|
||||
|
||||
|
||||
} else if (strcmp(argv[ia],"-par")==0) {
|
||||
if (ia+1<argc) {
|
||||
pfname=argv[ia+1];
|
||||
ia++;
|
||||
pf=1;
|
||||
}
|
||||
|
||||
|
||||
} else if (strcmp(argv[ia],"-id")==0) {
|
||||
if (ia+1<argc) {
|
||||
id=atoi(argv[ia+1]);
|
||||
ia++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cout << " *** " << endl;
|
||||
|
||||
/****** Create detector ****************/
|
||||
multiSlsDetector *myDet=new multiSlsDetector(id);
|
||||
myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
|
||||
|
||||
|
||||
if (cf) {
|
||||
myDet->readConfigurationFile(cfname);
|
||||
} else
|
||||
cout << "No config file specified" << endl;
|
||||
|
||||
|
||||
cout << "Created multi detector id " << id << " hostname " << myDet->getHostname() << endl;
|
||||
|
||||
if (pf) {
|
||||
myDet->retrieveDetectorSetup(pfname);
|
||||
} else
|
||||
cout << "No parameter file specified" << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***********Create GUI stuff *******************/
|
||||
TApplication theApp("App",&argc,argv);
|
||||
|
||||
|
||||
gStyle->SetDrawBorder(0);
|
||||
gStyle->SetCanvasColor(kWhite);
|
||||
gStyle->SetCanvasDefH(800);
|
||||
gStyle->SetCanvasDefW(800);
|
||||
gStyle->SetCanvasBorderMode(0);
|
||||
gStyle->SetPadBorderMode(0);
|
||||
gStyle->SetPaintTextFormat("5.2f");
|
||||
gStyle->SetLineWidth(2);
|
||||
gStyle->SetTextSize(1.1);
|
||||
gStyle->SetLabelSize(0.04,"xy");
|
||||
gStyle->SetTitleSize(0.05,"xy");
|
||||
gStyle->SetTitleOffset(1.0,"x");
|
||||
gStyle->SetTitleOffset(1.1,"y");
|
||||
gStyle->SetPadTopMargin(0.15);
|
||||
gStyle->SetPadRightMargin(0.15);
|
||||
gStyle->SetPadBottomMargin(0.15);
|
||||
gStyle->SetPadLeftMargin(0.15);
|
||||
gStyle->SetLegendBorderSize(1);
|
||||
gStyle->SetFrameBorderMode(0);
|
||||
gStyle->SetFrameFillColor(kWhite);
|
||||
// gStyle->SetLegendFillColor(kWhite);
|
||||
gStyle->SetTitleFillColor(kWhite);
|
||||
gStyle->SetFillColor(kWhite);
|
||||
gStyle->SetStatFontSize(0.03);
|
||||
gStyle->SetStatBorderSize(1);
|
||||
gStyle->SetStatFormat("6.4g");
|
||||
gStyle->SetStatX(0.95);
|
||||
gStyle->SetStatY(0.95);
|
||||
gStyle->SetStatW(0.2);
|
||||
gStyle->SetStatH(0.2);
|
||||
gStyle->SetTitleX(0.1);
|
||||
gStyle->SetTitleY(0.95);
|
||||
gStyle->SetTitleBorderSize(0);
|
||||
gStyle->SetTitleFontSize(0.05);
|
||||
gROOT->SetStyle("Default");
|
||||
|
||||
|
||||
TColor::InitializeColors();
|
||||
const Int_t NRGBs = 5;
|
||||
const Int_t NCont = 90;
|
||||
|
||||
Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
|
||||
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
|
||||
Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
|
||||
Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
|
||||
TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
|
||||
gStyle->SetNumberContours(NCont);
|
||||
|
||||
|
||||
gROOT->ForceStyle();
|
||||
jctbMain *mf=new jctbMain(gClient->GetRoot(),myDet);
|
||||
|
||||
cout << " *** " << argc << endl;
|
||||
for (int ia=0; ia<argc; ia++)
|
||||
cout << argv[ia] << endl;
|
||||
|
||||
|
||||
cout << " *** " << endl;
|
||||
|
||||
if (af)
|
||||
mf->loadAlias(afname);
|
||||
else
|
||||
cout << "no alias specified" << endl;
|
||||
|
||||
theApp.Run();
|
||||
return 0;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
|
||||
SRC=jctbDict.cpp jctbMain.cpp jctbDacs.cpp jctbDac.cpp jctbPattern.cpp jctbSignals.cpp jctbSignal.cpp jctbAdcs.cpp jctbAcquisition.cpp
|
||||
INCS=jctbSignals.h jctbSignal.h jctbPattern.h jctbDacs.h jctbDac.h jctbMain.h jctbAdcs.h jctbAcquisition.h
|
||||
LINKDEF=jctbLinkDef.h
|
||||
|
||||
INCDIR=-I../slsReceiverSoftware/include/ -I../slsDetectorSoftware/multiSlsDetector/ -I../slsDetectorSoftware/slsDetector -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetectorAnalysis -I../slsDetectorSoftware/slsDetectorUsers -I../slsDetectorSoftware/usersFunctions
|
||||
LDFLAG=-L../bin -lSlsDetector -L/usr/lib64/ -lpthread
|
||||
|
||||
MAIN=JCTBGui.cpp
|
||||
|
||||
DESTDIR?=../bin
|
||||
|
||||
all: $(DESTDIR)/JCTBGui
|
||||
|
||||
doc:
|
||||
cd manual && make DESTDIR=$(DESTDIR)
|
||||
|
||||
htmldoc:
|
||||
cd manual && make html DESTDIR=$(DESTDIR)
|
||||
|
||||
jctbDict.cpp: $(INCS) $(LINKDEF)
|
||||
rootcint -f jctbDict.cpp -c $(INCS) $(LINKDEF)
|
||||
|
||||
$(DESTDIR)/JCTBGui: $(SRC) $(MAIN) $(LINKDEF) $(INCS)
|
||||
g++ -DMYROOT `root-config --cflags --glibs` -lMinuit $(LDFLAG) -o JCTBGui $(INCDIR) $(SRC) $(MAIN)
|
||||
mv JCTBGui $(DESTDIR)
|
||||
|
||||
clean:
|
||||
rm -f JCTBGui *.o jctbDict.*
|
@ -1,176 +0,0 @@
|
||||
# this is a comment (every line starting with no keyword is such)
|
||||
|
||||
# space in label not allowed (tbf)
|
||||
|
||||
#BITX bitName plotFlag plotColorRGB (from 0!)
|
||||
|
||||
|
||||
#BIT1 compTestOUT 1 2 #you can put comments also here (leave a space bef. #)
|
||||
|
||||
BIT1 compTestIN
|
||||
|
||||
BIT32 curON
|
||||
|
||||
BIT2 side_clk
|
||||
|
||||
BIT3 side_din
|
||||
|
||||
BIT4 clear_shr
|
||||
|
||||
BIT5 bottom_din
|
||||
|
||||
BIT6 bottom_clk
|
||||
|
||||
BIT7 gHF
|
||||
|
||||
BIT31 bypassCDS
|
||||
|
||||
BIT8 ENprechPRE
|
||||
|
||||
BIT9 res
|
||||
|
||||
BIT30 pulseOFF
|
||||
|
||||
BIT27 connCDS #INVERTED NAME to match logical behaviour, chipname disconnCDS
|
||||
|
||||
BIT24 Dsg_1
|
||||
|
||||
BIT25 Dsg_2
|
||||
|
||||
BIT23 Dsg_3
|
||||
|
||||
BIT10 sto0
|
||||
|
||||
BIT11 sto1
|
||||
|
||||
BIT12 sto2
|
||||
|
||||
BIT13 resCDS
|
||||
|
||||
BIT14 prechargeConnect
|
||||
|
||||
BIT15 pulse
|
||||
|
||||
BIT21 PCT_mode
|
||||
|
||||
BIT16 res_DGS
|
||||
|
||||
#BIT26 dbit1
|
||||
|
||||
#BIT27 dbit0
|
||||
|
||||
#CMOS_IN
|
||||
|
||||
#CMOS_IN1 out_DGS
|
||||
|
||||
#LVDS_IN
|
||||
|
||||
# now the names of ADC channels (lt. 12 characters)
|
||||
|
||||
ADC1 T_boa.(C)
|
||||
|
||||
ADC2 Va+
|
||||
|
||||
ADC3 Vdd_ps
|
||||
|
||||
ADC4 Vsh
|
||||
|
||||
ADC5 Vcc_int
|
||||
|
||||
ADC6 Vcc_iochip
|
||||
|
||||
ADC7 Vcc1.8A
|
||||
|
||||
ADC8 Vcc1.8D
|
||||
|
||||
ADC9 T_chip
|
||||
|
||||
ADC10 _nc
|
||||
|
||||
ADC11 _nc
|
||||
|
||||
ADC12 _Vcc_io # 0.068 ohm resistor
|
||||
|
||||
ADC13 _nc # 0.068 ohm resistor
|
||||
|
||||
ADC14 _Va # 0.068 ohm resistor
|
||||
|
||||
ADC15 _nc
|
||||
|
||||
ADC16 _vdd_ana
|
||||
|
||||
I1 _I_va(mA) # this values are computed as spec.
|
||||
|
||||
I1a 2 #by the following lines ((ADCa-ADCb)/R)
|
||||
|
||||
I1b 14 # all the values comes mainly from the adapter board
|
||||
|
||||
I1r 0.068
|
||||
|
||||
I2 _I_vdd(mA) #
|
||||
|
||||
I2a 3
|
||||
|
||||
I2b 16
|
||||
|
||||
I2r 0.068 #
|
||||
|
||||
I3 _nn
|
||||
|
||||
I3a 14
|
||||
|
||||
I3b 2
|
||||
|
||||
I3r 0.068
|
||||
|
||||
I4 _I_io(mA)
|
||||
|
||||
I4a 6
|
||||
|
||||
I4b 12
|
||||
|
||||
I4r 0.068 #shuld be 5000000 for mA readout
|
||||
|
||||
# now the names of DAC channels (lt. 12 characters)
|
||||
|
||||
DAC7 vbp_colbuf
|
||||
|
||||
DAC8 vIpreCDS
|
||||
|
||||
DAC9 vIpre
|
||||
|
||||
DAC10 VprechPre
|
||||
|
||||
DAC11 prechargeV
|
||||
|
||||
DAC12 ibias_SFP
|
||||
|
||||
DAC1 vcasc_SFP
|
||||
|
||||
DAC3 VPH
|
||||
|
||||
DAC4 VPL
|
||||
|
||||
DAC2 ibias_CS
|
||||
|
||||
DAC5 vrefDGS
|
||||
|
||||
DAC6 vIpreDGS
|
||||
|
||||
DAC1 vcascSFP
|
||||
|
||||
DAC13 s2d_vcascp
|
||||
|
||||
#POT1 s2d_vcascn
|
||||
|
||||
DAC14 vin_com
|
||||
|
||||
DAC15 vout_com
|
||||
|
||||
DAC16 vb_sda
|
||||
|
||||
# number (1-16) of the adc "reading" the pot controlled VR. (should be always 2)
|
||||
|
||||
DACFORPOTVR 2
|
||||
|
||||
#SCHEMATIC jungfrau01_ADP.pdf #those files are located in doc/ folder
|
@ -1,228 +0,0 @@
|
||||
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
#include <TThread.h>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbAcquisition.h"
|
||||
#include "multiSlsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
jctbAcquisition::jctbAcquisition(TGVerticalFrame *page, multiSlsDetector *det) : TGGroupFrame(page,"Acquisition",kVerticalFrame), myDet(det) {
|
||||
|
||||
page->AddFrame(this,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
TGHorizontalFrame *hframe=new TGHorizontalFrame(this, 800,50);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
hframe->MapWindow();
|
||||
|
||||
char tit[100];
|
||||
|
||||
|
||||
cFileSave= new TGCheckButton(hframe, "Output file: ");
|
||||
hframe->AddFrame(cFileSave,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5));
|
||||
cFileSave->MapWindow();
|
||||
cFileSave->SetTextJustify(kTextRight);
|
||||
cFileSave->Connect("Toggled(Bool_t)","jctbAcquisition",this,"setFsave(Bool_t)");
|
||||
|
||||
|
||||
eFname = new TGTextEntry(hframe, (myDet->getFileName()).c_str());
|
||||
|
||||
hframe->AddFrame(eFname,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
|
||||
eFname->MapWindow();
|
||||
eFname->Resize(150,30);
|
||||
|
||||
eFname->Connect("ReturnPressed()","jctbAcquisition",this,"setFname()");
|
||||
|
||||
|
||||
TGLabel *label=new TGLabel(hframe,"index: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextRight);
|
||||
|
||||
|
||||
eFindex = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
hframe->AddFrame( eFindex,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eFindex->MapWindow();
|
||||
eFindex->Resize(150,30);
|
||||
TGTextEntry *e= eFindex->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbAcquisition",this,"setFindex()");
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,50);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
hframe->MapWindow();
|
||||
|
||||
label=new TGLabel(hframe,"Output directory: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextRight);
|
||||
|
||||
|
||||
|
||||
eOutdir = new TGTextEntry(hframe, (myDet->getFilePath()).c_str());
|
||||
|
||||
hframe->AddFrame(eOutdir,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
|
||||
eOutdir->MapWindow();
|
||||
eOutdir->Resize(150,30);
|
||||
|
||||
|
||||
eOutdir->Connect("ReturnPressed()","jctbAcquisition",this,"setOutdir()");
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,50);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
hframe->MapWindow();
|
||||
|
||||
bStatus=new TGTextButton(hframe, "Start");
|
||||
hframe->AddFrame(bStatus,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
|
||||
bStatus->MapWindow();
|
||||
bStatus->Connect("Clicked()","jctbAcquisition",this,"toggleAcquisition()");
|
||||
|
||||
|
||||
acqThread = new TThread("acqThread",
|
||||
jctbAcquisition::ThreadHandle,(void*)this);
|
||||
// acqThread->Run();
|
||||
|
||||
myDet->registerProgressCallback(&progressCallback,(void*)this);
|
||||
|
||||
|
||||
myDet->registerDataCallback(&dataCallback, (void*)this);
|
||||
|
||||
}
|
||||
|
||||
int jctbAcquisition::dataCallback(detectorData *data, int index, void* pArgs) {
|
||||
|
||||
|
||||
cout <<"------"<< index << " " << data->npoints << " "<< data->npy << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void jctbAcquisition::setOutdir() {
|
||||
|
||||
myDet->setFilePath(eOutdir->GetText());
|
||||
|
||||
// // cout << "setting dac! "<< id << endl;
|
||||
|
||||
// myDet->setDAC(dacsEntry->GetIntNumber(), (slsDetectorDefs::dacIndex)id, dacsUnit->IsOn());
|
||||
|
||||
// getValue();
|
||||
|
||||
}
|
||||
|
||||
void jctbAcquisition::setFname() {
|
||||
myDet->setFileName(eFname->GetText());
|
||||
// int val=myDet->setDAC(-1, (slsDetectorDefs::dacIndex)id, dacsUnit->IsOn());
|
||||
// char s[100];
|
||||
|
||||
// sprintf(s,"%d",val);
|
||||
|
||||
// dacsValue->SetText(s);
|
||||
|
||||
|
||||
// return val;
|
||||
|
||||
}
|
||||
|
||||
void jctbAcquisition::setFindex() {
|
||||
myDet->setFileIndex(eFindex->GetNumber());
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbAcquisition::setFsave(Bool_t b) {
|
||||
myDet->enableWriteToFile(b);
|
||||
eFname->SetState(b);
|
||||
eOutdir->SetState(b);
|
||||
|
||||
}
|
||||
|
||||
void jctbAcquisition::update() {
|
||||
|
||||
|
||||
eFname->SetText((myDet->getFileName()).c_str());
|
||||
eOutdir->SetText((myDet->getFilePath()).c_str());
|
||||
eFindex->SetNumber(myDet->getFileIndex());
|
||||
cFileSave->SetOn(myDet->enableWriteToFile());
|
||||
eFname->SetState(cFileSave->IsOn());
|
||||
eOutdir->SetState(cFileSave->IsOn());
|
||||
eFindex->SetState(cFileSave->IsOn());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbAcquisition::toggleAcquisition() {
|
||||
|
||||
|
||||
|
||||
if (acqThread->GetState()==1 || acqThread->GetState()==6) {
|
||||
bStatus->SetText("Stop");
|
||||
acqThread->Run();
|
||||
//myDet->startAcquisition();
|
||||
StopFlag=0;
|
||||
} else {
|
||||
StopFlag=1;
|
||||
myDet->stopAcquisition();
|
||||
bStatus->SetText("Start");
|
||||
// acqThread->Kill();
|
||||
}
|
||||
}
|
||||
|
||||
void jctbAcquisition::acquisitionFinished() {
|
||||
bStatus->SetText("Start");
|
||||
}
|
||||
|
||||
void jctbAcquisition::startAcquisition(){
|
||||
cout << "Detector started " << endl;
|
||||
myDet->acquire();
|
||||
}
|
||||
|
||||
void* jctbAcquisition::ThreadHandle(void *arg)
|
||||
{
|
||||
jctbAcquisition *acq = static_cast<jctbAcquisition*>(arg);
|
||||
int i=0;
|
||||
|
||||
acq->startAcquisition();
|
||||
acq->acquisitionFinished();
|
||||
|
||||
// while(!(classInstance->StopFlag))
|
||||
// {
|
||||
// cout << "thread " << i++ << endl;
|
||||
// usleep(100000);
|
||||
// }
|
||||
//myDet->readFrame();
|
||||
|
||||
}
|
||||
|
||||
int jctbAcquisition::progressCallback(double f,void* arg) {
|
||||
|
||||
|
||||
// jctbAcquisition *acq = static_cast<jctbAcquisition*>(arg);
|
||||
|
||||
|
||||
cout << "*********" << f << "*******" << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
#ifndef JCTBACQUISITION_H
|
||||
#define JCTBACQUISITION_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TGCheckButton;
|
||||
class TThread;
|
||||
|
||||
class TGTextButton;
|
||||
|
||||
class multiSlsDetector;
|
||||
class detectorData;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbAcquisition : public TGGroupFrame {
|
||||
|
||||
|
||||
private:
|
||||
TGTextEntry *eOutdir;
|
||||
TGTextEntry *eFname;
|
||||
TGNumberEntry *eFindex;
|
||||
TGCheckButton *cFileSave;
|
||||
TGTextButton *bStatus;
|
||||
// TGTextButton
|
||||
|
||||
TThread *acqThread;
|
||||
|
||||
multiSlsDetector* myDet;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
jctbAcquisition(TGVerticalFrame*, multiSlsDetector*);
|
||||
void setOutdir();
|
||||
void setFname();
|
||||
void setFsave(Bool_t);
|
||||
void setFindex();
|
||||
void toggleAcquisition();
|
||||
static void* ThreadHandle(void *arg);
|
||||
void update();
|
||||
void acquisitionFinished();
|
||||
|
||||
void startAcquisition();
|
||||
static int progressCallback(double,void*);
|
||||
static int dataCallback(detectorData*, int, void*);
|
||||
int StopFlag;
|
||||
|
||||
ClassDef(jctbAcquisition,0)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,215 +0,0 @@
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
#include <TF1.h>
|
||||
#include <TRandom.h>
|
||||
#include <TGButton.h>
|
||||
#include <TRootEmbeddedCanvas.h>
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TGComboBox.h>
|
||||
#include <TH2F.h>
|
||||
#include <TColor.h>
|
||||
#include <TH1F.h>
|
||||
#include <TGraphErrors.h>
|
||||
#include <TGColorSelect.h>
|
||||
#include <THStack.h>
|
||||
#include <TGTab.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbAdcs.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
jctbAdc::jctbAdc(TGVerticalFrame *page, int i, multiSlsDetector *det)
|
||||
: TGHorizontalFrame(page, 800,800), id(i), myDet(det) {
|
||||
|
||||
TGHorizontalFrame *hframe=this;
|
||||
char tit[100];
|
||||
|
||||
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "ADC%d", id);
|
||||
|
||||
sAdcLabel= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(sAdcLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sAdcLabel->MapWindow();
|
||||
sAdcLabel->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sAdcEnable= new TGCheckButton(hframe, "Enable");
|
||||
hframe->AddFrame( sAdcEnable,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sAdcEnable->MapWindow();
|
||||
sAdcEnable->SetOn(kTRUE);
|
||||
sAdcEnable->SetEnabled(kFALSE);
|
||||
|
||||
|
||||
|
||||
sAdcPlot= new TGCheckButton(hframe, "Plot");
|
||||
hframe->AddFrame( sAdcPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sAdcPlot->MapWindow();
|
||||
|
||||
|
||||
sAdcPlot->Connect("Toggled(Bool_t)","jctbAdc",this,"ToggledPlot(Bool_t)");
|
||||
|
||||
|
||||
|
||||
fColorSel = new TGColorSelect(hframe, id+1, 0);
|
||||
hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop |
|
||||
kLHintsLeft, 2, 0, 2, 2));
|
||||
|
||||
|
||||
fColorSel->SetColor(TColor::Number2Pixel(id+1));
|
||||
|
||||
|
||||
};
|
||||
|
||||
void jctbAdc::setAdcAlias(char *tit, int plot, int color) {
|
||||
if (tit)
|
||||
sAdcLabel->SetText(tit);
|
||||
if (plot)
|
||||
sAdcPlot->SetOn(kTRUE,kTRUE);
|
||||
else
|
||||
sAdcPlot->SetOn(kFALSE,kTRUE);
|
||||
if (color>=0)
|
||||
fColorSel->SetColor(color);
|
||||
fColorSel->SetEnabled(sAdcPlot->IsOn());
|
||||
}
|
||||
|
||||
|
||||
string jctbAdc::getAdcAlias() {
|
||||
|
||||
char line[1000];
|
||||
sprintf(line,"ADC%d %s %d %x\n",id,sAdcLabel->GetText()->Data(),sAdcPlot->IsOn(),fColorSel->GetColor());
|
||||
return string(line);
|
||||
}
|
||||
|
||||
void jctbAdc::update() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbAdc::ToggledPlot(Bool_t b){
|
||||
|
||||
Long_t mask=b<<id;
|
||||
ToggledAdcPlot(mask);
|
||||
fColorSel->SetEnabled(b);
|
||||
|
||||
}
|
||||
|
||||
void jctbAdc::ToggledAdcPlot(Int_t b){
|
||||
|
||||
|
||||
Emit("ToggledAdcPlot(Int_t)", id);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jctbAdcs::jctbAdcs(TGVerticalFrame *page, multiSlsDetector *det)
|
||||
: TGGroupFrame(page,"Adcs",kVerticalFrame), myDet(det) {
|
||||
|
||||
|
||||
SetTitlePos(TGGroupFrame::kLeft);
|
||||
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
char tit[100];
|
||||
|
||||
|
||||
TGHorizontalFrame* hframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
|
||||
|
||||
int idac=0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hhframe->MapWindow();
|
||||
|
||||
TGVerticalFrame *vframe;
|
||||
|
||||
|
||||
|
||||
|
||||
for (idac=0; idac<NADCS; idac++) {
|
||||
if (idac%16==0) {
|
||||
|
||||
|
||||
vframe=new TGVerticalFrame(hhframe, 400,800);
|
||||
hhframe->AddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
vframe->MapWindow();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
sAdc[idac]=new jctbAdc(vframe,idac,myDet);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void jctbAdcs::update() {
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
int jctbAdcs::setAdcAlias(string line) {
|
||||
|
||||
int is=-1, plot=0, color=-1;
|
||||
char tit[100];
|
||||
int narg=sscanf(line.c_str(),"ADC%d %s %d %x",&is,tit,&plot, &color);
|
||||
if (narg<2)
|
||||
return -1;
|
||||
if (narg!=3)
|
||||
color=-1;
|
||||
if (is>=0 && is<NADCS) {
|
||||
sAdc[is]->setAdcAlias(tit,plot,color);
|
||||
}
|
||||
return is;
|
||||
|
||||
}
|
||||
|
||||
string jctbAdcs::getAdcAlias() {
|
||||
|
||||
ostringstream line;
|
||||
|
||||
for (int is=0; is<NADCS; is++)
|
||||
line << sAdc[is]->getAdcAlias();
|
||||
|
||||
return line.str();
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
#ifndef JCTBADCS_H
|
||||
#define JCTBADCS_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
#define NADCS 32
|
||||
|
||||
class TRootEmbeddedCanvas;
|
||||
class TGButtonGroup;
|
||||
class TGVerticalFrame;
|
||||
class TGHorizontalFrame;
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TH2F;
|
||||
class TGComboBox;
|
||||
class TGCheckButton;
|
||||
class TGColorSelect;
|
||||
|
||||
class THStack;
|
||||
class TGraphErrors;
|
||||
class TGTextButton;
|
||||
class TGTab;
|
||||
|
||||
class TGraph;
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbAdc : public TGHorizontalFrame {
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TGLabel *sAdcLabel;
|
||||
TGCheckButton *sAdcEnable;
|
||||
TGCheckButton *sAdcPlot;
|
||||
|
||||
TGColorSelect *fColorSel;
|
||||
|
||||
TGraph *gADC;
|
||||
|
||||
int id;
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
jctbAdc(TGVerticalFrame *page, int i, multiSlsDetector *det);
|
||||
|
||||
|
||||
void setAdcAlias(char *tit, int plot, int color);
|
||||
string getAdcAlias();
|
||||
void ToggledAdcPlot(Int_t b);
|
||||
void ToggledPlot(Bool_t b);
|
||||
|
||||
void update();
|
||||
|
||||
ClassDef(jctbAdc,0)
|
||||
};
|
||||
|
||||
|
||||
|
||||
class jctbAdcs : public TGGroupFrame {
|
||||
private:
|
||||
|
||||
jctbAdc *sAdc[NADCS];
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
|
||||
jctbAdcs(TGVerticalFrame *page, multiSlsDetector *det);
|
||||
int setAdcAlias(string line);
|
||||
string getAdcAlias();
|
||||
|
||||
void update();
|
||||
|
||||
ClassDef(jctbAdcs,0)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,122 +0,0 @@
|
||||
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbDac.h"
|
||||
#include "multiSlsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
jctbDac::jctbDac(TGGroupFrame *page, int idac, multiSlsDetector *det) : TGHorizontalFrame(page, 800,50) , id(idac), myDet(det) {
|
||||
|
||||
|
||||
TGHorizontalFrame *hframe=this;
|
||||
|
||||
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
char tit[100];
|
||||
|
||||
|
||||
sprintf(tit, "DAC %d:",idac);
|
||||
|
||||
dacsLabel= new TGLabel(hframe, tit);
|
||||
|
||||
hframe->AddFrame(dacsLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
dacsLabel->MapWindow();
|
||||
dacsLabel->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
dacsEntry = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 65535);
|
||||
|
||||
hframe->AddFrame(dacsEntry,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
|
||||
dacsEntry->MapWindow();
|
||||
dacsEntry->Resize(150,30);
|
||||
|
||||
|
||||
dacsUnit= new TGCheckButton(hframe, "mV");
|
||||
hframe->AddFrame( dacsUnit,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
dacsUnit->MapWindow();
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "xxx");
|
||||
dacsValue= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame( dacsValue,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
dacsValue->MapWindow();
|
||||
dacsValue->SetTextJustify(kTextLeft);
|
||||
|
||||
TGTextEntry *e=dacsEntry->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbDac",this,"setValue()");
|
||||
// cout << "(((((((((((((((((((((((((((((((" << dacsEntry->GetListOfSignals()->At(0)->IsA() << endl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int jctbDac::setLabel(char *tit, int mv) {
|
||||
if(tit)
|
||||
dacsLabel->SetText(tit);
|
||||
if (mv>0)
|
||||
dacsUnit->SetOn(kTRUE,kTRUE);
|
||||
else if (mv==0)
|
||||
dacsUnit->SetOn(kFALSE,kTRUE);
|
||||
|
||||
|
||||
return id;
|
||||
|
||||
}
|
||||
|
||||
string jctbDac::getLabel() {
|
||||
|
||||
ostringstream line;
|
||||
|
||||
line << "DAC" << dec << id << " " << dacsUnit->IsOn() << endl;
|
||||
|
||||
return line.str();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbDac::setValue() {
|
||||
|
||||
|
||||
|
||||
// cout << "setting dac! "<< id << endl;
|
||||
|
||||
myDet->setDAC(dacsEntry->GetIntNumber(), (slsDetectorDefs::dacIndex)id, dacsUnit->IsOn());
|
||||
|
||||
getValue();
|
||||
|
||||
}
|
||||
|
||||
int jctbDac::getValue() {
|
||||
|
||||
int val=myDet->setDAC(-1, (slsDetectorDefs::dacIndex)id, dacsUnit->IsOn());
|
||||
char s[100];
|
||||
cout << "dac " << id << " " << val << endl;
|
||||
sprintf(s,"%d",val);
|
||||
|
||||
dacsValue->SetText(s);
|
||||
|
||||
|
||||
return val;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
#ifndef JCTBDAC_H
|
||||
#define JCTBDAC_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TGCheckButton;
|
||||
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbDac : public TGHorizontalFrame {
|
||||
|
||||
|
||||
private:
|
||||
TGLabel *dacsLabel;
|
||||
TGNumberEntry *dacsEntry;
|
||||
TGCheckButton *dacsUnit;
|
||||
TGLabel *dacsValue;
|
||||
int id;
|
||||
|
||||
multiSlsDetector* myDet;
|
||||
public:
|
||||
jctbDac(TGGroupFrame*, int , multiSlsDetector*);
|
||||
void setValue();
|
||||
int getValue();
|
||||
|
||||
|
||||
int setLabel(char *tit, int mv);
|
||||
string getLabel();
|
||||
|
||||
|
||||
|
||||
ClassDef(jctbDac,0)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,88 +0,0 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbDac.h"
|
||||
#include "jctbDacs.h"
|
||||
#include "multiSlsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jctbDacs::jctbDacs(TGVerticalFrame *page, multiSlsDetector *det) : TGGroupFrame(page,"DACs",kVerticalFrame) , myDet(det){
|
||||
|
||||
|
||||
SetTitlePos(TGGroupFrame::kLeft);
|
||||
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
// cout << "window mapped " << endl;
|
||||
|
||||
for (int idac=0; idac<NDACS; idac++) {
|
||||
|
||||
dacs[idac]=new jctbDac(this, idac, myDet);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int jctbDacs::setDacAlias(string line) {
|
||||
|
||||
int is=-1, mv=0;
|
||||
char tit[100];
|
||||
int narg=sscanf(line.c_str(),"DAC%d %s %d",&is,tit,&mv);
|
||||
if (narg<2)
|
||||
return -1;
|
||||
if (is>=0 && is<NDACS)
|
||||
dacs[is]->setLabel(tit,mv);
|
||||
return is;
|
||||
|
||||
}
|
||||
|
||||
string jctbDacs::getDacAlias() {
|
||||
|
||||
ostringstream line;
|
||||
|
||||
for (int i=0; i<NDACS; i++)
|
||||
line << dacs[i]->getLabel() << endl;
|
||||
return line.str();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string jctbDacs::getDacParameters() {
|
||||
|
||||
|
||||
ostringstream line;
|
||||
|
||||
for (int i=0; i<NDACS; i++) {
|
||||
//line << "dacs:" << i << " " << dacs[i]->getValue << endl;
|
||||
line << "dac:" << i << " " << dacs[i]->getValue() << endl;
|
||||
}
|
||||
return line.str();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbDacs::update() {
|
||||
|
||||
for (int idac=0; idac<NDACS; idac++) {
|
||||
|
||||
dacs[idac]->getValue();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
#ifndef JCTBDACS_H
|
||||
#define JCTBDACS_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
#define NDACS 16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class multiSlsDetector;
|
||||
class jctbDac;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
class jctbDacs : public TGGroupFrame {
|
||||
private:
|
||||
|
||||
|
||||
|
||||
jctbDac *dacs[NDACS];
|
||||
|
||||
multiSlsDetector* myDet;
|
||||
|
||||
public:
|
||||
jctbDacs(TGVerticalFrame *page, multiSlsDetector*);
|
||||
|
||||
int setDacAlias(string line);
|
||||
string getDacAlias();
|
||||
string getDacParameters();
|
||||
|
||||
void update();
|
||||
|
||||
ClassDef(jctbDacs,0)
|
||||
};
|
||||
|
||||
#endif
|
4274
JCTBGui/jctbDict.cpp
@ -1,98 +0,0 @@
|
||||
/********************************************************************
|
||||
* jctbDict.h
|
||||
* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED
|
||||
* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX().
|
||||
* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE.
|
||||
********************************************************************/
|
||||
#ifdef __CINT__
|
||||
#error jctbDict.h/C is only for compilation. Abort cint.
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#define G__ANSIHEADER
|
||||
#define G__DICTIONARY
|
||||
#define G__PRIVATE_GVALUE
|
||||
#include "G__ci.h"
|
||||
#include "FastAllocString.h"
|
||||
extern "C" {
|
||||
extern void G__cpp_setup_tagtablejctbDict();
|
||||
extern void G__cpp_setup_inheritancejctbDict();
|
||||
extern void G__cpp_setup_typetablejctbDict();
|
||||
extern void G__cpp_setup_memvarjctbDict();
|
||||
extern void G__cpp_setup_globaljctbDict();
|
||||
extern void G__cpp_setup_memfuncjctbDict();
|
||||
extern void G__cpp_setup_funcjctbDict();
|
||||
extern void G__set_cpp_environmentjctbDict();
|
||||
}
|
||||
|
||||
|
||||
#include "TObject.h"
|
||||
#include "TMemberInspector.h"
|
||||
#include "jctbSignals.h"
|
||||
#include "jctbSignal.h"
|
||||
#include "jctbPattern.h"
|
||||
#include "jctbDacs.h"
|
||||
#include "jctbDac.h"
|
||||
#include "jctbMain.h"
|
||||
#include "jctbAdcs.h"
|
||||
#include "jctbAcquisition.h"
|
||||
#include <algorithm>
|
||||
namespace std { }
|
||||
using namespace std;
|
||||
|
||||
#ifndef G__MEMFUNCBODY
|
||||
#endif
|
||||
|
||||
extern G__linked_taginfo G__jctbDictLN_TClass;
|
||||
extern G__linked_taginfo G__jctbDictLN_TBuffer;
|
||||
extern G__linked_taginfo G__jctbDictLN_TMemberInspector;
|
||||
extern G__linked_taginfo G__jctbDictLN_TObject;
|
||||
extern G__linked_taginfo G__jctbDictLN_string;
|
||||
extern G__linked_taginfo G__jctbDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR;
|
||||
extern G__linked_taginfo G__jctbDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR;
|
||||
extern G__linked_taginfo G__jctbDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR;
|
||||
extern G__linked_taginfo G__jctbDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGObject;
|
||||
extern G__linked_taginfo G__jctbDictLN_TQObject;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGWindow;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGCompositeFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGLayoutHints;
|
||||
extern G__linked_taginfo G__jctbDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGTextButton;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGVerticalFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGHorizontalFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGMainFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGGroupFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGNumberEntry;
|
||||
extern G__linked_taginfo G__jctbDictLN_multiSlsDetector;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbSignal;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbSignals;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGTextEntry;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGLabel;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGCheckButton;
|
||||
extern G__linked_taginfo G__jctbDictLN_TH1I;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGColorSelect;
|
||||
extern G__linked_taginfo G__jctbDictLN_TRootEmbeddedCanvas;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGButtonGroup;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGTab;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbLoop;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbWait;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbPattern;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbDac;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbDacs;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGMenuBar;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGPopupMenu;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGDockableFrame;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbAdcs;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbAcquisition;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbMain;
|
||||
extern G__linked_taginfo G__jctbDictLN_TGraph;
|
||||
extern G__linked_taginfo G__jctbDictLN_jctbAdc;
|
||||
extern G__linked_taginfo G__jctbDictLN_TThread;
|
||||
extern G__linked_taginfo G__jctbDictLN_detectorData;
|
||||
|
||||
/* STUB derived class for protected member access */
|
@ -1,11 +0,0 @@
|
||||
#pragma link C++ class jctbMain;
|
||||
#pragma link C++ class jctbDacs;
|
||||
#pragma link C++ class jctbDac;
|
||||
#pragma link C++ class jctbSignals;
|
||||
#pragma link C++ class jctbSignal;
|
||||
#pragma link C++ class jctbAdc;
|
||||
#pragma link C++ class jctbAdcs;
|
||||
#pragma link C++ class jctbLoop;
|
||||
#pragma link C++ class jctbWait;
|
||||
#pragma link C++ class jctbPattern;
|
||||
#pragma link C++ class jctbAcquisition;
|
@ -1,665 +0,0 @@
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
#include <TF1.h>
|
||||
#include <TRandom.h>
|
||||
#include <TGButton.h>
|
||||
#include <TRootEmbeddedCanvas.h>
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TGComboBox.h>
|
||||
#include <TH2F.h>
|
||||
#include <TColor.h>
|
||||
#include <TH1F.h>
|
||||
#include <TGraphErrors.h>
|
||||
#include <THStack.h>
|
||||
#include <TGTab.h>
|
||||
#include <TApplication.h>
|
||||
|
||||
|
||||
|
||||
#include <TGMenu.h>
|
||||
#include <TGDockableFrame.h>
|
||||
//#include <TGMenuBar.h>
|
||||
//#include <TGPopupMenu.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "multiSlsDetector.h"
|
||||
#include "jctbMain.h"
|
||||
#include "jctbDacs.h"
|
||||
#include "jctbSignals.h"
|
||||
#include "jctbPattern.h"
|
||||
#include "jctbAdcs.h"
|
||||
#include "jctbAcquisition.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
jctbMain::jctbMain(const TGWindow *p, multiSlsDetector *det)
|
||||
: TGMainFrame(p,800,800) {
|
||||
|
||||
myDet=det;
|
||||
|
||||
Connect("CloseWindow()", "jctbMain", this, "CloseWindow()");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// fMenuDock = new TGDockableFrame(this);
|
||||
// AddFrame(fMenuDock, new TGLayoutHints(kLHintsExpandX, 0, 0, 1, 0));
|
||||
// fMenuDock->SetWindowName("GuiTest Menu");
|
||||
|
||||
fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX);
|
||||
fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0);
|
||||
fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight);
|
||||
|
||||
fMenuFile = new TGPopupMenu(gClient->GetRoot());
|
||||
int im=0;
|
||||
|
||||
fMenuFile->AddEntry("Open Alias", im++);
|
||||
fMenuFile->AddEntry("Save Alias", im++);
|
||||
fMenuFile->AddSeparator();
|
||||
fMenuFile->AddEntry("Open Parameters", im++);
|
||||
fMenuFile->AddEntry("Save Parameters", im++);
|
||||
fMenuFile->AddSeparator();
|
||||
fMenuFile->AddEntry("Open Configuration", im++);
|
||||
fMenuFile->AddEntry("Save Configuration", im++);
|
||||
fMenuFile->AddSeparator();
|
||||
fMenuFile->AddEntry("Open Pattern", im++);
|
||||
fMenuFile->AddEntry("Save Pattern", im++);
|
||||
fMenuFile->AddSeparator();
|
||||
fMenuFile->AddEntry("Exit", im++);
|
||||
|
||||
fMenuFile->Connect("Activated(Int_t)", "jctbMain", this,
|
||||
"HandleMenu(Int_t)");
|
||||
// fMenuFile->Connect("PoppedUp()", "TestMainFrame", this, "HandlePopup()");
|
||||
// fMenuFile->Connect("PoppedDown()", "TestMainFrame", this, "HandlePopdown()");
|
||||
|
||||
|
||||
|
||||
|
||||
// fCascade2Menu = new TGPopupMenu(gClient->GetRoot());
|
||||
// fCascade2Menu->AddEntry("ID = 2&3", im++);
|
||||
// fCascade2Menu->AddEntry("ID = 2&4", im++);
|
||||
// fCascade2Menu->AddEntry("ID = 2&5", im++);
|
||||
|
||||
// fCascade1Menu = new TGPopupMenu(gClient->GetRoot());
|
||||
// fCascade1Menu->AddEntry("ID = 4&1", 41);
|
||||
// fCascade1Menu->AddEntry("ID = 4&2", 42);
|
||||
// fCascade1Menu->AddEntry("ID = 4&3", 43);
|
||||
// fCascade1Menu->AddSeparator();
|
||||
// fCascade1Menu->AddPopup("Cascade&d 2", fCascade2Menu);
|
||||
|
||||
// fCascadeMenu = new TGPopupMenu(gClient->GetRoot());
|
||||
// fCascadeMenu->AddEntry("ID = 5&1", 51);
|
||||
// fCascadeMenu->AddEntry("ID = 5&2", 52);
|
||||
// fCascadeMenu->AddEntry("ID = 5&3", 53);
|
||||
// fCascadeMenu->AddSeparator();
|
||||
// fCascadeMenu->AddPopup("&Cascaded 1", fCascade1Menu);
|
||||
|
||||
// fMenuTest = new TGPopupMenu(gClient->GetRoot());
|
||||
// fMenuTest->AddLabel("Test different features...");
|
||||
// fMenuTest->AddSeparator();
|
||||
// fMenuTest->AddEntry("&Dialog...", im++);
|
||||
// fMenuTest->AddEntry("&Message Box...", im++);
|
||||
// fMenuTest->AddEntry("&Sliders...", im++);
|
||||
// fMenuTest->AddEntry("Sh&utter...", im++);
|
||||
// fMenuTest->AddEntry("&List Directory...", im++);
|
||||
// fMenuTest->AddEntry("&File List...", im++);
|
||||
// fMenuTest->AddEntry("&Progress...", im++);
|
||||
// fMenuTest->AddEntry("&Number Entry...", im++);
|
||||
// fMenuTest->AddEntry("F&ont Dialog...", im++);
|
||||
// fMenuTest->AddSeparator();
|
||||
// fMenuTest->AddEntry("Add New Menus", im++);
|
||||
// fMenuTest->AddSeparator();
|
||||
// fMenuTest->AddPopup("&Cascaded menus", fCascadeMenu);
|
||||
|
||||
// fMenuView = new TGPopupMenu(gClient->GetRoot());
|
||||
// fMenuView->AddEntry("&Dock", im++);
|
||||
// fMenuView->AddEntry("&Undock", im++);
|
||||
// fMenuView->AddSeparator();
|
||||
// fMenuView->AddEntry("Enable U&ndock", im++);
|
||||
// fMenuView->AddEntry("Enable &Hide", im++);
|
||||
// fMenuView->DisableEntry(im);
|
||||
|
||||
// fMenuDock->EnableUndock(kTRUE);
|
||||
// fMenuDock->EnableHide(kTRUE);
|
||||
// fMenuView->CheckEntry(im);
|
||||
// fMenuView->CheckEntry(im);
|
||||
|
||||
// // When using the DockButton of the MenuDock,
|
||||
// // the states 'enable' and 'disable' of menus have to be updated.
|
||||
// fMenuDock->Connect("Undocked()", "TestMainFrame", this, "HandleMenu(=M_VIEW_UNDOCK)");
|
||||
|
||||
// fMenuHelp = new TGPopupMenu(gClient->GetRoot());
|
||||
// fMenuHelp->AddEntry("&Contents", im++);
|
||||
// fMenuHelp->AddEntry("&Search...", im++);
|
||||
// fMenuHelp->AddSeparator();
|
||||
// fMenuHelp->AddEntry("&About", im++);
|
||||
|
||||
// fMenuNew1 = new TGPopupMenu();
|
||||
// fMenuNew1->AddEntry("Remove New Menus", im++);
|
||||
|
||||
// fMenuNew2 = new TGPopupMenu();
|
||||
// fMenuNew2->AddEntry("Remove New Menus", im++);
|
||||
|
||||
// Menu button messages are handled by the main frame (i.e. "this")
|
||||
// HandleMenu() method.
|
||||
// fMenuFile->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fMenuFile->Connect("PoppedUp()", "TestMainFrame", this, "HandlePopup()");
|
||||
// fMenuFile->Connect("PoppedDown()", "TestMainFrame", this, "HandlePopdown()");
|
||||
// fMenuTest->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fMenuView->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fMenuHelp->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fCascadeMenu->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fCascade1Menu->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fCascade2Menu->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fMenuNew1->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
// fMenuNew2->Connect("Activated(Int_t)", "TestMainFrame", this,
|
||||
// "HandleMenu(Int_t)");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TGVerticalFrame *vframe=new TGVerticalFrame(this, 800,1200); //main frame
|
||||
|
||||
|
||||
|
||||
fMenuBar = new TGMenuBar(vframe, 1, 1, kHorizontalFrame);
|
||||
fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout);
|
||||
// fMenuBar->AddPopup("&Test", fMenuTest, fMenuBarItemLayout);
|
||||
// fMenuBar->AddPopup("&View", fMenuView, fMenuBarItemLayout);
|
||||
// fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout);
|
||||
|
||||
vframe->AddFrame(fMenuBar, fMenuBarLayout);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TGHorizontalFrame* hpage=new TGHorizontalFrame(vframe, 800,1200); //horizontal frame. Inside there should be the tab and the canvas
|
||||
mtab=new TGTab(hpage, 1500, 1200); //tab!
|
||||
// page=new TGVerticalFrame(mtab, 1500,1200);
|
||||
|
||||
TGCompositeFrame *tf = mtab->AddTab("DACs");
|
||||
TGVerticalFrame *page=new TGVerticalFrame(tf, 1500,1200);
|
||||
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
dacs=new jctbDacs(page, myDet);
|
||||
|
||||
|
||||
tf = mtab->AddTab("Signals");
|
||||
page=new TGVerticalFrame(tf, 1500,1200);
|
||||
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
sig=new jctbSignals(page, myDet);
|
||||
|
||||
|
||||
tf = mtab->AddTab("ADCs");
|
||||
page=new TGVerticalFrame(tf, 1500,1200);
|
||||
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
adcs=new jctbAdcs(page, myDet);
|
||||
|
||||
|
||||
|
||||
|
||||
tf = mtab->AddTab("Pattern");
|
||||
page=new TGVerticalFrame(tf, 1500,1200);
|
||||
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
pat=new jctbPattern(page, myDet);
|
||||
|
||||
|
||||
|
||||
tf = mtab->AddTab("Acquisition");
|
||||
page=new TGVerticalFrame(tf, 1500,1200);
|
||||
tf->AddFrame(page, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
acq=new jctbAcquisition(page, myDet);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
hpage->AddFrame(mtab,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
|
||||
vframe->AddFrame(hpage,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
|
||||
AddFrame(vframe,new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 10,10,10,1));
|
||||
vframe->MapWindow();
|
||||
hpage->MapWindow();
|
||||
mtab->MapWindow();
|
||||
page->MapWindow();
|
||||
|
||||
// Sets window name and shows the main frame
|
||||
SetWindowName("JCTB Gui");
|
||||
MapSubwindows();
|
||||
MapWindow();
|
||||
Resize(1500,1200);
|
||||
|
||||
|
||||
// // Creates widgets of the example
|
||||
fEcanvas = new TRootEmbeddedCanvas ("Ecanvas",hpage,800,800);
|
||||
fEcanvas->Resize();
|
||||
fEcanvas->GetCanvas()->Update();
|
||||
|
||||
hpage->AddFrame(fEcanvas, new TGLayoutHints(kLHintsBottom | kLHintsCenterX | kLHintsExpandX | kLHintsExpandY, 10,10,10,10));
|
||||
|
||||
|
||||
fEcanvas->MapWindow();
|
||||
hpage->MapSubwindows();
|
||||
mtab->Connect("Selected(Int_t)","jctbMain",this,"tabSelected(Int_t)");
|
||||
|
||||
|
||||
tabSelected(0);
|
||||
}
|
||||
|
||||
void jctbMain::CloseWindow() {
|
||||
gApplication->Terminate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void jctbMain::HandleMenu(Int_t id)
|
||||
{
|
||||
// Handle menu items.
|
||||
|
||||
|
||||
|
||||
|
||||
switch (id) {
|
||||
|
||||
case 0: // fMenuFile->AddEntry("Open Alias", im++);
|
||||
cout << "Open Alias" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename);
|
||||
// dir = fi.fIniDir;
|
||||
loadAlias(fi.fFilename);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: // fMenuFile->AddEntry("Save Alias", im++);
|
||||
cout << "Save Alias" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
|
||||
printf("Save file: %s (dir: %s)\n", fi.fFilename);
|
||||
// dir = fi.fIniDir;
|
||||
saveAlias(fi.fFilename);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: //fMenuFile->AddEntry("Open Parameters", im++);
|
||||
cout << "Open Parameters" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
loadParameters(fi.fFilename);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //fMenuFile->AddEntry("Save Parameters", im++);
|
||||
cout << "Save Parameters" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
saveParameters(fi.fFilename);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4: // fMenuFile->AddEntry("Open Configuration", im++);
|
||||
cout << "Open configuration" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
}
|
||||
break;
|
||||
|
||||
case 5: // fMenuFile->AddEntry("Save Configuration", im++);
|
||||
cout << "Save configuration" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
}
|
||||
break;
|
||||
|
||||
case 6: //fMenuFile->AddEntry("Open Pattern", im++);
|
||||
cout << "Open pattern" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: //fMenuFile->AddEntry("Save Pattern", im++);
|
||||
cout << "Save pattern" << endl;
|
||||
{
|
||||
static TString dir(".");
|
||||
TGFileInfo fi;
|
||||
//fi.fFileTypes = filetypes;
|
||||
fi.fIniDir = StrDup(dir);
|
||||
printf("fIniDir = %s\n", fi.fIniDir);
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
|
||||
printf("Open file: %s (dir: %s)\n", fi.fFilename, fi.fIniDir);
|
||||
// dir = fi.fIniDir;
|
||||
}
|
||||
break;
|
||||
|
||||
case 8: // fMenuFile->AddEntry("Exit", im++);
|
||||
CloseWindow();
|
||||
|
||||
default:
|
||||
printf("Menu item %d selected\n", id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::loadConfiguration(string fname) {
|
||||
|
||||
myDet->readConfigurationFile(fname);
|
||||
|
||||
// string line;
|
||||
// int i;
|
||||
// ifstream myfile (fname.c_str());
|
||||
// if (myfile.is_open())
|
||||
// {
|
||||
// while ( getline (myfile,line) )
|
||||
// {
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// myfile.close();
|
||||
// }
|
||||
|
||||
// else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::saveConfiguration(string fname) {
|
||||
|
||||
|
||||
string line;
|
||||
int i;
|
||||
ofstream myfile (fname.c_str());
|
||||
if (myfile.is_open())
|
||||
{
|
||||
|
||||
|
||||
myfile.close();
|
||||
}
|
||||
|
||||
else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::loadParameters(string fname) {
|
||||
|
||||
myDet->retrieveDetectorSetup(fname);
|
||||
|
||||
// string line;
|
||||
// int i;
|
||||
// ifstream myfile (fname.c_str());
|
||||
// if (myfile.is_open())
|
||||
// {
|
||||
// while ( getline (myfile,line) )
|
||||
// {
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// myfile.close();
|
||||
// }
|
||||
|
||||
// else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::saveParameters(string fname) {
|
||||
|
||||
|
||||
string line;
|
||||
int i;
|
||||
ofstream myfile (fname.c_str());
|
||||
if (myfile.is_open())
|
||||
{
|
||||
|
||||
myfile << dacs->getDacParameters();
|
||||
myfile.close();
|
||||
}
|
||||
|
||||
else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::loadAlias(string fname) {
|
||||
|
||||
|
||||
string line;
|
||||
int i;
|
||||
ifstream myfile (fname.c_str());
|
||||
if (myfile.is_open())
|
||||
{
|
||||
while ( getline (myfile,line) )
|
||||
{
|
||||
// cout << line ;
|
||||
if (sscanf(line.c_str(),"BIT%d",&i)>0) {
|
||||
//cout << "*******" << line<< endl;
|
||||
sig->setSignalAlias(line);
|
||||
// cout << line ;
|
||||
} else if (sscanf(line.c_str(),"DAC%d",&i)>0) {
|
||||
dacs->setDacAlias(line);
|
||||
// cout << "+++++++++" << line<< endl;
|
||||
} else if (sscanf(line.c_str(),"ADC%d",&i)>0) {
|
||||
adcs->setAdcAlias(line);
|
||||
// cout << "---------" << line<< endl;
|
||||
} // else
|
||||
// cout << "<<<<<<<" << line << endl;
|
||||
|
||||
|
||||
}
|
||||
myfile.close();
|
||||
}
|
||||
|
||||
else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbMain::saveAlias(string fname) {
|
||||
|
||||
|
||||
string line;
|
||||
int i;
|
||||
ofstream myfile (fname.c_str());
|
||||
if (myfile.is_open())
|
||||
{
|
||||
//while ( getline (myfile,line) )
|
||||
// {
|
||||
// cout << line ;
|
||||
//if (sscanf(line.c_str(),"BIT%d",&i)>0) {
|
||||
//cout << "*******" << line<< endl;
|
||||
myfile << sig->getSignalAlias();
|
||||
// cout << line ;
|
||||
// } else if (sscanf(line.c_str(),"DAC%d",&i)>0) {
|
||||
myfile << dacs->getDacAlias();
|
||||
// cout << "+++++++++" << line<< endl;
|
||||
// } else if (sscanf(line.c_str(),"ADC%d",&i)>0) {
|
||||
myfile << adcs->getAdcAlias();
|
||||
// cout << "---------" << line<< endl;
|
||||
// } // else
|
||||
// cout << "<<<<<<<" << line << endl;
|
||||
|
||||
|
||||
//}
|
||||
myfile.close();
|
||||
}
|
||||
|
||||
else cout << "Unable to open file";
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void jctbMain::tabSelected(Int_t i) {
|
||||
|
||||
// cout << "Selected tab " << i << endl;
|
||||
// cout << "Current tab is " << mtab->GetCurrent() << endl;
|
||||
|
||||
switch (i) {
|
||||
|
||||
case 0: //dacs
|
||||
dacs->update();
|
||||
break;
|
||||
case 1: //signals
|
||||
sig->update();
|
||||
break;
|
||||
|
||||
case 2: //adcs
|
||||
adcs->update();
|
||||
break;
|
||||
|
||||
case 3: //pattern
|
||||
pat->update();
|
||||
break;
|
||||
|
||||
case 4: //acq
|
||||
acq->update();
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
#ifndef JCTBMAIN_H
|
||||
#define JCTBMAIN_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
class TRootEmbeddedCanvas;
|
||||
class TGButtonGroup;
|
||||
class TGVerticalFrame;
|
||||
class TGHorizontalFrame;
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TH2F;
|
||||
class TGComboBox;
|
||||
class TGCheckButton;
|
||||
|
||||
class THStack;
|
||||
class TGraphErrors;
|
||||
class TGTextButton;
|
||||
class TGTab;
|
||||
|
||||
class TGMenuBar;
|
||||
class TGPopupMenu;
|
||||
class TGDockableFrame;
|
||||
class TGLayoutHints;
|
||||
|
||||
class jctbDacs;
|
||||
|
||||
|
||||
class jctbSignals;
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
class jctbPattern;
|
||||
class jctbAdcs;
|
||||
class jctbAcquisition;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbMain : public TGMainFrame {
|
||||
private:
|
||||
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
|
||||
|
||||
TRootEmbeddedCanvas *fEcanvas;
|
||||
TRootEmbeddedCanvas *fModulecanvas;
|
||||
TGButtonGroup *br;
|
||||
|
||||
TGTab *mtab;
|
||||
|
||||
|
||||
jctbDacs *dacs;
|
||||
|
||||
|
||||
jctbSignals *sig;
|
||||
jctbAdcs *adcs;
|
||||
|
||||
|
||||
|
||||
jctbPattern *pat;
|
||||
jctbAcquisition *acq;
|
||||
|
||||
TGDockableFrame *fMenuDock;
|
||||
|
||||
TGMenuBar *fMenuBar;
|
||||
TGPopupMenu *fMenuFile, *fMenuTest, *fMenuView, *fMenuHelp;
|
||||
TGPopupMenu *fCascadeMenu, *fCascade1Menu, *fCascade2Menu;
|
||||
TGPopupMenu *fMenuNew1, *fMenuNew2;
|
||||
TGLayoutHints *fMenuBarLayout, *fMenuBarItemLayout, *fMenuBarHelpLayout;
|
||||
|
||||
public:
|
||||
jctbMain(const TGWindow *p, multiSlsDetector *det);
|
||||
|
||||
|
||||
int loadAlias(string fname);
|
||||
int saveAlias(string fname);
|
||||
int loadParameters(string fname);
|
||||
int saveParameters(string fname);
|
||||
int loadConfiguration(string fname);
|
||||
int saveConfiguration(string fname);
|
||||
void tabSelected(Int_t);
|
||||
|
||||
void CloseWindow();
|
||||
|
||||
void HandleMenu(Int_t);
|
||||
|
||||
ClassDef(jctbMain,0)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,532 +0,0 @@
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
#include <TF1.h>
|
||||
#include <TRandom.h>
|
||||
#include <TGButton.h>
|
||||
#include <TRootEmbeddedCanvas.h>
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TGComboBox.h>
|
||||
#include <TH2F.h>
|
||||
#include <TColor.h>
|
||||
#include <TH1F.h>
|
||||
#include <TGraphErrors.h>
|
||||
#include <THStack.h>
|
||||
#include <TGTab.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbPattern.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jctbLoop::jctbLoop(TGGroupFrame *page, int i, multiSlsDetector *det) : TGHorizontalFrame(page, 800,800), id(i), myDet(det) {
|
||||
|
||||
TGHorizontalFrame *hframe=this;
|
||||
|
||||
char tit[100];
|
||||
|
||||
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
MapWindow();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "Loop %d Repetitions: ", id);
|
||||
|
||||
TGLabel *label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eLoopNumber = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
hframe->AddFrame( eLoopNumber,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eLoopNumber->MapWindow();
|
||||
eLoopNumber->Resize(150,30);
|
||||
TGTextEntry *e= eLoopNumber->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbLoop",this,"setNLoops()");
|
||||
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "Start Address: ");
|
||||
|
||||
label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eLoopStartAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 1024);
|
||||
hframe->AddFrame( eLoopStartAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eLoopStartAddr->MapWindow();
|
||||
eLoopStartAddr->Resize(150,30);
|
||||
|
||||
eLoopStartAddr->SetState(kFALSE);
|
||||
|
||||
label= new TGLabel(hframe, "Stop Address: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eLoopStopAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 1024);
|
||||
hframe->AddFrame( eLoopStopAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eLoopStopAddr->MapWindow();
|
||||
eLoopStopAddr->Resize(150,30);
|
||||
|
||||
|
||||
|
||||
eLoopStopAddr->SetState(kFALSE);
|
||||
}
|
||||
|
||||
void jctbLoop::setNLoops() {
|
||||
|
||||
int start, stop, n;
|
||||
|
||||
|
||||
start=-1;
|
||||
stop=-1;
|
||||
n=eLoopNumber->GetNumber();
|
||||
myDet->setCTBPatLoops(id,start, stop,n);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbLoop::update() {
|
||||
|
||||
int start, stop, n;
|
||||
|
||||
|
||||
start=-1;
|
||||
stop=-1;
|
||||
n=-1;
|
||||
myDet->setCTBPatLoops(id,start, stop,n);
|
||||
eLoopStartAddr->SetHexNumber(start);
|
||||
eLoopStopAddr->SetHexNumber(stop);
|
||||
eLoopNumber->SetNumber(n);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
jctbWait::jctbWait(TGGroupFrame *page, int i, multiSlsDetector *det) : TGHorizontalFrame(page, 800,800), id(i), myDet(det) {
|
||||
|
||||
char tit[100];
|
||||
TGHorizontalFrame *hframe=this;
|
||||
page->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
MapWindow();
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "Wait %d (run clk): ", id);
|
||||
|
||||
TGLabel *label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eWaitTime = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
hframe->AddFrame( eWaitTime,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eWaitTime->MapWindow();
|
||||
eWaitTime->Resize(150,30);
|
||||
TGTextEntry *e= eWaitTime->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbWait",this,"setWaitTime()");
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "Wait Address: ");
|
||||
|
||||
label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eWaitAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 1024);
|
||||
hframe->AddFrame( eWaitAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eWaitAddr->MapWindow();
|
||||
eWaitAddr->Resize(150,30);
|
||||
|
||||
eWaitAddr->SetState(kFALSE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbWait::setWaitTime() {
|
||||
|
||||
|
||||
Long64_t t=eWaitTime->GetNumber();
|
||||
|
||||
t=myDet->setCTBPatWaitTime(id,t);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbWait::update() {
|
||||
|
||||
int start, stop, n, addr;
|
||||
|
||||
Long64_t t=-1;
|
||||
|
||||
|
||||
t=myDet->setCTBPatWaitTime(id,t);
|
||||
addr=myDet->setCTBPatWaitAddr(id,-1);
|
||||
eWaitAddr->SetHexNumber(addr);
|
||||
eWaitTime->SetNumber(t);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jctbPattern::jctbPattern(TGVerticalFrame *page, multiSlsDetector *det)
|
||||
: TGGroupFrame(page,"Pattern",kVerticalFrame), myDet(det) {
|
||||
|
||||
|
||||
SetTitlePos(TGGroupFrame::kLeft);
|
||||
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
|
||||
char tit[100];
|
||||
|
||||
|
||||
TGHorizontalFrame* hframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
sprintf(tit, "ADC Clock Frequency (MHz): ");
|
||||
|
||||
TGLabel *label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eAdcClkFreq = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 40);
|
||||
hframe->AddFrame( eAdcClkFreq,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eAdcClkFreq->MapWindow();
|
||||
eAdcClkFreq->Resize(150,30);
|
||||
TGTextEntry *e= eAdcClkFreq->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setAdcFreq()");
|
||||
|
||||
|
||||
label= new TGLabel(hframe, " Phase (0.15ns step): ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eAdcClkPhase = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 200);
|
||||
hframe->AddFrame( eAdcClkPhase,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eAdcClkPhase->MapWindow();
|
||||
eAdcClkPhase->Resize(150,30);
|
||||
e= eAdcClkPhase->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setAdcPhase()");
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
sprintf(tit, "Run Clock Frequency (MHz): ");
|
||||
|
||||
label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eRunClkFreq = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 160);
|
||||
hframe->AddFrame( eRunClkFreq,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eRunClkFreq->MapWindow();
|
||||
eRunClkFreq->Resize(150,30);
|
||||
e= eRunClkFreq->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setRunFreq()");
|
||||
|
||||
|
||||
|
||||
label= new TGLabel(hframe, " Phase (0.15ns step): ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eRunClkPhase = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 200);
|
||||
hframe->AddFrame( eRunClkPhase,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eRunClkPhase->MapWindow();
|
||||
eRunClkPhase->Resize(150,30);
|
||||
e= eRunClkPhase->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setRunPhase()");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
sprintf(tit, "Number of frames: ");
|
||||
|
||||
label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eFrames = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
hframe->AddFrame( eFrames,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eFrames->MapWindow();
|
||||
eFrames->Resize(150,30);
|
||||
e= eFrames->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setFrames()");
|
||||
|
||||
|
||||
label= new TGLabel(hframe, " Period (s): ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ePeriod = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
hframe->AddFrame( ePeriod,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
ePeriod->MapWindow();
|
||||
ePeriod->Resize(150,30);
|
||||
e= ePeriod->TGNumberEntry::GetNumberEntry();
|
||||
e->Connect("ReturnPressed()","jctbPattern",this,"setPeriod()");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
sprintf(tit, "Start Address: ");
|
||||
|
||||
label= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
eStartAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 1024);
|
||||
hframe->AddFrame( eStartAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eStartAddr->MapWindow();
|
||||
eStartAddr->Resize(150,30);
|
||||
|
||||
eStartAddr->SetState(kFALSE);
|
||||
|
||||
label= new TGLabel(hframe, "Stop Address: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eStopAddr = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,
|
||||
0, 1024);
|
||||
hframe->AddFrame( eStopAddr,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eStopAddr->MapWindow();
|
||||
eStopAddr->Resize(150,30);
|
||||
|
||||
|
||||
|
||||
|
||||
eStopAddr->SetState(kFALSE);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int idac=0;
|
||||
for (idac=0; idac<NLOOPS; idac++) {
|
||||
|
||||
eLoop[idac]=new jctbLoop(this,idac,myDet);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for (idac=0; idac<NWAITS; idac++) {
|
||||
|
||||
|
||||
eWait[idac]=new jctbWait(this,idac,myDet);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void jctbPattern::update() {
|
||||
|
||||
int start, stop, n, addr;
|
||||
|
||||
Long_t t;
|
||||
|
||||
|
||||
|
||||
eAdcClkFreq->SetNumber(myDet->setSpeed(slsDetectorDefs::ADC_CLOCK,-1));
|
||||
eRunClkFreq->SetNumber(myDet->setSpeed(slsDetectorDefs::CLOCK_DIVIDER,-1));
|
||||
//ADC_PHASE
|
||||
//PHASE_SHIFT
|
||||
eFrames->SetNumber(myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,-1));
|
||||
ePeriod->SetNumber(((Double_t)myDet->setTimer(slsDetectorDefs::FRAME_PERIOD,-1))*1E-9);
|
||||
|
||||
start=-1;
|
||||
stop=-1;
|
||||
n=-1;
|
||||
myDet->setCTBPatLoops(-1,start, stop,n);
|
||||
eStartAddr->SetHexNumber(start);
|
||||
eStopAddr->SetHexNumber(stop);
|
||||
|
||||
for (int iloop=0; iloop<NLOOPS; iloop++) {
|
||||
eLoop[iloop]->update();
|
||||
|
||||
}
|
||||
|
||||
for (int iwait=0; iwait<NWAITS; iwait++) {
|
||||
eWait[iwait]->update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void jctbPattern::setFrames() {
|
||||
myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,eFrames->GetNumber());
|
||||
}
|
||||
|
||||
void jctbPattern::setPeriod() {
|
||||
myDet->setTimer(slsDetectorDefs::FRAME_PERIOD,eFrames->GetNumber()*1E9);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void jctbPattern::setAdcFreq() {
|
||||
myDet->setSpeed(slsDetectorDefs::ADC_CLOCK,eAdcClkFreq->GetNumber());
|
||||
}
|
||||
void jctbPattern::setRunFreq() {
|
||||
myDet->setSpeed(slsDetectorDefs::CLOCK_DIVIDER,eRunClkFreq->GetNumber());
|
||||
|
||||
}
|
||||
void jctbPattern::setAdcPhase() {
|
||||
myDet->setSpeed(slsDetectorDefs::ADC_PHASE,eAdcClkPhase->GetNumber());
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbPattern::setRunPhase() {
|
||||
myDet->setSpeed(slsDetectorDefs::PHASE_SHIFT,eRunClkPhase->GetNumber());
|
||||
|
||||
}
|
||||
|
@ -1,124 +0,0 @@
|
||||
#ifndef JCTBPATTERN_H
|
||||
#define JCTBPATTERN_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
#define NLOOPS 3
|
||||
#define NWAITS 3
|
||||
#define NADCS 32
|
||||
#define PATLEN 1024
|
||||
|
||||
class TRootEmbeddedCanvas;
|
||||
class TGButtonGroup;
|
||||
class TGVerticalFrame;
|
||||
class TGHorizontalFrame;
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TH2F;
|
||||
class TGComboBox;
|
||||
class TGCheckButton;
|
||||
|
||||
class THStack;
|
||||
class TGraphErrors;
|
||||
class energyCalibration;
|
||||
class TGTextButton;
|
||||
class TGTab;
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class jctbLoop : public TGHorizontalFrame {
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TGNumberEntry *eLoopStartAddr;
|
||||
TGNumberEntry *eLoopStopAddr;
|
||||
TGNumberEntry *eLoopNumber;
|
||||
|
||||
int id;
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
jctbLoop(TGGroupFrame *page, int i,multiSlsDetector *det);
|
||||
|
||||
void setNLoops();
|
||||
void update();
|
||||
|
||||
ClassDef(jctbLoop,0)
|
||||
};
|
||||
|
||||
class jctbWait : public TGHorizontalFrame {
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TGNumberEntry *eWaitAddr;
|
||||
TGNumberEntry *eWaitTime;
|
||||
|
||||
int id;
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
jctbWait(TGGroupFrame *page, int i,multiSlsDetector *det);
|
||||
|
||||
void setWaitTime();
|
||||
void update();
|
||||
|
||||
ClassDef(jctbWait,0)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class jctbPattern : public TGGroupFrame {
|
||||
private:
|
||||
|
||||
|
||||
TGNumberEntry *eAdcClkFreq;
|
||||
TGNumberEntry *eRunClkFreq;
|
||||
TGNumberEntry *eAdcClkPhase;
|
||||
TGNumberEntry *eRunClkPhase;
|
||||
|
||||
TGNumberEntry *eStartAddr;
|
||||
TGNumberEntry *eStopAddr;
|
||||
TGNumberEntry *eFrames;
|
||||
TGNumberEntry *ePeriod;
|
||||
|
||||
jctbLoop *eLoop[NLOOPS];
|
||||
jctbWait *eWait[NWAITS];
|
||||
|
||||
|
||||
char pat[PATLEN*8];
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
|
||||
jctbPattern(TGVerticalFrame *page, multiSlsDetector *det);
|
||||
|
||||
void update();
|
||||
void setAdcFreq();
|
||||
void setRunFreq();
|
||||
void setAdcPhase();
|
||||
void setRunPhase();
|
||||
void setFrames();
|
||||
void setPeriod();
|
||||
|
||||
|
||||
|
||||
ClassDef(jctbPattern,0)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,186 +0,0 @@
|
||||
#include <TGButton.h>
|
||||
#include <TRootEmbeddedCanvas.h>
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <TColor.h>
|
||||
#include <TGColorSelect.h>
|
||||
|
||||
|
||||
#include "jctbSignal.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
jctbSignal::jctbSignal(TGFrame *page, int i, multiSlsDetector *det)
|
||||
: TGHorizontalFrame(page, 800,50), myDet(det), id(i), hsig(NULL) {
|
||||
|
||||
|
||||
TGHorizontalFrame *hframe=this;
|
||||
char tit[100];
|
||||
|
||||
|
||||
|
||||
sprintf(tit, "BIT%d ",id);
|
||||
|
||||
sLabel= new TGLabel(hframe, tit);
|
||||
hframe->AddFrame( sLabel,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sLabel->MapWindow();
|
||||
sLabel->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
|
||||
sOutput= new TGCheckButton(hframe, "Out");
|
||||
hframe->AddFrame( sOutput,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sOutput->MapWindow();
|
||||
|
||||
|
||||
sOutput->Connect("Toggled(Bool_t)","jctbSignal",this,"ToggledOutput(Bool_t)");
|
||||
|
||||
sClock= new TGCheckButton(hframe, "Clk");
|
||||
hframe->AddFrame( sClock,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sClock->MapWindow();
|
||||
|
||||
sClock->Connect("Toggled(Bool_t)","jctbSignal",this,"ToggledClock(Bool_t)");
|
||||
|
||||
|
||||
sPlot= new TGCheckButton(hframe, "Plot");
|
||||
hframe->AddFrame( sPlot,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
sPlot->MapWindow();
|
||||
|
||||
sPlot->Connect("Toggled(Bool_t)","jctbSignal",this,"ToggledPlot(Bool_t)");
|
||||
|
||||
fColorSel = new TGColorSelect(hframe, id+1, 0);
|
||||
hframe->AddFrame(fColorSel, new TGLayoutHints(kLHintsTop |
|
||||
kLHintsLeft, 2, 0, 2, 2));
|
||||
|
||||
|
||||
fColorSel->SetColor(TColor::Number2Pixel(id+1));
|
||||
|
||||
|
||||
ToggledOutput(kFALSE);
|
||||
|
||||
if (id==63) {
|
||||
sOutput->SetOn(kTRUE);
|
||||
sClock->SetOn(kFALSE);
|
||||
sOutput->SetEnabled(kFALSE);
|
||||
sClock->SetEnabled(kFALSE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
int jctbSignal::setSignalAlias(char *tit, int plot, int col) {
|
||||
|
||||
if (tit)
|
||||
sLabel->SetText(tit);
|
||||
|
||||
if (plot>0) {
|
||||
sPlot->SetOn(kTRUE,kTRUE);
|
||||
} else if (plot==0)
|
||||
sPlot->SetOn(kFALSE,kTRUE);
|
||||
|
||||
if (col>=0)
|
||||
fColorSel->SetColor(col);//TColor::Number2Pixel(col+1));
|
||||
|
||||
fColorSel->SetEnabled(sPlot->IsOn());
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
string jctbSignal::getSignalAlias() {
|
||||
|
||||
|
||||
ostringstream oss;
|
||||
oss << "BIT" << dec << id << " " << sLabel->GetText()->Data() << " " << sPlot->IsOn() << hex << " " << fColorSel->GetColor() << endl;
|
||||
return oss.str();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
int jctbSignal::setOutput(Long64_t r) {
|
||||
|
||||
|
||||
// cout << hex << r << dec <<endl;
|
||||
|
||||
Long64_t mask=((Long64_t)1<<id);
|
||||
|
||||
if (r&mask)
|
||||
sOutput->SetOn(kTRUE,kTRUE);
|
||||
else
|
||||
sOutput->SetOn(kFALSE,kTRUE);
|
||||
|
||||
return sOutput->IsOn();
|
||||
|
||||
}
|
||||
|
||||
int jctbSignal::setClock(Long64_t r) {
|
||||
|
||||
Long64_t mask=((Long64_t)1<<id);
|
||||
|
||||
// cout << hex << r << dec <<endl;
|
||||
|
||||
if (r&mask)
|
||||
sClock->SetOn(kTRUE,kTRUE);
|
||||
else
|
||||
sClock->SetOn(kFALSE,kTRUE);
|
||||
|
||||
return sClock->IsOn();
|
||||
|
||||
}
|
||||
|
||||
int jctbSignal::isClock() { sClock->IsOn();}
|
||||
int jctbSignal::isOutput() { sOutput->IsOn();}
|
||||
int jctbSignal::isPlot() { sPlot->IsOn();}
|
||||
|
||||
|
||||
void jctbSignal::ToggledOutput(Bool_t b) {
|
||||
Long_t mask=b<<id;
|
||||
ToggledSignalOutput(b<<id);
|
||||
if (b) {
|
||||
sClock->SetEnabled(kTRUE);
|
||||
sPlot->SetEnabled(kTRUE);
|
||||
if ( sPlot->IsOn())
|
||||
fColorSel->SetEnabled(kTRUE);
|
||||
else
|
||||
fColorSel->SetEnabled(kFALSE);
|
||||
} else {
|
||||
sClock->SetEnabled(kFALSE);
|
||||
sPlot->SetEnabled(kFALSE);
|
||||
fColorSel->SetEnabled(kFALSE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
void jctbSignal::ToggledClock(Bool_t b){
|
||||
Long_t mask=b<<id;
|
||||
ToggledSignalClock(mask);
|
||||
|
||||
|
||||
}
|
||||
void jctbSignal::ToggledPlot(Bool_t b){
|
||||
Long_t mask=b<<id;
|
||||
ToggledSignalPlot(mask);
|
||||
fColorSel->SetEnabled(b);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbSignal::ToggledSignalOutput(Int_t b) {
|
||||
Emit("ToggledSignalOutput(Int_t)", id);
|
||||
|
||||
}
|
||||
void jctbSignal::ToggledSignalClock(Int_t b){
|
||||
Emit("ToggledSignalClock(Int_t)", id);
|
||||
|
||||
|
||||
}
|
||||
void jctbSignal::ToggledSignalPlot(Int_t b){
|
||||
Emit("ToggledSignalPlot(Int_t)", id);
|
||||
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
#ifndef JCTBSIGNAL_H
|
||||
#define JCTBSIGNAL_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class TGTextEntry;
|
||||
class TGLabel;
|
||||
class TGNumberEntry;
|
||||
class TGCheckButton;
|
||||
class TH1I;
|
||||
class TGTextButton;
|
||||
class TGColorSelect;
|
||||
|
||||
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbSignal : public TGHorizontalFrame {
|
||||
|
||||
// RQ_OBJECT("jctbSignal")
|
||||
|
||||
private:
|
||||
|
||||
TGLabel *sLabel;
|
||||
TGCheckButton *sOutput;
|
||||
TGCheckButton *sClock;
|
||||
TGCheckButton *sPlot;
|
||||
TGLabel *sValue;
|
||||
TGNumberEntry *sEntry;
|
||||
TGColorSelect *fColorSel;
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
Int_t id;
|
||||
|
||||
TH1I *hsig;
|
||||
|
||||
public:
|
||||
|
||||
jctbSignal(TGFrame *page, int i, multiSlsDetector *det);
|
||||
int setSignalAlias(char *tit, int plot, int col);
|
||||
string getSignalAlias();
|
||||
|
||||
TH1I *getPlot() {return hsig;};
|
||||
int setOutput(Long64_t);
|
||||
int setClock(Long64_t);
|
||||
|
||||
void ToggledOutput(Bool_t);
|
||||
void ToggledClock(Bool_t);
|
||||
void ToggledPlot(Bool_t);
|
||||
|
||||
int isClock();
|
||||
int isOutput();
|
||||
int isPlot();
|
||||
|
||||
|
||||
void ToggledSignalOutput(Int_t); //*SIGNAL*
|
||||
void ToggledSignalClock(Int_t); //*SIGNAL*
|
||||
void ToggledSignalPlot(Int_t); //*SIGNAL*
|
||||
|
||||
|
||||
|
||||
ClassDef(jctbSignal,0)
|
||||
};
|
||||
|
||||
#endif
|
@ -1,257 +0,0 @@
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
#include <TF1.h>
|
||||
#include <TRandom.h>
|
||||
#include <TGButton.h>
|
||||
#include <TRootEmbeddedCanvas.h>
|
||||
#include <TGButtonGroup.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGLabel.h>
|
||||
#include <TList.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TGComboBox.h>
|
||||
#include <TH2F.h>
|
||||
#include <TColor.h>
|
||||
#include <TH1F.h>
|
||||
#include <TGraphErrors.h>
|
||||
#include <THStack.h>
|
||||
#include <TGTab.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "jctbSignals.h"
|
||||
#include "jctbSignal.h"
|
||||
#include "multiSlsDetector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
#define DEFAULTFN "run_0.encal"
|
||||
|
||||
|
||||
jctbSignals::jctbSignals(TGVerticalFrame *page, multiSlsDetector *det)
|
||||
: TGGroupFrame(page,"IO Signals",kVerticalFrame), myDet(det) {
|
||||
|
||||
|
||||
SetTitlePos(TGGroupFrame::kLeft);
|
||||
page->AddFrame(this,new TGLayoutHints( kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
MapWindow();
|
||||
|
||||
cout << "window mapped " << endl;
|
||||
|
||||
TGHorizontalFrame *hframe;
|
||||
char tit[100];
|
||||
|
||||
TGHorizontalFrame* hhframe=new TGHorizontalFrame(this, 800,800);
|
||||
AddFrame(hhframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hhframe->MapWindow();
|
||||
|
||||
TGVerticalFrame *vframe;
|
||||
|
||||
|
||||
|
||||
|
||||
int idac=0;
|
||||
for (idac=0; idac<NIOSIGNALS; idac++) {
|
||||
if (idac%27==0) {
|
||||
|
||||
|
||||
vframe=new TGVerticalFrame(hhframe, 400,800);
|
||||
hhframe->AddFrame(vframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
vframe->MapWindow();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
signals[idac]=new jctbSignal(vframe,idac,myDet);
|
||||
signals[idac]->Connect(" ToggledSignalOutput(Int_t)","jctbSignals",this,"ToggledOutReg(Int_t)");
|
||||
signals[idac]->Connect(" ToggledSignalClock(Int_t)","jctbSignals",this,"ToggledClockReg(Int_t)");
|
||||
signals[idac]->Connect(" ToggledSignalPlot(Int_t)","jctbSignals",this,"ToggledPlot(Int_t)");
|
||||
|
||||
vframe->AddFrame(signals[idac],new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
signals[idac]->MapWindow();
|
||||
|
||||
}
|
||||
idac=63;
|
||||
signals[idac]=new jctbSignal(vframe,idac,myDet);
|
||||
vframe->AddFrame(signals[idac],new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
signals[idac]->MapWindow();
|
||||
sprintf(tit,"ADC Latch");
|
||||
|
||||
signals[idac]->setSignalAlias(tit,-1,-1);
|
||||
|
||||
signals[idac]->Connect(" ToggledSignalOutput(Int_t)","jctbSignals",this,"ToggledOutReg(Int_t)");
|
||||
signals[idac]->Connect(" ToggledSignalClock(Int_t)","jctbSignals",this,"ToggledClockReg(Int_t)");
|
||||
signals[idac]->Connect(" ToggledSignalPlot(Int_t)","jctbSignals",this,"ToggledPlot(Int_t)");
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(vframe, 800,50);
|
||||
vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
TGLabel *label= new TGLabel(hframe, "IO Control Register");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
eIOCntrlRegister = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
|
||||
hframe->AddFrame(eIOCntrlRegister,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eIOCntrlRegister->MapWindow();
|
||||
eIOCntrlRegister->Resize(150,30);
|
||||
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(vframe, 800,50);
|
||||
vframe->AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 1,1,1,1));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
label= new TGLabel(hframe, "Clock Control Register");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
eClkCntrlRegister = new TGNumberEntry(hframe, 0, 16,999, TGNumberFormat::kNESHex,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELNoLimits);
|
||||
|
||||
hframe->AddFrame(eClkCntrlRegister,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eClkCntrlRegister->MapWindow();
|
||||
eClkCntrlRegister->Resize(150,30);
|
||||
|
||||
eIOCntrlRegister->SetState(kFALSE);
|
||||
eClkCntrlRegister->SetState(kFALSE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int jctbSignals::setSignalAlias(string line) {
|
||||
|
||||
int is=-1, plot=0, col=-1;
|
||||
char tit[100];
|
||||
int narg=sscanf(line.c_str(),"BIT%d %s %d %d",&is,tit,&plot,&col);
|
||||
if (narg<2)
|
||||
return -1;
|
||||
if (is>=0 && is<NIOSIGNALS) {
|
||||
signals[is]->setSignalAlias(tit,plot,col);
|
||||
}
|
||||
return is;
|
||||
|
||||
}
|
||||
|
||||
string jctbSignals::getSignalAlias() {
|
||||
|
||||
ostringstream oss;
|
||||
for (int is=0; is<NIOSIGNALS; is++)
|
||||
oss << signals[is]->getSignalAlias() << endl;
|
||||
|
||||
|
||||
return oss.str();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void jctbSignals::update() {
|
||||
Long64_t oreg=myDet->setCTBWord(-1,-1);
|
||||
Long64_t creg=myDet->setCTBWord(-2,-1);
|
||||
|
||||
|
||||
char val[1000];
|
||||
cout << hex << oreg << dec << endl;
|
||||
cout << hex << creg << dec << endl;
|
||||
|
||||
sprintf(val,"%llX",oreg);
|
||||
// eIOCntrlRegister->SetHexNumber(oreg);
|
||||
eIOCntrlRegister->SetText(val);
|
||||
sprintf(val,"%llX",creg);
|
||||
// eClkCntrlRegister->SetHexNumber(creg);
|
||||
eClkCntrlRegister->SetText(val);
|
||||
|
||||
for (int idac=0; idac<NIOSIGNALS; idac++) {
|
||||
signals[idac]->setOutput(oreg);
|
||||
signals[idac]->setClock(creg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void jctbSignals::ToggledOutReg(Int_t mask) {
|
||||
|
||||
char val[1000];
|
||||
Long64_t oreg=myDet->setCTBWord(-1,-1);
|
||||
Long64_t m=((Long64_t)1)<<mask;
|
||||
|
||||
|
||||
if (signals[mask]->isOutput())
|
||||
oreg|=m;
|
||||
else
|
||||
oreg&=~m;
|
||||
|
||||
cout << dec << sizeof(Long64_t) << " " << mask << " " << hex << m << " ioreg " << oreg << endl;
|
||||
|
||||
myDet->setCTBWord(-1,oreg);
|
||||
oreg=myDet->setCTBWord(-1,-1);
|
||||
|
||||
cout << dec << sizeof(Long64_t) << " " << mask << " " << hex << m << " ioreg " << oreg << endl;
|
||||
|
||||
sprintf(val,"%llX",oreg);
|
||||
// eIOCntrlRegister->SetHexNumber(oreg);
|
||||
eIOCntrlRegister->SetText(val);
|
||||
// eIOCntrlRegister->SetNumber(oreg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void jctbSignals::ToggledClockReg(Int_t mask){
|
||||
|
||||
char val[1000];
|
||||
Long64_t oreg=myDet->setCTBWord(-2,-1);
|
||||
Long64_t m=((Long64_t)1)<<mask;
|
||||
|
||||
|
||||
|
||||
if (signals[mask]->isClock())
|
||||
oreg|=m;
|
||||
else
|
||||
oreg&=~m;
|
||||
|
||||
cout << hex << "clkreg " << oreg << endl;
|
||||
|
||||
myDet->setCTBWord(-2,oreg);
|
||||
oreg=myDet->setCTBWord(-2,-1);
|
||||
sprintf(val,"%llX",oreg);
|
||||
// eIOCntrlRegister->SetHexNumber(oreg);
|
||||
|
||||
eClkCntrlRegister->SetText(val);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void jctbSignals::ToggledPlot(Int_t mask) {
|
||||
|
||||
if (signals[mask]->isPlot())
|
||||
cout << "plot signal " << mask << endl;
|
||||
else
|
||||
cout << "unplot signal " << mask << endl;
|
||||
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
#ifndef JCTBSIGNALS_H
|
||||
#define JCTBSIGNALS_H
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
#define NSIGNALS 64
|
||||
#define NIOSIGNALS 52
|
||||
#define ADCLATCH 63
|
||||
|
||||
|
||||
|
||||
|
||||
class TGNumberEntry;
|
||||
class multiSlsDetector;
|
||||
class jctbSignal;
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class jctbSignals : public TGGroupFrame {
|
||||
private:
|
||||
|
||||
jctbSignal *signals[NSIGNALS];
|
||||
|
||||
TGNumberEntry *eIOCntrlRegister;
|
||||
TGNumberEntry *eClkCntrlRegister;
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
public:
|
||||
jctbSignals(TGVerticalFrame *page, multiSlsDetector *det);
|
||||
int setSignalAlias(string line);
|
||||
string getSignalAlias();
|
||||
|
||||
void update();
|
||||
|
||||
|
||||
void ToggledOutReg(Int_t);
|
||||
void ToggledClockReg(Int_t);
|
||||
void ToggledPlot(Int_t);
|
||||
ClassDef(jctbSignals,0)
|
||||
};
|
||||
|
||||
#endif
|
44
README.md
Normal file
@ -0,0 +1,44 @@
|
||||
# slsDetector package
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Get source
|
||||
The source code is organised into several submodules, and the top level module is
|
||||
sls_detectors_package.
|
||||
|
||||
```
|
||||
$ git clone git@git.psi.ch:sls_detectors_software/sls_detectors_package.git
|
||||
$ cd sls_detectors_package
|
||||
$ ./checkout.sh
|
||||
```
|
||||
|
||||
### Setup dependencies
|
||||
The GUI client requires Qt 4.8 and Qwt 6.0
|
||||
```
|
||||
export QTDIR=/usr/local/Trolltech/
|
||||
export QWTDIR=/usr/local/qwt-6.0.1/
|
||||
```
|
||||
If either of them does not exist, the GUI client will not be built.
|
||||
|
||||
The calibration wizards require ROOT
|
||||
```
|
||||
export ROOTSYS=/usr/local/root-5.34
|
||||
```
|
||||
|
||||
### Compile
|
||||
Use cmake to create out-of-source builds, by creating an build folder parallel to source directory.
|
||||
```
|
||||
$ cd ..
|
||||
$ mkdir sls_detectors_package-build
|
||||
$ cd sls_detectors_package-build
|
||||
$ cmake ../sls_detectors_package
|
||||
$ make
|
||||
```
|
||||
|
||||
The libraries and executables will be found at `bin` directory
|
||||
```
|
||||
$ ls bin/
|
||||
gui_client libSlsDetector.a libSlsDetector.so libSlsReceiver.a libSlsReceiver.so
|
||||
sls_detector_acquire sls_detector_get slsDetectorGui sls_detector_help sls_detector_put slsReceiver
|
||||
```
|
11
cmake/FindCBF.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
FIND_PATH (CBF_INCLUDE_DIR
|
||||
${CBF_DIR}/include
|
||||
${CBF_DIR}/include/cbflib
|
||||
)
|
||||
FIND_LIBRARY (CBF_LIBRARY
|
||||
NAMES cbf
|
||||
HINTS ${CBF_DIR}/lib
|
||||
)
|
||||
INCLUDE ( FindPackageHandleStandardArgs )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS (CBF DEFAULT_MSG CBF_LIBRARY CBF_INCLUDE_DIR )
|
||||
|
118
cmake/FindQwt.cmake
Normal file
@ -0,0 +1,118 @@
|
||||
# Qt Widgets for Technical Applications
|
||||
# available at http://www.http://qwt.sourceforge.net/
|
||||
#
|
||||
# The module defines the following variables:
|
||||
# QWT_FOUND - the system has Qwt
|
||||
# QWT_INCLUDE_DIR - where to find qwt_plot.h
|
||||
# QWT_INCLUDE_DIRS - qwt includes
|
||||
# QWT_LIBRARY - where to find the Qwt library
|
||||
# QWT_LIBRARIES - aditional libraries
|
||||
# QWT_MAJOR_VERSION - major version
|
||||
# QWT_MINOR_VERSION - minor version
|
||||
# QWT_PATCH_VERSION - patch version
|
||||
# QWT_VERSION_STRING - version (ex. 5.2.1)
|
||||
# QWT_ROOT_DIR - root dir (ex. /usr/local)
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010-2013, Julien Schueller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# The views and conclusions contained in the software and documentation are those
|
||||
# of the authors and should not be interpreted as representing official policies,
|
||||
# either expressed or implied, of the FreeBSD Project.
|
||||
#=============================================================================
|
||||
|
||||
|
||||
find_path ( QWT_INCLUDE_DIR
|
||||
NAMES qwt_plot.h
|
||||
HINTS $ENV{QWTDIR} $ENV{QWTDIR}/src ${QT_INCLUDE_DIR}
|
||||
PATH_SUFFIXES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
||||
)
|
||||
|
||||
set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
|
||||
|
||||
# version
|
||||
set ( _VERSION_FILE ${QWT_INCLUDE_DIR}/qwt_global.h )
|
||||
if ( EXISTS ${_VERSION_FILE} )
|
||||
file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QWT_VERSION_STR" )
|
||||
if ( _VERSION_LINE )
|
||||
string ( REGEX REPLACE ".*define[ ]+QWT_VERSION_STR[ ]+\"(.*)\".*" "\\1" QWT_VERSION_STRING "${_VERSION_LINE}" )
|
||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" QWT_MAJOR_VERSION "${QWT_VERSION_STRING}" )
|
||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" QWT_MINOR_VERSION "${QWT_VERSION_STRING}" )
|
||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" QWT_PATCH_VERSION "${QWT_VERSION_STRING}" )
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
# check version
|
||||
set ( _QWT_VERSION_MATCH TRUE )
|
||||
if ( Qwt_FIND_VERSION AND QWT_VERSION_STRING )
|
||||
if ( Qwt_FIND_VERSION_EXACT )
|
||||
if ( NOT Qwt_FIND_VERSION VERSION_EQUAL QWT_VERSION_STRING )
|
||||
set ( _QWT_VERSION_MATCH FALSE )
|
||||
endif ()
|
||||
else ()
|
||||
if ( QWT_VERSION_STRING VERSION_LESS Qwt_FIND_VERSION )
|
||||
set ( _QWT_VERSION_MATCH FALSE )
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
find_library ( QWT_LIBRARY
|
||||
NAMES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
||||
HINTS $ENV{QWTDIR}/lib ${QT_LIBRARY_DIR}
|
||||
)
|
||||
|
||||
set ( QWT_LIBRARIES ${QWT_LIBRARY} )
|
||||
|
||||
|
||||
# try to guess root dir from include dir
|
||||
if ( QWT_INCLUDE_DIR )
|
||||
string ( REGEX REPLACE "(.*)/include.*" "\\1" QWT_ROOT_DIR ${QWT_INCLUDE_DIR} )
|
||||
# try to guess root dir from library dir
|
||||
elseif ( QWT_LIBRARY )
|
||||
string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" QWT_ROOT_DIR ${QWT_LIBRARY} )
|
||||
endif ()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments
|
||||
include ( FindPackageHandleStandardArgs )
|
||||
if ( CMAKE_VERSION LESS 2.8.3 )
|
||||
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH )
|
||||
else ()
|
||||
find_package_handle_standard_args( Qwt REQUIRED_VARS QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH VERSION_VAR QWT_VERSION_STRING )
|
||||
endif ()
|
||||
|
||||
|
||||
mark_as_advanced (
|
||||
QWT_LIBRARY
|
||||
QWT_LIBRARIES
|
||||
QWT_INCLUDE_DIR
|
||||
QWT_INCLUDE_DIRS
|
||||
QWT_MAJOR_VERSION
|
||||
QWT_MINOR_VERSION
|
||||
QWT_PATCH_VERSION
|
||||
QWT_VERSION_STRING
|
||||
QWT_ROOT_DIR
|
||||
)
|
167
cmake/FindROOT.cmake
Normal file
@ -0,0 +1,167 @@
|
||||
# - Finds ROOT instalation
|
||||
# This module sets up ROOT information
|
||||
# It defines:
|
||||
# ROOT_FOUND If the ROOT is found
|
||||
# ROOT_INCLUDE_DIR PATH to the include directory
|
||||
# ROOT_LIBRARIES Most common libraries
|
||||
# ROOT_GUI_LIBRARIES Most common libraries + GUI
|
||||
# ROOT_LIBRARY_DIR PATH to the library directory
|
||||
|
||||
|
||||
find_program(ROOT_CONFIG_EXECUTABLE root-config
|
||||
PATHS $ENV{ROOTSYS}/bin)
|
||||
|
||||
if(NOT ROOT_CONFIG_EXECUTABLE)
|
||||
set(ROOT_FOUND FALSE)
|
||||
else()
|
||||
set(ROOT_FOUND TRUE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
|
||||
OUTPUT_VARIABLE ROOTSYS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE ROOT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --incdir
|
||||
OUTPUT_VARIABLE ROOT_INCLUDE_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --libs
|
||||
OUTPUT_VARIABLE ROOT_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${ROOT_CONFIG_EXECUTABLE} --glibs
|
||||
OUTPUT_VARIABLE ROOT_GUI_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lThread -lMinuit -lHtml -lVMC -lEG -lGeom -lTreePlayer -lXMLIO -lProof)
|
||||
#set(ROOT_LIBRARIES ${ROOT_LIBRARIES} -lProofPlayer -lMLP -lSpectrum -lEve -lRGL -lGed -lXMLParser -lPhysics)
|
||||
set(ROOT_LIBRARY_DIR ${ROOTSYS}/lib)
|
||||
|
||||
# Make variables changeble to the advanced user
|
||||
mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
|
||||
|
||||
if(NOT ROOT_FIND_QUIETLY)
|
||||
message(STATUS "Found ROOT ${ROOT_VERSION} in ${ROOTSYS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
include(CMakeParseArguments)
|
||||
find_program(ROOTCINT_EXECUTABLE rootcint PATHS $ENV{ROOTSYS}/bin)
|
||||
find_program(GENREFLEX_EXECUTABLE genreflex PATHS $ENV{ROOTSYS}/bin)
|
||||
find_package(GCCXML)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function ROOT_GENERATE_DICTIONARY( dictionary
|
||||
# header1 header2 ...
|
||||
# LINKDEF linkdef1 ...
|
||||
# OPTIONS opt1...)
|
||||
function(ROOT_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "LINKDEF;OPTIONS" "" ${ARGN})
|
||||
#---Get the list of header files-------------------------
|
||||
set(headerfiles)
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
file(GLOB files ${fp})
|
||||
if(files)
|
||||
foreach(f ${files})
|
||||
if(NOT f MATCHES LinkDef)
|
||||
set(headerfiles ${headerfiles} ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(headerfiles ${headerfiles} ${fp})
|
||||
endif()
|
||||
endforeach()
|
||||
#---Get the list of include directories------------------
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
endforeach()
|
||||
#---Get LinkDef.h file------------------------------------
|
||||
set(linkdefs)
|
||||
foreach( f ${ARG_LINKDEF})
|
||||
if( IS_ABSOLUTE ${f})
|
||||
set(linkdefs ${linkdefs} ${f})
|
||||
else()
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/inc/${f})
|
||||
else()
|
||||
set(linkdefs ${linkdefs} ${CMAKE_CURRENT_SOURCE_DIR}/${f})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
#---call rootcint------------------------------------------
|
||||
add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
|
||||
COMMAND ${ROOTCINT_EXECUTABLE} -cint -f ${dictionary}.cxx
|
||||
-c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
|
||||
DEPENDS ${headerfiles} ${linkdefs})
|
||||
endfunction()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# function REFLEX_GENERATE_DICTIONARY(dictionary
|
||||
# header1 header2 ...
|
||||
# SELECTION selectionfile ...
|
||||
# OPTIONS opt1...)
|
||||
function(REFLEX_GENERATE_DICTIONARY dictionary)
|
||||
CMAKE_PARSE_ARGUMENTS(ARG "" "" "SELECTION;OPTIONS" "" ${ARGN})
|
||||
#---Get the list of header files-------------------------
|
||||
set(headerfiles)
|
||||
foreach(fp ${ARG_UNPARSED_ARGUMENTS})
|
||||
file(GLOB files ${fp})
|
||||
if(files)
|
||||
foreach(f ${files})
|
||||
set(headerfiles ${headerfiles} ${f})
|
||||
endforeach()
|
||||
else()
|
||||
set(headerfiles ${headerfiles} ${fp})
|
||||
endif()
|
||||
endforeach()
|
||||
#---Get Selection file------------------------------------
|
||||
if(IS_ABSOLUTE ${ARG_SELECTION})
|
||||
set(selectionfile ${ARG_SELECTION})
|
||||
else()
|
||||
set(selectionfile ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_SELECTION})
|
||||
endif()
|
||||
#---Get the list of include directories------------------
|
||||
get_directory_property(incdirs INCLUDE_DIRECTORIES)
|
||||
set(includedirs)
|
||||
foreach( d ${incdirs})
|
||||
set(includedirs ${includedirs} -I${d})
|
||||
endforeach()
|
||||
#---Get preprocessor definitions--------------------------
|
||||
get_directory_property(defs COMPILE_DEFINITIONS)
|
||||
foreach( d ${defs})
|
||||
set(definitions ${definitions} -D${d})
|
||||
endforeach()
|
||||
#---Nanes and others---------------------------------------
|
||||
set(gensrcdict ${dictionary}.cpp)
|
||||
if(MSVC)
|
||||
set(gccxmlopts "--gccxmlopt=\"--gccxml-compiler cl\"")
|
||||
else()
|
||||
#set(gccxmlopts "--gccxmlopt=\'--gccxml-cxxflags -m64 \'")
|
||||
set(gccxmlopts)
|
||||
endif()
|
||||
#set(rootmapname ${dictionary}Dict.rootmap)
|
||||
#set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
|
||||
#---Check GCCXML and get path-----------------------------
|
||||
if(GCCXML)
|
||||
get_filename_component(gccxmlpath ${GCCXML} PATH)
|
||||
else()
|
||||
message(WARNING "GCCXML not found. Install and setup your environment to find 'gccxml' executable")
|
||||
endif()
|
||||
#---Actual command----------------------------------------
|
||||
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname}
|
||||
COMMAND ${GENREFLEX_EXECUTABLE} ${headerfiles} -o ${gensrcdict} ${gccxmlopts} ${rootmapopts} --select=${selectionfile}
|
||||
--gccxmlpath=${gccxmlpath} ${ARG_OPTIONS} ${includedirs} ${definitions}
|
||||
DEPENDS ${headerfiles} ${selectionfile})
|
||||
endfunction()
|
||||
|
@ -19,7 +19,7 @@ A EIGER single module (500~kpixels) needs:
|
||||
\begin{itemize}
|
||||
\item A chilled (water+alcohol) at approximately 21~$^{\circ}$C, which needs to dissipate 85~W.
|
||||
\item A power supply (12~V, 8~A).
|
||||
\item 2$\times$1~Gb/s ethernet connectors to control the detector and, optionally, receive data at low rate. A DHCP server that gives IPs to the 1~Gb/s connectors of the detector is needed.
|
||||
\item 2$\times$1~Gb/s ethernet connectors to control the detector and, optionally, receive data at low rate. A DHCP server that gives IPs to the 1~Gb/s connectors of the detector is needed. Note that flow control has to be enabled on the switch you are using.
|
||||
\item 2$\times$10~Gb/s transceivers to optionally, receive data at high rate.
|
||||
\end{itemize}
|
||||
|
||||
@ -96,7 +96,7 @@ We would recommend expert users (beamline people) to write their parameters file
|
||||
|
||||
You will then need to setup the detector threshold and settings, the exposure time, the number of real time frames and eventually how many real time frames should be acquired:
|
||||
\begin{verbatim}
|
||||
sls_detector_put 0-settings [standard/highgain/lowgain]
|
||||
sls_detector_put 0-settings [veryhighgain/highgain/standard/lowgain/verylowgain]
|
||||
sls_detector_put 0-threshold 6000
|
||||
sls_detector_put 0-exptime 1[time_is_s]
|
||||
sls_detector_put 0-frames 10
|
||||
@ -104,8 +104,8 @@ sls_detector_put 0-period 0[time_is_s]
|
||||
\end{verbatim}
|
||||
In this case 10 consecutive 1~s frames will be acquired. Note that {\tt{period}} defines the sum of the acquisition time and the desired dead time before the next frame. If {\tt{period}} is set to 0, then the next frame will start as soon as the detector is ready to take another acquisition. \\
|
||||
|
||||
For \E, at the moment 3 settings are possible: {\tt{standard}}, {\tt{lowgain}} and {\tt{highgain}}. According to the setting chosen, one can reach different energies. Refer to the settings requirements for your detector.\\
|
||||
Notice that the option {\tt{settings standard/highgain/lowgain}} actually loads the trimbit files so it is time consuming. Only setting the {\tt{threshold}} does not load trimbit files.
|
||||
For \E, at the moment 5 settings are possible: {\tt{standard}}, {\tt{lowgain}}, {\tt{verylowgain}}, {\tt{veryhighgain}} and {\tt{highgain}}. According to the setting chosen, one can reach different energies. Refer to the settings requirements for your detector.\\
|
||||
Notice that the option {\tt{settings standard/highgain/lowgain/veryhighgain/verylowgain}} actually loads the trimbit files so it is time consuming. Only setting the {\tt{threshold}} does not load trimbit files.
|
||||
|
||||
The threshold is expressed in (eV) as the proper threshold setting, i.e. normally is set to 50\% of the beam energy.
|
||||
|
||||
@ -243,6 +243,7 @@ sls_detector_put 0-ratecorr -1
|
||||
|
||||
Every time either the rate corrections are activated, $\tau$ is changed or the subframe length is changed, then a new correction table is evaluated. Note that computing the correction table is time consuming.
|
||||
|
||||
|
||||
\subsection{Offline image reconstruction}
|
||||
The offline image reconstruction is in {\tt{slsDetectorsPackage/slsImageReconstruction}}.
|
||||
|
||||
@ -258,12 +259,78 @@ eg.
|
||||
|
||||
To use it for a 1.5 multi modules:
|
||||
\begin{verbatim}
|
||||
cbfMaker [filename] [pixels x] [pixels y] [start det]
|
||||
cbfMaker [filename] [pixels x] [pixels y] ([singlemodulelongside_x] [start det])
|
||||
\end{verbatim}
|
||||
eg.
|
||||
{\tt cbfMaker /scratch/run\_63\_d0\_f000000000000\_3.raw 3072 512 0}.\\
|
||||
\underline{The executable {\tt{bcfMakerMulti [file\_name\_with\_dir]}} contains the hardcoded}\\\underline{ geometry for the 1.5M at CSAXS.}
|
||||
{\tt cbfMaker /scratch/run\_63\_d0\_f000000000000\_3.raw 3072 512 1 0}.\\
|
||||
The {\tt{[singlemodulelongside\_x]}} and {\tt{[start det]}} param are optional. Defaults are ``1'', the detector long side is on the x coordinate and start to reconstruct from module 0.
|
||||
The executables:
|
||||
\begin{verbatim}
|
||||
bcfMaker1.5M [file\_name\_with\_dir]
|
||||
bcfMaker9M [file\_name\_with\_dir]
|
||||
\end{verbatim}
|
||||
contain the hardcoded geometry for the 1.5M (3 modules horizontal on the long side) and for the 9M at cSAXS: 6(short side)x3 (lomg side) modules.\\
|
||||
Missing packets in a frame and border pixels ($\times 2$ and $/times 4$ are given with value $-1$ at the present mode.
|
||||
|
||||
It is important to know, that the pixels at the edge between 2 chips count more as double size. We can virtually introduced 1 virtual poixel per double larger pixel, so to have an even number of counts everywhere. Virtual pixels (not filled ) between module gaps are also inserted.
|
||||
|
||||
\begin{verbatim}
|
||||
GapPixelsBetweenChips_x = 2;
|
||||
GapPixelsBetweenChips_y = 2;
|
||||
GapPixelsBetweenModules_x = 8;
|
||||
GapPixelsBetweenModules_y = 36;
|
||||
\end{verbatim}
|
||||
|
||||
\subsection{Read temperatures from boards}
|
||||
|
||||
|
||||
|
||||
\subsection{Delays in sending for 1Gb/s, 10Gb/s, 10Gb flow control}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\appendix
|
||||
|
||||
\section{Kill the server, copy a new server, start the server}
|
||||
All the below operations are form a terminal and assume you login to the boards.\\
|
||||
Kill current server:
|
||||
\begin{verbatim}
|
||||
ssh root@bebxxx #password is root
|
||||
killall eigerDetectorServer # kill server and stopserver
|
||||
\end{verbatim}
|
||||
Copy a new version of the server (if necessary, otherwise skip it):
|
||||
\begin{verbatim}
|
||||
cd executables
|
||||
scp user@pc:/path/eigerDetectorServerNewVersion .
|
||||
chmod 777 eigerDetectorServerNewVersion
|
||||
mv eigerDetectorServerNewVersion eigerDetectorServer
|
||||
sync
|
||||
\end{verbatim}
|
||||
Start the server again:
|
||||
\begin{verbatim}
|
||||
./eigerDetectorServer &
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\section{Loading firmware bitfiles}
|
||||
|
||||
A \textbf{bcp} executable (which needs \textbf{tftp} installed on the PC, is needed. First of all, you need to press something on the detector: to programm bitfiles (firmware files), do a hard reset with a pin/thin stuff in the holes at the very back of the module. They are between the top 7 LED and the bottom 1 and opposite for the otehr side. Push hard till all LEDs are alternating green and red. After booting only the central one should be on green and red alternating. From a terminal, do:
|
||||
\begin{verbatim}
|
||||
nc -p 3000 -u bebxxx 3000
|
||||
\end{verbatim}
|
||||
where {\tt{xxx}} is the board number. It is enough top monitor with {\tt{nc}} only one board. Pres enter twice (till you see a prompt with the baord hostname printed) and keep this terminal to monitor. It takes a bit of time to load the bitfiles, but the terminal tells you.\\
|
||||
From another terminal you do:
|
||||
\begin{verbatim}
|
||||
./bcp feb_left.bit bebxxx:/febl
|
||||
sleep 300; #or till the screen over netcat has told you OK
|
||||
./bcp feb_right.bit bebxxx:/febr
|
||||
sleep 300; #or till the screen over netcat has told you OK
|
||||
./bcp download.bit bebxxx:/fw0
|
||||
sleep 300; #or till the screen over netcat has told you OK
|
||||
\end{verbatim}
|
||||
do the same for the other boards. You can programm in parallel many boards, but ou cannot load two bitfiles on the same board till loading and copying one process has finished. So load all left febs together, then proceed to the left febs, then the bebs. Power off completely everything. Power it on.
|
||||
|
||||
\end{document}
|
||||
|
||||
|
@ -396,3 +396,43 @@ where the default functions performing these actions are implemented and modify
|
||||
A simple high-level solution in case you need to maintain the software for several beamlines and don't want to recompile for all of them is to call external scripts.
|
||||
|
||||
|
||||
\section{In which data format are written the data?} \label{sec:dataFormat}
|
||||
|
||||
For MYTHEN the data are writen in ASCII fomat, one file per frame, in columns, either channel number - counts for the \textit{.raw} files or angle (or channel number)-counts-error for the \textit{.dat} files.
|
||||
|
||||
For the other detectors the files are written in binary format, and must be decoded depending on the detector.
|
||||
|
||||
\subsection{GOTTHARD}
|
||||
Each file contains 100 frames.
|
||||
\begin{description}
|
||||
\item[Normal mode]
|
||||
Each frame is split into 2 packets of 1286 bytes each, where actual data is 1280 bytes each. Both the packets (incl header and footer) are written one after the other into the file.
|
||||
|
||||
Representation of each packet:
|
||||
\begin{itemize}
|
||||
\item
|
||||
The first 4 bytes represents a number from which, the frame number and packet number can be derived.
|
||||
If the number was 108601, increment it by 1 to get 108602.\\
|
||||
Then this $(108602\&0xFFFFFFFE)>>1 = 54301$ is the frame number
|
||||
and $(108602\&0x1) =0$ is the packet number.\\
|
||||
0 is the packet on the left and 1 is the packet on the right.\\
|
||||
On a side note, when you use the data call back, we also give you the derived frame number as an argument.
|
||||
|
||||
\item Data of 1280 bytes. 16 bits per pixel.
|
||||
|
||||
\item 2 bytes of insignificant footer.
|
||||
\end{itemize}
|
||||
|
||||
\item[Short Frame Mode]
|
||||
One Frame has only one packet of 518 bytes, where actual data is 512 bytes.
|
||||
\begin{itemize}
|
||||
\item first 4 bytes is the frame number. There is no packet number or increment required herecompared to the normal mode.
|
||||
\item Data of 512 bytes.
|
||||
\item 2 bytes of insignificant footer.
|
||||
\end{itemize}
|
||||
|
||||
\end{description}
|
||||
|
||||
\subsection{EIGER}
|
||||
|
||||
\subsection{JUNGFRAU}
|
||||
|
@ -1,4 +1,4 @@
|
||||
3433.58 486.39
|
||||
3470.99 483.471
|
||||
3480.06 479.017
|
||||
3409.62 476.202
|
||||
3486.22 365.75
|
||||
3518.43 368.23
|
||||
3519.11 357.62
|
||||
3491.49 365.08
|
||||
|
@ -1,4 +1,4 @@
|
||||
3685.67 246.055
|
||||
3732.38 246.328
|
||||
3741.86 245.924
|
||||
3696.84 246.167
|
||||
3415.26 226.24
|
||||
3406.35 223.45
|
||||
3407.89 225.60
|
||||
3385.72 220.54
|
||||
|
@ -1,4 +1,4 @@
|
||||
3538.73 389.187
|
||||
3499.86 374.654
|
||||
3462.84 364.88
|
||||
3514.72 381.02
|
||||
3419.26 282.68
|
||||
3451.04 285.35
|
||||
3451.30 277.63
|
||||
3431.27 283.41
|
||||
|
@ -1,4 +0,0 @@
|
||||
3538.73 389.187
|
||||
3499.86 374.654
|
||||
3462.84 364.88
|
||||
3514.72 381.02
|
4
settingsdir/eiger/veryhighgain/veryhighgain.cal
Normal file
@ -0,0 +1,4 @@
|
||||
3381.13 493.21
|
||||
3385.45 490.36
|
||||
3374.03 492.96
|
||||
3363.40 483.72
|
BIN
settingsdir/eiger/veryhighgain/veryhighgain.trim
Normal file
@ -1,4 +0,0 @@
|
||||
3538.73 389.187
|
||||
3499.86 374.654
|
||||
3462.84 364.88
|
||||
3514.72 381.02
|
4
settingsdir/eiger/verylowgain/verylowgain.cal
Normal file
@ -0,0 +1,4 @@
|
||||
3323.57 124.58
|
||||
3336.87 124.85
|
||||
3302.45 123.64
|
||||
3338.19 124.44
|
BIN
settingsdir/eiger/verylowgain/verylowgain.trim
Normal file
5
slsDetectorGui/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
Makefile.gui
|
||||
forms/include/
|
||||
mocs/
|
||||
objs/
|
||||
qrc_icons.cpp
|
59
slsDetectorGui/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
# LEO: Won't compile without libSlsDetector
|
||||
|
||||
include ../Makefile.include
|
||||
|
||||
$(info )
|
||||
$(info ##################################)
|
||||
$(info # Compiling slsDetectorGui #)
|
||||
$(info ##################################)
|
||||
$(info )
|
||||
|
||||
|
||||
|
||||
PROG = $(DESTDIR)/slsDetectorGui
|
||||
|
||||
DESTDIR ?= ../bin
|
||||
LIBDIR ?= $(DESTDIR)
|
||||
DOCDIR ?= docs
|
||||
|
||||
LIBRARYDIR ?= ../slsDetectorSoftware
|
||||
LIBRARYRXRDIR ?= ../slsReceiverSoftware
|
||||
INCLUDES ?= $(LIBRARYDIR)/commonFiles -I$(LIBRARYRXRDIR)/MySocketTCP -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYRXRDIR)/includes
|
||||
|
||||
#ifeq ( $(EIGERSLS), yes)
|
||||
# LDFLAG += $(EIGERFLAGS)
|
||||
#else ifeq ( $(ROOTSLS), yes)
|
||||
# LDFLAG += $(ROOTFLAGS)
|
||||
#endif
|
||||
|
||||
.PHONY: all lib clean mm doc htmldoc guiclient
|
||||
|
||||
|
||||
all: lib $(PROG) Makefile.gui guiclient
|
||||
|
||||
lib:
|
||||
cd ../ && $(MAKE) lib
|
||||
|
||||
clean:
|
||||
if test -e Makefile.gui; then $(MAKE) -f Makefile.gui clean; $(MAKE) -f Makefile.gui mocclean; rm Makefile.gui; else $(MAKE) Makefile.gui; $(MAKE) -f Makefile.gui clean; $(MAKE) -f Makefile.gui mocclean; fi
|
||||
cd client && $(MAKE) clean
|
||||
# cd manual && make clean
|
||||
|
||||
|
||||
Makefile.gui: mm
|
||||
|
||||
mm:
|
||||
qmake -set QT_INSTALL_PREFIX $(QTDIR) && qmake -o Makefile.gui INCLUDES='$(INCLUDES)' DESTDIR=$(DESTDIR) SLSDETLIB=$(LIBDIR) SUBLIBS='$(LDFLAGDET)'
|
||||
|
||||
doc:
|
||||
cd manual && $(MAKE) DESTDIR=$(DOCDIR)
|
||||
|
||||
htmldoc:
|
||||
cd manual && $(MAKE) html DESTDIR=$(DOCDIR)
|
||||
|
||||
$(PROG): Makefile.gui $(DIR)
|
||||
$(MAKE) -f Makefile.gui SLSDETLIB=$(LIBDIR) DESTDIR=$(DESTDIR) SUBLIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)'
|
||||
|
||||
guiclient:
|
||||
echo $(WD)
|
||||
cd client && $(MAKE) DESTDIR=$(DESTDIR)
|
36
slsDetectorGui/client/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
CC = g++
|
||||
CLAGS += -DVERBOSE #VERYBOSE
|
||||
LDLIBS += -lm -lstdc++ -lpthread
|
||||
|
||||
LDIR = ../../slsDetectorSoftware
|
||||
RDIR = ../../slsReceiverSoftware
|
||||
|
||||
INCLUDES = -I $(LDIR)/commonFiles -I $(LDIR)/slsDetector -I ../include -I $(RDIR)/include
|
||||
SRC_CLNT = qClient.cpp $(RDIR)/src/MySocketTCP.cpp
|
||||
|
||||
PROGS = gui_client
|
||||
DESTDIR ?= bin
|
||||
INSTMODE = 0777
|
||||
|
||||
FINALDIR = ../../bin
|
||||
|
||||
OBJS = $(SRC_CLNT:.cpp=.o)
|
||||
|
||||
|
||||
all: clean $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
$(PROGS):
|
||||
echo $(OBJS)
|
||||
mkdir -p $(DESTDIR)
|
||||
gcc $(SRC_CLNT) $(INCLUDES) $(FLAGS) $(LDLIBS) -o $@
|
||||
mv $(PROGS) $(FINALDIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(DESTDIR)/$(PROGS) *.o $(FINALDIR)/$(PROGS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
234
slsDetectorGui/client/qClient.cpp
Normal file
@ -0,0 +1,234 @@
|
||||
/*
|
||||
* qClient.cpp
|
||||
*
|
||||
* Created on: Feb 27, 2013
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
// Qt Project Class Headers
|
||||
#include "qClient.h"
|
||||
// Project Class Headers
|
||||
#include "MySocketTCP.h"
|
||||
#include "slsDetectorBase.h"
|
||||
|
||||
// C++ Include Headers
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
qClient *cl =new qClient(argv[1]);
|
||||
cl->executeLine(argc-2, argv+2);
|
||||
|
||||
delete cl;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
qClient::qClient(char* hostname){
|
||||
//create socket
|
||||
mySocket = new MySocketTCP(hostname, DEFAULT_GUI_PORTNO);
|
||||
if (mySocket->getErrorStatus()){
|
||||
cout << "Error: could not connect to host:" << hostname << " with port " << DEFAULT_GUI_PORTNO << endl;
|
||||
delete mySocket;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
//create socket to connect to stop server
|
||||
myStopSocket = new MySocketTCP(hostname, DEFAULT_GUI_PORTNO+1);
|
||||
if (myStopSocket->getErrorStatus()){
|
||||
cout << "Error: could not connect to host:" << hostname << " with port " << DEFAULT_GUI_PORTNO + 1 << endl;
|
||||
delete myStopSocket;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
qClient::~qClient() {
|
||||
if(mySocket) delete mySocket;
|
||||
if(myStopSocket) delete myStopSocket;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
int qClient::executeLine(int narg, char *args[]){
|
||||
|
||||
char arg[MAX_STR_LENGTH] = "";
|
||||
int iarg = -1;
|
||||
char answer[100];
|
||||
string retval = "";
|
||||
string cmd = args[0];
|
||||
string argument;
|
||||
|
||||
|
||||
//validate command structure
|
||||
if(narg<1){
|
||||
cout << "Error: no command parsed" << endl;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
//help
|
||||
if (cmd == "help"){
|
||||
retval = printCommands();
|
||||
}
|
||||
|
||||
//file name
|
||||
else if (cmd == "status"){
|
||||
|
||||
if(narg>1){
|
||||
argument = args[1];
|
||||
//start acquisition
|
||||
if(argument == "start")
|
||||
startAcquisition();
|
||||
else if (argument == "stop")
|
||||
stopAcquisition();
|
||||
else{
|
||||
cout << "Error: could not parse arguments: " << argument << endl;
|
||||
printCommands();
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
retval = getStatus();
|
||||
}
|
||||
|
||||
|
||||
else if (cmd == "acquire"){
|
||||
startAcquisition(true);
|
||||
retval = getStatus();
|
||||
}
|
||||
|
||||
|
||||
else if (cmd == "exit"){
|
||||
return exitServer();
|
||||
}
|
||||
|
||||
|
||||
//unrecognized command
|
||||
else{
|
||||
cout << "Error: unrecognized command" << endl;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
//print result
|
||||
cout << cmd << ": " << retval << endl;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
string qClient::printCommands(){
|
||||
ostringstream os;
|
||||
os << "\nexit \t exits servers in gui" << std::endl;
|
||||
os << "status \t gets status of acquisition in gui. - can be running or idle" << std::endl;
|
||||
os << "status i starts/stops acquistion in gui-non blocking. i is start or stop" << std::endl;
|
||||
os << "acquire starts acquistion in gui-blocking" << std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
string qClient::getStatus(){
|
||||
int fnum = F_GET_RUN_STATUS;
|
||||
int ret = FAIL;
|
||||
runStatus retval=ERROR;
|
||||
int progress = 0;
|
||||
char answer[100];
|
||||
|
||||
if (myStopSocket->Connect() >= 0) {
|
||||
myStopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
myStopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
myStopSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
myStopSocket->ReceiveDataOnly(&progress,sizeof(progress));
|
||||
myStopSocket->Disconnect();
|
||||
}else
|
||||
exit(-1);
|
||||
|
||||
|
||||
sprintf(answer,"%d%% ",progress);
|
||||
strcat(answer,slsDetectorBase::runStatusType((runStatus)retval).c_str());
|
||||
|
||||
return string(answer);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
int qClient::startAcquisition(bool blocking){
|
||||
int fnum = F_START_ACQUISITION;
|
||||
if(blocking) fnum = F_START_AND_READ_ALL;
|
||||
int ret = FAIL;
|
||||
|
||||
if (mySocket->Connect() >= 0) {
|
||||
mySocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
mySocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret == FAIL){
|
||||
mySocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Gui returned error: " << mess << std::endl;
|
||||
}
|
||||
mySocket->Disconnect();
|
||||
}else
|
||||
exit(-1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
int qClient::stopAcquisition(){
|
||||
int fnum = F_STOP_ACQUISITION;
|
||||
int ret = FAIL;
|
||||
|
||||
if (myStopSocket->Connect() >= 0) {
|
||||
myStopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
myStopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret == FAIL){
|
||||
myStopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Gui returned error: " << mess << std::endl;
|
||||
}
|
||||
myStopSocket->Disconnect();
|
||||
}else
|
||||
exit(-1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
int qClient::exitServer(){
|
||||
int fnum = F_EXIT_SERVER;
|
||||
int ret = FAIL;
|
||||
|
||||
if (myStopSocket->Connect() >= 0) {
|
||||
myStopSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
myStopSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
myStopSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
cout << mess << endl;
|
||||
myStopSocket->Disconnect();
|
||||
}else
|
||||
exit(-1);
|
||||
|
||||
return ret;
|
||||
}
|
65
slsDetectorGui/client/qClient.h
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* qClient.h
|
||||
*
|
||||
* Created on: Feb 27, 2013
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
#ifndef QCLIENT_H
|
||||
#define QCLIENT_H
|
||||
|
||||
|
||||
/** Qt Project Class Headers */
|
||||
/** Project Class Headers */
|
||||
class MySocketTCP;
|
||||
#include "sls_detector_defs.h"
|
||||
/** C++ Include Headers */
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
*@short Sets up the gui server
|
||||
*/
|
||||
class qClient: public virtual slsDetectorDefs{
|
||||
|
||||
|
||||
public:
|
||||
/** \short The constructor*/
|
||||
qClient(char* hostname);
|
||||
/** Destructor */
|
||||
virtual ~qClient();
|
||||
|
||||
/**Execute command*/
|
||||
int executeLine(int narg, char *args[]);
|
||||
|
||||
private:
|
||||
/** Print list of commands */
|
||||
string printCommands();
|
||||
|
||||
/** Start Acquisition
|
||||
* @param blocking true if its a blocking acquistion
|
||||
*/
|
||||
int startAcquisition(bool blocking = false);
|
||||
|
||||
/** Stops Acquisition */
|
||||
int stopAcquisition();
|
||||
|
||||
/** Gets run status */
|
||||
string getStatus();
|
||||
|
||||
/** Exits Server */
|
||||
int exitServer();
|
||||
|
||||
/** client socket */
|
||||
MySocketTCP *mySocket;
|
||||
|
||||
/** client socket */
|
||||
MySocketTCP *myStopSocket;
|
||||
|
||||
char mess[MAX_STR_LENGTH];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QCLIENT_H */
|
106
slsDetectorGui/doxy.config
Normal file
@ -0,0 +1,106 @@
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available.
|
||||
# Private class members and static file members will be hidden unless
|
||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file
|
||||
# will be included in the documentation.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
|
||||
# defined locally in source files will be included in the documentation.
|
||||
# If set to NO only classes defined in header files are included.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# This flag is only useful for Objective-C code. When set to YES local
|
||||
# methods, which are defined in the implementation section but not in
|
||||
# the interface are included in the documentation.
|
||||
# If set to NO (the default) only methods in the interface are included.
|
||||
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
|
||||
# If this flag is set to YES, the members of anonymous namespaces will be
|
||||
# extracted and appear in the documentation as a namespace called
|
||||
# 'anonymous_namespace{file}', where file will be replaced with the base
|
||||
# name of the file that contains the anonymous namespace. By default
|
||||
# anonymous namespace are hidden.
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
|
||||
# undocumented members of documented classes, files or namespaces.
|
||||
# If set to NO (the default) these members will be included in the
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these classes will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
|
||||
# friend (class|struct|union) declarations.
|
||||
# If set to NO (the default) these declarations will be included in the
|
||||
# documentation.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
INPUT = \
|
||||
slsDetectorPlotting/include/SlsQt1DPlot.h\
|
||||
slsDetectorPlotting/src/SlsQt1DPlot.cxx
|
||||
slsDetectorPlotting/include/SlsQt1DZoomer.h\
|
||||
slsDetectorPlotting/src/SlsQt1DZoomer.cxx\
|
||||
slsDetectorPlotting/include/SlsQt2DHist.h\
|
||||
slsDetectorPlotting/src/SlsQt2DHist.cxx\
|
||||
slsDetectorPlotting/include/SlsQt2DPlot.h\
|
||||
slsDetectorPlotting/src/SlsQt2DPlot.cxx\
|
||||
slsDetectorPlotting/include/SlsQt2DPlotLayout.h\
|
||||
slsDetectorPlotting/src/SlsQt2DPlotLayout.cxx\
|
||||
slsDetectorPlotting/include/SlsQtNumberEntry.h\
|
||||
slsDetectorPlotting/src/SlsQtNumberEntry.cxx\
|
||||
slsDetectorPlotting/include/SlsQt2DZoomer.h\
|
||||
slsDetectorPlotting/include/SlsQtValidators.h\
|
||||
include/qDetectorMain.h\
|
||||
src/qDetectorMain.cpp\
|
||||
include/qDrawPlot.h\
|
||||
src/qDrawPlot.cpp\
|
||||
include/qCloneWidget.h\
|
||||
src/qCloneWidget.cpp\
|
||||
include/qTabMeasurement.h\
|
||||
src/qTabMeasurement.cpp\
|
||||
include/qTabDataOutput.h\
|
||||
src/qTabDataOutput.cpp\
|
||||
include/qTabPlot.h\
|
||||
src/qTabPlot.cpp\
|
||||
include/qTabActions.h\
|
||||
src/qTabActions.cpp\
|
||||
include/qActionsWidget.h\
|
||||
src/qActionsWidget.cpp\
|
||||
include/qScanWidget.h\
|
||||
src/qScanWidget.cpp\
|
||||
include/qTabAdvanced.h\
|
||||
src/qTabAdvanced.cpp\
|
||||
include/qTabSettings.h\
|
||||
src/qTabSettings.cpp\
|
||||
include/qTabDebugging.h\
|
||||
src/qTabDebugging.cpp\
|
||||
include/qTabDeveloper.h\
|
||||
src/qTabDeveloper.cpp\
|
||||
include/qDefs.h
|
||||
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
|
169
slsDetectorGui/forms/form_action.ui
Normal file
@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ActionsObject</class>
|
||||
<widget class="QWidget" name="ActionsObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>680</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboScript">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Custom Script</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="dispScript">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblParameter">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Additional Parameter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="btnBrowse">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QLineEdit" name="dispParameter">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
521
slsDetectorGui/forms/form_detectormain.ui
Normal file
@ -0,0 +1,521 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DetectorMainObject</class>
|
||||
<widget class="QMainWindow" name="DetectorMainObject">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>848</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>89</red>
|
||||
<green>89</green>
|
||||
<blue>89</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>SLS Detector GUI</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="documentMode">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="tabShape">
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="dockNestingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>395</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>524287</width>
|
||||
<height>395</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="defaultUp">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="nativeMenuBar">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuUtilities">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>&Utilities</string>
|
||||
</property>
|
||||
<addaction name="actionOpenSetup"/>
|
||||
<addaction name="actionSaveSetup"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionOpenConfiguration"/>
|
||||
<addaction name="actionSaveConfiguration"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLoadTrimbits"/>
|
||||
<addaction name="actionSaveTrimbits"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLoadCalibration"/>
|
||||
<addaction name="actionSaveCalibration"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuModes">
|
||||
<property name="title">
|
||||
<string>&Modes</string>
|
||||
</property>
|
||||
<addaction name="actionDebug"/>
|
||||
<addaction name="actionExpert"/>
|
||||
<addaction name="actionDockable"/>
|
||||
<addaction name="actionListenGuiClient"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuHelp">
|
||||
<property name="title">
|
||||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<addaction name="menuUtilities"/>
|
||||
<addaction name="menuModes"/>
|
||||
<addaction name="menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="dockWidgetPlot">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>36</width>
|
||||
<height>422</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>524287</width>
|
||||
<height>524287</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>11</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Left Click :zoom in</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Righ</span><span style=" color:#00007f;">t Click </span><span style=" color:#00007f;">: zoom out by 1</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Middle Click : panning</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Ctrl+Right Click : zoom out to full size</span></p></td></tr></table></body></html></string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="features">
|
||||
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::BottomDockWidgetArea</set>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>SLS Detector Plot</string>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>8</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContentsPlot">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="actionOpenSetup">
|
||||
<property name="text">
|
||||
<string>&Load &Setup</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveSetup">
|
||||
<property name="text">
|
||||
<string>&Save &Setup</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMeasurementWizard">
|
||||
<property name="text">
|
||||
<string>&Measurement Wizard</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenConfiguration">
|
||||
<property name="text">
|
||||
<string>&Load &Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveConfiguration">
|
||||
<property name="text">
|
||||
<string>&Save &Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnergyCalibration">
|
||||
<property name="text">
|
||||
<string>&Energy Calibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAngularCalibration">
|
||||
<property name="text">
|
||||
<string>&Angular Calibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDebug">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Debug</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBeamline">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Beamline</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExpert">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Expert</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionConfiguration">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionVersion">
|
||||
<property name="text">
|
||||
<string>&Version</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="text">
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDockable">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D&ockable Windows</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadTrimbits">
|
||||
<property name="text">
|
||||
<string>&Load &Trimbits</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveTrimbits">
|
||||
<property name="text">
|
||||
<string>&Save &Trimbits</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadCalibration">
|
||||
<property name="text">
|
||||
<string>&Load C&alibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveCalibration">
|
||||
<property name="text">
|
||||
<string>&Save C&alibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionListenGuiClient">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Listen to Gui Client</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
488
slsDetectorGui/forms/form_scan.ui
Normal file
@ -0,0 +1,488 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ScanObject</class>
|
||||
<widget class="QWidget" name="ScanObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>125</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="2" rowspan="3" colspan="3">
|
||||
<widget class="QGroupBox" name="group">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioRange">
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Defines scan range for a <b>Constant Step Size</b> with the following constraints:
|
||||
</nobr><br><nobr>
|
||||
1. <b>Number of Steps</b> >=2.
|
||||
</nobr><br><nobr>
|
||||
2. <b>Size</b> not equal to 0.
|
||||
</nobr><br><nobr>
|
||||
3. <b>From</b> not equal to <b>To</b>.
|
||||
</nobr><br></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Constant Step Size</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioCustom">
|
||||
<property name="toolTip">
|
||||
<string><nobr>Measures only at specific values listed by the user.</nobr><br>
|
||||
<nobr>Number of entries is restricted to <b>Number of Steps</b> field.</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Specific Values</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioFile">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>Measures only at the specific values listed in a file.</nobr><br>
|
||||
<nobr>Select the file, where these values are listed.</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Values from File</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QWidget" name="stackedWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblPrecision">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Precision:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinPrecision">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblParameter">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Additional Parameter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="dispParameter">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblSteps">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Steps:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinSteps">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboScript">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Energy Scan (eV)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Threshold Scan</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Trimbits Scan</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Position Scan</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Custom Script</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="dispScript">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnBrowse">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>comboScript</tabstop>
|
||||
<tabstop>dispScript</tabstop>
|
||||
<tabstop>btnBrowse</tabstop>
|
||||
<tabstop>dispParameter</tabstop>
|
||||
<tabstop>spinSteps</tabstop>
|
||||
<tabstop>spinPrecision</tabstop>
|
||||
<tabstop>radioRange</tabstop>
|
||||
<tabstop>radioCustom</tabstop>
|
||||
<tabstop>radioFile</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
1606
slsDetectorGui/forms/form_tab_advanced.ui
Normal file
718
slsDetectorGui/forms/form_tab_dataoutput.ui
Normal file
@ -0,0 +1,718 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TabDataOutputObject</class>
|
||||
<widget class="QWidget" name="TabDataOutputObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>775</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="boxOutDir">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>30</y>
|
||||
<width>747</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Output Directory</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frameOutput">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>10</y>
|
||||
<width>731</width>
|
||||
<height>96</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>716</width>
|
||||
<height>92</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="dispReadOutputDir">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Normal</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="dispOutputDir">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="btnOutputBrowse">
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="boxCorrection_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>160</y>
|
||||
<width>746</width>
|
||||
<height>170</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>17</x>
|
||||
<y>21</y>
|
||||
<width>192</width>
|
||||
<height>137</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="chkTenGiga">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Compression using Root. Available only for Gotthard in Expert Mode.
|
||||
</nobr><br><nobr>
|
||||
#r_compression#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>10GbE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="chkCompression">
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Compression using Root. Available only for Gotthard in Expert Mode.
|
||||
</nobr><br><nobr>
|
||||
#r_compression#
|
||||
</nobr></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compression</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkAngular">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Angular Conversion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkDiscardBad">
|
||||
<property name="text">
|
||||
<string>Discard Bad Channels</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>255</x>
|
||||
<y>21</y>
|
||||
<width>476</width>
|
||||
<height>76</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="4">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkRate">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rate:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QPushButton" name="btnFlatField">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Flat field corrections.
|
||||
#flatfield# filename</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="6">
|
||||
<widget class="QLineEdit" name="dispFlatField">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Flat field corrections.
|
||||
#flatfield# filename</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkFlatField">
|
||||
<property name="toolTip">
|
||||
<string>Flat field corrections.
|
||||
#flatfield# filename</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Flat Field File:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QLabel" name="lblDeadTime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dead Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6" colspan="3">
|
||||
<widget class="QSpinBox" name="spinDeadTime">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>200000000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="btnDefaultRate">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/calculate.png</normaloff>:/icons/images/calculate.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>21</y>
|
||||
<width>20</width>
|
||||
<height>134</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="widgetEiger" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>244</x>
|
||||
<y>92</y>
|
||||
<width>491</width>
|
||||
<height>72</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>11</x>
|
||||
<y>4</y>
|
||||
<width>475</width>
|
||||
<height>62</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridEiger">
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="comboEigerFlags1">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Continous</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Store in RAM</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblClkDivider">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>105</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clock Divider:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboEigerClkDivider">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Full Speed</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Half Speed</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Quarter Speed</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Super Slow Speed</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblEigerFlags">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>105</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Flags:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="comboEigerFlags2">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Parallel</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Non Parallel</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Safe</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<zorder>boxOutDir</zorder>
|
||||
<zorder>boxCorrection_2</zorder>
|
||||
<zorder>btnOutputBrowse</zorder>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>dispReadOutputDir</tabstop>
|
||||
<tabstop>chkFlatField</tabstop>
|
||||
<tabstop>dispFlatField</tabstop>
|
||||
<tabstop>btnFlatField</tabstop>
|
||||
<tabstop>chkRate</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
471
slsDetectorGui/forms/form_tab_debugging.ui
Normal file
@ -0,0 +1,471 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TabDebuggingObject</class>
|
||||
<widget class="QWidget" name="TabDebuggingObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>775</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>45</x>
|
||||
<y>75</y>
|
||||
<width>686</width>
|
||||
<height>231</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Tests</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>110</y>
|
||||
<width>141</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkDetectorFirmware">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout Firmware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkDetectorSoftware">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout Software</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>185</y>
|
||||
<width>656</width>
|
||||
<height>36</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnTest">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Run Test </string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>415</x>
|
||||
<y>30</y>
|
||||
<width>256</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblModule">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Module:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboModule">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All Modules</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>110</y>
|
||||
<width>141</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkDetectorBus">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout Bus</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="chkDetectorMemory">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout Memory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>110</y>
|
||||
<width>141</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkChip">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Chip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>30</y>
|
||||
<width>276</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>60</y>
|
||||
<width>276</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblStatusLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblStatus">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IDLE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>135</y>
|
||||
<width>141</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="chkModuleFirmware">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Module Firmware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>95</y>
|
||||
<width>676</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>165</y>
|
||||
<width>676</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>45</x>
|
||||
<y>25</y>
|
||||
<width>686</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnGetInfo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get ID Information </string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>btnGetInfo</tabstop>
|
||||
<tabstop>comboDetector</tabstop>
|
||||
<tabstop>comboModule</tabstop>
|
||||
<tabstop>btnTest</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
1018
slsDetectorGui/forms/form_tab_measurement.ui
Normal file
82
slsDetectorGui/forms/form_tab_messages.ui
Normal file
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TabMessagesObject</class>
|
||||
<widget class="QWidget" name="TabMessagesObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>775</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" rowspan="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
2941
slsDetectorGui/forms/form_tab_plot.ui
Normal file
248
slsDetectorGui/forms/form_tab_settings.ui
Normal file
@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TabSettingsObject</class>
|
||||
<widget class="QWidget" name="TabSettingsObject">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>775</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>20</y>
|
||||
<width>316</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="comboSettings">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Settings of the detector.
|
||||
#settings#</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Standard</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Fast</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>High Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dynamic Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Medium Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Very High Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low Noise</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dynamic HG0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Fix Gain 1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Fix Gain 2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Force Switch G1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Force Switch G2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Very Low Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Undefined</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Uninitialized</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinThreshold">
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> eV</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Number of Modules:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Dynamic Range:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="comboDynamicRange">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.67772e+07</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>65535</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>255</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumModules">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblThreshold">
|
||||
<property name="text">
|
||||
<string>Threshold:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>comboSettings</tabstop>
|
||||
<tabstop>spinThreshold</tabstop>
|
||||
<tabstop>spinNumModules</tabstop>
|
||||
<tabstop>comboDynamicRange</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../include/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
9
slsDetectorGui/gitInfo.txt
Normal file
@ -0,0 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorGui
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_gui.git
|
||||
Repsitory UUID: 2ad70c5041e2e2f6cdfa949639bb6250083eebec
|
||||
Revision: 336
|
||||
Branch: developer
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 336
|
||||
Last Changed Date: 2016-08-24 17:10:07 +0200
|
BIN
slsDetectorGui/images/add.png
Normal file
After Width: | Height: | Size: 702 B |
BIN
slsDetectorGui/images/browse.png
Normal file
After Width: | Height: | Size: 884 B |
BIN
slsDetectorGui/images/calculate.png
Normal file
After Width: | Height: | Size: 833 B |
BIN
slsDetectorGui/images/close.png
Normal file
After Width: | Height: | Size: 812 B |
BIN
slsDetectorGui/images/download.png
Normal file
After Width: | Height: | Size: 757 B |
BIN
slsDetectorGui/images/erase.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
slsDetectorGui/images/leftArrow.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
slsDetectorGui/images/mountain.png
Normal file
After Width: | Height: | Size: 757 B |
BIN
slsDetectorGui/images/new.png
Normal file
After Width: | Height: | Size: 644 B |
BIN
slsDetectorGui/images/refresh.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
slsDetectorGui/images/refresher.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
slsDetectorGui/images/remove.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
slsDetectorGui/images/rightArrow.png
Normal file
After Width: | Height: | Size: 556 B |
BIN
slsDetectorGui/images/save.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
slsDetectorGui/images/saveAll.png
Normal file
After Width: | Height: | Size: 755 B |
BIN
slsDetectorGui/images/setup.png
Normal file
After Width: | Height: | Size: 605 B |
BIN
slsDetectorGui/images/start.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
slsDetectorGui/images/stop.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
slsDetectorGui/images/upload.png
Normal file
After Width: | Height: | Size: 721 B |
11
slsDetectorGui/include/gitInfoGui.h
Normal file
@ -0,0 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_gui.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "2ad70c5041e2e2f6cdfa949639bb6250083eebec"
|
||||
//#define SVNREV 0x336
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Dhanya_Maliakal"
|
||||
#define SVNREV 0x336
|
||||
#define SVNDATE 0x20160824
|
||||
//
|
11
slsDetectorGui/include/gitInfoGuiTmp.h
Normal file
@ -0,0 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL ""
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID ""
|
||||
//#define SVNREV ""
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH ""
|
||||
#define SVNREV ""
|
||||
#define SVNDATE ""
|
||||
//
|
22
slsDetectorGui/include/icons.qrc
Normal file
@ -0,0 +1,22 @@
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="/icons">
|
||||
<file>../images/mountain.png</file>
|
||||
<file>../images/refresh.png</file>
|
||||
<file>../images/save.png</file>
|
||||
<file>../images/saveAll.png</file>
|
||||
<file>../images/close.png</file>
|
||||
<file>../images/add.png</file>
|
||||
<file>../images/new.png</file>
|
||||
<file>../images/download.png</file>
|
||||
<file>../images/browse.png</file>
|
||||
<file>../images/start.png</file>
|
||||
<file>../images/erase.png</file>
|
||||
<file>../images/remove.png</file>
|
||||
<file>../images/stop.png</file>
|
||||
<file>../images/leftArrow.png</file>
|
||||
<file>../images/rightArrow.png</file>
|
||||
<file>../images/upload.png</file>
|
||||
<file>../images/setup.png</file>
|
||||
<file>../images/calculate.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
85
slsDetectorGui/include/qActionsWidget.h
Normal file
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* qActionsWidget.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QACTIONSWIDGET_H_
|
||||
#define QACTIONSWIDGET_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_action.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class qActionsWidget : public QWidget,private Ui::ActionsObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qActionsWidget(QWidget *parent, multiSlsDetector*& detector);
|
||||
|
||||
~qActionsWidget();
|
||||
|
||||
/**to update the widgets*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
/**number of action widgets*/
|
||||
static int NUM_ACTION_WIDGETS;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/**id of the action widget*/
|
||||
int id;
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
* */
|
||||
void Initialization();
|
||||
|
||||
|
||||
private slots:
|
||||
/** Sets the scan or script. Accordingly enables, disables other widgets
|
||||
* @param mode value chosen
|
||||
* */
|
||||
void SetMode(int mode);
|
||||
|
||||
/** Browse for the script
|
||||
* */
|
||||
void BrowsePath();
|
||||
|
||||
/** Sets the script file
|
||||
* */
|
||||
void SetScriptFile();
|
||||
|
||||
/** Set Parameter
|
||||
* */
|
||||
void SetParameter();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* QACTIONSWIDGET_H_ */
|
||||
|
165
slsDetectorGui/include/qCloneWidget.h
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* qCloneWidget.h
|
||||
*
|
||||
* Created on: May 18, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QCLONEWIDGET_H_
|
||||
#define QCLONEWIDGET_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Qt Project Class Headers */
|
||||
class SlsQtH1D;
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlotLayout.h"
|
||||
/** Qt Include Headers */
|
||||
#include <QMainWindow>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QAction>
|
||||
#include <QGridLayout>
|
||||
#include <QCloseEvent>
|
||||
#include <QGroupBox>
|
||||
#include <QWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QCheckBox>
|
||||
#include <QString>
|
||||
#include <QSpacerItem>
|
||||
#include <QWidget>
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
*@short Sets up the clone plot widget
|
||||
*/
|
||||
class qCloneWidget:public QMainWindow{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
*/
|
||||
qCloneWidget(QWidget *parent,int id,QString title,QString xTitle, QString yTitle, QString zTitle, int numDim,string FilePath,
|
||||
bool displayStats, QString min, QString max, QString sum);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qCloneWidget();
|
||||
|
||||
/** Sets up the widget window
|
||||
* @param title title of the image with frame number
|
||||
* @param xTitle title of x axis
|
||||
* @param yTitle title of y axis
|
||||
* @param zTitle title of z axis
|
||||
* @param numDim 1D or 2D
|
||||
* */
|
||||
void SetupWidgetWindow(QString title, QString xTitle, QString yTitle, QString zTitle, int numDim);
|
||||
|
||||
|
||||
|
||||
/** Get the 1D hist values to plot
|
||||
* @param nHists Number of graphs in 1D
|
||||
* @param histNBins Total Number of X axis values/channels in 1D
|
||||
* @param histXAxis X Axis value in 1D
|
||||
* @param histYAxis Y Axis value in 1D
|
||||
* @param histTitle Title for all the graphs in 1D
|
||||
* @param lines style of plot if lines or dots
|
||||
* @param markers style of plot markers or not
|
||||
* */
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[],bool lines,bool markers);
|
||||
|
||||
/** Get the 1D hist values to plot for angle plotting
|
||||
* @param nHists Number of graphs in 1D
|
||||
* @param histNBins Total Number of X axis values/channels in 1D
|
||||
* @param histXAxis X Axis value in 1D
|
||||
* @param histYAxis Y Axis value in 1D
|
||||
* @param histTitle Title for all the graphs in 1D
|
||||
* @param lines style of plot if lines or dots
|
||||
* @param markers style of plot markers or not
|
||||
* */
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[],bool lines,bool markers);
|
||||
|
||||
/** Get the 1D hist values to plot for angle plotting
|
||||
* @param nbinsx number of bins in x axis
|
||||
* @param xmin minimum in x axis
|
||||
* @param xmax maximum in x axis
|
||||
* @param nbinsy number of bins in y axis
|
||||
* @param ymin minimum in y axis
|
||||
* @param ymax maximum in y axis
|
||||
* @param d data
|
||||
* */
|
||||
void SetCloneHists2D(int nbinsx,double xmin,double xmax,int nbinsy, double ymin, double ymax, double *d);
|
||||
|
||||
/**Set the range of the 1d plot
|
||||
* @param IsXYRange array of x,y,min,max if these values are set
|
||||
* @param XYRangeValues array of set values of x,y, min, max
|
||||
*/
|
||||
void SetRange(bool IsXYRange[], double XYRangeValues[]);
|
||||
|
||||
/** Returns the 1d plot
|
||||
*/
|
||||
SlsQt1DPlot* Get1dPlot(){return cloneplot1D;};
|
||||
|
||||
public slots:
|
||||
/** Save Plots automatically by save all clones
|
||||
* returns -1 if fail*/
|
||||
int SavePlotAutomatic();
|
||||
|
||||
|
||||
private:
|
||||
/** clone window id*/
|
||||
int id;
|
||||
/** Default Save file path */
|
||||
string filePath;
|
||||
|
||||
/** clone 2D Plot */
|
||||
SlsQt2DPlotLayout* cloneplot2D;
|
||||
/** clone 1D Plot */
|
||||
SlsQt1DPlot* cloneplot1D;
|
||||
/** vector of 1D hist values */
|
||||
QVector<SlsQtH1D*> cloneplot1D_hists;
|
||||
|
||||
/** markers for the plot*/
|
||||
QwtSymbol *marker;
|
||||
QwtSymbol *nomarker;
|
||||
|
||||
QMenuBar *menubar;
|
||||
QAction *actionSave;
|
||||
|
||||
QGridLayout *mainLayout;
|
||||
QGroupBox *cloneBox;
|
||||
QGridLayout *gridClone;
|
||||
|
||||
QLabel *lblHistTitle;
|
||||
|
||||
/** Gets the current time stamp for the window title*/
|
||||
char* GetCurrentTimeStamp();
|
||||
|
||||
/** Display Statistics */
|
||||
void DisplayStats(bool enable, QString min, QString max, QString sum);
|
||||
|
||||
|
||||
private slots:
|
||||
/** Save Plot */
|
||||
void SavePlot();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
signals:
|
||||
void CloneClosedSignal(int);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* QCLONEWIDGET_H_ */
|
105
slsDetectorGui/include/qDebugStream.h
Normal file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* qDebugStream.h
|
||||
*
|
||||
* Created on: Jun 28, 2012
|
||||
* Author: Anna Bergamaschi
|
||||
*/
|
||||
|
||||
#ifndef QDEBUGSTREAM_H_
|
||||
#define QDEBUGSTREAM_H_
|
||||
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
#include <QCustomEvent>
|
||||
|
||||
#include <iostream>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#define STREAMEVENT 60001
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class qStreamEvent:public QEvent{
|
||||
public:
|
||||
qStreamEvent(QString s):QEvent(static_cast<QEvent::Type>(STREAMEVENT)),str(s){
|
||||
#ifdef PRINT_LOG
|
||||
printf("%s\n",str.toAscii().constData());
|
||||
#endif
|
||||
}
|
||||
/** \returns the progress index */
|
||||
QString getString() {return str;}
|
||||
private:
|
||||
QString str;
|
||||
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class qDebugStream : public basic_streambuf<char> {
|
||||
|
||||
public:
|
||||
qDebugStream(ostream &stream, QWidget* w) : m_stream(stream), log_window(w) {
|
||||
m_old_buf = stream.rdbuf();
|
||||
stream.rdbuf(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
~qDebugStream(){
|
||||
// output anything that is left
|
||||
if (!m_string.empty())
|
||||
QApplication::postEvent(log_window, new qStreamEvent(m_string.c_str()));
|
||||
m_stream.rdbuf(m_old_buf);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
protected:
|
||||
virtual int_type overflow(int_type v){
|
||||
if (v == '\n'){
|
||||
QApplication::postEvent(log_window, new qStreamEvent(m_string.c_str()));
|
||||
m_string.erase(m_string.begin(), m_string.end());
|
||||
}
|
||||
else
|
||||
m_string += v;
|
||||
return v;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
virtual streamsize xsputn(const char *p, streamsize n) {
|
||||
m_string.append(p, p + n);
|
||||
//changed from uint because of 64 bit
|
||||
int pos = 0;
|
||||
|
||||
while (pos != string::npos){
|
||||
pos = m_string.find('\n');
|
||||
if (pos != string::npos){
|
||||
string tmp(m_string.begin(), m_string.begin() + pos);
|
||||
QApplication::postEvent(log_window, new qStreamEvent(tmp.c_str()));
|
||||
m_string.erase(m_string.begin(), m_string.begin() + pos + 1);
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
ostream &m_stream;
|
||||
streambuf *m_old_buf;
|
||||
string m_string;
|
||||
QWidget* log_window;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#endif /* QDEBUGSTREAM_H_ */
|
301
slsDetectorGui/include/qDefs.h
Normal file
@ -0,0 +1,301 @@
|
||||
/*
|
||||
* qDefs.h
|
||||
*
|
||||
* Created on: May 4, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QDEFS_H
|
||||
#define QDEFS_H
|
||||
|
||||
#include "sls_detector_defs.h"
|
||||
#include "slsDetector.h"
|
||||
#include "multiSlsDetector.h"
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
#include <iostream>
|
||||
#include <QMessageBox>
|
||||
#include <QAbstractButton>
|
||||
using namespace std;
|
||||
|
||||
class qDefs:public QWidget{
|
||||
public:
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/** Empty Constructor
|
||||
*/
|
||||
qDefs(){};
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
static const int64_t GUI_VERSION=0x20121213;
|
||||
|
||||
#define GOODBYE -200
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
enum{
|
||||
OK,
|
||||
FAIL
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
enum MessageIndex{
|
||||
WARNING,
|
||||
CRITICAL,
|
||||
INFORMATION,
|
||||
QUESTION
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
/** unit of time
|
||||
*/
|
||||
enum timeUnit{
|
||||
HOURS, /** hr */
|
||||
MINUTES, /** min */
|
||||
SECONDS, /** s */
|
||||
MILLISECONDS, /** ms */
|
||||
MICROSECONDS, /** us */
|
||||
NANOSECONDS /** ns */
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/** returns the unit in words
|
||||
* @param unit is the time unit
|
||||
*/
|
||||
static string getUnitString(timeUnit unit){
|
||||
switch(unit){
|
||||
case HOURS: return string("hrs");
|
||||
case MINUTES: return string("min");
|
||||
case SECONDS: return string("sec");
|
||||
case MILLISECONDS: return string("msec");
|
||||
case MICROSECONDS: return string("usec");
|
||||
case NANOSECONDS: return string("nsec");
|
||||
default: return string("error");
|
||||
}
|
||||
};
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/** returns the value in ns to send to server as the
|
||||
* server class slsdetector accepts in ns.
|
||||
* @param unit unit of time
|
||||
* @param value time
|
||||
* returns time value in ns
|
||||
*/
|
||||
static double getNSTime(timeUnit unit, double value){
|
||||
double valueNS=value;
|
||||
switch(unit){
|
||||
case HOURS: valueNS*=60;
|
||||
case MINUTES: valueNS*=60;
|
||||
case SECONDS: valueNS*=1000;
|
||||
case MILLISECONDS: valueNS*=1000;
|
||||
case MICROSECONDS: valueNS*=1000;
|
||||
case NANOSECONDS:
|
||||
default:;
|
||||
}
|
||||
return valueNS;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/** returns the time in the appropriate time unit
|
||||
* @param unit unit of time
|
||||
* @param value time in seconds
|
||||
* returns the corresponding time value
|
||||
*/
|
||||
static double getCorrectTime(timeUnit& unit, double value){
|
||||
int intUnit = (int)SECONDS;
|
||||
|
||||
/**0 ms*/
|
||||
if(!value){
|
||||
unit = MILLISECONDS;
|
||||
return value;
|
||||
}
|
||||
|
||||
/** hr, min, sec */
|
||||
if(value>=1){
|
||||
double newVal = value;
|
||||
while((newVal>=1)&&(intUnit>=(int)HOURS)){
|
||||
/** value retains the old value */
|
||||
value = newVal;
|
||||
newVal = value/(double)60;
|
||||
intUnit--;
|
||||
}
|
||||
/** returning the previous value*/
|
||||
unit = (timeUnit)(intUnit+1);
|
||||
return value;
|
||||
}
|
||||
/** ms, us, ns */
|
||||
else{
|
||||
while((value<1)&&(intUnit<(int)NANOSECONDS)){
|
||||
value = value*(double)1000;
|
||||
intUnit++;
|
||||
}
|
||||
unit = (timeUnit)(intUnit);
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**displays an warning,error,info message
|
||||
* @param message the message to be displayed
|
||||
* @param source is the tab or the source of the message
|
||||
* */
|
||||
static int Message(MessageIndex index, string message,string source)
|
||||
{
|
||||
static QMessageBox* msgBox;
|
||||
size_t pos;
|
||||
|
||||
//replace all \n with <br>
|
||||
pos = 0;
|
||||
while((pos = message.find("\n", pos)) != string::npos){
|
||||
message.replace(pos, 1, "<br>");
|
||||
pos += 1;
|
||||
}
|
||||
message.append(string("<p style=\"font-size:10px;color:grey;\">Source: ") + source + string("</p>"));
|
||||
|
||||
switch(index){
|
||||
case WARNING:
|
||||
msgBox= new QMessageBox(QMessageBox::Warning,"WARNING",tr(message.c_str()),QMessageBox::Ok, msgBox);
|
||||
break;
|
||||
case CRITICAL:
|
||||
msgBox= new QMessageBox(QMessageBox::Critical,"CRITICAL",tr(message.c_str()),QMessageBox::Ok, msgBox);
|
||||
break;
|
||||
case INFORMATION:
|
||||
msgBox= new QMessageBox(QMessageBox::Information,"INFORMATION",tr(message.c_str()),QMessageBox::Ok, msgBox);
|
||||
break;
|
||||
default:
|
||||
msgBox= new QMessageBox(QMessageBox::Question,"QUESTION",tr(message.c_str()),QMessageBox::Ok| QMessageBox::Cancel, msgBox);
|
||||
break;
|
||||
}
|
||||
//msgBox->setDetailedText(QString(source.c_str())); //close button doesnt work with this static function and this
|
||||
if(msgBox->exec()==QMessageBox::Ok) return OK; else return FAIL;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/** range of x and y axes
|
||||
*/
|
||||
enum range{
|
||||
XMINIMUM,
|
||||
XMAXIMUM,
|
||||
YMINIMUM,
|
||||
YMAXIMUM
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**gets error mask and displays the message if it exists
|
||||
* @param myDet is the multidetector object
|
||||
/returns error message else an empty string
|
||||
* */
|
||||
static string checkErrorMessage(multiSlsDetector*& myDet, string title = "Main"){
|
||||
|
||||
|
||||
int errorLevel= (int)WARNING;
|
||||
string retval="";
|
||||
size_t pos;
|
||||
|
||||
|
||||
retval = myDet->getErrorMessage(errorLevel);
|
||||
|
||||
if(!retval.empty()){
|
||||
//replace all \n with <br>
|
||||
pos = 0;
|
||||
while((pos = retval.find("\n", pos)) != string::npos){
|
||||
retval.replace(pos, 1, "<br>");
|
||||
pos += 1;
|
||||
}
|
||||
|
||||
//get rid of the last \n
|
||||
if(retval.find_last_of("<br>")==retval.length()-1)
|
||||
retval.erase((int)retval.find_last_of("<br>")-3,4);
|
||||
|
||||
retval.insert(0,"<font color=\"darkBlue\">");
|
||||
retval.append("</font></nobr>");
|
||||
|
||||
//display message
|
||||
qDefs::Message((MessageIndex)errorLevel,retval,title);
|
||||
}
|
||||
|
||||
myDet->clearAllErrorMask();
|
||||
return retval;
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**gets error mask and displays the message if it exists
|
||||
* @param myDet is the slsdetector object
|
||||
* @param show to display the error message
|
||||
/returns error message else an empty string
|
||||
* */
|
||||
static string checkErrorMessage(slsDetector*& myDet, string title = "Main", bool show = true){
|
||||
|
||||
|
||||
int errorLevel= (int)WARNING;
|
||||
string retval="";
|
||||
size_t pos;
|
||||
int64_t emask=0;
|
||||
|
||||
emask = myDet->getErrorMask();
|
||||
retval = myDet->getErrorMessage(emask);
|
||||
|
||||
if(!retval.empty()){
|
||||
//replace all \n with <br>
|
||||
pos = 0;
|
||||
while((pos = retval.find("\n", pos)) != string::npos){
|
||||
retval.replace(pos, 1, "<br>");
|
||||
pos += 1;
|
||||
}
|
||||
|
||||
//get rid of the last \n
|
||||
if(retval.find_last_of("<br>")==retval.length()-1)
|
||||
retval.erase((int)retval.find_last_of("<br>")-3,4);
|
||||
|
||||
retval.insert(0,"<font color=\"darkBlue\">");
|
||||
retval.append("</font></nobr>");
|
||||
|
||||
//display message
|
||||
if(show)
|
||||
qDefs::Message((MessageIndex)errorLevel,retval,title);
|
||||
}
|
||||
|
||||
myDet->clearErrorMask();
|
||||
|
||||
return retval;
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/** scan arguments*/
|
||||
enum scanArgumentList{
|
||||
None,
|
||||
Level0,
|
||||
Level1,
|
||||
FileIndex,
|
||||
AllFrames
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/** histogram arguments*/
|
||||
enum histogramArgumentList{
|
||||
Intensity,
|
||||
histLevel0,
|
||||
histLevel1
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* QDEFS_H */
|
201
slsDetectorGui/include/qDetectorMain.h
Normal file
@ -0,0 +1,201 @@
|
||||
/*
|
||||
* qDetectorMain.h
|
||||
* Main Window of the GUI
|
||||
* Created on: Apr 30, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
#ifndef QDETECTORMAIN_H
|
||||
#define QDETECTORMAIN_H
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_detectormain.h"
|
||||
/** Qt Project Class Headers */
|
||||
#include "qDrawPlot.h"
|
||||
#include "qTabMeasurement.h"
|
||||
#include "qTabDataOutput.h"
|
||||
class qTabPlot;
|
||||
class qTabActions;
|
||||
class qTabAdvanced;
|
||||
class qTabSettings;
|
||||
class qTabDebugging;
|
||||
class qTabDeveloper;
|
||||
class qTabMessages;
|
||||
class qServer;
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QScrollArea>
|
||||
#include <QGridLayout>
|
||||
#include <QResizeEvent>
|
||||
#include <QTabWidget>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
/** To Over-ride the QTabWidget class to get the tabBar */
|
||||
class MyTabWidget:public QTabWidget{
|
||||
public:
|
||||
MyTabWidget(QWidget* parent = 0) {setParent(parent);}
|
||||
/** Overridden method from QTabWidget */
|
||||
QTabBar* tabBar(){return QTabWidget::tabBar();}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*@short Main window of the GUI.
|
||||
*/
|
||||
class qDetectorMain:public QMainWindow, private Ui::DetectorMainObject{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
/** \short Main Window constructor.
|
||||
* This is mainly used to create detector object and all the tabs
|
||||
* @param argc number of command line arguments for server options
|
||||
* @param argv server options
|
||||
* @param app the qapplication
|
||||
* @param parent makes the parent window 0 by default
|
||||
* */
|
||||
qDetectorMain(int argc, char **argv, QApplication *app, QWidget *parent = 0);
|
||||
|
||||
/**Destructor
|
||||
* */
|
||||
~qDetectorMain();
|
||||
|
||||
/** Starts or stops Acquisition From gui client
|
||||
* @param start 1 for start and 0 to stop
|
||||
/returns success or fail
|
||||
*/
|
||||
int StartStopAcquisitionFromClient(bool start);
|
||||
|
||||
/** Returns if plot is running
|
||||
*/
|
||||
bool isPlotRunning(){return myPlot->isRunning();};
|
||||
|
||||
/** Returns progress bar value */
|
||||
int GetProgress(){return tab_measurement->GetProgress();};
|
||||
|
||||
/** Returns file path */
|
||||
QString GetFilePath(){QString s = QString(myDet->getFilePath().c_str());qDefs::checkErrorMessage(myDet); return s;};
|
||||
|
||||
/** Verifies if output directories for all the receivers exist */
|
||||
int DoesOutputDirExist(){return tab_dataoutput->VerifyOutputDirectory();};
|
||||
|
||||
bool isCurrentlyTabDeveloper();
|
||||
|
||||
private:
|
||||
/** The Qt Application */
|
||||
QApplication *theApp;
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/** sls detector id */
|
||||
int detID;
|
||||
/** true for mythen and eiger */
|
||||
bool digitalDetector;
|
||||
/** The Plot widget */
|
||||
qDrawPlot *myPlot;
|
||||
/**Tab Widget */
|
||||
MyTabWidget *tabs;
|
||||
/**Layout of the central Widget */
|
||||
QGridLayout *layoutTabs;
|
||||
/** default height of Plot Window when docked */
|
||||
int heightPlotWindow;
|
||||
/** default height of central widgetwhen plot Window when docked */
|
||||
int heightCentralWidget;
|
||||
/** The default zooming tool tip */
|
||||
QString zoomToolTip;
|
||||
|
||||
/** The default tab heading color */
|
||||
QColor defaultTabColor;
|
||||
/** enumeration of the tabs */
|
||||
enum {Measurement, Settings, DataOutput, Plot, Actions, Advanced, Debugging, Developer, Messages, NumberOfTabs };
|
||||
/* Scroll Area for the tabs**/
|
||||
QScrollArea *scroll[NumberOfTabs];
|
||||
/**Measurement tab */
|
||||
qTabMeasurement *tab_measurement;
|
||||
/**DataOutput tab */
|
||||
qTabDataOutput *tab_dataoutput;
|
||||
/**Plot tab */
|
||||
qTabPlot *tab_plot;
|
||||
/**Actions tab */
|
||||
qTabActions *tab_actions;
|
||||
/**Settings tab */
|
||||
qTabSettings *tab_settings;
|
||||
/**Advanced tab */
|
||||
qTabAdvanced *tab_advanced;
|
||||
/**Debugging tab */
|
||||
qTabDebugging *tab_debugging;
|
||||
/**Developer tab */
|
||||
qTabDeveloper *tab_developer;
|
||||
/**Messages tab */
|
||||
qTabMessages *tab_messages;
|
||||
|
||||
/** server object*/
|
||||
qServer *myServer;
|
||||
|
||||
/**if the developer tab should be enabled,known from command line */
|
||||
int isDeveloper;
|
||||
|
||||
/**Sets up the layout of the widget
|
||||
* */
|
||||
void SetUpWidgetWindow();
|
||||
|
||||
/**Sets up detector
|
||||
* @param fName file name of the config file at start up
|
||||
* */
|
||||
void SetUpDetector(const string fName);
|
||||
|
||||
/**Sets up the signals and the slots
|
||||
* */
|
||||
void Initialization();
|
||||
|
||||
/** Loads config file at start up
|
||||
* */
|
||||
void LoadConfigFile(const string fName);
|
||||
|
||||
|
||||
private slots:
|
||||
/** Enables modes as selected -Debug, Expert, Dockable(calls setdockablemode())
|
||||
* */
|
||||
void EnableModes(QAction *action);
|
||||
|
||||
/** Executes actions in the utilities menu as selected
|
||||
* */
|
||||
void ExecuteUtilities(QAction *action);
|
||||
|
||||
/** Executes actions in the utilities menu as selected
|
||||
* */
|
||||
void ExecuteHelp(QAction *action);
|
||||
|
||||
/** Refreshes the tab each time the tab is changed. Also displays the next enabled tab
|
||||
* */
|
||||
void Refresh(int index);
|
||||
|
||||
/** Resizes the main window if the plot is docked/undocked
|
||||
* @param b bool TRUE if undocked(outside main window), FALSE docked
|
||||
* */
|
||||
void ResizeMainWindow(bool b);
|
||||
|
||||
/** Enables/disables tabs depending on if acquisition is currently in progress
|
||||
* */
|
||||
void EnableTabs();
|
||||
|
||||
/** Set the tool tip of mouse controlled zooming depening on if its enabled/disabled
|
||||
* */
|
||||
void SetZoomToolTip(bool disable);
|
||||
|
||||
/** Uncheck the Listen to gui client mode when the server has exited
|
||||
*/
|
||||
void UncheckServer();
|
||||
|
||||
protected:
|
||||
/** Adjust the resizing to resize plot, except for actions tab
|
||||
* */
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* QDETECTORMAIN_H */
|
593
slsDetectorGui/include/qDrawPlot.h
Normal file
@ -0,0 +1,593 @@
|
||||
/*
|
||||
* qDrawPlot.h
|
||||
*
|
||||
* Created on: May 7, 2012
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
#ifndef QDRAWPLOT_H
|
||||
#define QDRAWPLOT_H
|
||||
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
#include "detectorData.h"
|
||||
/** Qt Project Class Headers */
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlotLayout.h"
|
||||
class qCloneWidget;
|
||||
/** Qt Include Headers */
|
||||
#include <QWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
#include "qwt_symbol.h"
|
||||
|
||||
|
||||
#include <QVector>
|
||||
#include <qwt_series_data.h>
|
||||
#include <qwt_plot_histogram.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
#include <qwt_column_symbol.h>
|
||||
#include <qpen.h>
|
||||
|
||||
/** C++ Include Headers */
|
||||
|
||||
|
||||
#define MAX_1DPLOTS 10
|
||||
|
||||
|
||||
/**
|
||||
*@short Sets up the plot widget
|
||||
*/
|
||||
class qDrawPlot:public QWidget{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
/** \short The constructor */
|
||||
qDrawPlot(QWidget *parent,multiSlsDetector*& detector);
|
||||
/** Destructor */
|
||||
~qDrawPlot();
|
||||
|
||||
/**is an acquisition running , need it to prevent measurement tab
|
||||
* from being refreshed when switching tabs during acquisition */
|
||||
bool isRunning(){return running;};
|
||||
/** gets the progress of acquisition to the measurement tab*/
|
||||
int GetProgress(){return progress;};
|
||||
/** gets the file index to the measurement tab*/
|
||||
int GetFileIndex(){return currentFileIndex;};
|
||||
/** gets the frame index to the measurement tab*/
|
||||
int GetFrameIndex(){return currentFrameIndex;};
|
||||
/** sets file write enable , if not enabled,
|
||||
* file index wont increase and so you need secondary titles to differentitate between plots*/
|
||||
void SetEnableFileWrite(bool enable){fileSaveEnable = enable;};
|
||||
|
||||
/** sets plot Title prefix*/
|
||||
void SetPlotTitlePrefix(QString title) {plotTitle_prefix = title;}
|
||||
/** sets 1D X Axis Title */
|
||||
void SetHistXAxisTitle(QString title) {histXAxisTitle = title;}
|
||||
/** sets 1D Y Axis Title */
|
||||
void SetHistYAxisTitle(QString title) {histYAxisTitle = title;}
|
||||
/** sets 2D X Axis Title */
|
||||
void SetImageXAxisTitle(QString title) {imageXAxisTitle = title;}
|
||||
/** sets 2D Y Axis Title */
|
||||
void SetImageYAxisTitle(QString title) {imageYAxisTitle = title;}
|
||||
/** sets 2D Z Axis Title */
|
||||
void SetImageZAxisTitle(QString title) {imageZAxisTitle = title;}
|
||||
/** Disables zoom if any of the axes range are checked and fixed with a value */
|
||||
void DisableZoom(bool disable);
|
||||
/** Enables plot from the plot tab*/
|
||||
void EnablePlot(bool enable);
|
||||
/** Enable angle plot */
|
||||
void EnableAnglePlot(bool enable){anglePlot = enable;};
|
||||
|
||||
/** Its a reminder to update plot to set the xy range
|
||||
* This is done only when there is a plot to update */
|
||||
void SetXYRange(bool changed){XYRangeChanged = changed;};
|
||||
/**Sets the min/max for x/y
|
||||
* @param val is the value to be set
|
||||
* @param xy is xmin,xmax,ymin or ymax */
|
||||
void SetXYRangeValues(double val,qDefs::range xy){XYRangeValues[xy]=val;};
|
||||
/**Sets if min/max for x/y is enabled
|
||||
* @param changed is if this has been changed
|
||||
* @param xy is xmin,xmax,ymin or ymax */
|
||||
void IsXYRangeValues(bool changed,qDefs::range xy){IsXYRange[xy]=changed;};
|
||||
|
||||
/** Get minimum Plot timer - between plots */
|
||||
double GetMinimumPlotTimer(){return PLOT_TIMER_MS;};
|
||||
/** Set Plot timer - between plots in ms*/
|
||||
void SetPlotTimer(double time){timerValue = time;};
|
||||
/** Set Plot frame factor - between plots, also for receiver if exists */
|
||||
void SetFrameFactor(int frame);
|
||||
|
||||
/** Starts or stop acquisition
|
||||
* Calls startDaq() function
|
||||
* @param stop_if_running is 0 to stop acquisition and 1 to start acquisition
|
||||
*/
|
||||
void StartStopDaqToggle(bool stop_if_running=0);
|
||||
/** Set frame enabled
|
||||
* @param enable enable*/
|
||||
void setFrameEnabled(bool enable){isFrameEnabled = enable;};
|
||||
/** Set trigger enabled
|
||||
* @param enable enable */
|
||||
void setTriggerEnabled(bool enable){isTriggerEnabled = enable;};
|
||||
|
||||
/** Updates the trimbit plot
|
||||
* @param fromDetector is true if the trimbits should be loaded from detector
|
||||
* @param Histogram true if histogram, else data graph
|
||||
* returns ok/fail
|
||||
* */
|
||||
int UpdateTrimbitPlot(bool fromDetector,bool Histogram);
|
||||
|
||||
/** This is set once client initiates start/stop acquisition
|
||||
* and this is reset when the gui really starts/stops- to know when to return
|
||||
*/
|
||||
void SetClientInitiated(){clientInitiated = true;};
|
||||
|
||||
/** Get client intiated variable. This is set once client initiates start/stop acquisition
|
||||
* and this is reset when the gui really starts/stops- to know when to return
|
||||
*/
|
||||
bool GetClientInitiated(){return clientInitiated;};
|
||||
|
||||
/** Update all ranges, interpolate etc after cloning
|
||||
* parameters are if they are checked or not
|
||||
*/
|
||||
void UpdateAfterCloning(bool points, bool logy, bool interpolate, bool contour, bool logz);
|
||||
|
||||
/** set binary range */
|
||||
void SetBinary(bool enable, int from=0, int to=0);
|
||||
|
||||
/** Enable/Disable Histogram */
|
||||
void SetHistogram(bool enable,int histArg, int min=0, int max=0, double size=0){histogram = enable;histogramArgument = histArg; histFrom=min;histTo=max;histSize=size;};
|
||||
|
||||
public slots:
|
||||
/** To select 1D or 2D plot
|
||||
@param i is 1 for 1D, else 2D plot */
|
||||
void SelectPlot(int i=2);
|
||||
/** To select 1D plot */
|
||||
void Select1DPlot() {SelectPlot(1);}
|
||||
/** To select 2D plot */
|
||||
void Select2DPlot() {SelectPlot(2);}
|
||||
/** To clear plot */
|
||||
void Clear1DPlot();
|
||||
/** Creates a clone of the plot */
|
||||
void ClonePlot();
|
||||
/** Closes all the clone plots */
|
||||
void CloseClones();
|
||||
/** Saves all the clone plots */
|
||||
void SaveClones();
|
||||
/** To Save plot */
|
||||
void SavePlot();
|
||||
/** Save all plots **/
|
||||
void SaveAll(bool enable){saveAll = enable;};
|
||||
/** Sets persistency from plot tab */
|
||||
void SetPersistency(int val);
|
||||
/** sets style of plot to lines*/
|
||||
void SetLines(bool enable){lines = enable;};
|
||||
/** sets markers */
|
||||
void SetMarkers(bool enable){markers = enable;};
|
||||
/** sets the scan argument to prepare the plot*/
|
||||
void SetScanArgument(int scanArg);
|
||||
/** sets stop_signal to true */
|
||||
void StopAcquisition(){ stop_signal = true; };
|
||||
/** Set/unset pedestal */
|
||||
void SetPedestal(bool enable);
|
||||
/** Recalculate Pedestal */
|
||||
void RecalculatePedestal();
|
||||
/** Set/unset accumulate */
|
||||
void SetAccumulate(bool enable);
|
||||
/** Reset accumulation */
|
||||
void ResetAccumulate();
|
||||
/** Display Statistics */
|
||||
void DisplayStatistics(bool enable);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** Initializes all its members and the thread */
|
||||
void Initialization();
|
||||
/** Sets up the widget */
|
||||
void SetupWidgetWindow();
|
||||
|
||||
|
||||
/** Gets the image title */
|
||||
const char* GetImageTitle() {return imageTitle.c_str();}
|
||||
/** Gets the hist title for a 1D plot */
|
||||
const char* GetHistTitle(int i) {return (i>=0&&i<MAX_1DPLOTS) ? histTitle[i].c_str():0;} //int for hist number
|
||||
/** Gets the y axis value for the hist in 1D plot */
|
||||
double* GetHistYAxis(int i) {return (i>=0&&i<MAX_1DPLOTS) ? histYAxis[i]:0;} //int for hist number
|
||||
|
||||
|
||||
/** Locks the image to update plot */
|
||||
int LockLastImageArray() {return pthread_mutex_lock(&last_image_complete_mutex); }
|
||||
/** Unocks the image to update plot */
|
||||
int UnlockLastImageArray() {return pthread_mutex_unlock(&last_image_complete_mutex);}
|
||||
/** Starts the acquisition */
|
||||
int StartDaqForGui() {return StartOrStopThread(1) ? 1:0;}
|
||||
/** Stops the acquisition */
|
||||
int StopDaqForGui() {return StartOrStopThread(0) ? 0:1;}
|
||||
|
||||
/** Starts/stops Acquisition Thread */
|
||||
bool StartOrStopThread(bool start);
|
||||
|
||||
/** Sets up measurement each time
|
||||
* */
|
||||
void SetupMeasurement();
|
||||
|
||||
/** Resets the acquisition parameter like lastimagenumber */
|
||||
int ResetDaqForGui();
|
||||
|
||||
/** The function which is called when start acquisition thread is created */
|
||||
static void* DataStartAcquireThread(void *this_pointer);
|
||||
|
||||
/** This is called by the detector class to copy the data it jus acquired */
|
||||
static int GetDataCallBack(detectorData *data, int fIndex, int subIndex, void *this_pointer);
|
||||
|
||||
/** This is called by the GetDataCallBack function to copy the data */
|
||||
int GetData(detectorData *data, int fIndex, int subIndex);
|
||||
|
||||
/** This is called by detector class when acquisition is finished
|
||||
* @param currentProgress current progress of measurement
|
||||
* @param detectorStatus current status of the detector
|
||||
* @param this_pointer is the pointer pointing to this object
|
||||
* */
|
||||
static int GetAcquisitionFinishedCallBack(double currentProgress,int detectorStatus, void *this_pointer);
|
||||
|
||||
/** This is called by static function when acquisition is finished
|
||||
* @param currentProgress current progress of measurement
|
||||
* @param detectorStatus current status of the detector
|
||||
* */
|
||||
int AcquisitionFinished(double currentProgress,int detectorStatus);
|
||||
|
||||
/** This is called by detector class when a measurement is finished
|
||||
* @param currentMeasurementIndex current measurement index
|
||||
* @param fileIndex current file index
|
||||
* @param this_pointer is the pointer pointing to this object
|
||||
* */
|
||||
static int GetMeasurementFinishedCallBack(int currentMeasurementIndex, int fileIndex, void *this_pointer);
|
||||
|
||||
/** This is called by the static function when meausrement is finished
|
||||
* @param currentMeasurementIndex current measurement index
|
||||
* @param fileIndex current file index
|
||||
* */
|
||||
int MeasurementFinished(int currentMeasurementIndex, int fileIndex);
|
||||
|
||||
/** This is called by the detector class to send progress if receiver is online */
|
||||
static int GetProgressCallBack(double currentProgress, void *this_pointer);
|
||||
|
||||
|
||||
/** Saves all the plots. All sets saveError to true if not saved.*/
|
||||
void SavePlotAutomatic();
|
||||
/** Sets the style of the 1d plot */
|
||||
void SetStyle(SlsQtH1D* h){
|
||||
if(lines) h->setStyle(QwtPlotCurve::Lines); else h->setStyle(QwtPlotCurve::Dots);
|
||||
#if QWT_VERSION<0x060000
|
||||
if(markers) h->setSymbol(*marker); else h->setSymbol(*noMarker);
|
||||
#else
|
||||
if(markers) h->setSymbol(marker); else h->setSymbol(noMarker);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/** Find Statistics
|
||||
* @param min is the minimum value
|
||||
* @param max is the maximum value
|
||||
* @param sum is the sum of all values
|
||||
* @param array is the array to get statistics from
|
||||
* @param size is the size of the array */
|
||||
void GetStatistics(double &min, double &max, double &sum, double* array, int size);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** To update plot
|
||||
* */
|
||||
void UpdatePlot();
|
||||
/** To stop updating plot
|
||||
* */
|
||||
void StopUpdatePlot();
|
||||
/** To start or stop acquisition
|
||||
* @param start is 1 to start and 0 to stop acquisition
|
||||
* */
|
||||
void StartDaq(bool start);
|
||||
/** To set the reference to zero after closing a clone
|
||||
* @param id is the id of the clone
|
||||
* */
|
||||
void CloneCloseEvent(int id);
|
||||
/**After a pause, the gui is allowed to collect the data
|
||||
* this is called when it is over
|
||||
* */
|
||||
void UpdatePause(){data_pause_over=true;};
|
||||
/** Shows the first save error message while automatic saving
|
||||
* @param fileName file name of the first file that it tried to save.
|
||||
* */
|
||||
void ShowSaveErrorMessage(QString fileName);
|
||||
/**Shows an error message when acquisition stopped unexpectedly
|
||||
* @param status is the status of the detector
|
||||
* */
|
||||
void ShowAcquisitionErrorMessage(QString status);
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
|
||||
|
||||
/** Widgets needed to plot the clone */
|
||||
/** Max Number of Clone Windows */
|
||||
static const int MAXCloneWindows = 50;
|
||||
/** Array of clone window widget pointers */
|
||||
qCloneWidget *winClone[MAXCloneWindows];
|
||||
|
||||
/** Widgets needed to set up plot*/
|
||||
QGroupBox *boxPlot;
|
||||
QGridLayout *layout;
|
||||
QGridLayout *plotLayout;
|
||||
/** Timer to update plot */
|
||||
QTimer* plot_update_timer;
|
||||
|
||||
/** Timer to pause getting data from client */
|
||||
QTimer* data_pause_timer;
|
||||
bool data_pause_over;
|
||||
|
||||
|
||||
/** 1D object */
|
||||
SlsQt1DPlot* plot1D;
|
||||
/** 2D object */
|
||||
SlsQt2DPlotLayout* plot2D;
|
||||
/** vector of 1D hist values */
|
||||
QVector<SlsQtH1D*> plot1D_hists;
|
||||
|
||||
|
||||
/**label with frame index for those with many frames per file*/
|
||||
QLabel *histFrameIndexTitle;
|
||||
|
||||
|
||||
/** Current Measurement */
|
||||
int currentMeasurement;
|
||||
/** currentFrame */
|
||||
int currentFrame;
|
||||
/** variable to check if its the nth frame */
|
||||
int numFactor;
|
||||
/** current Scan Division Level */
|
||||
int currentScanDivLevel;
|
||||
/** current scan Value */
|
||||
double currentScanValue;
|
||||
/** Number of Exposures */
|
||||
int number_of_exposures;
|
||||
/** Number of Frames Per Measurement */
|
||||
int number_of_frames;
|
||||
/** Duration between Exposures */
|
||||
double acquisitionPeriod;
|
||||
/** Acquisition Time */
|
||||
double exposureTime;
|
||||
/** Current file index*/
|
||||
int currentFileIndex;
|
||||
/** Current frame index*/
|
||||
int currentFrameIndex;
|
||||
|
||||
/**variables for threads */
|
||||
/** */
|
||||
volatile bool stop_signal;
|
||||
/** */
|
||||
pthread_mutex_t last_image_complete_mutex;
|
||||
|
||||
/**variables for histograms */
|
||||
/** X Axis Title in 2D */
|
||||
QString imageXAxisTitle;
|
||||
/** Y Axis Title in 2D */
|
||||
QString imageYAxisTitle;
|
||||
/** Z Axis Title in 2D */
|
||||
QString imageZAxisTitle;
|
||||
/** X Axis Title in 1D */
|
||||
QString histXAxisTitle;
|
||||
/** Y Axis Title in 1D */
|
||||
QString histYAxisTitle;
|
||||
/** Title for all the graphs in 1D */
|
||||
std::string histTitle[MAX_1DPLOTS];
|
||||
/** Title in 2D */
|
||||
std::string imageTitle;
|
||||
/** plot Title */
|
||||
QString plotTitle;
|
||||
/** plot Title prefix */
|
||||
QString plotTitle_prefix;
|
||||
/** 1D or 2D */
|
||||
unsigned int plot_in_scope;
|
||||
/** Number of Pixels in X Axis */
|
||||
unsigned int nPixelsX;
|
||||
/** Number of angle Pixels in X Axis */
|
||||
int nAnglePixelsX;
|
||||
/** Number of pixel bins in Y Axis */
|
||||
int nPixelsY;
|
||||
/** Min Pixel number for Y Axis*/
|
||||
double minPixelsY;
|
||||
/** Max Pixel number for Y Axis*/
|
||||
double maxPixelsY;
|
||||
/** starting pixel */
|
||||
double startPixel;
|
||||
/** end Pixel*/
|
||||
double endPixel;
|
||||
/** pixel width */
|
||||
double pixelWidth;
|
||||
|
||||
/** Current Image Number */
|
||||
unsigned int lastImageNumber;
|
||||
int last_plot_number;
|
||||
|
||||
/** Number of graphs in 1D */
|
||||
unsigned int nHists;
|
||||
/** Total Number of X axis values/channels in 1D */
|
||||
int histNBins;
|
||||
/** X Axis value in 1D */
|
||||
double* histXAxis;
|
||||
/** Y Axis value in 1D */
|
||||
double* histYAxis[MAX_1DPLOTS];
|
||||
/** X Axis for angles in 1D */
|
||||
double* histXAngleAxis;
|
||||
/** Y Axis for angles in 1D (no persistency) */
|
||||
double* histYAngleAxis;
|
||||
/** X Axis for trimbits in 1D */
|
||||
double* histTrimbits;
|
||||
|
||||
|
||||
/** Current Image Values in 2D */
|
||||
double* lastImageArray;
|
||||
|
||||
/**persistency to be reached*/
|
||||
int persistency;
|
||||
/** persistency takes time to reach as it increases per frame
|
||||
* this is the current one */
|
||||
int currentPersistency;
|
||||
/** to update the progress for each getData() so that
|
||||
* measurement tab can request on a timer basis*/
|
||||
int progress;
|
||||
/**If plot is enabled from plot tab*/
|
||||
bool plotEnable;
|
||||
/**If plot is dotted */
|
||||
bool lines;
|
||||
bool markers;
|
||||
/** Plot marker */
|
||||
QwtSymbol *marker;
|
||||
QwtSymbol *noMarker;
|
||||
/** Save all plots */
|
||||
bool saveAll;
|
||||
/** If error, while automatically saving plots, checks this at the end of an acquistion */
|
||||
bool saveError;
|
||||
/** index of last saved image for automatic saving*/
|
||||
int lastSavedFrame;
|
||||
/** index of measurement number of last saved image for automatic saving*/
|
||||
int lastSavedMeasurement;
|
||||
/**if an acquisition is running, so as not to refresh tab
|
||||
* and also to update plot only if running (while creating clones)*/
|
||||
bool running;
|
||||
|
||||
/** if the min/max of x and y has been changed,
|
||||
* to notify while plotting */
|
||||
bool XYRangeChanged;
|
||||
/**the specific min/max of x/y*/
|
||||
double XYRangeValues[4];
|
||||
/**if the specific min/max of x/y is enabled */
|
||||
bool IsXYRange[4];
|
||||
|
||||
/** Default timer between plots*/
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)
|
||||
static constexpr double PLOT_TIMER_MS = 200;
|
||||
#else
|
||||
static const double PLOT_TIMER_MS = 200;
|
||||
#endif
|
||||
/** Specific timer value between plots */
|
||||
double timerValue;
|
||||
/** every nth frame when to plot */
|
||||
int frameFactor;
|
||||
/**if frame is enabled in measurement tab */
|
||||
bool isFrameEnabled;
|
||||
/**if trigger is enabled in measurement tab */
|
||||
bool isTriggerEnabled;
|
||||
|
||||
/** scan arguments*/
|
||||
int scanArgument;
|
||||
|
||||
/** histogram arguments*/
|
||||
int histogramArgument;
|
||||
|
||||
/** enable angle plot */
|
||||
bool anglePlot;
|
||||
/** prevents err msg displaying twice when detector stopped, "transmitting" */
|
||||
bool alreadyDisplayed;
|
||||
|
||||
/**saves the file path and file name, not to access shared memory while running*/
|
||||
QString filePath;
|
||||
QString fileName;
|
||||
|
||||
/** Max Number of Clone Windows */
|
||||
static const int TRIM_HISTOGRAM_XMAX = 63;
|
||||
|
||||
/**if the values increment backwards*/
|
||||
bool backwardScanPlot;
|
||||
|
||||
/**if files will be saved and index increased*/
|
||||
bool fileSaveEnable;
|
||||
|
||||
|
||||
/** true of originally 2d */
|
||||
bool originally2D;
|
||||
|
||||
|
||||
//pedstal
|
||||
/** Number of pedestal frames*/
|
||||
static const int NUM_PEDESTAL_FRAMES = 20;
|
||||
/** set/unset pedestal*/
|
||||
bool pedestal;
|
||||
/** pedestal values */
|
||||
double* pedestalVals;
|
||||
/** temporary pedestal values to hide while recalculating*/
|
||||
double* tempPedestalVals;
|
||||
/** count for 20 frames to calculate the pedestal */
|
||||
int pedestalCount;
|
||||
/** start pedestal calculation */
|
||||
bool startPedestalCal;
|
||||
|
||||
//accumulation
|
||||
/** set/unset accumulation */
|
||||
bool accumulate;
|
||||
/** to reset accumulation */
|
||||
bool resetAccumulate;
|
||||
|
||||
/** range for binary plot output */
|
||||
bool binary;
|
||||
int binaryFrom;
|
||||
int binaryTo;
|
||||
|
||||
/** this is set when client starts/stops acquisition
|
||||
* and is reset once the gui really starts/stops */
|
||||
bool clientInitiated;
|
||||
|
||||
|
||||
/** display statistics widgets */
|
||||
QWidget *widgetStatistics;
|
||||
QLabel *lblMinDisp;
|
||||
QLabel *lblMaxDisp;
|
||||
QLabel *lblSumDisp;
|
||||
|
||||
bool displayStatistics;
|
||||
|
||||
|
||||
/* histogram */
|
||||
bool histogram;
|
||||
int histFrom;
|
||||
int histTo;
|
||||
double histSize;
|
||||
QwtPlotGrid *grid;
|
||||
QwtPlotHistogram *plotHistogram;
|
||||
QVector<QwtIntervalSample> histogramSamples;
|
||||
|
||||
|
||||
bool firstPlot;
|
||||
|
||||
signals:
|
||||
void UpdatingPlotFinished();
|
||||
void InterpolateSignal(bool);
|
||||
void ContourSignal(bool);
|
||||
void LogzSignal(bool);
|
||||
void LogySignal(bool);
|
||||
void SetZRangeSignal(double,double);
|
||||
void ResetZMinZMaxSignal(bool,bool,double,double);
|
||||
void SetCurrentMeasurementSignal(int);
|
||||
void saveErrorSignal(QString);
|
||||
void AcquisitionErrorSignal(QString);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QDRAWPLOT_H */
|
193
slsDetectorGui/include/qScanWidget.h
Normal file
@ -0,0 +1,193 @@
|
||||
/*
|
||||
* qScanWidget.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QSCANWIDGET_H_
|
||||
#define QSCANWIDGET_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_scan.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QStackedLayout>
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
|
||||
class qScanWidget : public QWidget,private Ui::ScanObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qScanWidget(QWidget *parent, multiSlsDetector*& detector);
|
||||
|
||||
~qScanWidget();
|
||||
|
||||
/**to update the widgets*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
/**number of scan widgets*/
|
||||
static int NUM_SCAN_WIDGETS;
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/**id of the scan widget*/
|
||||
int id;
|
||||
/**type of steps*/
|
||||
enum sizeIndex{RangeValues, CustomValues, FileValues};
|
||||
enum modes{None,EnergyScan,ThresholdScan,TrimbitsScan,PositionScan,CustomScript,NumModes};
|
||||
static const string modeNames[NumModes];
|
||||
|
||||
/**values*/
|
||||
int actualNumSteps;
|
||||
vector <double> positions;
|
||||
|
||||
/**non error font*/
|
||||
QPalette normal;
|
||||
QPalette red;
|
||||
QString customTip;
|
||||
QString fileTip;
|
||||
QString rangeTip;
|
||||
|
||||
/**widgets needed for diff size types*/
|
||||
QButtonGroup *btnGroup;
|
||||
QStackedLayout *stackedLayout;
|
||||
QLabel *lblFrom;
|
||||
QDoubleSpinBox *spinFrom;
|
||||
QLabel *lblTo;
|
||||
QDoubleSpinBox *spinTo;
|
||||
QLabel *lblSize;
|
||||
QDoubleSpinBox *spinSize;
|
||||
QComboBox *comboCustom;
|
||||
QPushButton *btnCustom;
|
||||
QLineEdit *dispFile;
|
||||
QPushButton *btnFile;
|
||||
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals */
|
||||
void Initialization();
|
||||
|
||||
/** Sets up all the parameters from server/client */
|
||||
void LoadPositions();
|
||||
|
||||
/** Sets up the scan parameters
|
||||
* returns if it was set
|
||||
*/
|
||||
int SetScan(int mode);
|
||||
|
||||
private slots:
|
||||
/** Enables widgets depending on which size is clicked.
|
||||
* Options: constant size,specific values,values from file
|
||||
* */
|
||||
void EnableSizeWidgets();
|
||||
|
||||
/** Sets the scan or script. Accordingly enables, disables other widgets
|
||||
* @param mode value chosen*/
|
||||
void SetMode(int mode);
|
||||
|
||||
/** Browse for the script
|
||||
* */
|
||||
void BrowsePath();
|
||||
|
||||
/** Sets the script file
|
||||
* */
|
||||
void SetScriptFile();
|
||||
|
||||
/** Set Parameter
|
||||
* */
|
||||
void SetParameter();
|
||||
|
||||
/** Set precision
|
||||
* @param value value of precision to be set
|
||||
* */
|
||||
void SetPrecision(int value);
|
||||
|
||||
/** Set number of steps
|
||||
* */
|
||||
void SetNSteps();
|
||||
|
||||
/**Checks if size is zero and return FAIL if it does
|
||||
* */
|
||||
int RangeCheckSizeZero();
|
||||
|
||||
/**returns ok and number of steps if valid
|
||||
* @param number of steps
|
||||
* */
|
||||
int RangeCheckNumValid(int &num);
|
||||
|
||||
/**returns fail if to is not exact
|
||||
* */
|
||||
int RangeCheckToValid();
|
||||
|
||||
/** Sets number of steps if from changed
|
||||
* */
|
||||
void RangeFromChanged();
|
||||
|
||||
/** Sets number of steps if to changed
|
||||
* */
|
||||
void RangeToChanged();
|
||||
|
||||
/** Sets s of steps if size changed
|
||||
* */
|
||||
void RangeSizeChanged();
|
||||
|
||||
/** Set range for scan
|
||||
* */
|
||||
void SetRangeSteps();
|
||||
|
||||
|
||||
/** Range type: If size is changed,
|
||||
* the Number of steps is calculated
|
||||
* */
|
||||
//void RangeCalculateNumSteps();
|
||||
|
||||
/** Range type: If size is changed, the To is calculated
|
||||
* */
|
||||
//void RangeCalculateTo();
|
||||
|
||||
|
||||
/** Set custom steps
|
||||
* returns OK if set properly
|
||||
* */
|
||||
int SetCustomSteps();
|
||||
|
||||
/** Delete custom steps
|
||||
* */
|
||||
void DeleteCustomSteps();
|
||||
|
||||
/** Reads the file to get the steps
|
||||
* */
|
||||
void SetFileSteps();
|
||||
|
||||
/** Browses for the file path for steps
|
||||
* */
|
||||
void BrowseFileStepsPath();
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
void EnableScanBox();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* QSCANWIDGET_H_ */
|
||||
|
137
slsDetectorGui/include/qServer.h
Normal file
@ -0,0 +1,137 @@
|
||||
/*
|
||||
* qServer.h.h
|
||||
*
|
||||
* Created on: Feb 27, 2013
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
#ifndef QSERVER_H
|
||||
#define QSERVER_H
|
||||
|
||||
|
||||
/** Qt Project Class Headers */
|
||||
#include "sls_detector_defs.h"
|
||||
#include "qDefs.h"
|
||||
class qDetectorMain;
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
class MySocketTCP;
|
||||
/** Qt Include Headers */
|
||||
#include <QWidget>
|
||||
/** C++ Include Headers */
|
||||
|
||||
|
||||
/**
|
||||
*@short Sets up the gui server
|
||||
*/
|
||||
class qServer: public QWidget, public virtual slsDetectorDefs{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
/** \short The constructor */
|
||||
qServer(qDetectorMain *t);
|
||||
/** Destructor */
|
||||
~qServer();
|
||||
|
||||
/** Start or Stop Gui Server
|
||||
* @param start is 1 to start and 0 to stop
|
||||
*/
|
||||
int StartStopServer(int start);
|
||||
|
||||
private:
|
||||
/** assigns functions to the fnum enum */
|
||||
int FunctionTable();
|
||||
|
||||
/** Decodes Function */
|
||||
int DecodeFunction(MySocketTCP* sock);
|
||||
|
||||
/** Exit Server */
|
||||
int ExitServer();
|
||||
|
||||
|
||||
/**
|
||||
* Static function - Thread started which listens to client gui.
|
||||
* Called by StartStopServer()
|
||||
* @param this_pointer pointer to this object
|
||||
*/
|
||||
static void* StartServerThread(void *this_pointer);
|
||||
|
||||
/**
|
||||
* Thread started which listens to client gui.
|
||||
* Called by startServerThread()
|
||||
*
|
||||
*/
|
||||
int StartServer();
|
||||
|
||||
/**
|
||||
* Static function - Thread started which listens to client gui to stop acquisition
|
||||
* Called by StartStopServer()
|
||||
* @param this_pointer pointer to this object
|
||||
*/
|
||||
static void* StopServerThread(void *this_pointer);
|
||||
|
||||
/**
|
||||
* Thread started which listens to client gui to stop acquisition.
|
||||
* Called by startServerThread()
|
||||
*
|
||||
*/
|
||||
int StopServer();
|
||||
|
||||
|
||||
|
||||
/** Get Detector Status */
|
||||
int GetStatus();
|
||||
|
||||
/** Starts Acquisition */
|
||||
int StartAcquisition();
|
||||
|
||||
/** Stops Acquisition */
|
||||
int StopsAcquisition();
|
||||
|
||||
/** Acquire - blocking */
|
||||
int Acquire();
|
||||
|
||||
|
||||
|
||||
/**The measurement tab object*/
|
||||
qDetectorMain *myMainTab;
|
||||
|
||||
/** tcp socket to gui client */
|
||||
MySocketTCP *mySocket;
|
||||
/** tcp socket to gui client to stop or get status */
|
||||
MySocketTCP *myStopSocket;
|
||||
|
||||
/** server port number*/
|
||||
int port_no;
|
||||
|
||||
/** Lock Status if server locked to a client */
|
||||
int lockStatus;
|
||||
|
||||
/** Function List */
|
||||
static const int NUMBER_OF_FUNCTIONS = 256;
|
||||
int (qServer::*flist[NUMBER_OF_FUNCTIONS])();
|
||||
|
||||
|
||||
/** if the gui server thread is running*/
|
||||
static int gui_server_thread_running;
|
||||
/** thread listening to gui client*/
|
||||
pthread_t gui_server_thread;
|
||||
/** thread also listening to gui client to stop acquisition*/
|
||||
pthread_t gui_stop_server_thread;
|
||||
|
||||
/** server started */
|
||||
int checkStarted;
|
||||
int checkStopStarted;
|
||||
|
||||
/** Message */
|
||||
char mess[MAX_STR_LENGTH];
|
||||
|
||||
|
||||
signals:
|
||||
void ServerStoppedSignal();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QSERVER_H */
|
150
slsDetectorGui/include/qTabActions.h
Normal file
@ -0,0 +1,150 @@
|
||||
/*
|
||||
* qTabActions.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABACTIONS_H_
|
||||
#define QTABACTIONS_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/* Qt Project Class Headers */
|
||||
#include "qActionsWidget.h"
|
||||
#include "qScanWidget.h"
|
||||
/** C++ Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QSpinBox>
|
||||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
#include <QScrollArea>
|
||||
#include <QGridLayout>
|
||||
#include <QPalette>
|
||||
|
||||
|
||||
/**
|
||||
*@short sets up the acions parameters
|
||||
*/
|
||||
class qTabActions:public QWidget{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabActions(QWidget *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabActions();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
public slots:
|
||||
/** Disable Positions
|
||||
* @param enable true if to disable
|
||||
* */
|
||||
void EnablePositions(bool enable);
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
|
||||
enum actionIndex{
|
||||
ActionStart,
|
||||
Scan0,
|
||||
Scan1,
|
||||
ActionBefore,
|
||||
NumPositions,
|
||||
HeaderBefore,
|
||||
HeaderAfter,
|
||||
ActionAfter,
|
||||
ActionStop,
|
||||
NumTotalActions};
|
||||
|
||||
QGridLayout *gridLayout;
|
||||
QButtonGroup *group;
|
||||
QPalette *palette;
|
||||
|
||||
/** all action widget objects */
|
||||
qActionsWidget *actionWidget[6];
|
||||
qScanWidget *scanWidget[2];
|
||||
QWidget *positionWidget;
|
||||
QPushButton *btnExpand[NumTotalActions];
|
||||
QLabel *lblName[NumTotalActions];
|
||||
|
||||
|
||||
/** NumPositions widget */
|
||||
QLabel *lblNumPos;
|
||||
QLabel *lblPosList;
|
||||
QSpinBox *spinNumPos;
|
||||
QComboBox *comboPos;
|
||||
QPushButton *btnDelete;
|
||||
QCheckBox *chkInvert;
|
||||
QCheckBox *chkSeparate;
|
||||
QCheckBox *chkReturn;
|
||||
|
||||
double *positions;
|
||||
QPalette normal;
|
||||
QIcon *iconPlus;
|
||||
QIcon *iconMinus;
|
||||
|
||||
|
||||
/** Sets up the widget */
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals */
|
||||
void Initialization();
|
||||
|
||||
/** creates the Num Positions object */
|
||||
void CreatePositionsWidget();
|
||||
|
||||
/** Returns the index in each of the classes
|
||||
* of actionwidget and scanwidget
|
||||
* @param index the index in the list of all widgets
|
||||
* returns actual index of the class
|
||||
*/
|
||||
int GetActualIndex(int index);
|
||||
|
||||
/** Updates to green color if collapsed and mode not none
|
||||
*/
|
||||
void UpdateCollapseColors();
|
||||
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** To Expand the Action Widget
|
||||
* */
|
||||
void Expand(QAbstractButton *button);
|
||||
|
||||
/** Sets the positions list and the number of positions
|
||||
* */
|
||||
void SetPosition();
|
||||
|
||||
/** Deletes current position
|
||||
* */
|
||||
void DeletePosition();
|
||||
|
||||
|
||||
signals:
|
||||
void EnableScanBox();
|
||||
|
||||
};
|
||||
|
||||
#endif /* QTABACTIONS_H_ */
|
||||
|
234
slsDetectorGui/include/qTabAdvanced.h
Normal file
@ -0,0 +1,234 @@
|
||||
/*
|
||||
* qTabAdvanced.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABADVANCED_H_
|
||||
#define QTABADVANCED_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_advanced.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
class slsDetector;
|
||||
/** Qt Project Class Headers */
|
||||
class qDrawPlot;
|
||||
/** Qt Include Header */
|
||||
#include <QStackedLayout>
|
||||
#include <QSpacerItem>
|
||||
/**
|
||||
*@short sets up the advanced parameters
|
||||
*/
|
||||
class qTabAdvanced:public QWidget, private Ui::TabAdvancedObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
* @param plot plot object reference
|
||||
*/
|
||||
qTabAdvanced(QWidget *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabAdvanced();
|
||||
|
||||
public slots:
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
private:
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/** Add ROI Input
|
||||
* @param num number of inputs to add
|
||||
*/
|
||||
void AddROIInput(int num);
|
||||
|
||||
/** Checks for a few conditions before trimming
|
||||
/returns OK or FAIL
|
||||
*/
|
||||
int validateBeforeTrimming();
|
||||
|
||||
/** update the setalltrimbits value from server
|
||||
*/
|
||||
void updateAllTrimbitsFromServer();
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
/** Enable/Disable Energy and Calibration Logs
|
||||
*/
|
||||
void SetLogs();
|
||||
|
||||
/** Set acquisition time
|
||||
*/
|
||||
void SetExposureTime();
|
||||
|
||||
/** Set the Threshold dac value
|
||||
*/
|
||||
void SetThreshold();
|
||||
|
||||
/** Set output directory for trimming
|
||||
*/
|
||||
void SetOutputFile();
|
||||
|
||||
/** Browse output directory for trimming
|
||||
*/
|
||||
void BrowseOutputFile();
|
||||
|
||||
/** Enables trimming method and calls SetTrimmingMethod if enabled
|
||||
* @param enable to enable trimming
|
||||
*/
|
||||
void EnableTrimming(bool enable);
|
||||
|
||||
/** Enabling resolution and Counts if this is enabled
|
||||
* @param enable to enable
|
||||
*/
|
||||
void SetOptimize(bool enable);
|
||||
|
||||
/** Sets the trimming method
|
||||
* @param mode trimming method
|
||||
*/
|
||||
void SetTrimmingMethod(int mode);
|
||||
|
||||
/** Ensures the right trimming mode and Executes Trimming
|
||||
*/
|
||||
void StartTrimming();
|
||||
|
||||
/** Updates the plot with trimbits from detector/shared memory
|
||||
*/
|
||||
void UpdateTrimbitPlot(int id);
|
||||
|
||||
/** Sets control port
|
||||
* @param port control port
|
||||
*/
|
||||
void SetControlPort(int port);
|
||||
|
||||
/** Sets stop port
|
||||
* @param port stop port
|
||||
*/
|
||||
void SetStopPort(int port);
|
||||
|
||||
/** Sets receiver tcp port
|
||||
* @param port receiver tcp port
|
||||
*/
|
||||
void SetRxrTCPPort(int port);
|
||||
|
||||
/** Sets receiver udp port
|
||||
* @param port receiver udp port
|
||||
*/
|
||||
void SetRxrUDPPort(int port);
|
||||
|
||||
/** Sets receiver online
|
||||
* @param index 1 for online and 0 for offline
|
||||
*/
|
||||
void SetReceiverOnline(int index);
|
||||
|
||||
/** Sets detector online
|
||||
* @param index 1 for online and 0 for offline
|
||||
*/
|
||||
void SetOnline(int index);
|
||||
|
||||
/** Sets network parameters like receiver udp ip,
|
||||
* receiver udp mac, detector ip and detector mac
|
||||
*/
|
||||
void SetNetworkParameters();
|
||||
|
||||
/** Sets the receiver. which also sets the receiver parameters
|
||||
*/
|
||||
void SetReceiver();
|
||||
|
||||
/** Add ROI Input if the value changed in the last slot
|
||||
*/
|
||||
void AddROIInputSlot(){AddROIInput(1);};
|
||||
|
||||
/** Clears all the ROI inputs
|
||||
*/
|
||||
void clearROI();
|
||||
|
||||
/** Gets ROIs from detector and updates it
|
||||
*/
|
||||
void updateROIList();
|
||||
|
||||
/** Sets ROI in detector
|
||||
*/
|
||||
void setROI();
|
||||
|
||||
/** Clears ROI in detector
|
||||
*/
|
||||
void clearROIinDetector();
|
||||
|
||||
/** Clears ROI in detector
|
||||
*/
|
||||
void SetDetector(int index);
|
||||
|
||||
/** Set all trimbits to a value
|
||||
*/
|
||||
void SetAllTrimbits();
|
||||
|
||||
private:
|
||||
/** The multi detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** The sls detector object */
|
||||
slsDetector *det;
|
||||
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
/** The Plot widget */
|
||||
qDrawPlot *myPlot;
|
||||
|
||||
QButtonGroup *btnGroup;
|
||||
|
||||
/** Tool Tip for the output dir */
|
||||
QString outputDirTip;
|
||||
QString errOutputTip;
|
||||
QString errOnlineTip;
|
||||
QString detOnlineTip;
|
||||
QString rxrOnlineTip;
|
||||
QPalette red;
|
||||
|
||||
/** Trimming mode */
|
||||
slsDetectorDefs::trimMode trimmingMode;
|
||||
static const int TRIMMING_DYNAMIC_RANGE = 32;
|
||||
static const int TRIMMING_FRAME_NUMBER = 1;
|
||||
static const int TRIMMING_TRIGGER_NUMBER = 1;
|
||||
static const int TRIMMING_PROBE_NUMBER = 0;
|
||||
|
||||
bool isEnergy;
|
||||
bool isAngular;
|
||||
|
||||
/** ROI */
|
||||
vector <QLabel*> lblFromX;
|
||||
vector <QSpinBox*> spinFromX;
|
||||
vector <QLabel*> lblFromY;
|
||||
vector <QSpinBox*> spinFromY;
|
||||
vector <QLabel*> lblToX;
|
||||
vector <QSpinBox*> spinToX;
|
||||
vector <QLabel*> lblToY;
|
||||
vector <QSpinBox*> spinToY;
|
||||
int numRois;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABADVANCED_H_ */
|
152
slsDetectorGui/include/qTabDataOutput.h
Normal file
@ -0,0 +1,152 @@
|
||||
/*
|
||||
* qTabDataOutput.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABDATAOUTPUT_H_
|
||||
#define QTABDATAOUTPUT_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QString>
|
||||
|
||||
|
||||
/**
|
||||
*@short sets up the DataOutput parameters
|
||||
*/
|
||||
class qTabDataOutput:public QWidget, private Ui::TabDataOutputObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabDataOutput(QWidget *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabDataOutput();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
/** verify output directories
|
||||
* /returns success or fail
|
||||
*/
|
||||
int VerifyOutputDirectory();
|
||||
|
||||
/** To enable expert mode
|
||||
* @param enable to enable if true
|
||||
*/
|
||||
void SetExpertMode(bool enable);
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
|
||||
QString flatFieldTip;
|
||||
QString errFlatFieldTip;
|
||||
QString outDirTip;
|
||||
QPalette red;
|
||||
QPalette black;
|
||||
QPalette *red1;
|
||||
QPalette *black1;
|
||||
|
||||
/** enum for the Eiger clock divider */
|
||||
enum {FullSpeed, HalfSpeed, QuarterSpeed, SuperSlowSpeed, NumberofSpeeds};
|
||||
/** enum for the Eiger readout flags1 */
|
||||
enum {Continous, Storeinram};
|
||||
/** enum for the Eiger readout flags2 */
|
||||
enum {Parallel, NonParallel, Safe};
|
||||
|
||||
|
||||
/** methods */
|
||||
/** Sets up the widget */
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals */
|
||||
void Initialization();
|
||||
|
||||
/** Populate the readouts
|
||||
*/
|
||||
void PopulateDetectors();
|
||||
|
||||
/** Get Compression */
|
||||
void GetCompression();
|
||||
|
||||
/** update speed */
|
||||
void updateSpeedFromServer();
|
||||
|
||||
/** update flags */
|
||||
void updateFlagsFromServer();
|
||||
|
||||
private slots:
|
||||
|
||||
/** Open dialog to choose the output directory */
|
||||
void browseOutputDir();
|
||||
|
||||
/**set flat field file*/
|
||||
void SetFlatField();
|
||||
|
||||
/** update flat field correction from server */
|
||||
void UpdateFlatFieldFromServer();
|
||||
|
||||
/**browse flat field*/
|
||||
void BrowseFlatFieldPath();
|
||||
|
||||
/**rate correction*/
|
||||
void SetRateCorrection(int deadtime=0);
|
||||
|
||||
/** default rate correction */
|
||||
void SetDefaultRateCorrection();
|
||||
|
||||
/** update rate correction from server */
|
||||
void UpdateRateCorrectionFromServer();
|
||||
|
||||
/**angular correction*/
|
||||
void SetAngularCorrection();
|
||||
|
||||
/**discard bad channels*/
|
||||
void DiscardBadChannels();
|
||||
|
||||
/** set output directory*/
|
||||
void SetOutputDir();
|
||||
|
||||
/** set output directory*/
|
||||
void GetOutputDir();
|
||||
|
||||
/** set compression */
|
||||
void SetCompression(bool enable);
|
||||
|
||||
/** enable 10GbE */
|
||||
void EnableTenGigabitEthernet(bool enable, int get=0);
|
||||
|
||||
/** set speed */
|
||||
void setSpeed();
|
||||
|
||||
/** set flags */
|
||||
void setFlags();
|
||||
|
||||
signals:
|
||||
/**signal to enable/disable positions in Actions*/
|
||||
void AngularConversionSignal(bool);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABDATAOUTPUT_H_ */
|
103
slsDetectorGui/include/qTabDebugging.h
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* qTabDebugging.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABDEBUGGING_H_
|
||||
#define QTABDEBUGGING_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_debugging.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
class slsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QTreeWidget>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*@short sets up the Debugging parameters
|
||||
*/
|
||||
class qTabDebugging:public QWidget, private Ui::TabDebuggingObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabDebugging(QWidget *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabDebugging();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
private:
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** Updates the module list depending on current detector
|
||||
*/
|
||||
void UpdateModuleList();
|
||||
|
||||
/** Updates the status depending on current detector
|
||||
*/
|
||||
void UpdateStatus();
|
||||
|
||||
/** Gets id and versions etc
|
||||
*/
|
||||
void GetInfo();
|
||||
|
||||
/** Sets id and versions on the display widget
|
||||
*/
|
||||
void SetParameters(QTreeWidgetItem *item);
|
||||
|
||||
/** Test detector and module
|
||||
*/
|
||||
void TestDetector();
|
||||
|
||||
private:
|
||||
/** The multi sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
/**sls detecctor object */
|
||||
slsDetector *det;
|
||||
|
||||
/** Tree Widget displaying the detectors, modules */
|
||||
QTreeWidget *treeDet;
|
||||
/** Widget displaying the serial numbers, mac addresses etc */
|
||||
QFrame *dispFrame;
|
||||
QLabel *lblDetectorId;
|
||||
QLabel *lblDetectorSerial;
|
||||
QLabel *lblDetectorFirmware;
|
||||
QLabel *lblDetectorSoftware;
|
||||
QLabel *lblModuleId;
|
||||
QLabel *lblModuleFirmware;
|
||||
QLabel *lblModuleSerial;
|
||||
QPalette *blue;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABDEBUGGING_H_ */
|
159
slsDetectorGui/include/qTabDeveloper.h
Normal file
@ -0,0 +1,159 @@
|
||||
/*
|
||||
* qTabDeveloper.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABDEVELOPER_H_
|
||||
#define QTABDEVELOPER_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QScrollArea>
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
#include <QPalette>
|
||||
class qDetectorMain;
|
||||
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
|
||||
/**To override the spin box class to have an id and emit it*/
|
||||
class MyDoubleSpinBox:public QDoubleSpinBox{
|
||||
Q_OBJECT
|
||||
private:
|
||||
int myId;
|
||||
private slots:
|
||||
void valueChangedWithID() {emit editingFinished(myId);};
|
||||
public:
|
||||
/** Overridden constructor from QDoubleSpinBox */
|
||||
MyDoubleSpinBox(int id,QWidget* parent = 0)
|
||||
:QDoubleSpinBox(parent),myId(id){
|
||||
//setParent(parent);
|
||||
connect(this,SIGNAL(editingFinished()),
|
||||
this,SLOT(valueChangedWithID()));
|
||||
}
|
||||
signals:
|
||||
void editingFinished(int myId);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*@short sets up the Developer parameters
|
||||
*/
|
||||
class qTabDeveloper:public QWidget{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabDeveloper();
|
||||
|
||||
/** To stop ADC Timer when starting acquisition
|
||||
*/
|
||||
void StopADCTimer(){if(adcTimer) adcTimer->stop();};
|
||||
|
||||
private:
|
||||
/** parent widget */
|
||||
qDetectorMain *thisParent;
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/** The sls detector object */
|
||||
slsDetector *det;
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
/**number of dac widgets*/
|
||||
static int NUM_DAC_WIDGETS;
|
||||
/**number of adc widgets*/
|
||||
static int NUM_ADC_WIDGETS;
|
||||
|
||||
static const int ADC_TIMEOUT = 5000;
|
||||
|
||||
vector<string>dacNames;
|
||||
vector<string>adcNames;
|
||||
|
||||
|
||||
/**widgets needed*/
|
||||
QGridLayout *layout;
|
||||
QScrollArea *scroll;
|
||||
QGroupBox *boxDacs;
|
||||
QGroupBox *boxAdcs;
|
||||
QLabel *lblDacs[20];
|
||||
QLabel *lblAdcs[20];
|
||||
MyDoubleSpinBox *spinDacs[20];
|
||||
QLabel *lblDacsmV[20];
|
||||
QDoubleSpinBox *spinAdcs[20];
|
||||
QLabel *lblHV;
|
||||
QComboBox *comboHV;
|
||||
QTimer *adcTimer;
|
||||
QGridLayout *dacLayout;
|
||||
QString tipHV;
|
||||
QPalette red;
|
||||
QComboBox *comboDetector;
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/** Sets up the DAC Widgets
|
||||
*/
|
||||
void CreateDACWidgets();
|
||||
|
||||
/** Sets up the ADC Widgets
|
||||
*/
|
||||
void CreateADCWidgets();
|
||||
|
||||
/** Gets the sls index to set/get dac/adc
|
||||
* @param index is the gui dac/adc index
|
||||
* returns the sls index
|
||||
*/
|
||||
slsDetectorDefs::dacIndex getSLSIndex(int index);
|
||||
|
||||
public slots:
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
private slots:
|
||||
/** Refreshes the adcs
|
||||
*/
|
||||
void RefreshAdcs();
|
||||
|
||||
/** Set Dac values
|
||||
* @param id id of dac
|
||||
*/
|
||||
void SetDacValues(int id);
|
||||
|
||||
/** Set High Voltage
|
||||
*/
|
||||
void SetHighVoltage();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABDEVELOPER_H_ */
|
205
slsDetectorGui/include/qTabMeasurement.h
Normal file
@ -0,0 +1,205 @@
|
||||
/*
|
||||
* qTabMeasurement.h
|
||||
*
|
||||
* Created on: May 2, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
#ifndef QTABMEASUREMENT
|
||||
#define QTABMEASUREMENT
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_measurement.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Project Class Headers */
|
||||
#include <QStandardItemModel>
|
||||
#include "qDrawPlot.h"
|
||||
class qDetectorMain;
|
||||
|
||||
/**
|
||||
*@short sets up the measurement parameters
|
||||
*/
|
||||
class qTabMeasurement:public QWidget, private Ui::TabMeasurementObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* This tab allows to change the detector settings, the threshold, the number of (non real time) measurements,
|
||||
* the acquisition time, the file name, the start run index and shows the current progress of the measurement
|
||||
* via a progress bar and labels inidicating the current position, scan variable, frame number etc.
|
||||
* Contains the start and stop acquisition button
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
* @param plot plot object reference
|
||||
*/
|
||||
qTabMeasurement(qDetectorMain *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabMeasurement();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
/** To enable expert mode
|
||||
* @param enable to enable if true
|
||||
*/
|
||||
void SetExpertMode(bool enable);
|
||||
|
||||
/** Returns the status of the Start/Stop Acquisition button
|
||||
*/
|
||||
bool GetStartStatus(){return btnStartStop->isChecked();};
|
||||
|
||||
/** Click the Start/Stop Acquisition button
|
||||
* This is used if this command came from gui client
|
||||
*/
|
||||
void ClickStartStop(){btnStartStop->click();myPlot->SetClientInitiated();};
|
||||
|
||||
/** Returns progress bar value */
|
||||
int GetProgress(){return progressBar->value();};
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
/** update plot is finished,
|
||||
* changes start/stop text and enables/disables all widgets
|
||||
*/
|
||||
void UpdateFinished();
|
||||
|
||||
/** updates the current measurement
|
||||
* @param val the value to be updated
|
||||
*/
|
||||
void SetCurrentMeasurement(int val);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up the timing mode
|
||||
*/
|
||||
void SetupTimingMode();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/** Enables/Disables all the widgets
|
||||
*/
|
||||
void Enable(bool enable);
|
||||
|
||||
/** Validates before enabling or disabling probes */
|
||||
void EnableProbes();
|
||||
|
||||
/** Get timing mode from detector
|
||||
* @param startup is true when gui has just started up*/
|
||||
void GetModeFromDetector(bool startup = false);
|
||||
|
||||
/** Checks if acquisition period is greater than exposure time
|
||||
* and dsplays in red as a warning */
|
||||
void CheckAcqPeriodGreaterThanExp();
|
||||
|
||||
|
||||
private slots:
|
||||
/** Sets the timing mode
|
||||
* @ param mode cane be None, Auto, Gated, Trigger Exposure Series,
|
||||
* Trigger Frame, Trigger Readout, External Trigger Window
|
||||
*/
|
||||
void SetTimingMode(int mode);
|
||||
|
||||
/** Set number of measurements
|
||||
* @param num number of measurements to be set */
|
||||
void setNumMeasurements(int num);
|
||||
|
||||
/** Set file name
|
||||
*/
|
||||
void setFileName();
|
||||
|
||||
/** Set index of file name
|
||||
* @param index index of selection
|
||||
*/
|
||||
void setRunIndex(int index);
|
||||
|
||||
/** starts/stops Acquisition
|
||||
*/
|
||||
void startStopAcquisition();
|
||||
|
||||
/** Set number of frames
|
||||
* @param val number of frames to be set
|
||||
*/
|
||||
void setNumFrames(int val);
|
||||
|
||||
/** Set acquisition time
|
||||
*/
|
||||
void setExposureTime();
|
||||
|
||||
/** Set frame period between exposures
|
||||
*/
|
||||
void setAcquisitionPeriod();
|
||||
|
||||
/** Set number of triggers
|
||||
* @param val number of triggers to be set
|
||||
*/
|
||||
void setNumTriggers(int val);
|
||||
|
||||
/** Set delay
|
||||
*/
|
||||
void setDelay();
|
||||
|
||||
/** Set number of gates
|
||||
* @param val number of gates to be set
|
||||
*/
|
||||
void setNumGates(int val);
|
||||
|
||||
/** Set number of probes
|
||||
* @param val number of probes to be set
|
||||
*/
|
||||
void setNumProbes(int val);
|
||||
|
||||
/** Update progress*/
|
||||
void UpdateProgress();
|
||||
|
||||
/** Enable write to file */
|
||||
void EnableFileWrite(bool enable);
|
||||
|
||||
|
||||
private:
|
||||
/** parent widget */
|
||||
qDetectorMain *thisParent;
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/** The Plot widget */
|
||||
qDrawPlot *myPlot;
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
/** enum for the timing mode */
|
||||
enum{None, Auto, Trigger_Exp_Series, Trigger_Readout, Gated, Gated_Start, Burst_Trigger, NumTimingModes};
|
||||
/** timer to update the progress*/
|
||||
QTimer *progressTimer;
|
||||
/** tool tip variables*/
|
||||
QString acqPeriodTip;
|
||||
QString errPeriodTip;
|
||||
QPalette red;
|
||||
/** expert mode */
|
||||
bool expertMode;
|
||||
QIcon *iconStart;
|
||||
QIcon *iconStop;
|
||||
/** to access items in settings combobox */
|
||||
QStandardItemModel* model;
|
||||
|
||||
signals:
|
||||
void StartSignal();
|
||||
void StopSignal();
|
||||
void CheckPlotIntervalSignal();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABMEASUREMENT */
|
86
slsDetectorGui/include/qTabMessages.h
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* qTabMessages.h
|
||||
*
|
||||
* Created on: Jun 26, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABMESSAGES_H_
|
||||
#define QTABMESSAGES_H_
|
||||
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
|
||||
/** Project Class Headers */
|
||||
class qDetectorMain;
|
||||
/** Qt Include Headers */
|
||||
#include <QWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QEvent>
|
||||
#include <QPushButton>
|
||||
#include "qDebugStream.h"
|
||||
|
||||
/**
|
||||
*@short sets up the Messages parameters
|
||||
*/
|
||||
class qTabMessages:public QWidget{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param det the qDetectorMain class reference
|
||||
*/
|
||||
qTabMessages(qDetectorMain* m);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabMessages();
|
||||
|
||||
|
||||
private:
|
||||
/** The qDetectorMain object */
|
||||
qDetectorMain *myMainTab;
|
||||
|
||||
/** Log of executed commands */
|
||||
QTextEdit *dispLog;
|
||||
|
||||
/** To save the log to file */
|
||||
QPushButton *btnSave;
|
||||
|
||||
/** To clear the log to file */
|
||||
QPushButton *btnClear;
|
||||
|
||||
/** This class creates the log */
|
||||
qDebugStream *qout;
|
||||
qDebugStream *qerr;
|
||||
|
||||
string errMsg;
|
||||
|
||||
/** methods */
|
||||
/** Sets up the widget */
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals */
|
||||
void Initialization();
|
||||
|
||||
private slots:
|
||||
/** Stream log to textedit in GUI */
|
||||
void customEvent(QEvent *e);
|
||||
|
||||
/** Save Log to File*/
|
||||
void SaveLog();
|
||||
|
||||
/** Clear Log to File*/
|
||||
void ClearLog();
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* QTABMESSAGES_H_ */
|
166
slsDetectorGui/include/qTabPlot.h
Normal file
@ -0,0 +1,166 @@
|
||||
/*
|
||||
* qTabPlot.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABPLOT_H_
|
||||
#define QTABPLOT_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_plot.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Project Class Headers */
|
||||
class qDrawPlot;
|
||||
/** Qt Include Headers */
|
||||
#include <QStackedLayout>
|
||||
#include <QButtonGroup>
|
||||
#include <QAbstractButton>
|
||||
|
||||
|
||||
/**
|
||||
*@short sets up the Plot parameters
|
||||
*/
|
||||
class qTabPlot:public QWidget, private Ui::TabPlotObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
* @param plot plot object reference
|
||||
*/
|
||||
qTabPlot(QWidget *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabPlot();
|
||||
|
||||
/** Sets the scan argument of the plot
|
||||
*/
|
||||
void SetScanArgument();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** The Plot widget */
|
||||
qDrawPlot *myPlot;
|
||||
|
||||
|
||||
/** 1d/2d plot */
|
||||
bool isOneD;
|
||||
bool isOriginallyOneD;
|
||||
|
||||
/**is set if its a possible wrong interval between plots*/
|
||||
bool wrongInterval;
|
||||
|
||||
QStackedLayout *stackedLayout;
|
||||
QSpinBox *spinNthFrame;
|
||||
QDoubleSpinBox *spinTimeGap;
|
||||
QComboBox *comboTimeGapUnit;
|
||||
QButtonGroup *btnGroupScan;
|
||||
QButtonGroup *btnGroupPlotType;
|
||||
QButtonGroup *btnGroupHistogram;
|
||||
|
||||
/** some Default Values */
|
||||
static QString defaultPlotTitle;
|
||||
static QString defaultHistXAxisTitle;
|
||||
static QString defaultHistYAxisTitle;
|
||||
static QString defaultImageXAxisTitle;
|
||||
static QString defaultImageYAxisTitle;
|
||||
static QString defaultImageZAxisTitle;
|
||||
|
||||
/** scans */
|
||||
static const QString modeNames[5];
|
||||
|
||||
/** error palette*/
|
||||
QPalette *red;
|
||||
QString intervalTip;
|
||||
|
||||
|
||||
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
|
||||
public slots:
|
||||
/** Set frequency between plots*/
|
||||
void SetFrequency();
|
||||
|
||||
/** Enable Scan box
|
||||
*/
|
||||
void EnableScanBox();
|
||||
|
||||
|
||||
private slots:
|
||||
/** Selects the plot to display, enables/disables widgets
|
||||
* @param b true to select plot dimension 1, else false to select 2D
|
||||
*/
|
||||
void Select1DPlot(bool b);
|
||||
|
||||
/**Enables Persistency depending on Superimpose checkbox */
|
||||
void EnablePersistency(bool enable);
|
||||
|
||||
/**Sets the titles in plot axis */
|
||||
void SetTitles();
|
||||
|
||||
/** Enables/Sets default Titles to default */
|
||||
void EnableTitles();
|
||||
|
||||
/** Enables range of the axes */
|
||||
void EnableRange();
|
||||
|
||||
/** Sets the range of the x and y axes */
|
||||
void SetAxesRange();
|
||||
|
||||
/** Sets the range of the z axis */
|
||||
void SetZRange();
|
||||
|
||||
/** Enables the range of the z axis */
|
||||
void EnableZRange();
|
||||
|
||||
/** Return true if valid */
|
||||
bool CheckZRange(QString value);
|
||||
|
||||
/** Set Plot to none, data graph, histogram*/
|
||||
void SetPlot();
|
||||
|
||||
/** Change pages in plot options box to the right*/
|
||||
void SetPlotOptionsRightPage();
|
||||
|
||||
/** Change pages in plot options box to the left*/
|
||||
void SetPlotOptionsLeftPage();
|
||||
|
||||
/** Plot binary plot */
|
||||
void SetBinary();
|
||||
|
||||
/** Set histogram options */
|
||||
void SetHistogramOptions();
|
||||
|
||||
signals:
|
||||
void DisableZoomSignal(bool);
|
||||
void SetZRangeSignal(double,double);
|
||||
void ResetZMinZMaxSignal(bool,bool,double,double);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABPLOT_H_ */
|
116
slsDetectorGui/include/qTabSettings.h
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* qTabSettings.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABSETTINGS_H_
|
||||
#define QTABSETTINGS_H_
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_settings.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QStandardItemModel>
|
||||
|
||||
/**
|
||||
*@short sets up the Settings parameters
|
||||
*/
|
||||
class qTabSettings:public QWidget, private Ui::TabSettingsObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** \short The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabSettings(QWidget *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
~qTabSettings();
|
||||
|
||||
/** To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
/** To enable expert mode
|
||||
* @param enable to enable if true
|
||||
*/
|
||||
void SetExpertMode(bool enable){expertMode = enable;};
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
/** expert mode */
|
||||
bool expertMode;
|
||||
|
||||
enum{Standard,Fast,HighGain,DynamicGain,LowGain,MediumGain,VeryHighGain,LowNoise,
|
||||
DynamicHG0,FixGain1,FixGain2,ForceSwitchG1,ForceSwitchG2, VeryLowGain,
|
||||
Undefined,Uninitialized,NumSettings};
|
||||
|
||||
/** To be able to index items on a combo box */
|
||||
QStandardItemModel* model;
|
||||
QModelIndex index[NumSettings];
|
||||
QStandardItem* item[NumSettings];
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up the detector settings
|
||||
*/
|
||||
void SetupDetectorSettings();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/** Gets the dynamic range and sets it on the gui
|
||||
* @param setvalue the value set by the gui when used as a check
|
||||
*/
|
||||
void GetDynamicRange(int setvalue = -1);
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** Set settings according to selection
|
||||
* @param index index of selection
|
||||
*/
|
||||
void setSettings(int index);
|
||||
|
||||
/** Set number of modules if possible
|
||||
* @param index number of modules
|
||||
*/
|
||||
void SetNumberOfModules(int index);
|
||||
|
||||
/** Set dynamic range if possible
|
||||
* @param index selection
|
||||
*/
|
||||
void SetDynamicRange(int index);
|
||||
|
||||
/** Set threshold energy
|
||||
*/
|
||||
void SetEnergy();
|
||||
|
||||
|
||||
signals:
|
||||
/**Update Trimbits after Set Settings */
|
||||
void UpdateTrimbitSignal(int);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABSETTINGS_H_ */
|