- Timestamp:
- 06/22/12 22:57:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r14218 r14220 21 21 #include "Converter.h" 22 22 #include "PixelMap.h" 23 #include "DimWriteStatistics.h" 23 24 24 25 #include "tools.h" … … 500 501 EventHist fErrorHist; 501 502 EventHist fChatHist; 503 504 uint64_t fFreeSpace; 502 505 503 506 Sun fSun; … … 1561 1564 } 1562 1565 1566 int HandleStats(const EventImp &d) 1567 { 1568 if (!CheckDataSize(d, "Stats", 4*8)) 1569 { 1570 fFreeSpace = UINT64_MAX; 1571 return GetCurrentState(); 1572 } 1573 1574 const DimWriteStatistics::Stats &s = d.Ref<DimWriteStatistics::Stats>(); 1575 fFreeSpace = s.freeSpace; 1576 1577 return GetCurrentState(); 1578 } 1579 1563 1580 int HandleFscTemperature(const EventImp &d) 1564 1581 { … … 2097 2114 newerr |= SetError(!fDimControl.online(), 2098 2115 "<b>dimctrl offline</b>"); 2116 newerr |= SetError(fDimDataLogger.state()<20 || fDimDataLogger.state()>40, 2117 "<b>datalogger not ready</b>"); 2099 2118 2100 2119 //newerr |= SetError(fDimDriveControl.state()==Drive::State::kLocked, … … 2148 2167 newerr |= SetError(fLastRunFinishedWithZeroEvents, 2149 2168 "Last run finshed, but contained zero events."); 2169 2170 newerr |= SetError(fFreeSpace<50000000000, 2171 "Less than 50GB disk space left."); 2150 2172 2151 2173 fLastRunFinishedWithZeroEvents = false; … … 2541 2563 out << GetStateHtml(fDimSkypeClient, 1); 2542 2564 2565 string col = HTML::kRed; 2566 if (fFreeSpace>uint64_t(199999999999)) 2567 col = HTML::kYellow; 2568 if (fFreeSpace>uint64_t(999999999999)) 2569 col = HTML::kGreen; 2570 if (fFreeSpace==UINT64_MAX) 2571 col = HTML::kWhite; 2572 2573 out << col << '\t' << Tools::Scientific(fFreeSpace) << "B\n"; 2574 2543 2575 out << HTML::kGreen << '\t' << dt.str().substr(0, dt.str().length()-7) << '\n'; 2544 2576 } … … 2575 2607 fRateScanDataId(0), 2576 2608 fRateScanBoard(0), 2609 fFreeSpace(UINT64_MAX), 2577 2610 // --- 2578 2611 fDimMcp ("MCP"), … … 2658 2691 Subscribe("FAD_CONTROL/EVENT_DATA") 2659 2692 (bind(&StateMachineSmartFACT::HandleFadEventData, this, placeholders::_1)); 2693 Subscribe("FAD_CONTROL/STATS") 2694 (bind(&StateMachineSmartFACT::HandleStats, this, placeholders::_1)); 2695 2696 Subscribe("DATA_LOGGER/STATS") 2697 (bind(&StateMachineSmartFACT::HandleStats, this, placeholders::_1)); 2660 2698 2661 2699 Subscribe("FTM_CONTROL/TRIGGER_RATES")
Note:
See TracChangeset
for help on using the changeset viewer.