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