Changeset 10818 for trunk/FACT++/src
- Timestamp:
- 05/25/11 14:03:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/dataLogger.cc
r10814 r10818 465 465 if (fDebugIsOn) 466 466 { 467 stringstream str;467 ostringstream str; 468 468 str << "Removing run number " << fRunNumber.front().runNumber; 469 Debug(str .str());469 Debug(str); 470 470 } 471 471 CreateFitsGrouping(fRunNumber.front().openedFits, fRunNumber.front().runNumber); … … 479 479 if (fDebugIsOn) 480 480 { 481 stringstream str;481 ostringstream str; 482 482 str << "Closing Fits run file " << y->second.runFile.fFileName; 483 Debug(str .str());483 Debug(str); 484 484 } 485 485 y->second.runFile.Close(); … … 505 505 { 506 506 ostringstream str; 507 str.str("");508 507 str << "There are " << fNumSubAndFitsData.numOpenFits << " FITS files open:"; 509 Message(str .str());508 Message(str); 510 509 } 511 510 SubscriptionsListType::iterator x; … … 568 567 { 569 568 ostringstream str; 570 str.str("");571 569 str << "Unable to retrieve stats for " << fNightlyFilePath << ". Reason: " << strerror(errno) << " [" << errno << "]"; 572 570 if (!shouldWarn) … … 653 651 str << statVar.writingRate/1024 << " KB/s; free space: "; 654 652 str << statVar.freeSpace/(1024*1024) << " MB"; 655 Debug(str .str());653 Debug(str); 656 654 } 657 655 } … … 885 883 ostringstream str; 886 884 str << "Subscribing to service " << *i << "/" << *givenSubs; 887 Debug(str .str());885 Debug(str); 888 886 } 889 887 } … … 913 911 ostringstream str; 914 912 str << "Subscribing to service " << *i << "/" << *j; 915 Debug(str .str());913 Debug(str); 916 914 } 917 915 } … … 987 985 ostringstream str; 988 986 str << "Updating number of subscriptions service: Num Subs=" << fNumSubAndFitsData.numSubscriptions << " Num open FITS=" << fNumSubAndFitsData.numOpenFits; 989 Debug(str .str());987 Debug(str); 990 988 } 991 989 fNumSubAndFits->updateService(); … … 1036 1034 if (run.logFile->is_open()) 1037 1035 { 1038 stringstream str;1036 ostringstream str; 1039 1037 str << "Log file " << run.logName << " was already open when trying to open it in OpenRunFile"; 1040 Error(str .str());1038 Error(str); 1041 1039 return -1; 1042 1040 } … … 1053 1051 if (run.reportFile->is_open()) 1054 1052 { 1055 stringstream str;1053 ostringstream str; 1056 1054 str << "Report file " << run.reportName << " was already open when trying to open it in OpenRunFile"; 1057 Error(str .str());1055 Error(str); 1058 1056 return -1; 1059 1057 } … … 1070 1068 ostringstream str; 1071 1069 str << "Something went wrong while openning nightly files " << run.logName << " and " << run.reportName; 1072 Error(str .str());1070 Error(str); 1073 1071 return -1; 1074 1072 } … … 1136 1134 if (fDebugIsOn) 1137 1135 { 1138 stringstream str;1136 ostringstream str; 1139 1137 str << "Adding new run number " << newRun << " that was issued on " << time; 1140 Debug(str .str());1138 Debug(str); 1141 1139 } 1142 1140 //Add new run number to run number list … … 1163 1161 ostringstream str; 1164 1162 str << "New run number is " << fRunNumber.back().runNumber; 1165 Message(str .str());1163 Message(str); 1166 1164 } 1167 1165 } … … 1228 1226 if (rit == fRunNumber.rend() && fRunNumber.size() != 0) 1229 1227 { 1230 stringstream str;1228 ostringstream str; 1231 1229 str << "Could not find an appropriate run number for info coming at time: " << cTime; 1232 Error(str .str());1230 Error(str); 1233 1231 Error("Active run numbers: "); 1234 1232 for (rit=fRunNumber.rbegin(); rit != fRunNumber.rend(); rit++) … … 1236 1234 str.str(""); 1237 1235 str << rit->runNumber; 1238 Error(str .str());1236 Error(str); 1239 1237 } 1240 1238 } … … 1282 1280 ostringstream str; 1283 1281 str << "Writing: \"" << header.str() << text << "\" to Nightly report file"; 1284 Debug(str .str());1282 Debug(str); 1285 1283 } 1286 1284 fNightlyReportFile << header.str() << text << endl; … … 1300 1298 ostringstream str; 1301 1299 str << "Writing: \"" << header.str() << text << "\" to Run report file"; 1302 Debug(str .str());1300 Debug(str); 1303 1301 } 1304 1302 *targetRunFile << header.str() << text << endl; … … 1323 1321 ostringstream str; 1324 1322 str << "Writing: \"" << msg.str() << "\" to Nightly log file"; 1325 Debug(str .str());1323 Debug(str); 1326 1324 } 1327 1325 MessageImp nightlyMess(fNightlyLogFile); … … 1340 1338 ostringstream str; 1341 1339 str << "Writing: \"" << msg.str() << "\" to Run log file"; 1342 Debug(str .str());1340 Debug(str); 1343 1341 } 1344 1342 MessageImp runMess(*targetRunFile); … … 1499 1497 for (list<RunNumberType>::iterator it=fRunNumber.begin(); it!=fRunNumber.end(); it++) 1500 1498 str << "\n" << it->runNumber; 1501 Message(str .str());1499 Message(str); 1502 1500 Message("----------- OPENED FILES ----------------"); 1503 1501 //print all the open files. … … 1527 1525 str.str(""); 1528 1526 str << "Total Size written: " << statVar.sizeWritten << " bytes."; 1529 Message(str .str());1527 Message(str); 1530 1528 str.str(""); 1531 1529 str << "Disk free space: " << statVar.freeSpace << " bytes."; 1532 Message(str .str());1530 Message(str); 1533 1531 str.str(""); 1534 1532 str << "Statistics are updated every " << fStatsPeriodDuration << " seconds"; … … 1541 1539 str.str(""); 1542 1540 str << "There are " << fNumSubAndFitsData.numSubscriptions << " active DIM subscriptions:"; 1543 Message(str .str());1541 Message(str); 1544 1542 1545 1543 for (map<const string, map<string, SubscriptionType> >::const_iterator it=fServiceSubscriptions.begin(); it!= fServiceSubscriptions.end();it++) … … 1593 1591 ostringstream str; 1594 1592 str << "Debug mode is now " << fDebugIsOn; 1595 Message(str .str());1593 Message(str); 1596 1594 } 1597 1595 return GetCurrentState(); … … 1631 1629 ostringstream str; 1632 1630 str << "Statistics period is now " << fStatsPeriodDuration << " seconds"; 1633 Message(str .str());1631 Message(str); 1634 1632 } 1635 1633 } … … 1654 1652 ostringstream str; 1655 1653 str << "Opened files service mode is now " << fOpenedFilesIsOn; 1656 Message(str .str());1654 Message(str); 1657 1655 } 1658 1656 return GetCurrentState(); … … 1677 1675 ostringstream str; 1678 1676 str << "Number of subscriptions service mode is now " << fNumSubAndFitsIsOn; 1679 Message(str .str());1677 Message(str); 1680 1678 } 1681 1679 return GetCurrentState(); … … 1733 1731 ostringstream str; 1734 1732 str << "The new run number is: " << fRunNumber.back().runNumber; 1735 Message(str .str());1733 Message(str); 1736 1734 return GetCurrentState(); 1737 1735 } … … 1751 1749 ostringstream str; 1752 1750 str << "Updating files service " << service->getName() << "with code: " << type << " and file: " << name; 1753 Debug(str .str());1751 Debug(str); 1754 1752 str.str(""); 1755 1753 str << "Num subs: " << fNumSubAndFitsData.numSubscriptions << " Num open FITS: " << fNumSubAndFitsData.numOpenFits; 1756 Debug(str .str());1754 Debug(str); 1757 1755 } 1758 1756 OpenFileToDim fToDim; … … 1802 1800 ostringstream str; 1803 1801 str << "Something went wrong while openning nightly files " << fFullNightlyLogFileName << " and " << fFullNightlyReportFileName; 1804 Error(str .str());1802 Error(str); 1805 1803 return kSM_BadNightlyConfig; 1806 1804 } … … 1922 1920 ostringstream str; 1923 1921 str << "Opened Nightly FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits; 1924 Debug(str .str());1922 Debug(str); 1925 1923 } 1926 1924 } … … 2007 2005 ostringstream str; 2008 2006 str << "Opened Run FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits; 2009 Debug(str .str());2007 Debug(str); 2010 2008 } 2011 2009 } … … 2154 2152 else 2155 2153 str << "nightly files"; 2156 Debug(str .str());2154 Debug(str); 2157 2155 } 2158 2156 //create the FITS group corresponding to the ending run. … … 2167 2165 ostringstream str; 2168 2166 str << "There are " << numFilesToGroup << " tables to group"; 2169 Debug(str .str());2167 Debug(str); 2170 2168 } 2171 2169 if (numFilesToGroup <= 1) … … 2240 2238 ostringstream str; 2241 2239 str << "Grouping " << it->first << " " << *jt; 2242 Debug(str .str());2240 Debug(str); 2243 2241 } 2244 2242 int status = 0; … … 2248 2246 ostringstream str; 2249 2247 str << "Could not write row #" << i << "In the fits grouping file " << groupName << ". Cfitsio error code: " << status; 2250 Error(str .str());2248 Error(str); 2251 2249 } 2252 2250 }
Note:
See TracChangeset
for help on using the changeset viewer.