Changeset 13890 for trunk/FACT++/src/smartfact.cc
- Timestamp:
- 05/25/12 20:22:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r13878 r13890 307 307 { 308 308 private: 309 const Time fRunTime; 310 309 311 enum states_t 310 312 { … … 511 513 out << '\n'; 512 514 513 ofstream(fPath+"/scriptlog. txt") << out.str();515 ofstream(fPath+"/scriptlog.data") << out.str(); 514 516 } 515 517 … … 573 575 out << "#ffffff\t" << stat.max << '\n'; 574 576 575 ofstream(fPath+"/"+name+". txt") << out.str();577 ofstream(fPath+"/"+name+".data") << out.str(); 576 578 577 579 WriteBinary(d, "magicweather-"+name+"-hist", fMagicWeatherHist[i], max-min, min); … … 621 623 out << "\t\n"; 622 624 623 ofstream(fPath+"/weather. txt") << out.str();625 ofstream(fPath+"/weather.data") << out.str(); 624 626 625 627 out.str(""); … … 640 642 out << kHtmlWhite << '\t'; 641 643 642 ofstream(fPath+"/astro. txt") << out.str();644 ofstream(fPath+"/astro.data") << out.str(); 643 645 644 646 WriteWeather(d, "temp", kTemp, -5, 35); … … 672 674 out << d.GetJavaDate() << '\n'; 673 675 674 ofstream(fPath+"/tngdust. txt") << out.str();676 ofstream(fPath+"/tngdust.data") << out.str(); 675 677 676 678 return GetCurrentState(); … … 704 706 out << az << '\n'; 705 707 706 ofstream(fPath+"/drive-pointing. txt") << out.str();708 ofstream(fPath+"/drive-pointing.data") << out.str(); 707 709 708 710 return GetCurrentState(); … … 763 765 out << kHtmlWhite << "\t— \n"; 764 766 765 ofstream(fPath+"/tracking. txt") << out.str();767 ofstream(fPath+"/tracking.data") << out.str(); 766 768 767 769 return GetCurrentState(); … … 793 795 out << "#ffffff\t" << wang << '\n'; 794 796 795 ofstream(fPath+"/source. txt") << out.str();797 ofstream(fPath+"/source.data") << out.str(); 796 798 797 799 return GetCurrentState(); … … 840 842 out << kHtmlWhite << '\t' << stat.avg << '\n'; 841 843 out << kHtmlWhite << '\t' << stat.max << '\n'; 842 ofstream(fPath+"/feedback. txt") << out.str();844 ofstream(fPath+"/feedback.data") << out.str(); 843 845 844 846 return GetCurrentState(); … … 878 880 out << kHtmlWhite << '\t' << stat.avg << '\n'; 879 881 out << kHtmlWhite << '\t' << stat.max << '\n'; 880 ofstream(fPath+"/voltage. txt") << out.str();882 ofstream(fPath+"/voltage.data") << out.str(); 881 883 882 884 return GetCurrentState(); … … 993 995 out << col4 << '\t' << stat.max << '\n'; 994 996 out << kHtmlWhite << '\t' << power_tot << "W [" << power_apd << "mW]\n"; 995 ofstream(fPath+"/current. txt") << out.str();997 ofstream(fPath+"/current.data") << out.str(); 996 998 997 999 return GetCurrentState(); … … 1057 1059 out << col[2] << '\t' << rc.substr(20, 10) << '\n'; 1058 1060 out << col[3] << '\t' << rc.substr(30, 10) << '\n'; 1059 ofstream(fPath+"/fad. txt") << out.str();1061 ofstream(fPath+"/fad.data") << out.str(); 1060 1062 1061 1063 return GetCurrentState(); … … 1095 1097 out << "#ffffff\t" << fFtmControlTriggerRateCam << '\n'; 1096 1098 1097 ofstream(fPath+"/trigger. txt") << out.str();1099 ofstream(fPath+"/trigger.data") << out.str(); 1098 1100 1099 1101 const Statistics bstat(vector<float>(brates, brates+40)); … … 1106 1108 out << kHtmlWhite << '\t' << bstat.avg << '\n'; 1107 1109 out << kHtmlWhite << '\t' << bstat.max << '\n'; 1108 ofstream(fPath+"/boardrates. txt") << out.str();1110 ofstream(fPath+"/boardrates.data") << out.str(); 1109 1111 1110 1112 out.str(""); … … 1114 1116 out << kHtmlWhite << '\t' << pstat.avg << '\n'; 1115 1117 out << kHtmlWhite << '\t' << pstat.max << '\n'; 1116 ofstream(fPath+"/patchrates. txt") << out.str();1118 ofstream(fPath+"/patchrates.data") << out.str(); 1117 1119 1118 1120 return GetCurrentState(); … … 1148 1150 //out << kHtmlWhite << '\t' << statp.avg << '\n'; 1149 1151 out << kHtmlWhite << '\t' << statp.max << '\n'; 1150 ofstream(fPath+"/thresholds. txt") << out.str();1152 ofstream(fPath+"/thresholds.data") << out.str(); 1151 1153 1152 1154 out.str(""); … … 1187 1189 out << kHtmlWhite << "\t" << 0.5*vp << "\n"; 1188 1190 1189 ofstream(fPath+"/ftm. txt") << out.str();1191 ofstream(fPath+"/ftm.data") << out.str(); 1190 1192 1191 1193 // Active FTUs: IsActive(i) … … 1227 1229 fFtmControlFtuOk = cnt==40; 1228 1230 1229 ofstream(fPath+"/ftu. txt") << out.str();1231 ofstream(fPath+"/ftu.data") << out.str(); 1230 1232 1231 1233 return GetCurrentState(); … … 1317 1319 out << "#ffffff\t" << stat.max << '\n'; 1318 1320 1319 ofstream(fPath+"/fsc. txt") << out.str();1321 ofstream(fPath+"/fsc.data") << out.str(); 1320 1322 1321 1323 WriteBinary(d, "fsccontrol-temperature-hist", … … 1386 1388 out << "#ffffff\t" << max << '\n'; 1387 1389 1388 ofstream(fPath+"/ratescan. txt") << out.str();1390 ofstream(fPath+"/ratescan.data") << out.str(); 1389 1391 1390 1392 out.str(""); … … 1393 1395 out << "#ffffff\t" << pow(10, fRateScanDataHist[fRateScanBoard+1].back()) << '\n'; 1394 1396 1395 ofstream(fPath+"/ratescan_board. txt") << out.str();1397 ofstream(fPath+"/ratescan_board.data") << out.str(); 1396 1398 1397 1399 return GetCurrentState(); … … 1412 1414 } 1413 1415 1414 ofstream(fPath+"/dotest. txt") << out.str();1416 ofstream(fPath+"/dotest.data") << out.str(); 1415 1417 } 1416 1418 … … 1525 1527 msg << "dimctrl offline<br/>"; 1526 1528 1529 // FTM in Connected instead of Idle --> power cyclen 1530 1527 1531 /* // Check offline and disconnected status? 1528 1532 Out() << fDimMcp << endl; … … 1549 1553 1550 1554 ostringstream out; 1551 out << now.JavaDate() << '\t' << haserror << '\ n';1555 out << now.JavaDate() << '\t' << haserror << '\t' << (fDimControl.state()>-3) << '\n'; 1552 1556 out << setprecision(3); 1553 1557 out << kHtmlWhite << '\t' << msg.str() << '\n'; 1554 1558 1555 1559 if (haserror || fHasError) 1556 ofstream(fPath+"/error. txt") << out.str();1560 ofstream(fPath+"/error.data") << out.str(); 1557 1561 1558 1562 fHasError = haserror; … … 1561 1565 1562 1566 out.str(""); 1563 out << now.JavaDate() << '\t' << fHasError << '\ n';1567 out << now.JavaDate() << '\t' << fHasError << '\t' << (fDimControl.state()>-3) << '\n'; 1564 1568 out << setprecision(3); 1565 1569 … … 1791 1795 out << kHtmlWhite << '\n'; 1792 1796 1793 ofstream(fPath+"/fact. txt") << out.str();1797 ofstream(fPath+"/fact.data") << out.str(); 1794 1798 1795 1799 // ============================================================== 1796 1800 1797 1801 out.str(""); 1798 out << now.JavaDate() << '\t' << fHasError << '\ n';1802 out << now.JavaDate() << '\t' << fHasError << '\t' << (fDimControl.state()>-3) << '\n'; 1799 1803 1800 1804 if (!fDimDNS.online()) 1801 out << kHtmlWhite << "\tOffline\n\n\n\n\n\n\n\n\n\n\n\n ";1805 out << kHtmlWhite << "\tOffline\n\n\n\n\n\n\n\n\n\n\n\n\n"; 1802 1806 else 1803 1807 { 1808 ostringstream dt; 1809 dt << (Time()-fRunTime); 1810 1804 1811 out << kHtmlGreen << '\t' << fDimDNS.version() << '\n'; 1805 1812 … … 1818 1825 out << GetStateHtml(fDimRateScan, 4); 1819 1826 out << GetStateHtml(fDimChatServer, 1); 1820 } 1821 1822 ofstream(fPath+"/status.txt") << out.str(); 1827 1828 out << kHtmlGreen << '\t' << dt.str().substr(0, dt.str().length()-7) << '\n'; 1829 } 1830 1831 ofstream(fPath+"/status.data") << out.str(); 1823 1832 1824 1833 return kStateRunning;
Note:
See TracChangeset
for help on using the changeset viewer.