@@ -10,6 +10,8 MainWindow::MainWindow(QWidget *parent) | |||||
10 | totalOfPackets = 0; |
|
10 | totalOfPackets = 0; | |
11 |
|
11 | |||
12 | spectraPacketNormalSpectrumF0 = new SpectraPacket(0, 128); |
|
12 | spectraPacketNormalSpectrumF0 = new SpectraPacket(0, 128); | |
|
13 | spectraPacketNormalSpectrumF1 = new SpectraPacket(0, 128); | |||
|
14 | spectraPacketNormalSpectrumF2 = new SpectraPacket(0, 128); | |||
13 |
|
15 | |||
14 | //********* |
|
16 | //********* | |
15 | // wfPacket |
|
17 | // wfPacket | |
@@ -532,7 +534,9 void MainWindow::buildWFAndDisplay_CWF_F | |||||
532 | } |
|
534 | } | |
533 | } |
|
535 | } | |
534 |
|
536 | |||
535 |
void MainWindow::build_ASM_AndDisplay_NORM |
|
537 | void MainWindow::build_ASM_AndDisplay_NORM(TMPacketToRead *packet, SpectraPacket *spectraPacket, | |
|
538 | double deltaF, unsigned char indiceStart, | |||
|
539 | ASMPage* asmPage ) | |||
536 | { |
|
540 | { | |
537 | unsigned int i; |
|
541 | unsigned int i; | |
538 | unsigned int j; |
|
542 | unsigned int j; | |
@@ -541,7 +545,6 void MainWindow::build_ASM_AndDisplay_NO | |||||
541 | unsigned char cntASM; |
|
545 | unsigned char cntASM; | |
542 | unsigned char nrASM; |
|
546 | unsigned char nrASM; | |
543 | unsigned int blkNR; |
|
547 | unsigned int blkNR; | |
544 | double deltaF; |
|
|||
545 | unsigned int nbData; |
|
548 | unsigned int nbData; | |
546 |
|
549 | |||
547 | cntASM = packet->Value[22]; |
|
550 | cntASM = packet->Value[22]; | |
@@ -569,15 +572,14 void MainWindow::build_ASM_AndDisplay_NO | |||||
569 | aux[2] = data[ (i * 50 + 2*24) + 1]; |
|
572 | aux[2] = data[ (i * 50 + 2*24) + 1]; | |
570 | } |
|
573 | } | |
571 |
|
574 | |||
572 | deltaF = 24576. / 256. ; |
|
|||
573 | nbData = j + blkNR; |
|
575 | nbData = j + blkNR; | |
574 | if (nrASM == cntASM) |
|
576 | if (nrASM == cntASM) | |
575 | { |
|
577 | { | |
576 |
|
|
578 | asmPage->displayOnPlot(spectraPacket->s11, 0, indiceStart, deltaF, nbData); | |
577 |
|
|
579 | asmPage->displayOnPlot(spectraPacket->s22, 1, indiceStart, deltaF, nbData); | |
578 |
|
|
580 | asmPage->displayOnPlot(spectraPacket->s33, 2, indiceStart, deltaF, nbData); | |
579 |
|
|
581 | asmPage->displayOnPlot(spectraPacket->s44, 3, indiceStart, deltaF, nbData); | |
580 |
|
|
582 | asmPage->displayOnPlot(spectraPacket->s55, 4, indiceStart, deltaF, nbData); | |
581 | } |
|
583 | } | |
582 | } |
|
584 | } | |
583 |
|
585 | |||
@@ -690,7 +692,13 void MainWindow::preProcessPacket(TMPack | |||||
690 | buildWFAndDisplay_CWF_F2(packet, wfPacketSBM2); |
|
692 | buildWFAndDisplay_CWF_F2(packet, wfPacketSBM2); | |
691 | break; |
|
693 | break; | |
692 | case SID_NORMAL_ASM_F0: |
|
694 | case SID_NORMAL_ASM_F0: | |
693 |
build_ASM_AndDisplay_NORM |
|
695 | build_ASM_AndDisplay_NORM(packet, spectraPacketNormalSpectrumF0, 4096./256., ASM_F1_INDICE_START, this->UI->asmPage_F0 ); | |
|
696 | break; | |||
|
697 | case SID_NORMAL_ASM_F1: | |||
|
698 | build_ASM_AndDisplay_NORM(packet, spectraPacketNormalSpectrumF1, 4096./256., ASM_F1_INDICE_START, this->UI->asmPage_F1 ); | |||
|
699 | break; | |||
|
700 | case SID_NORMAL_ASM_F2: | |||
|
701 | build_ASM_AndDisplay_NORM(packet, spectraPacketNormalSpectrumF2, 256./256., ASM_F2_INDICE_START, this->UI->asmPage_F2 ); | |||
694 | break; |
|
702 | break; | |
695 | } |
|
703 | } | |
696 | } |
|
704 | } |
@@ -44,6 +44,7 public: | |||||
44 | void buildWFAndDisplay_CWF_F1(TMPacketToRead *packet, WFPacket *wfPacket); |
|
44 | void buildWFAndDisplay_CWF_F1(TMPacketToRead *packet, WFPacket *wfPacket); | |
45 | void buildWFAndDisplay_CWF_F2(TMPacketToRead *packet, WFPacket *wfPacket); |
|
45 | void buildWFAndDisplay_CWF_F2(TMPacketToRead *packet, WFPacket *wfPacket); | |
46 | void build_ASM_AndDisplay_NORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket); |
|
46 | void build_ASM_AndDisplay_NORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket); | |
|
47 | void build_ASM_AndDisplay_NORM(TMPacketToRead *packet, SpectraPacket *spectraPacket, double deltaF, unsigned char indiceStart, ASMPage *asmPage); | |||
47 |
|
48 | |||
48 | protected: |
|
49 | protected: | |
49 | void closeEvent(QCloseEvent *); |
|
50 | void closeEvent(QCloseEvent *); | |
@@ -88,6 +89,8 private: | |||||
88 | WFPacket *wfPacketSBM2; |
|
89 | WFPacket *wfPacketSBM2; | |
89 | WFPacket *wfPacketCWF_F3; |
|
90 | WFPacket *wfPacketCWF_F3; | |
90 | SpectraPacket *spectraPacketNormalSpectrumF0; |
|
91 | SpectraPacket *spectraPacketNormalSpectrumF0; | |
|
92 | SpectraPacket *spectraPacketNormalSpectrumF1; | |||
|
93 | SpectraPacket *spectraPacketNormalSpectrumF2; | |||
91 |
|
94 | |||
92 | bool parsingContinue; |
|
95 | bool parsingContinue; | |
93 |
|
96 |
@@ -27,11 +27,15 MainWindowUI::MainWindowUI(QWidget *pare | |||||
27 | wfPage_CWF_F2 = new WFPage(0, 8 * BLK_NR_CWF, 8 * BLK_NR_CWF, 15000); |
|
27 | wfPage_CWF_F2 = new WFPage(0, 8 * BLK_NR_CWF, 8 * BLK_NR_CWF, 15000); | |
28 | wfPage_CWF_F3 = new WFPage(0, 8 * BLK_NR_CWF, 8 * BLK_NR_CWF, 15000); |
|
28 | wfPage_CWF_F3 = new WFPage(0, 8 * BLK_NR_CWF, 8 * BLK_NR_CWF, 15000); | |
29 | asmPage_F0 = new ASMPage(0, NB_BINS_PER_ASM_F0, NB_BINS_PER_ASM_F0, 15000); |
|
29 | asmPage_F0 = new ASMPage(0, NB_BINS_PER_ASM_F0, NB_BINS_PER_ASM_F0, 15000); | |
|
30 | asmPage_F1 = new ASMPage(0, NB_BINS_PER_ASM_F1, NB_BINS_PER_ASM_F1, 15000); | |||
|
31 | asmPage_F2 = new ASMPage(0, NB_BINS_PER_ASM_F2, NB_BINS_PER_ASM_F2, 15000); | |||
30 |
|
32 | |||
31 | wfPage_CWF_F1->pageTitle = "SBM1_CWF_F1"; |
|
33 | wfPage_CWF_F1->pageTitle = "SBM1_CWF_F1"; | |
32 | wfPage_CWF_F2->pageTitle = "SBM2_CWF_F2"; |
|
34 | wfPage_CWF_F2->pageTitle = "SBM2_CWF_F2"; | |
33 | wfPage_CWF_F3->pageTitle = "NORM_CWF_F3"; |
|
35 | wfPage_CWF_F3->pageTitle = "NORM_CWF_F3"; | |
34 | asmPage_F0->pageTitle = "ASM_F0"; |
|
36 | asmPage_F0->pageTitle = "ASM_F0"; | |
|
37 | asmPage_F1->pageTitle = "ASM_F1"; | |||
|
38 | asmPage_F2->pageTitle = "ASM_F2"; | |||
35 | hkDisplay = new HKDisplay(); |
|
39 | hkDisplay = new HKDisplay(); | |
36 | recordPage = new RecordPage; |
|
40 | recordPage = new RecordPage; | |
37 |
|
41 | |||
@@ -107,6 +111,8 MainWindowUI::MainWindowUI(QWidget *pare | |||||
107 | spwTabWidget->addTab( wfPage_CWF_F2, tr("CWF_F2")); |
|
111 | spwTabWidget->addTab( wfPage_CWF_F2, tr("CWF_F2")); | |
108 | spwTabWidget->addTab( wfPage_CWF_F3, tr("CWF_F3")); |
|
112 | spwTabWidget->addTab( wfPage_CWF_F3, tr("CWF_F3")); | |
109 | spwTabWidget->addTab( asmPage_F0, tr("ASM_F0")); |
|
113 | spwTabWidget->addTab( asmPage_F0, tr("ASM_F0")); | |
|
114 | spwTabWidget->addTab( asmPage_F1, tr("ASM_F1")); | |||
|
115 | spwTabWidget->addTab( asmPage_F2, tr("ASM_F2")); | |||
110 |
|
116 | |||
111 | spwTabWidgetPage0->setLayout(mainLayout); |
|
117 | spwTabWidgetPage0->setLayout(mainLayout); | |
112 | spwTabWidgetPage1->setLayout(tmStatistics->layout()); |
|
118 | spwTabWidgetPage1->setLayout(tmStatistics->layout()); | |
@@ -154,6 +160,16 MainWindowUI::MainWindowUI(QWidget *pare | |||||
154 | this->asmPage_F0, SLOT(storeWfrm())); |
|
160 | this->asmPage_F0, SLOT(storeWfrm())); | |
155 | connect(this->recordPage, SIGNAL(signal_defaultStorageDirectoryUpdated(QString)), |
|
161 | connect(this->recordPage, SIGNAL(signal_defaultStorageDirectoryUpdated(QString)), | |
156 | this->asmPage_F0, SLOT(setDefaultStorageDirectory(QString))); |
|
162 | this->asmPage_F0, SLOT(setDefaultStorageDirectory(QString))); | |
|
163 | // ASM_F1 | |||
|
164 | connect(this->recordPage, SIGNAL(signal_store_asm_f1()), | |||
|
165 | this->asmPage_F1, SLOT(storeWfrm())); | |||
|
166 | connect(this->recordPage, SIGNAL(signal_defaultStorageDirectoryUpdated(QString)), | |||
|
167 | this->asmPage_F1, SLOT(setDefaultStorageDirectory(QString))); | |||
|
168 | // ASM_F2 | |||
|
169 | connect(this->recordPage, SIGNAL(signal_store_asm_f2()), | |||
|
170 | this->asmPage_F2, SLOT(storeWfrm())); | |||
|
171 | connect(this->recordPage, SIGNAL(signal_defaultStorageDirectoryUpdated(QString)), | |||
|
172 | this->asmPage_F2, SLOT(setDefaultStorageDirectory(QString))); | |||
157 |
|
173 | |||
158 | emit this->recordPage->signal_defaultStorageDirectoryUpdated(this->recordPage->defaultStorageDirectory); |
|
174 | emit this->recordPage->signal_defaultStorageDirectoryUpdated(this->recordPage->defaultStorageDirectory); | |
159 | } |
|
175 | } |
@@ -46,6 +46,8 public: | |||||
46 | WFPage* wfPage_CWF_F2; |
|
46 | WFPage* wfPage_CWF_F2; | |
47 | WFPage* wfPage_CWF_F3; |
|
47 | WFPage* wfPage_CWF_F3; | |
48 | ASMPage* asmPage_F0; |
|
48 | ASMPage* asmPage_F0; | |
|
49 | ASMPage* asmPage_F1; | |||
|
50 | ASMPage* asmPage_F2; | |||
49 | HKDisplay* hkDisplay; |
|
51 | HKDisplay* hkDisplay; | |
50 | RecordPage* recordPage; |
|
52 | RecordPage* recordPage; | |
51 |
|
53 |
@@ -12,6 +12,8 RecordPage::RecordPage(QWidget *parent) | |||||
12 | radiobutton_cwf_f2 = new QRadioButton("cwf_f2"); |
|
12 | radiobutton_cwf_f2 = new QRadioButton("cwf_f2"); | |
13 | radiobutton_cwf_f3 = new QRadioButton("cwf_f3"); |
|
13 | radiobutton_cwf_f3 = new QRadioButton("cwf_f3"); | |
14 | radiobutton_asm_f0 = new QRadioButton("asm_f0"); |
|
14 | radiobutton_asm_f0 = new QRadioButton("asm_f0"); | |
|
15 | radiobutton_asm_f1 = new QRadioButton("asm_f1"); | |||
|
16 | radiobutton_asm_f2 = new QRadioButton("asm_f2"); | |||
15 |
|
17 | |||
16 | radiobutton_swf_f0->setAutoExclusive(false); |
|
18 | radiobutton_swf_f0->setAutoExclusive(false); | |
17 | radiobutton_swf_f1->setAutoExclusive(false); |
|
19 | radiobutton_swf_f1->setAutoExclusive(false); | |
@@ -20,6 +22,8 RecordPage::RecordPage(QWidget *parent) | |||||
20 | radiobutton_cwf_f2->setAutoExclusive(false); |
|
22 | radiobutton_cwf_f2->setAutoExclusive(false); | |
21 | radiobutton_cwf_f3->setAutoExclusive(false); |
|
23 | radiobutton_cwf_f3->setAutoExclusive(false); | |
22 | radiobutton_asm_f0->setAutoExclusive(false); |
|
24 | radiobutton_asm_f0->setAutoExclusive(false); | |
|
25 | radiobutton_asm_f1->setAutoExclusive(false); | |||
|
26 | radiobutton_asm_f2->setAutoExclusive(false); | |||
23 |
|
27 | |||
24 | label_currentDir = new QLabel("Current Dir: -"); |
|
28 | label_currentDir = new QLabel("Current Dir: -"); | |
25 |
|
29 | |||
@@ -48,6 +52,8 RecordPage::RecordPage(QWidget *parent) | |||||
48 |
|
52 | |||
49 |
|
53 | |||
50 | vboxlayout_matrices->addWidget(radiobutton_asm_f0); |
|
54 | vboxlayout_matrices->addWidget(radiobutton_asm_f0); | |
|
55 | vboxlayout_matrices->addWidget(radiobutton_asm_f1); | |||
|
56 | vboxlayout_matrices->addWidget(radiobutton_asm_f2); | |||
51 | vboxlayout_matrices->addStretch(); |
|
57 | vboxlayout_matrices->addStretch(); | |
52 |
|
58 | |||
53 | vboxlayout_directory->addWidget(button_storeWfrm); |
|
59 | vboxlayout_directory->addWidget(button_storeWfrm); | |
@@ -107,6 +113,8 void RecordPage::storeWfrm() | |||||
107 | if (radiobutton_cwf_f2->isChecked()) emit signal_store_cwf_f2(); |
|
113 | if (radiobutton_cwf_f2->isChecked()) emit signal_store_cwf_f2(); | |
108 | if (radiobutton_cwf_f3->isChecked()) emit signal_store_cwf_f3(); |
|
114 | if (radiobutton_cwf_f3->isChecked()) emit signal_store_cwf_f3(); | |
109 | if (radiobutton_asm_f0->isChecked()) emit signal_store_asm_f0(); |
|
115 | if (radiobutton_asm_f0->isChecked()) emit signal_store_asm_f0(); | |
|
116 | if (radiobutton_asm_f1->isChecked()) emit signal_store_asm_f0(); | |||
|
117 | if (radiobutton_asm_f2->isChecked()) emit signal_store_asm_f0(); | |||
110 | radiobutton_swf_f0->setEnabled(false); |
|
118 | radiobutton_swf_f0->setEnabled(false); | |
111 | radiobutton_swf_f1->setEnabled(false); |
|
119 | radiobutton_swf_f1->setEnabled(false); | |
112 | radiobutton_swf_f2->setEnabled(false); |
|
120 | radiobutton_swf_f2->setEnabled(false); | |
@@ -114,6 +122,8 void RecordPage::storeWfrm() | |||||
114 | radiobutton_cwf_f2->setEnabled(false); |
|
122 | radiobutton_cwf_f2->setEnabled(false); | |
115 | radiobutton_cwf_f3->setEnabled(false); |
|
123 | radiobutton_cwf_f3->setEnabled(false); | |
116 | radiobutton_asm_f0->setEnabled(false); |
|
124 | radiobutton_asm_f0->setEnabled(false); | |
|
125 | radiobutton_asm_f1->setEnabled(false); | |||
|
126 | radiobutton_asm_f2->setEnabled(false); | |||
117 | } |
|
127 | } | |
118 | else |
|
128 | else | |
119 | { |
|
129 | { | |
@@ -127,6 +137,8 void RecordPage::storeWfrm() | |||||
127 | if (radiobutton_cwf_f2->isChecked()) emit signal_store_cwf_f2(); |
|
137 | if (radiobutton_cwf_f2->isChecked()) emit signal_store_cwf_f2(); | |
128 | if (radiobutton_cwf_f3->isChecked()) emit signal_store_cwf_f3(); |
|
138 | if (radiobutton_cwf_f3->isChecked()) emit signal_store_cwf_f3(); | |
129 | if (radiobutton_asm_f0->isChecked()) emit signal_store_asm_f0(); |
|
139 | if (radiobutton_asm_f0->isChecked()) emit signal_store_asm_f0(); | |
|
140 | if (radiobutton_asm_f1->isChecked()) emit signal_store_asm_f1(); | |||
|
141 | if (radiobutton_asm_f2->isChecked()) emit signal_store_asm_f2(); | |||
130 | radiobutton_swf_f0->setEnabled(true); |
|
142 | radiobutton_swf_f0->setEnabled(true); | |
131 | radiobutton_swf_f1->setEnabled(true); |
|
143 | radiobutton_swf_f1->setEnabled(true); | |
132 | radiobutton_swf_f2->setEnabled(true); |
|
144 | radiobutton_swf_f2->setEnabled(true); | |
@@ -134,6 +146,8 void RecordPage::storeWfrm() | |||||
134 | radiobutton_cwf_f2->setEnabled(true); |
|
146 | radiobutton_cwf_f2->setEnabled(true); | |
135 | radiobutton_cwf_f3->setEnabled(true); |
|
147 | radiobutton_cwf_f3->setEnabled(true); | |
136 | radiobutton_asm_f0->setEnabled(true); |
|
148 | radiobutton_asm_f0->setEnabled(true); | |
|
149 | radiobutton_asm_f1->setEnabled(true); | |||
|
150 | radiobutton_asm_f2->setEnabled(true); | |||
137 | } |
|
151 | } | |
138 | } |
|
152 | } | |
139 |
|
153 |
@@ -33,6 +33,8 public: | |||||
33 | QRadioButton *radiobutton_cwf_f2; |
|
33 | QRadioButton *radiobutton_cwf_f2; | |
34 | QRadioButton *radiobutton_cwf_f3; |
|
34 | QRadioButton *radiobutton_cwf_f3; | |
35 | QRadioButton *radiobutton_asm_f0; |
|
35 | QRadioButton *radiobutton_asm_f0; | |
|
36 | QRadioButton *radiobutton_asm_f1; | |||
|
37 | QRadioButton *radiobutton_asm_f2; | |||
36 |
|
38 | |||
37 | QGroupBox *groupbox_waveforms; |
|
39 | QGroupBox *groupbox_waveforms; | |
38 | QGroupBox *groupbox_matrices; |
|
40 | QGroupBox *groupbox_matrices; | |
@@ -57,6 +59,8 signals: | |||||
57 | void signal_store_cwf_f2(); |
|
59 | void signal_store_cwf_f2(); | |
58 | void signal_store_cwf_f3(); |
|
60 | void signal_store_cwf_f3(); | |
59 | void signal_store_asm_f0(); |
|
61 | void signal_store_asm_f0(); | |
|
62 | void signal_store_asm_f1(); | |||
|
63 | void signal_store_asm_f2(); | |||
60 | void signal_defaultStorageDirectoryUpdated( QString nameOfTheDirectory ); |
|
64 | void signal_defaultStorageDirectoryUpdated( QString nameOfTheDirectory ); | |
61 |
|
65 | |||
62 | public slots: |
|
66 | public slots: |
General Comments 0
You need to be logged in to leave comments.
Login now