Changeset 11175
- Timestamp:
- 06/24/11 14:19:43 (14 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11174 r11175 390 390 DimStampedInfo fDimFadConnections; 391 391 DimStampedInfo fDimFadFwVersion; 392 DimStampedInfo fDimFadPllLock;393 DimStampedInfo fDimFadDrsEnabled;394 392 DimStampedInfo fDimFadStatus; 395 393 DimStampedInfo fDimFadStatistics; … … 1115 1113 SetLedColor(fFadLedFwVersion, d.qos?kLedGreen:kLedOrange, d.time); 1116 1114 } 1117 /* 1118 void handleFadPllLock(const DimData &d) 1119 { 1120 if (!CheckSize(d, 41*sizeof(uint8_t))) 1121 return; 1122 1123 // SetLedColor(fFadLedPllLock, d.qos?kLedGreen:kLedOrange, d.time); 1124 1125 const uint8_t *ptr = d.ptr<uint8_t>(); 1126 1127 ostringstream tip; 1128 tip << "<table border='1'><tr><th colspan='11'>" << Time().GetAsStr() << "</th></tr><tr><th></th>"; 1129 for (int b=0; b<10; b++) 1130 tip << "<th>" << b << "</th>"; 1131 tip << "</tr>"; 1132 1133 for (int c=0; c<4; c++) 1134 { 1135 tip << "<tr><th>" << c << "</th>"; 1136 for (int b=0; b<10; b++) 1137 { 1138 tip << "<td>" 1139 << (int)(ptr[c*10+b+1]&8) 1140 << (int)(ptr[c*10+b+1]&4) 1141 << (int)(ptr[c*10+b+1]&2) 1142 << (int)(ptr[c*10+b+1]&1) 1143 << "</td>"; 1144 } 1145 tip << "</tr>"; 1146 } 1147 tip << "</table>"; 1148 1149 fFadLedPllLock->setToolTip(tip.str().c_str()); 1150 } 1151 1152 void handleFadDrsEnabled(const DimData &d) 1153 { 1154 if (!CheckSize(d, 41*sizeof(uint8_t))) 1155 return; 1156 1157 const uint8_t *ptr = d.ptr<uint8_t>(); 1158 1159 // SetLedColor(fFadLedDrsEnabled, d.qos?(ptr[0]?kLedGreen:kLedRed):kLedOrange, d.time); 1160 1161 ostringstream tip; 1162 tip << "<table border='1'><tr><th colspan='11'>" << Time().GetAsStr() << "</th></tr><tr><th></th>"; 1163 for (int b=0; b<10; b++) 1164 tip << "<th>" << b << "</th>"; 1165 tip << "</tr>"; 1166 1167 for (int c=0; c<4; c++) 1168 { 1169 tip << "<tr><th>" << c << "</th>"; 1170 for (int b=0; b<10; b++) 1171 { 1172 tip << "<td>" 1173 << (ptr[c*10+b+1]?"on":"off") 1174 << "</td>"; 1175 } 1176 tip << "</tr>"; 1177 } 1178 tip << "</table>"; 1179 1180 fFadLedDrsEnabled->setToolTip(tip.str().c_str()); 1181 1182 } 1183 */ 1115 1184 1116 void SetFadLed(QPushButton *led, const DimData &d, uint16_t bitmask) 1185 1117 { … … 2024 1956 return PostInfoHandler(&FactGui::handleFadFwVersion); 2025 1957 2026 // if (getInfo()==&fDimFadPllLock)2027 // return PostInfoHandler(&FactGui::handleFadPllLock);2028 2029 // if (getInfo()==&fDimFadDrsEnabled)2030 // return PostInfoHandler(&FactGui::handleFadDrsEnabled);2031 2032 1958 if (getInfo()==&fDimFadStatus) 2033 1959 return PostInfoHandler(&FactGui::handleFadStatus); … … 2474 2400 fDimFadConnections ("FAD_CONTROL/CONNECTIONS", (void*)NULL, 0, this), 2475 2401 fDimFadFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", (void*)NULL, 0, this), 2476 fDimFadPllLock ("FAD_CONTROL/PLL_LOCK", (void*)NULL, 0, this),2477 fDimFadDrsEnabled ("FAD_CONTROL/DRS_ENABLED", (void*)NULL, 0, this),2478 2402 fDimFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, this), 2479 2403 fDimFadStatistics ("FAD_CONTROL/STATISTICS", (void*)NULL, 0, this) -
trunk/FACT++/src/EventBuilderWrapper.h
r11174 r11175 721 721 DimDescribedService fDimEventData; 722 722 DimDescribedService fDimFwVersion; 723 //DimDescribedService fDimPllLock;724 //DimDescribedService fDimDrsEnabled;725 //DimDescribedService fDimTriggerLine;726 //DimDescribedService fDimContinousTrigger;727 //DimDescribedService fDimSocket;728 723 DimDescribedService fDimStatus; 729 724 DimDescribedService fDimStatistics; … … 740 735 EventBuilderWrapper(MessageImp &imp) : fMsg(imp), 741 736 fFileFormat(kRaw), fMaxRun(0), 742 fDimFiles ("FAD_CONTROL/FILES", "X:1", ""), 743 fDimRuns ("FAD_CONTROL/RUNS", "I:1", ""), 744 fDimEvents("FAD_CONTROL/EVENTS", "I:2", ""), 745 fDimCurrentEvent("FAD_CONTROL/CURRENT_EVENT", "I:1", ""), 746 fDimEventData("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:2;S:1;S", ""), 747 fDimFwVersion("FAD_CONTROL/FIRMWARE_VERSION", "F:43", ""), 748 //fDimPllLock("FAD_CONTROL/PLL_LOCK", "C:41", ""), 749 //fDimDrsEnabled("FAD_CONTROL/DRS_ENABLED", "C:41", ""), 750 //fDimTriggerLine("FAD_CONTROL/TRIGGER_LINE", "C:41", ""), 751 //fDimContinousTrigger("FAD_CONTROL/CONTINOUS_TRIGGER", "C:41", ""), 752 //fDimBusy("FAD_CONTROL/BUSY", "C:41", ""), 753 fDimStatus("FAD_CONTROL/STATUS", "S:42", ""), 754 fDimStatistics("FAD_CONTROL/STATISTICS", "X:8", ""), 737 fDimFiles ("FAD_CONTROL/FILES", "X:1", ""), 738 fDimRuns ("FAD_CONTROL/RUNS", "I:1", ""), 739 fDimEvents ("FAD_CONTROL/EVENTS", "I:2", ""), 740 fDimCurrentEvent("FAD_CONTROL/CURRENT_EVENT", "I:1", ""), 741 fDimEventData ("FAD_CONTROL/EVENT_DATA", "S:1;I:1;S:1;I:2;S:1;S", ""), 742 fDimFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", "F:43", ""), 743 fDimStatus ("FAD_CONTROL/STATUS", "S:42", ""), 744 fDimStatistics ("FAD_CONTROL/STATISTICS", "X:8", ""), 755 745 fDebugStream(false), fDebugRead(false) 756 746 { … … 1488 1478 Print("Run", run); 1489 1479 } 1490 /* 1491 if (old.PLLLCK() != h.PLLLCK()) 1492 { 1493 const pair<bool, boost::array<uint16_t,43>> pll = Compare(&h, &h.fStatus, 0xf<<12, 12); 1494 pair<bool, boost::array<uint8_t,41>> data; 1495 data.first = pll.first; 1496 data.second[0] = pll.second[1]; 1497 for (int i=0; i<40; i++) 1498 data.second[i+1] = pll.second[i+3]; 1499 Update(fDimPllLock, data); 1500 } 1501 1502 if (old.HasDenable() != h.HasDenable()) 1503 { 1504 const pair<bool, boost::array<uint16_t,43>> drs = Compare(&h, &h.fStatus, FAD::EventHeader::kDenable); 1505 pair<bool, boost::array<uint8_t,43>> data; 1506 data.first = drs.first; 1507 data.second[0] = drs.second[1]; 1508 for (int i=0; i<40; i++) 1509 data.second[i+1] = drs.second[i+3]; 1510 Update(fDimDrsEnabled, data); 1511 } 1512 1513 if (old.HasDwrite() != h.HasDwrite()) 1514 { 1515 const pair<bool, boost::array<uint16_t,43>> wri = Compare(&h, &h.fStatus, FAD::EventHeader::kDwrite); 1516 Print("Wri", wri); 1517 } 1518 1519 if (old.IsRefClockTooLow() != h.IsRefClockTooLow()) 1520 { 1521 const pair<bool, boost::array<uint16_t,43>> owf = Compare(&h, &h.fStatus, FAD::EventHeader::kRefClkTooLow); 1522 Print("Owf", owf); 1523 } 1524 */ 1480 1525 1481 if (old.IsDcmLocked() != h.IsDcmLocked()) 1526 1482 { … … 1540 1496 Print("Spi", spi); 1541 1497 } 1542 /* 1543 if (old.HasBusy() != h.HasBusy()) 1544 { 1545 const pair<bool, boost::array<uint16_t,43>> bsy = Compare(&h, &h.fStatus, FAD::EventHeader::kBusy); 1546 pair<bool, boost::array<uint8_t,43>> data; 1547 data.first = bsy.first; 1548 data.second[0] = bsy.second[1]; 1549 for (int i=0; i<40; i++) 1550 data.second[i+1] = bsy.second[i+3]; 1551 Update(fDimBusy, data); 1552 } 1553 1554 if (old.HasTriggerEnabled() != h.HasTriggerEnabled()) 1555 { 1556 const pair<bool, boost::array<uint16_t,43>> trg = Compare(&h, &h.fStatus, FAD::EventHeader::kTriggerLine); 1557 pair<bool, boost::array<uint8_t,43>> data; 1558 data.first = trg.first; 1559 data.second[0] = trg.second[1]; 1560 for (int i=0; i<40; i++) 1561 data.second[i+1] = trg.second[i+3]; 1562 Update(fDimTriggerLine, data); 1563 } 1564 1565 if (old.HasContTriggerEnabled() != h.HasContTriggerEnabled()) 1566 { 1567 const pair<bool, boost::array<uint16_t,43>> cnt = Compare(&h, &h.fStatus, FAD::EventHeader::kContTrigger); 1568 pair<bool, boost::array<uint8_t,43>> data; 1569 data.first = cnt.first; 1570 data.second[0] = cnt.second[1]; 1571 for (int i=0; i<40; i++) 1572 data.second[i+1] = cnt.second[i+3]; 1573 Update(fDimContinousTrigger, data); 1574 } 1575 1576 if (old.IsInSock17Mode() != h.IsInSock17Mode()) 1577 { 1578 const pair<bool, boost::array<uint16_t,43>> sck = Compare(&h, &h.fStatus, FAD::EventHeader::kSock17); 1579 Print("Sck", sck); 1580 } 1581 */ 1498 1582 1499 if (old.fStatus != h.fStatus) 1583 1500 { … … 1585 1502 fDimStatus.setData(const_cast<uint16_t*>(sts.data()), 42*sizeof(uint16_t)); 1586 1503 fDimStatus.updateService(); 1587 1588 cout << "EMMIT" << endl; 1589 } 1590 1591 1592 //Update(fDimFwVersion, ver); 1593 //Update(fDimFwVersion, trg); 1594 //Update(fDimFwVersion, run); 1595 // frq send only min/max 1596 1597 //const pair<bool, boost::array<uint32_t,43>> frq = Compare(&h, &h.fFreqRefClock); 1598 //Print("Frq", frq); 1504 } 1599 1505 } 1600 1506 };
Note:
See TracChangeset
for help on using the changeset viewer.