Changeset 11179
- Timestamp:
- 06/24/11 15:46:00 (14 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11177 r11179 390 390 DimStampedInfo fDimFadConnections; 391 391 DimStampedInfo fDimFadFwVersion; 392 DimStampedInfo fDimFadDNA; 392 393 DimStampedInfo fDimFadStatus; 393 394 DimStampedInfo fDimFadStatistics; … … 1112 1113 1113 1114 SetLedColor(fFadLedFwVersion, d.qos?kLedGreen:kLedOrange, d.time); 1115 } 1116 1117 void handleFadDNA(const DimData &d) 1118 { 1119 if (!CheckSize(d, 40*sizeof(uint64_t))) 1120 return; 1121 1122 const uint64_t *ptr = d.ptr<uint64_t>(); 1123 1124 ostringstream tip; 1125 tip << "<table width='100%'>"; 1126 tip << "<tr><th>Crate</th><td></td><th>Board</th><td></td><th>DNA</th></tr>"; 1127 1128 for (int i=0; i<40; i++) 1129 { 1130 tip << dec; 1131 tip << "<tr>"; 1132 tip << "<td align='center'>" << i/10 << "</td><td>:</td>"; 1133 tip << "<td align='center'>" << i%10 << "</td><td>:</td>"; 1134 tip << hex; 1135 tip << "<td>0x" << setfill('0') << setw(16) << ptr[i] << "</td>"; 1136 tip << "</tr>"; 1137 } 1138 tip << "</table>"; 1139 1140 fFadDNA->setText(tip.str().c_str()); 1114 1141 } 1115 1142 … … 1971 1998 return PostInfoHandler(&FactGui::handleFadFwVersion); 1972 1999 2000 if (getInfo()==&fDimFadDNA) 2001 return PostInfoHandler(&FactGui::handleFadDNA); 2002 1973 2003 if (getInfo()==&fDimFadStatus) 1974 2004 return PostInfoHandler(&FactGui::handleFadStatus); … … 2415 2445 fDimFadConnections ("FAD_CONTROL/CONNECTIONS", (void*)NULL, 0, this), 2416 2446 fDimFadFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", (void*)NULL, 0, this), 2447 fDimFadDNA ("FAD_CONTROL/DNA", (void*)NULL, 0, this), 2417 2448 fDimFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, this), 2418 2449 fDimFadStatistics ("FAD_CONTROL/STATISTICS", (void*)NULL, 0, this) -
trunk/FACT++/gui/design.ui
r11176 r11179 52 52 </property> 53 53 <property name="currentIndex"> 54 <number> 0</number>54 <number>3</number> 55 55 </property> 56 56 <property name="documentMode"> … … 4464 4464 </property> 4465 4465 </widget> 4466 <widget class="QTextEdit" name=" textEdit">4466 <widget class="QTextEdit" name="fFadDNA"> 4467 4467 <property name="geometry"> 4468 4468 <rect> 4469 4469 <x>10</x> 4470 <y> 310</y>4471 <width> 181</width>4472 <height> 51</height>4470 <y>280</y> 4471 <width>271</width> 4472 <height>81</height> 4473 4473 </rect> 4474 4474 </property> … … 4477 4477 <property name="geometry"> 4478 4478 <rect> 4479 <x> 20</x>4480 <y>2 90</y>4479 <x>10</x> 4480 <y>260</y> 4481 4481 <width>57</width> 4482 4482 <height>15</height> … … 4852 4852 <property name="geometry"> 4853 4853 <rect> 4854 <x>3 70</x>4854 <x>300</x> 4855 4855 <y>180</y> 4856 4856 <width>161</width> … … 4868 4868 <property name="geometry"> 4869 4869 <rect> 4870 <x> 540</x>4871 <y>1 70</y>4870 <x>470</x> 4871 <y>180</y> 4872 4872 <width>18</width> 4873 4873 <height>25</height> -
trunk/FACT++/src/EventBuilderWrapper.h
r11177 r11179 722 722 DimDescribedService fDimFwVersion; 723 723 DimDescribedService fDimStatus; 724 DimDescribedService fDimDNA; 724 725 DimDescribedService fDimStatistics; 725 726 … … 742 743 fDimFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", "F:43", ""), 743 744 fDimStatus ("FAD_CONTROL/STATUS", "S:42", ""), 745 fDimDNA ("FAD_CONTROL/DNA", "X:40", ""), 744 746 fDimStatistics ("FAD_CONTROL/STATISTICS", "X:8", ""), 745 747 fDebugStream(false), fDebugRead(false) … … 1453 1455 { 1454 1456 const pair<bool, boost::array<uint16_t,43>> ver = Compare(&h, &h.fVersion); 1455 //Print("Ver", ver);1456 1457 1457 1458 pair<bool, boost::array<float,43>> data; … … 1467 1468 } 1468 1469 1470 /* 1471 uint16_t fTriggerType; 1472 uint32_t fTriggerId; 1473 uint32_t fEventCounter; 1474 uint32_t fFreqRefClock; 1475 uint16_t fAdcClockPhaseShift; 1476 uint16_t fNumTriggersToGenerate; 1477 uint16_t fTriggerGeneratorPrescaler; 1478 uint64_t fDNA; // Xilinx DNA 1479 uint32_t fTimeStamp; 1480 uint32_t fRunNumber; 1481 int16_t fTempDrs[kNumTemp]; // In units of 1/16 deg(?) 1482 uint16_t fDac[kNumDac]; 1483 */ 1484 1469 1485 if (old.fTriggerType != h.fTriggerType) 1470 1486 { … … 1477 1493 const pair<bool, boost::array<uint32_t,43>> run = Compare(&h, &h.fRunNumber); 1478 1494 Print("Run", run); 1495 } 1496 1497 if (old.fDNA != h.fDNA) 1498 { 1499 const pair<bool, boost::array<uint64_t,43>> dna = Compare(&h, &h.fDNA); 1500 fDimDNA.setData(const_cast<uint64_t*>(dna.second.data())+3, 40*sizeof(uint64_t)); 1501 fDimDNA.updateService(); 1479 1502 } 1480 1503 -
trunk/FACT++/src/fad.cc
r11161 r11179 324 324 fHeader.fBoardId = (fBoardId%10) | ((fBoardId/10)<<8); 325 325 fHeader.fRunNumber = 1; 326 fHeader.fDNA = reinterpret_cast<uint64_t>(this); 326 327 fHeader.fStatus = 0xf<<12 | 327 328 FAD::EventHeader::kDenable | … … 330 331 FAD::EventHeader::kDcmReady | 331 332 FAD::EventHeader::kSpiSclk; 333 332 334 333 335 fStartTime = Time(Time::utc).UnixTime();
Note:
See TracChangeset
for help on using the changeset viewer.