Compare commits

..

388 Commits
2.0.5 ... 2.1.0

Author SHA1 Message Date
3e8774798a Merge branch 'main-rc' into b2.1.0 2020-11-30 15:13:43 +01:00
975cbb576e Merge remote branch 'slsDetectorCalibration/2.1' into 2.1 2017-12-12 11:06:15 +01:00
4e429c0d77 Merge remote branch 'slsDetectorGui/2.1' into 2.1 2017-12-04 16:45:34 +01:00
bf4fab549d Merge remote branch 'slsReceiverSoftware/2.1' into 2.1 2017-12-04 16:45:34 +01:00
f7705eb1da Merge remote branch 'slsDetectorSoftware/2.1' into 2.1 2017-12-04 16:45:32 +01:00
839896c7e6 fixed the print file packet loss progress bug 2016-10-19 15:53:26 +02:00
4a7e246604 removed asking only 1 for framescaugh 2016-10-19 10:21:29 +02:00
7f293115c4 moved f_activate to receiver funcs from detectors funcs 2016-10-10 08:43:18 +02:00
f59f40a659 ask only 1 for frames caught for 9m 2016-10-10 08:41:03 +02:00
64fd82f92c fixed bug in gui that overwrites the individual sls file path values with the multi value, included a febl and febr temp read 2016-10-10 08:39:46 +02:00
cd232fd732 fixed bug in gui that overwrites the individual sls file path values with the multi value 2016-10-10 08:17:34 +02:00
572047b72d was making 3 threads for each set detector type command, because it created standard receiver object each time 2016-09-30 15:13:12 +02:00
4b7743b8ad update manual 2016-09-28 14:25:24 +02:00
953e513a2d updatereveiger 2016-09-22 17:18:35 +02:00
a7c180eb1c settings initially at UNINITIALIZED in eiger server 2016-09-22 17:16:49 +02:00
7745bf5e0c Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detectors_package into developer 2016-09-20 10:44:11 +02:00
8c88de899a added in gitignore to ignore build and tests 2016-09-20 10:43:59 +02:00
7a55866966 manual 2016-09-14 17:41:07 +02:00
1044fc68ab Merge branch 'cmake' of git.psi.ch:sls_detectors_software/sls_detectors_package into cmake 2016-09-02 16:28:28 +02:00
36904db3ca now GUI is compatible with qwt 6.1 2016-09-02 16:28:01 +02:00
4a7d7ec9e1 Merge branch 'developer' into cmake 2016-09-02 16:00:04 +02:00
c940607088 Merge branch '2.1-rc' into developer 2016-09-01 18:12:59 +02:00
d2240884b4 settings dir for eiger 2016-09-01 18:10:49 +02:00
90d2e6b82a eiger manual 2016-09-01 15:50:36 +02:00
61d347b45d FindQwt returns qwt verison
This can be used to check compatibility
2016-09-01 14:42:47 +02:00
13aa0599af add variable for GUI libraries 2016-09-01 12:05:59 +02:00
59d8584a9e README for compilation 2016-09-01 11:16:17 +02:00
0807e130e4 optionally build calibrationWizards 2016-09-01 11:14:29 +02:00
1a0550301b cmake config file from ROOT with compatibility fixes 2016-09-01 11:13:27 +02:00
316ed783a8 add cmake configuration 2016-08-31 20:49:58 +02:00
6adc373e18 Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer 2016-08-30 16:14:13 +02:00
8eea853a9a updaterev 2016-08-30 16:13:24 +02:00
aad1885bf5 updaterev 2016-08-30 16:13:18 +02:00
020e1b43f9 updaterev 2016-08-30 16:12:47 +02:00
13aa48e3ec Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer 2016-08-30 09:30:53 +02:00
d5f80831dd Changes to jctb server to correctly change the power supplies 2016-08-30 09:30:31 +02:00
5d52e41e37 adcs refresh only in developer tab 2016-08-24 17:10:07 +02:00
cf34103d1f Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer 2016-08-24 16:47:14 +02:00
079c7dc169 removed setup_beb.txt not required 2016-08-24 16:47:05 +02:00
1f7fbcfae2 adding the git ignore change for the .log, .aux etc and for the jctbgui 2016-08-24 12:02:01 +02:00
511d3e3970 Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer 2016-08-22 14:33:09 +02:00
c6c11f6740 Added v_a command for chiptestboard 2016-08-22 14:32:42 +02:00
3703d06684 Added section on GOTTHARD data format to the manual 2016-08-18 11:53:37 +02:00
08fd848504 updatereveiger 2016-08-18 10:31:10 +02:00
4ac7df5b90 Added section on GOTTHARD data format to the manual 2016-08-18 09:09:35 +02:00
d13a76af25 Merge branch 'developer' of git.psi.ch:sls_detectors_software/sls_detector_software into developer 2016-08-17 10:30:15 +02:00
e0c45f4afd solved paralel start bug. due to handshaking deficit in thread start 2016-08-17 10:29:47 +02:00
b90ca7b864 Added DACs for ne chiptestboard; fixed problem on dac14/highvoltage for moench 2016-08-16 15:15:24 +02:00
de8f04a058 removed jctb, use repository instead 2016-08-16 14:34:56 +02:00
fb8f49985b changes to test 2016-08-15 15:14:15 +02:00
597f5e5d2a got rid of unnecesaary handshaking for -1 in dynamic range in receiver 2016-08-15 11:15:52 +02:00
1f9dc775f6 ensure receiver is updated when detector timer values are updated (force_update) 2016-08-12 17:44:28 +02:00
882202c2bc fixed bug show nth frame as in 2nd, 4th etc. 2016-08-12 13:48:30 +02:00
5b5e1e32b3 updaterev 2016-08-12 11:14:57 +02:00
4c2d28943f rate correction fixed for gui, removed auto made it defalt 2016-08-11 13:59:36 +02:00
cf74f9b138 fixed rate correction to not include 16 bit dr 2016-08-08 15:50:37 +02:00
5d3e925ed4 compatible with gcc 5.3.1 amd 6.1.1 2016-08-03 17:50:54 +02:00
9139451127 added 2 gain settings to eigeR 2016-08-03 10:34:10 +02:00
180038e485 updaterev 2016-07-22 10:41:54 +02:00
86308352cb added more accurate temperature sensors for eiger, and to gui 2016-07-22 10:41:35 +02:00
843dbffcd8 updaterev 2016-07-18 17:19:18 +02:00
6e4d4eed0e updating versions 2016-07-06 10:32:55 +02:00
be516e34b2 updating versions 2016-07-05 17:24:43 +02:00
cc896bd99c updating versions 2016-07-05 17:23:00 +02:00
6b0814c907 updating versions 2016-07-04 15:49:43 +02:00
d4dd7b5d8c added burst_trigger mode for eiger to replace trigger_readout mode 2016-07-04 15:44:59 +02:00
7db1136e65 versions update 2016-06-13 19:10:38 +02:00
328139434d fixed the zooming in plot tab. if x andy axis zoom set, it didnt take it for next measurement 2016-05-11 17:21:27 +02:00
14c78dc500 Changed make to $(MAKE) in Makefile for parallel compiling 2016-05-04 14:15:00 +02:00
e7dbbf4c1f undefined enum fixed 2016-03-15 17:33:40 +01:00
6ad6c9e8bb fixed undefined gain enum to a large number 2016-03-15 16:10:10 +01:00
1633cc3f01 incorporated rate correction of eiger into gui 2016-02-17 18:04:24 +01:00
615909f178 Merge branch 'release' into jungfrauv1.0 2016-02-03 15:00:53 +01:00
1230b63b29 Merge branch 'release', remote branch 'origin' into release 2016-02-02 11:21:07 +01:00
d489b34824 Test commit, added a space in makefile 2016-02-02 10:49:40 +01:00
700346fbbe some changes for gui for settings for jungfrau 2015-12-01 17:15:41 +01:00
b803f3a32a works for jungfrau 2015-11-27 17:30:45 +01:00
8ecc795574 corrected settings for eiger;removed loqwnoise to lowgain 2015-11-13 13:48:30 +01:00
da809171e9 output dir multi for all 2015-10-26 11:31:56 +01:00
73ebb2750c Better commandline parsing 2015-10-23 12:03:19 +02:00
2ed8b46ad0 displaying subframe index in gui 2015-09-23 11:50:47 +02:00
754d0b7911 included set all trimbits 2015-09-10 12:53:18 +02:00
1c41ea8898 changes to includes clkdivider and flags in gui 2015-09-10 11:28:39 +02:00
5c5e9d349a zmin zmax change finish 2015-07-27 19:18:32 +02:00
b1a9689caf solved some zmax zmin problems with gui 2015-07-27 18:53:16 +02:00
2d8ee637dc adc update not stopped between acquisition 2015-07-22 10:35:26 +02:00
db5412e599 propix integrated into gui 2015-07-22 10:06:38 +02:00
a5e18833de git rev in 2015-06-29 16:55:51 +02:00
7b2934fb73 git version update 2015-06-16 11:56:58 +02:00
e035eeaf08 not compulsory anymore for every frame for eiger 2015-06-12 17:44:30 +02:00
e0de23dd45 threshold to set all vcmp dacs for eiger 2015-04-01 12:17:55 +02:00
85416acbea indiviual dac control for each detector enabled in gui 2015-04-01 12:05:09 +02:00
5c14453c5d fixed histogram issues 2015-03-13 11:20:00 +01:00
2c6f0c49a7 lets gui know if old plot 2015-03-12 13:45:45 +01:00
a37eb65dbc new argv set merged 2015-03-06 10:57:06 +01:00
b091b7e1a9 Smallish changes? 2015-03-06 10:44:07 +01:00
71ad7ae2f0 some pointers deleted equalled to null 2015-03-05 15:30:21 +01:00
848569b216 print receiver configurations and some error messages upon exit 2015-03-02 14:04:27 +01:00
3fa5191705 so that the dacs dont go negative in the gui, default timer reduced to 200ms so more frames can be shown 2015-02-23 15:26:14 +01:00
4a755d96ce revision update 2015-01-14 10:43:41 +01:00
8dc41efad2 changed to linux argument type with -- 2014-12-01 10:54:31 +01:00
9b8325bd37 Merge branch 'master' into eiger_receiver 2014-11-17 15:04:42 +01:00
5acb1419af the version given to esrf 2014-10-16 14:14:34 +02:00
3d4b2e9fee Merge branch 'eiger_receiver_temp' into eiger_receiver
Conflicts:
	client/Makefile
2014-09-12 16:22:59 +02:00
13a54224eb updating makefiles 2014-09-12 16:22:22 +02:00
056fb4e119 updating Makefile 2014-09-12 13:47:19 +02:00
baf65e8318 some clone changes and setting the gui image read frequency to be one for eiger in gui 2014-09-10 14:39:02 +02:00
92c56739d9 version 2014-09-09 17:01:25 +02:00
0d66e62d10 fixed histogram for trimbits and threshold 2014-09-09 15:46:36 +02:00
705a25c9e0 fixed moench dac error 2014-08-29 16:42:26 +02:00
c33657f04d histogram for 2d and s curves 2014-08-05 11:30:36 +02:00
8a26eef0bf scans for 2d detectors should read every frame 2014-07-31 12:14:09 +02:00
7c58d3db46 enabling 10Gbe for eiger, advanced settings and also mV for dacs for all detectors 2014-07-11 12:56:11 +02:00
4d9bbeecc3 eiger receiver, receiving many packets at a time, with 16,8, 4 bitmode sort of working 2014-07-02 10:57:03 +02:00
b256e0b9e3 included eiger dacs to gui 2014-06-18 16:39:11 +02:00
0eaecc0e12 git version history 2014-06-03 13:56:39 +02:00
c985124b51 git version history 2014-06-03 12:07:35 +02:00
891c67f3d0 added gitignore for gui 2014-05-23 14:52:12 +02:00
ea1878f848 changes in makefile to make a separate receiver 2014-05-20 17:17:20 +02:00
9c5e2aa5b7 compiling with and without root defined in makefile.include
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@269 af1100a4-978c-4157-bff7-07162d2ba061
2014-04-09 10:29:11 +00:00
02c4a5e18e Makefile sala refined
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@268 af1100a4-978c-4157-bff7-07162d2ba061
2014-04-07 15:50:23 +00:00
bf2d8937f4 got rid of trigger frame and trigger window to merge with other timing modes
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@267 af1100a4-978c-4157-bff7-07162d2ba061
2014-03-26 14:06:59 +00:00
ef983c151f small variation
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@266 af1100a4-978c-4157-bff7-07162d2ba061
2014-03-26 10:07:27 +00:00
36171dc5a0 changed #triggers to #frames for trigger frame and trigger window for eiger
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@265 af1100a4-978c-4157-bff7-07162d2ba061
2014-03-13 14:19:43 +00:00
6d708e620a changed #triggers to #frames for trigger frame and trigger window for eiger
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@264 af1100a4-978c-4157-bff7-07162d2ba061
2014-03-13 14:13:58 +00:00
c338de941d bug fix changing prbes did not change other items as planned, signal lost
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@263 af1100a4-978c-4157-bff7-07162d2ba061
2014-03-04 14:18:07 +00:00
e7d22b1b39 compression enabled in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@262 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-27 10:53:27 +00:00
d0b12f4197 fixed a bug in measurement tab
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@261 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-12 09:23:56 +00:00
69524e61f4 does not refresh measurement tab upon clicking start
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@260 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-10 17:01:34 +00:00
7ebd1643ee made measurement tab faster, not too many checks anymore
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@259 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-10 16:20:17 +00:00
f768886308 tried to reduce the time to refresh measurement and settings tab
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@258 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-07 12:33:07 +00:00
534be9f942 file dialogs now show option to show all files, trimbits is possible to open non existing file, copying clones does not get rid of the old plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@257 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-05 16:37:05 +00:00
28e0cae2e2 rescaled histogram plotting
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@256 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-04 11:22:58 +00:00
32e4af910d to reduce warning in between plotting
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@255 af1100a4-978c-4157-bff7-07162d2ba061
2014-02-03 13:10:53 +00:00
922c7ede92 removed an extra settings check
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@254 af1100a4-978c-4157-bff7-07162d2ba061
2014-01-31 16:32:31 +00:00
78e6dccf46 fixed angular conversion crashing problem and got rid of unnecssary prints
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@253 af1100a4-978c-4157-bff7-07162d2ba061
2014-01-31 14:12:14 +00:00
f738b218e1 svn rev updates
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@252 af1100a4-978c-4157-bff7-07162d2ba061
2014-01-30 17:52:00 +00:00
a1c58f152f got rid of unncessary printouts and MyApplication inqDetectorMain does not work.so bak to original
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@251 af1100a4-978c-4157-bff7-07162d2ba061
2014-01-30 17:50:41 +00:00
635a33ea85 fixed bug when trimming
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@250 af1100a4-978c-4157-bff7-07162d2ba061
2014-01-28 12:20:43 +00:00
3731bfd51e removed checkinfinity flags
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@249 af1100a4-978c-4157-bff7-07162d2ba061
2013-12-17 10:31:54 +00:00
5c1574ec90 updated binary of 2d to be negative an update the label enabling before each acquisition if disabled
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@248 af1100a4-978c-4157-bff7-07162d2ba061
2013-11-25 16:57:57 +00:00
6956ee3164 getting back to basics in zooming, using a flag to check for angle error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@247 af1100a4-978c-4157-bff7-07162d2ba061
2013-11-25 16:00:35 +00:00
9f92f5cffa getting back to basics in zooming, using a flag to check for angle error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@246 af1100a4-978c-4157-bff7-07162d2ba061
2013-11-25 15:59:30 +00:00
d421c0c9fe checked in threshold changes to binary
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@245 af1100a4-978c-4157-bff7-07162d2ba061
2013-10-14 08:33:40 +00:00
c32acebc35 fixed problem of period beign recalculated for each refresh
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@244 af1100a4-978c-4157-bff7-07162d2ba061
2013-10-10 09:09:55 +00:00
b9fcbf4697 changed order to pedestal binary then accumulate, also fxed a bug in that
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@243 af1100a4-978c-4157-bff7-07162d2ba061
2013-10-09 10:37:49 +00:00
c7bc397098 changed 1d line color to black
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@242 af1100a4-978c-4157-bff7-07162d2ba061
2013-10-04 08:58:10 +00:00
4c662270cd fixed zooming problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@241 af1100a4-978c-4157-bff7-07162d2ba061
2013-10-02 16:41:50 +00:00
38570080b9 revered changed to old version for negative threshold
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@240 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-25 08:52:15 +00:00
a06a4ef8d7 reverted to old version for negative threshold
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@239 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-25 08:50:36 +00:00
5e4e52936b spin poxes can get negative values for binary plotting
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@238 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-24 13:29:06 +00:00
e3df740901 bug fix filename with an underscore was a problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@237 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-20 13:11:57 +00:00
e7633f1e04 let threshold take negative numbers fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@236 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-20 10:25:40 +00:00
05d4290ace included stoptimer bug fix and also screwing up period updates in measurement tab
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@235 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-18 15:29:21 +00:00
790966e3dd semaphores , no usleep in receiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@234 af1100a4-978c-4157-bff7-07162d2ba061
2013-09-04 13:10:18 +00:00
e6c94a1d62 fixed the zooming problems for 2d
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@233 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-29 15:15:24 +00:00
88f0b089b4 fixed the zooming problems for 2d
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@232 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-28 15:17:36 +00:00
3c30ef71cf fixed the zooming problems for 2d
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@231 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-28 15:02:17 +00:00
22de76c8b0 histogram included, improved ready every frame, and other stuff.. a working version
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@230 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-27 15:47:07 +00:00
d9444121b7 pedestal correction
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@229 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-16 14:07:46 +00:00
061bd4251c pedestalbug fixed, trylock changed to lock, binary has qtip
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@228 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-16 13:48:03 +00:00
3c92f26be7 fixed some probelems wuth scans for receiver and also scans for allframes/frameindex
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@227 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-16 12:59:48 +00:00
505328bcaa displaying statistics works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@226 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-13 10:30:13 +00:00
eb48b1c492 checking if probes or threshold ..shouldnt check if its the wrong detector unnecessary err printouts
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@225 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-12 12:21:49 +00:00
440b244b66 checking conditions before trimming and settings include low noise now, so a few changes
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@224 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-12 10:28:42 +00:00
f2a77be1b2 layoutthreshold was disabled for mythen, changed that
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@223 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-08 14:30:10 +00:00
113ee269d4 added trimming checks
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@222 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-08 13:39:36 +00:00
038d3c11df set maximum number for probes in gui as 3
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@221 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-08 09:56:15 +00:00
1274b5532c set maximum number for probes in gui as 3
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@220 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-08 09:54:29 +00:00
daae091945 a HUGE number of changes in measurement tab, and changes probes to be still disabled until #frames>1 and set cycles to 1 if probes >1
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@219 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-08 09:53:28 +00:00
d6dccef65c added the tip that probes are enabled only in expert mode
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@218 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-07 09:36:42 +00:00
35d7359403 qdefs message changed everything from \n to <br>, helps for gray source as html
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@217 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-06 07:22:50 +00:00
ae35542193 ask before disabling file write and fixed the ccorrect source for it
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@216 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-05 15:36:36 +00:00
2c8df98bf8 included the error message source to debug errors because of too many slots and signals
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@215 af1100a4-978c-4157-bff7-07162d2ba061
2013-08-05 14:57:40 +00:00
4f2f7639af changed the start and stop receiver error messages to be displayed to the client and not jsus recever
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@214 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-30 14:55:17 +00:00
9cdbd74471 changed the start and stop receiver error messages to be displayed to the client and not jsus recever
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@213 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-30 14:50:01 +00:00
16b8bb967c proceed anyway if outdir doesnt exist implmented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@212 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-25 09:23:38 +00:00
676fe91e57 change outdir for all receivers in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@211 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-24 13:17:47 +00:00
57e801e5ea change outdir for all receivers in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@210 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-24 09:43:09 +00:00
77aec59da9 change outdir for all receivers in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@209 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-24 09:39:30 +00:00
68f360e395 change outdir for all receivers in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@208 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-24 09:38:55 +00:00
27a21cc258 change outdir for non receivers in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@207 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-24 08:31:30 +00:00
6ea6f44824 verifying output directory works for receiver based detectors.. before acquisition
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@206 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-23 08:39:15 +00:00
b6145510ad refresh output dir requires output dir to be set to really check if it exists
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@205 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-19 10:10:11 +00:00
d84f95456b included accumulate, pedestal and binary
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@204 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-17 14:54:42 +00:00
12f48fb0d2 form used ampersand
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@203 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-12 12:44:23 +00:00
bca0799b84 fixed gui bug: time interval must be set before acquisition
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@202 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-12 10:27:16 +00:00
0aef2f3b81 updated svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@201 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-12 09:25:05 +00:00
f618ed439d svn updated
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@200 af1100a4-978c-4157-bff7-07162d2ba061
2013-07-11 09:07:14 +00:00
390ca76130 small change in config file err msg
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@199 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-25 11:30:54 +00:00
c0e735c0b9 updated svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@198 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-21 14:28:45 +00:00
019b231a8c update svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@197 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-19 09:34:58 +00:00
6dfa75430c svn info
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@196 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-12 10:24:55 +00:00
d49a5cd7b4 bug fix: after cloning, signals still ocnnected
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@195 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-07 11:16:53 +00:00
378f7715b9 update svn number
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@194 af1100a4-978c-4157-bff7-07162d2ba061
2013-06-03 08:18:34 +00:00
b915844822 2d pedestal implemented
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@193 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-28 07:04:53 +00:00
4f1dfe8b87 2d pedestal implemented
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@192 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-28 06:45:56 +00:00
1129702738 changed the receiver to be te one deicing frame factor, not gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@191 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-27 09:34:39 +00:00
141a982878 update svn rev
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@190 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-27 09:11:45 +00:00
6aeacf7b13 ordered the makefile a bit, needs more revising
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@189 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-23 12:26:08 +00:00
014dfd7eed receiver read frequency from gui can be set now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@188 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-21 13:43:30 +00:00
b0d8739439 update svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@187 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-17 10:20:45 +00:00
bf77cc10b2 small change
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@186 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-17 10:20:19 +00:00
7624d301a4 changed dac names for monech
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@185 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-16 12:12:51 +00:00
0e22e9c03c updated version
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@184 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-15 15:09:02 +00:00
acbb4774fc updated svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@183 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-15 13:28:01 +00:00
a843661d1b updated svn
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@182 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-15 13:27:00 +00:00
4214ef6be0 changed the tab order for the forms
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@181 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-15 13:07:07 +00:00
287a451904 optimized the plot a bit
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@180 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-15 12:50:11 +00:00
4fdacefdbe getting rid of undefined state in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@179 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-13 13:47:05 +00:00
e153c6fd58 fixed zmin zmax bug, automatically online when refreshing advanced tab bug, outdir not checking properly
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@178 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-08 17:32:38 +00:00
7701531ff3 fixed the undefined state of gui when acquisition stopped
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@177 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-07 14:20:43 +00:00
8e19beb410 changed to trackertextF for qwt6 to show z value for 2d plots
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@176 af1100a4-978c-4157-bff7-07162d2ba061
2013-05-06 15:04:24 +00:00
675ab8ceca bad channel not read on refresh or start up, makefile reverted to compile
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@175 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-30 15:05:21 +00:00
35f151775e some debugging at the beamline, still crashing sl6 64bit, angular conversion etc.
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@174 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-30 11:26:22 +00:00
4719fff09a sample 2d plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@173 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-16 14:52:27 +00:00
c605c77037 adjusted gui for moench and proper 2d plots, which are not scans for 1ds
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@172 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-16 13:43:28 +00:00
050bec703d defining everything to reduce null pointer errors, fixed zooming problem for scans
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@171 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-10 13:34:52 +00:00
d56b2b480b edited the gui makefile to be able to compile withot errors from this directory
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@170 af1100a4-978c-4157-bff7-07162d2ba061
2013-04-04 07:23:19 +00:00
10e47581e0 gui_client more stable with 2 servers for stop and acquire
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@169 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-21 09:27:16 +00:00
303d84b24a reduced gui_client crashes
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@168 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-19 16:00:38 +00:00
b7629f6c67 included a flag to print log or not
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@167 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-15 08:11:52 +00:00
ebd6a9131b check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@166 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:53:24 +00:00
b0534f194a check error message in between implemented in gui, uncommented the displaying messages part
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@165 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:51:10 +00:00
7352407968 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@164 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:50:49 +00:00
3e81c16f38 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@163 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:50:41 +00:00
9e1029185f check error message in between implemented in gui, also fixed wrong ports being set:control:stop
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@162 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:48:30 +00:00
db1aaf041a check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@161 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:47:19 +00:00
4ac8439202 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@160 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:46:35 +00:00
f809657ec4 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@159 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:45:49 +00:00
bef3745693 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@158 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:39:21 +00:00
5c78f148b6 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@157 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:38:57 +00:00
7675b47474 check error message in between implemented in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@156 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:38:33 +00:00
3e4f76ed07 slsdet clear errormask fixed, qmessage not printing and displog fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@155 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-13 15:36:37 +00:00
ab41ffb6bf there was a gap between start and get status
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@154 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-06 10:16:48 +00:00
448f333b1e changed the makefiles a bit to be included in slsDetectorsPAckage make
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@153 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-06 09:41:21 +00:00
499cf4db56 forgot client makefile for gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@152 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-06 09:21:15 +00:00
8a87f17811 included makefile changes for gui client
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@151 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-06 09:18:46 +00:00
22b51032dd client connecting to gui serveR done
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@150 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-04 15:27:57 +00:00
863b662c6b gui client works for just getting status
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@149 af1100a4-978c-4157-bff7-07162d2ba061
2013-03-01 13:21:07 +00:00
2fc324ab4b made advanced tab detector dependent. each set mac adress etc is done via slsdetector and not multi
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@148 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-26 08:35:20 +00:00
0682d23abd made advanced tab detector dependent. each set mac adress etc is done via slsdetector and not multi
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@147 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-26 08:34:47 +00:00
642d7d8c74 previous checkin is not a working version
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@146 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-22 09:54:06 +00:00
4814962347 included setroi for multidet
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@145 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-21 16:00:44 +00:00
f3eb9c924f included network tab in gui, correctedmulti to be able to clear sls detectors error mask,included coud not set up network parameter error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@144 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-07 17:34:16 +00:00
aec136cf21 added error mask properly inherited by base; mask exist only for cannot connect to detector, receiver and could not configure mac
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@143 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-06 15:23:35 +00:00
1d1e5e1202 included shortframe in gui for time being its just adc selection
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@142 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-31 15:42:04 +00:00
6b311f931b included shortframe in gui for time being its just adc selection
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@141 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-31 15:34:31 +00:00
2ead554b7b fixed browse to show in red when disabled browse button for receiver, got rid of error message showing,
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@140 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-31 11:15:38 +00:00
64208d5edd dataoutput browse button disabled help in red
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@139 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-22 09:45:24 +00:00
0c529e09fb with all the svn revisions
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@138 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-16 13:59:41 +00:00
b10fedb8f3 cleared data in gui at beginning
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@137 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-16 10:19:14 +00:00
b94e9475a0 also catches cerr now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@136 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-15 17:36:04 +00:00
bb46b9afce also catches cerr now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@135 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-15 17:28:59 +00:00
6a3747638d also catches cerr now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@134 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-15 17:11:54 +00:00
ac79bb86fb initialized everything in gui to get rid of the initialization error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@133 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-11 17:21:37 +00:00
0b05f67f9d included sls defs in every file so that int is 32 bit
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@132 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-11 09:59:29 +00:00
74654b1ebc got rid of the weird ui look, which was due to windows style from afs
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@131 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-08 16:28:32 +00:00
6560a325ce no change
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@130 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-08 14:05:49 +00:00
c21d674e89 changed uint in qDebugStream so that qtabmessages work on 64bit machine
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@129 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-18 16:33:30 +00:00
dbad2a41d8 git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@128 af1100a4-978c-4157-bff7-07162d2ba061 2012-12-18 15:21:09 +00:00
dd7385cd88 included -f in config file
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@127 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-18 14:34:48 +00:00
b59b54e004 got rid of segmentation fault while loading settings file which didnt refresh actions tab etc
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@126 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-18 12:07:45 +00:00
46a4fee083 included the revision change
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@125 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-17 16:39:25 +00:00
5bb8bc4574 svn version headers generated, but not yet implemented in the code
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@124 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-17 15:51:44 +00:00
adc52782f8 gui svninfo added to script
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@123 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-14 13:45:38 +00:00
4ccb47203e manual removed from makefiile
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@122 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-13 11:36:50 +00:00
27ef53da4a made some change in static member used as index to avoid compile time error with new gcc
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@121 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-05 08:48:57 +00:00
1e705df5dc docs
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@120 af1100a4-978c-4157-bff7-07162d2ba061
2012-12-04 15:46:18 +00:00
bbb6e21607 included pedestal and also moved the frame index out of graph so it doesnt keep moving
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@119 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-30 17:05:06 +00:00
382554afe9 included spacebar as a shortcut to start and stop acq
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@118 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-30 09:51:52 +00:00
0b8f6cc925 changed the check for is a file using stat and not looking for a dot in file name
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@117 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-26 15:54:22 +00:00
95741a1c33 project file finally ok
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@116 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-22 10:11:54 +00:00
90e219d402 makefile again
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@115 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-22 08:29:47 +00:00
29a9678d3b makefile changed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@114 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-21 09:01:33 +00:00
832287af9e fixed filedir for gotthard receiver problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@113 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-15 13:53:08 +00:00
f201a6a32b for receiver, display frame number since not in filename
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@112 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-15 11:18:56 +00:00
7a6bba3c77 fixed the problem with multiple frame scan, frame index and file index included in gui
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@111 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-14 13:39:04 +00:00
6e529f1c06 warings suppressed (directly with flag in .pro)
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@110 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-14 11:37:40 +00:00
854015532e gotthard works with receiver without tcp lock
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@109 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-12 15:47:55 +00:00
ba923b55b7 updated gui to work with receiver, start and stop receiver, show progress using callback
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@108 af1100a4-978c-4157-bff7-07162d2ba061
2012-11-07 17:01:24 +00:00
716b3530e8 zero value in 2D plot set to BG, logZ does not crash any longer (?)
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@107 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-25 08:37:18 +00:00
80e0cd7fa1 qwtsrc was commented out in pro file
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@106 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-24 11:52:55 +00:00
d083d80a29 got rid of sample plot for 2d again
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@105 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-24 11:47:20 +00:00
3759b48c6e editted QDrawPlot to include sample plot just before they do a 2d scan
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@104 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-24 11:35:16 +00:00
07ff5ce42d Some problems with LogZ solved, but stil crashing when unsetting logZ
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@103 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-24 10:39:05 +00:00
3e979fdece finally works also with qwt6 - 2D plot color scales changed to root's
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@102 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-24 09:44:31 +00:00
1d03067bd5 works with qwt5, but qwt6 except for 2D plots
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@101 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-23 10:30:32 +00:00
8715a416a0 Changes for Qwt6, but 2D plot still does not work...and should be checked if Qwt5 still works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@100 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-22 15:34:14 +00:00
6cec748335 added the buttons
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@99 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-22 14:10:32 +00:00
04e04db2ad problem with segmentation fault when trying to capture config loading logs at start:fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@98 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-19 10:21:56 +00:00
ce110a79c8 some small changes to comly with qt4.7 version..but it still does not work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@97 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-18 15:28:57 +00:00
34b3a8b01b bugfix: catching config count at the beginning caused it to crash. now it works without crashing. still to catch cerr output
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@96 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-16 09:44:09 +00:00
e104b1d529 messages capture config output, still to find a way to capture all cerr output
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@95 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-16 08:29:44 +00:00
863662a5eb enhancement: logy with arrow buttons
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@94 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-12 14:12:20 +00:00
353e9baa78 got rid of some unnecessary coutlines in plotting by dhanya
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@93 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-12 12:16:58 +00:00
4ada872aaa histogram for 1d detectors without scan implemened
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@92 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-12 11:58:47 +00:00
51faab3c7c enhancement:nth frame changed to red, instead of error and changing it back
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@91 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-11 09:17:54 +00:00
19b6ca2eda enhancement:nth frame changed to red, instead of error and changing it back
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@90 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-11 08:57:09 +00:00
f4dc6aab22 enhancement:nth frame changed to red, instead of error and changing it back
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@89 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-11 08:36:11 +00:00
ad171a3257 enhancement:plotting interval changed to red for error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@88 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-10 15:42:23 +00:00
55f7145b1b bugfix:settings undefined and uninitialized not disabled anymore
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@87 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-10 12:12:00 +00:00
87410f09de check if outdir exists,indent Actions,degreeC,cascode,thresholdscan(ev),not saving data secondary title,got rid of 2d sampledata
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@86 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-10 10:25:31 +00:00
b703e52563 bug fix: got rid of title as measurement,as it should be empty
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@85 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-08 09:01:20 +00:00
918765e06f bug fix:output directory did not set when using browse. solved
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@84 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-01 16:00:39 +00:00
9fc66d571e bug fix: run index, plots only new data, lockimage for clone
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@83 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-01 15:45:47 +00:00
7eb48a300d bug fix: time interval disabled when angular conversion disabled.solved
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@82 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-01 09:36:39 +00:00
887303c820 bug fix: time interval disabled when angular conversion disabled.solved
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@81 af1100a4-978c-4157-bff7-07162d2ba061
2012-10-01 09:36:25 +00:00
87f79a9327 without very verbose
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@80 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 17:05:38 +00:00
1eb07b31f6 bug fix: plot tab refresh doesnt change plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@79 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 16:55:33 +00:00
bdabf9e649 bug fix: update measurement index, update index does not use sharedmemory, start run index updated after measurement
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@78 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 16:08:10 +00:00
cfce337c46 bug fix:scans: backward scan plotting works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@77 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 15:51:29 +00:00
f4bd585ba2 bug fix:scans: backward scan plotting works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@76 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 15:41:37 +00:00
bc5fddbe1e bug fix: tabactions: positions disabled label color
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@75 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 14:30:36 +00:00
c506fcf739 script fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@74 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 13:47:25 +00:00
4e4b8b9beb ang conversion enables positions without having to do refresh
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@73 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 13:05:07 +00:00
4143c648d8 bug fixed: constant scan widget: use red label to indicate wrong to, numsteps neednt be an integer
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@72 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 12:52:49 +00:00
d56780d906 bug fixed: must wait to get data for scans
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@71 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 11:44:49 +00:00
e6e991bc64 fixed constant scan widget problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@70 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 11:34:18 +00:00
bf8a1ec0d2 fixed constant scan widget problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@69 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 11:31:15 +00:00
a79c5c6183 fixed advanced tab, optimize settings, threshold and exposure time enabling, histogram plotting crashing
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@68 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-25 07:22:04 +00:00
197de5c995 checked in the change about config file at the very start of gui and gui version
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@67 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-21 10:14:03 +00:00
96c805f7bf Makefile with clean label addded
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@66 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-21 08:37:34 +00:00
1273a3b1a1 added images
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@65 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-21 08:32:47 +00:00
cd0d1976bc changed qw dir
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@64 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-20 10:19:27 +00:00
8c250ed26a modified makefile
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@63 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-20 10:12:05 +00:00
12eeebb439 done
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@62 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-20 09:25:44 +00:00
4f1c03c879 removed possible chances of a shared memory access during acquisition, start button to entable tabs, to refresh plot tab and startstoptoggle
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@61 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-19 15:10:28 +00:00
d01852892b done
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@60 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-19 14:40:27 +00:00
ee264e9b56 change filename in plot only when you get to plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@59 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-17 12:20:01 +00:00
34d20aa712 change filename in plot only when you get to plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@58 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-17 12:12:25 +00:00
4527e9f61b should be completely done except for mods in mythen for debuggin
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@57 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-14 15:19:09 +00:00
38451caa7c should all be done now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@56 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-14 14:55:53 +00:00
62b14f4199 fixed gettrimbits, histogram(still more),start stop,scans,not accessign shared memory duign acquisition
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@55 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-12 15:44:23 +00:00
f7078c3700 updated number of measurements to be taken from the detector class
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@54 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-10 17:55:44 +00:00
b85e03adfd included images
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@53 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-07 16:33:24 +00:00
c9db2c4272 included images
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@52 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-07 16:29:32 +00:00
a4a0237711 trim tab works except for graph
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@51 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-07 08:17:16 +00:00
b67f3a83d8 stop signal works, call back works, number of probes to expert mode, angular works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@50 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-05 08:42:03 +00:00
e32c1de0af stop signal works, call back works, number of probes to expert mode, angular works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@49 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-05 07:33:55 +00:00
63fadd3633 added color to collapse in actions, changed angular for number of data to be received, corrected constant size scan widget
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@48 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-04 10:30:18 +00:00
a754e419fe loading and saving trimbits and calibration file works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@47 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-03 09:35:01 +00:00
f0217ce9b1 loading and saving trimbits and calibration file works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@46 af1100a4-978c-4157-bff7-07162d2ba061
2012-09-03 09:25:09 +00:00
a25b74c9ab angle done, more of trimming...save, load, yet to fix number of probes
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@45 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-31 15:09:13 +00:00
4686cb9c0e the angles should work now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@44 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-30 16:45:11 +00:00
c4d478484b deleted some forms not used
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@43 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-30 08:35:45 +00:00
fa5817ab77 constant size scan widget works properly now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@42 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-30 08:28:16 +00:00
86ccd014ab included position scan
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@41 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-29 09:07:05 +00:00
c9ecec183f included position scan
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@40 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-29 09:06:49 +00:00
51e7feb605 the scans work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@39 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-27 14:50:59 +00:00
ee3a54601c the scans work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@38 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-27 14:11:58 +00:00
73152572a5 a rough idea of a scan is implemented with all frames
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@37 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-21 16:52:41 +00:00
cc176ea404 updated plot to show index instead of frame number
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@36 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-21 12:05:22 +00:00
1ce04ef785 updated plot to show index instead of frame number
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@35 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-21 11:53:23 +00:00
40af9384b5 fixed the losing focus too often problem in rangeSizeWidget for scanwidget
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@34 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-17 14:31:47 +00:00
6c19d75359 included high voltage for developer tab in gotthard
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@33 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-17 13:16:02 +00:00
b21b4d066c included high voltage for developer tab in gotthard
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@32 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-17 13:12:08 +00:00
685e236828 energy calibration is not needed anymore
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@31 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-17 10:37:06 +00:00
92406bf6a8 energy calibration is not needed anymore
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@30 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-17 10:35:39 +00:00
423a47cd9e git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@29 af1100a4-978c-4157-bff7-07162d2ba061 2012-08-17 10:29:46 +00:00
30c11d7589 fixed the dac problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@28 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-15 17:21:05 +00:00
63bfdb9cb9 dacs and adcs work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@27 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-08 17:10:44 +00:00
a47d0a57f6 finished getting dacs and adcs..need to set it
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@26 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-07 19:11:54 +00:00
72c52de2fe included checkbox for enable file write
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@25 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-07 12:20:50 +00:00
bcb4710477 changed such that getdata returns if not really necessary to copy
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@24 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-07 10:19:15 +00:00
e88e24178c scans work as of now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@23 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-06 16:15:33 +00:00
2dbdf8ff17 fixed bugs to do with stacked trace and fixed file input range for scan
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@22 af1100a4-978c-4157-bff7-07162d2ba061
2012-08-03 16:52:21 +00:00
63f9d04981 actions without scan, positions, min plotimer=250,acquisition problem,error showing in actions tab
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@21 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-27 10:01:35 +00:00
111608bdc8 included number of triggers for number of measurements, script and parameters work for non scan types
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@20 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-24 15:39:36 +00:00
3b59d03526 going to start actions
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@19 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-19 14:20:51 +00:00
d2b9b6ae1d interval between plots work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@18 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-11 17:06:12 +00:00
6fb45c6c4b set current measurement dont work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@17 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-04 15:09:29 +00:00
81ac62dd49 no plot histogram, messages work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@16 af1100a4-978c-4157-bff7-07162d2ba061
2012-07-04 13:39:30 +00:00
ec0878d008 created messages tab-not working completely yet
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@15 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-28 08:35:21 +00:00
824da9d4c4 snapshot works,id works, conversion from seconds to ms,us etc works, number of measurements works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@14 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-26 15:06:55 +00:00
b3de7a9051 made number of measurements static
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@13 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-20 15:26:31 +00:00
31b65642cb The timing mode works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@12 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-20 15:02:35 +00:00
69e6500522 All the ranges of the axes work properly without zooming in and out each time
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@11 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-19 15:01:40 +00:00
8246154032 Setting axes range and enabling/disabling zooming functionalities successfull
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@10 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-15 12:10:54 +00:00
2b02f94fe3 small changes from the meeting
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@9 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-08 10:21:30 +00:00
ef41286bf0 Got rid of tabAction form
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@8 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-06 15:45:46 +00:00
06ec6558a1 Got rid of tabAction form
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@7 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-06 15:44:33 +00:00
7a218418d1 Version 1 with the action tab working
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@6 af1100a4-978c-4157-bff7-07162d2ba061
2012-06-06 15:23:55 +00:00
20cc6d9a90 done with save plot and all resizing options
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@5 af1100a4-978c-4157-bff7-07162d2ba061
2012-05-29 16:49:30 +00:00
216a9ada7c made some changes to make clone and main window resize plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@4 af1100a4-978c-4157-bff7-07162d2ba061
2012-05-29 08:26:49 +00:00
4624c65398 made some changes to make clone and main window resize plot
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@3 af1100a4-978c-4157-bff7-07162d2ba061
2012-05-29 08:24:03 +00:00
934bbbd0c8 resize works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@2 af1100a4-978c-4157-bff7-07162d2ba061
2012-05-23 16:00:35 +00:00
9f851d6156 Creating Classes, Libraries and Functions for the Common SLS Detector GUI
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@1 af1100a4-978c-4157-bff7-07162d2ba061
2012-05-21 16:00:26 +00:00
179 changed files with 39066 additions and 7872 deletions

7
.gitignore vendored
View File

@ -8,3 +8,10 @@ slsReceiverSoftware/
slsDetectorCalibration/
slsImageReconstruction/
.settings
JCTBGui/
*.aux
*.log
*.out
*.toc
build
tests

21
CMakeLists.txt Normal file
View 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()

View File

@ -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;
}

View File

@ -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.*

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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();
}

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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();
}
}

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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 */

View File

@ -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;

View File

@ -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:
;
}
}

View File

@ -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

View File

@ -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());
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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;
}

View File

@ -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
View 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
View 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
View 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
View 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()

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +0,0 @@
3538.73 389.187
3499.86 374.654
3462.84 364.88
3514.72 381.02

View File

@ -0,0 +1,4 @@
3381.13 493.21
3385.45 490.36
3374.03 492.96
3363.40 483.72

Binary file not shown.

View File

@ -1,4 +0,0 @@
3538.73 389.187
3499.86 374.654
3462.84 364.88
3514.72 381.02

View File

@ -0,0 +1,4 @@
3323.57 124.58
3336.87 124.85
3302.45 123.64
3338.19 124.44

Binary file not shown.

5
slsDetectorGui/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
Makefile.gui
forms/include/
mocs/
objs/
qrc_icons.cpp

59
slsDetectorGui/Makefile Normal file
View 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)

View 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)

View 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;
}

View 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
View 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

View 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>

View 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>&amp;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>&amp;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>&amp;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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Left Click :zoom in&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Righ&lt;/span&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;t Click &lt;/span&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;: zoom out by 1&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Middle Click : panning&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#00007f;&quot;&gt;Ctrl+Right Click : zoom out to full size&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</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>&amp;Load &amp;Setup</string>
</property>
<property name="font">
<font/>
</property>
</action>
<action name="actionSaveSetup">
<property name="text">
<string>&amp;Save &amp;Setup</string>
</property>
<property name="font">
<font/>
</property>
</action>
<action name="actionMeasurementWizard">
<property name="text">
<string>&amp;Measurement Wizard</string>
</property>
</action>
<action name="actionOpenConfiguration">
<property name="text">
<string>&amp;Load &amp;Configuration</string>
</property>
</action>
<action name="actionSaveConfiguration">
<property name="text">
<string>&amp;Save &amp;Configuration</string>
</property>
</action>
<action name="actionEnergyCalibration">
<property name="text">
<string>&amp;Energy Calibration</string>
</property>
</action>
<action name="actionAngularCalibration">
<property name="text">
<string>&amp;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>&amp;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>&amp;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>&amp;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>&amp;Configuration</string>
</property>
</action>
<action name="actionVersion">
<property name="text">
<string>&amp;Version</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>&amp;About</string>
</property>
</action>
<action name="actionDockable">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>D&amp;ockable Windows</string>
</property>
</action>
<action name="actionLoadTrimbits">
<property name="text">
<string>&amp;Load &amp;Trimbits</string>
</property>
</action>
<action name="actionSaveTrimbits">
<property name="text">
<string>&amp;Save &amp;Trimbits</string>
</property>
</action>
<action name="actionLoadCalibration">
<property name="text">
<string>&amp;Load C&amp;alibration</string>
</property>
</action>
<action name="actionSaveCalibration">
<property name="text">
<string>&amp;Save C&amp;alibration</string>
</property>
</action>
<action name="actionListenGuiClient">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Listen to Gui Client</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>

View 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>&lt;nobr&gt;
Defines scan range for a &lt;b&gt;Constant Step Size&lt;/b&gt; with the following constraints:
&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;
1. &lt;b&gt;Number of Steps&lt;/b&gt; &gt;=2.
&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;
2. &lt;b&gt;Size&lt;/b&gt; not equal to 0.
&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;
3. &lt;b&gt;From&lt;/b&gt; not equal to &lt;b&gt;To&lt;/b&gt;.
&lt;/nobr&gt;&lt;br&gt;</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>&lt;nobr&gt;Measures only at specific values listed by the user.&lt;/nobr&gt;&lt;br&gt;
&lt;nobr&gt;Number of entries is restricted to &lt;b&gt;Number of Steps&lt;/b&gt; field.&lt;/nobr&gt;</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>&lt;nobr&gt;Measures only at the specific values listed in a file.&lt;/nobr&gt;&lt;br&gt;
&lt;nobr&gt;Select the file, where these values are listed.&lt;/nobr&gt;</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>

File diff suppressed because it is too large Load Diff

View 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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Compression using Root. Available only for Gotthard in Expert Mode.
&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;
#r_compression#
&lt;/nobr&gt;</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>&lt;nobr&gt;
Compression using Root. Available only for Gotthard in Expert Mode.
&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;
#r_compression#
&lt;/nobr&gt;</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>&lt;nobr&gt;
Directory where one saves the data.
&lt;/nobr&gt;&lt;br&gt;
#outdir#
&lt;br&gt;
</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>

View 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>

File diff suppressed because it is too large Load Diff

View 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>

File diff suppressed because it is too large Load Diff

View 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>

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

View 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
//

View 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 ""
//

View 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>

View 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_ */

View 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_ */

View 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_ */

View 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:&nbsp;&nbsp; ") + 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 */

View 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 */

View 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 */

View 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_ */

View 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 */

View 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_ */

View 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_ */

View 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_ */

View 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_ */

View 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_ */

View 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 */

View 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_ */

View 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_ */

View 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_ */

Some files were not shown because too many files have changed in this diff Show More