Changeset 10780 for trunk/FACT++
- Timestamp:
- 05/23/11 15:04:32 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Connection.cc
r10731 r10780 81 81 if (IsConnected()) 82 82 { 83 stringstream str;83 ostringstream str; 84 84 str << "Connection closed to " << URL() << "."; 85 85 Message(str); … … 126 126 if (error && error!=ba::error::basic_errors::operation_aborted) 127 127 { 128 stringstream str;128 ostringstream str; 129 129 str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 130 130 Error(str); … … 157 157 if (error) 158 158 { 159 stringstream str;159 ostringstream str; 160 160 str << "Writing to " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 161 161 Error(str); … … 165 165 } 166 166 167 stringstream msg;167 ostringstream msg; 168 168 msg << n << " bytes successfully sent to " << URL(); 169 169 Message(msg); … … 239 239 if (error && error!=ba::error::basic_errors::operation_aborted) 240 240 { 241 stringstream str;241 ostringstream str; 242 242 str << "Connetion timer of " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 243 243 Error(str); … … 286 286 fConnectionStatus = kConnecting; 287 287 288 stringstream msg;288 ostringstream msg; 289 289 if (!host.empty()) 290 290 msg << "Connecting to " << host << ": " << error.message() << " (" << error << ")"; … … 327 327 tcp::resolver::iterator iterator = resolver.resolve(query, ec); 328 328 329 stringstream msg;329 ostringstream msg; 330 330 if (!fAddress.empty() || !fPort.empty() || ec) 331 331 msg << "Trying to connect to " << URL() << "..."; -
trunk/FACT++/src/DimErrorRedirecter.cc
r10657 r10780 82 82 case DIM_INFO: fMsg.Info(id+msg); break; 83 83 default: 84 stringstream str;84 ostringstream str; 85 85 str << "DIM message with unknown severity (" << severity << "): "; 86 86 str << msg << " (" << code << ")"; -
trunk/FACT++/src/Fits.cc
r10758 r10780 65 65 for (unsigned int i=0;i<dataFormat.size();i++) 66 66 { 67 stringstream stt;67 ostringstream stt; 68 68 stt << "Data" << i; 69 69 fDataColDesc.push_back(Description(stt.str(), "comment", "unit")); … … 98 98 catch (CCfits::FitsException e) 99 99 { 100 stringstream str;100 ostringstream str; 101 101 str << "Could not open FITS file " << fileName << " reason: " << e.message(); 102 102 fMess->Error(str); … … 133 133 else 134 134 { 135 stringstream stt;135 ostringstream stt; 136 136 stt << "Data" << i; 137 137 allNames.push_back(stt.str()); … … 179 179 catch(CCfits::FitsException e) 180 180 { 181 stringstream str;181 ostringstream str; 182 182 str << "Could not open or create FITS table " << tableName << " in file " << fileName << " reason: " << e.message(); 183 183 fMess->Error(str); … … 205 205 catch (CCfits::FitsException e) 206 206 { 207 stringstream str;207 ostringstream str; 208 208 str << "Could not add header keys in file " << fFileName << " reason: " << e.message(); 209 209 fMess->Error(str); … … 248 248 if (fits_insert_rows(fTable->fitsPointer(), fNumRows, 1, &status)) 249 249 { 250 stringstream str;250 ostringstream str; 251 251 str << "Could not insert row in file " << fFileName << ". cfitsio error code: " << status; 252 252 fMess->Error(str); … … 281 281 char text[30];//max length of cfitsio error strings (from doc) 282 282 fits_get_errstatus(status, text); 283 stringstream str;283 ostringstream str; 284 284 str << "Error while writing FITS row in " << fFileName << ". Message: " << text << " [" << status << "]"; 285 285 fMess->Error(str); -
trunk/FACT++/src/MessageImp.h
r10712 r10780 34 34 int Update(const std::string &txt, int severity=kInfo); 35 35 int Update(const char *txt, int severity=kInfo) { return Update(std::string(txt), severity); } 36 int Update(const std:: stringstream &str, int severity=kInfo) { return Update(str.str(), severity); }36 int Update(const std::ostringstream &str, int severity=kInfo) { return Update(str.str(), severity); } 37 37 // int Update(int qos, const char *fmt, ...); 38 38 … … 51 51 int Fatal(const char *txt) { return Fatal(std::string(txt)); } 52 52 53 int Debug(const std:: stringstream &str) { return Debug(str.str()); }54 int Message(const std:: stringstream &str) { return Message(str.str()); }55 int Info(const std:: stringstream &str) { return Info(str.str()); }56 int Warn(const std:: stringstream &str) { return Warn(str.str()); }57 int Error(const std:: stringstream &str) { return Error(str.str()); }58 int Fatal(const std:: stringstream &str) { return Fatal(str.str()); }53 int Debug(const std::ostringstream &str) { return Debug(str.str()); } 54 int Message(const std::ostringstream &str) { return Message(str.str()); } 55 int Info(const std::ostringstream &str) { return Info(str.str()); } 56 int Warn(const std::ostringstream &str) { return Warn(str.str()); } 57 int Error(const std::ostringstream &str) { return Error(str.str()); } 58 int Fatal(const std::ostringstream &str) { return Fatal(str.str()); } 59 59 60 60 std::ostream &operator()() const { return fOut; } -
trunk/FACT++/src/StateMachineImp.cc
r10720 r10780 829 829 // instead of fCurrentState. 830 830 831 stringstream str;831 ostringstream str; 832 832 str << "State Transition from " << nold << " to " << nnew << " (" << txt; 833 833 if (!cmd.empty()) … … 924 924 if (!evt.IsStateAllowed(fCurrentState)) 925 925 { 926 stringstream msg;926 ostringstream msg; 927 927 msg << evt.GetName() << ": Not allowed in state "; 928 928 msg << GetStateDescription() << "... ignored."; -
trunk/FACT++/src/dataLogger.cc
r10758 r10780 335 335 if (isPrinting) 336 336 { 337 stringstream str;337 ostringstream str; 338 338 str.str(""); 339 339 str << "There are " << fNumSubAndFitsData.numOpenFits << " FITS files open:"; … … 395 395 else 396 396 { 397 stringstream str;397 ostringstream str; 398 398 str.str(""); 399 399 str << "Unable to retrieve stats for " << fNightlyFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; … … 467 467 if(fDebugIsOn) 468 468 { 469 stringstream str;469 ostringstream str; 470 470 str << "Size written: " << statVar.sizeWritten/1024 << " KB; writting rate: "; 471 471 str << statVar.writingRate/1024 << " KB/s; free space: "; … … 555 555 556 556 //Provide a print command 557 stringstream str;557 ostringstream str; 558 558 str << kSM_Ready << " " << kSM_NightlyOpen << " " << kSM_WaitingRun << " " << kSM_Logging << " " << kSM_BadNightlyConfig; 559 559 str << " " << kSM_BadRunConfig; … … 707 707 if(fDebugIsOn) 708 708 { 709 stringstream str;709 ostringstream str; 710 710 str << "Subscribing to service " << *i << "/" << *givenSubs; 711 711 Debug(str.str()); … … 735 735 if(fDebugIsOn) 736 736 { 737 stringstream str;737 ostringstream str; 738 738 str << "Subscribing to service " << *i << "/" << *j; 739 739 Debug(str.str()); … … 811 811 if (fDebugIsOn) 812 812 { 813 stringstream str;813 ostringstream str; 814 814 str << "Updating number of subscriptions service: Num Subs=" << fNumSubAndFitsData.numSubscriptions << " Num open FITS=" << fNumSubAndFitsData.numOpenFits; 815 815 Debug(str.str()); … … 870 870 {//assumes that the run number is an integer 871 871 fRunNumber = I->getInt(); 872 stringstream str;872 ostringstream str; 873 873 str << "New run number is " << fRunNumber; 874 874 Message(str.str()); … … 906 906 if (!sub.fConv) 907 907 { 908 stringstream str;908 ostringstream str; 909 909 str << "Couldn't properly parse the format... service " << sub.dimInfo->getName() << " ignored."; 910 910 Error(str); … … 914 914 915 915 //construct the header 916 stringstream header;916 ostringstream header; 917 917 Time cTime(I->getTimestamp(), I->getTimestampMillisecs()*1000); 918 918 fQuality = I->getQuality(); … … 935 935 { 936 936 Out() << kRed << e.what() << endl; 937 stringstream str;937 ostringstream str; 938 938 str << "Could not properly parse the data for service " << sub.dimInfo->getName(); 939 939 str << " reason: " << e.what() << ". Entry ignored"; … … 944 944 if (text.empty()) 945 945 { 946 stringstream str;946 ostringstream str; 947 947 str << "Service " << sub.dimInfo->getName() << " sent an empty string"; 948 948 Info(str); … … 958 958 if (fDebugIsOn) 959 959 { 960 stringstream str;960 ostringstream str; 961 961 str << "Writing: \"" << header.str() << text << "\" to Nightly report file"; 962 962 Debug(str.str()); … … 976 976 if (fDebugIsOn) 977 977 { 978 stringstream str;978 ostringstream str; 979 979 str << "Writing: \"" << header.str() << text << "\" to Run report file"; 980 980 Debug(str.str()); … … 992 992 {//write entry to both Nightly and run logs 993 993 string n = I->getName(); 994 stringstream msg;994 ostringstream msg; 995 995 msg << n << ": " << I->getString();//n.substr(0, n.find_first_of('/')) << ": " << I->getString(); 996 996 … … 999 999 if (fDebugIsOn) 1000 1000 { 1001 stringstream str;1001 ostringstream str; 1002 1002 str << "Writing: \"" << msg.str() << "\" to Nightly log file"; 1003 1003 Debug(str.str()); … … 1016 1016 if (fDebugIsOn) 1017 1017 { 1018 stringstream str;1018 ostringstream str; 1019 1019 str << "Writing: \"" << msg.str() << "\" to Run log file"; 1020 1020 Debug(str.str()); … … 1059 1059 return GetCurrentState(); 1060 1060 Warn("LogMessagePlease has not been checked nor updated since a long while. Undefined behavior to be expected"); 1061 stringstream header;1061 ostringstream header; 1062 1062 const Time& cTime = evt.GetTime(); 1063 1063 header << evt.GetName() << " " << cTime.Y() << " " << cTime.M() << " " << cTime.D() << " "; … … 1092 1092 if (fDebugIsOn) 1093 1093 { 1094 stringstream str;1094 ostringstream str; 1095 1095 str << "Logging: \"" << header << text << "\""; 1096 1096 Debug(str.str()); … … 1172 1172 actualTargetDir = fRunFileName; 1173 1173 Message("Run Path: " + actualTargetDir); 1174 stringstream str;1174 ostringstream str; 1175 1175 str << "Run Number: " << fRunNumber; 1176 1176 Message(str.str()); … … 1263 1263 else 1264 1264 { 1265 stringstream str;1265 ostringstream str; 1266 1266 str << "Debug mode is now " << fDebugIsOn; 1267 1267 Message(str.str()); … … 1301 1301 else 1302 1302 { 1303 stringstream str;1303 ostringstream str; 1304 1304 str << "Statistics period is now " << fStatsPeriodDuration << " seconds"; 1305 1305 Message(str.str()); … … 1324 1324 else 1325 1325 { 1326 stringstream str;1326 ostringstream str; 1327 1327 str << "Opened files service mode is now " << fOpenedFilesIsOn; 1328 1328 Message(str.str()); … … 1347 1347 else 1348 1348 { 1349 stringstream str;1349 ostringstream str; 1350 1350 str << "Number of subscriptions service mode is now " << fNumSubAndFitsIsOn; 1351 1351 Message(str.str()); … … 1402 1402 { 1403 1403 fRunNumber = evt.GetInt(); 1404 stringstream str;1404 ostringstream str; 1405 1405 str << "The new run number is: " << fRunNumber; 1406 1406 Message(str.str()); … … 1420 1420 if (fDebugIsOn) 1421 1421 { 1422 stringstream str;1422 ostringstream str; 1423 1423 str << "Updating files service " << service->getName() << "with code: " << type << " and file: " << name; 1424 1424 Debug(str.str()); … … 1449 1449 } 1450 1450 Time time; 1451 stringstream sTime;1451 ostringstream sTime; 1452 1452 sTime << time.Y() << "_" << time.M() << "_" << time.D(); 1453 1453 … … 1456 1456 if (errno != 0) 1457 1457 { 1458 stringstream str;1458 ostringstream str; 1459 1459 str << "Unable to open Nightly Log " << fFullNightlyLogFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1460 1460 Error(str); … … 1464 1464 if (errno != 0) 1465 1465 { 1466 stringstream str;1466 ostringstream str; 1467 1467 str << "Unable to open Nightly Report " << fFullNightlyReportFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1468 1468 Error(str); … … 1471 1471 if (!fNightlyLogFile.is_open() || !fNightlyReportFile.is_open()) 1472 1472 { 1473 stringstream str;1473 ostringstream str; 1474 1474 str << "Something went wrong while openning nightly files " << fFullNightlyLogFileName << " and " << fFullNightlyReportFileName; 1475 1475 Error(str.str()); … … 1494 1494 if (errno != 0) 1495 1495 { 1496 stringstream str;1496 ostringstream str; 1497 1497 str << "Unable retrieve current path" << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1498 1498 Error(str); … … 1544 1544 } 1545 1545 Time time; 1546 stringstream sTime;1546 ostringstream sTime; 1547 1547 sTime << time.Y() << "_" << time.M() << "_" << time.D(); 1548 1548 //we open the NightlyFile anyway, otherwise this function shouldn't have been called. … … 1581 1581 if (fDebugIsOn) 1582 1582 { 1583 stringstream str;1583 ostringstream str; 1584 1584 str << "Opened Nightly FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits; 1585 1585 Debug(str.str()); … … 1588 1588 if (!sub.runFile.IsOpen() && (GetCurrentState() == kSM_Logging)) 1589 1589 {//buffer for the run file have already been allocated when doing the Nightly file 1590 stringstream sRun;1590 ostringstream sRun; 1591 1591 sRun << fRunNumber; 1592 1592 string fileNameOnly; … … 1637 1637 catch (CCfits::FitsException e) 1638 1638 { 1639 stringstream str;1639 ostringstream str; 1640 1640 str << "Could not open FITS Run file " << partialName << " reason: " << e.message(); 1641 1641 Error(str); … … 1664 1664 if (fDebugIsOn) 1665 1665 { 1666 stringstream str;1666 ostringstream str; 1667 1667 str << "Opened Run FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits; 1668 1668 Debug(str.str()); … … 1698 1698 for (unsigned int i=0;i<flist.size()-1;i++) 1699 1699 { 1700 stringstream dataQualifier;1700 ostringstream dataQualifier; 1701 1701 1702 1702 dataQualifier << flist[i].second.first; … … 1788 1788 // if (fRunNumber == -1) 1789 1789 // return kSM_BadRunConfig; 1790 stringstream sRun;1790 ostringstream sRun; 1791 1791 sRun << fRunNumber; 1792 1792 fFullRunLogFileName = fRunFileName + '/' + sRun.str() + ".log"; … … 1794 1794 if (errno != 0) 1795 1795 { 1796 stringstream str;1796 ostringstream str; 1797 1797 str << "Unable to open run Log " << fFullRunLogFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1798 1798 Error(str); … … 1802 1802 if (errno != 0) 1803 1803 { 1804 stringstream str;1804 ostringstream str; 1805 1805 str << "Unable to open run report " << fFullRunReportFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1806 1806 Error(str); … … 1809 1809 if (!fRunLogFile.is_open() || !fRunReportFile.is_open()) 1810 1810 { 1811 stringstream str;1811 ostringstream str; 1812 1812 str << "Something went wrong while openning nightly files " << fFullRunLogFileName << " and " << fFullRunReportFileName; 1813 1813 Error(str.str()); … … 1822 1822 if (errno != 0) 1823 1823 { 1824 stringstream str;1824 ostringstream str; 1825 1825 str << "Unable to stat " << fFullRunLogFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1826 1826 Error(str); … … 1835 1835 if (errno != 0) 1836 1836 { 1837 stringstream str;1837 ostringstream str; 1838 1838 str << "Unable to stat " << fFullRunReportFileName << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1839 1839 Error(str); … … 1851 1851 if (errno != 0) 1852 1852 { 1853 stringstream str;1853 ostringstream str; 1854 1854 str << "Unable to retrieve the current path" << ". Reason: " << strerror(errno) << " [" << errno << "]"; 1855 1855 Error(str); … … 1873 1873 if (fDebugIsOn) 1874 1874 { 1875 stringstream str;1875 ostringstream str; 1876 1876 str << "Creating fits group for "; 1877 1877 if (runGroup) … … 1891 1891 if (fDebugIsOn) 1892 1892 { 1893 stringstream str;1893 ostringstream str; 1894 1894 str << "There are " << numFilesToGroup << " tables to group"; 1895 1895 Debug(str.str()); … … 1900 1900 return; 1901 1901 } 1902 stringstream groupName;1902 ostringstream groupName; 1903 1903 if (runGroup) 1904 1904 { … … 1908 1908 { 1909 1909 Time time; 1910 stringstream sTime;1910 ostringstream sTime; 1911 1911 sTime << time.Y() << "_" << time.M() << "_" << time.D(); 1912 1912 … … 1919 1919 groupFile = new CCfits::FITS(groupName.str(), CCfits::RWmode::Write); 1920 1920 //setup the column names 1921 stringstream pathTypeName;1921 ostringstream pathTypeName; 1922 1922 pathTypeName << maxCharLength << "A"; 1923 1923 vector<string> names; … … 1936 1936 catch (CCfits::FitsException e) 1937 1937 { 1938 stringstream str;1938 ostringstream str; 1939 1939 str << "Could not open or create FITS table GROUPING in file " << groupName.str() << " reason: " << e.message(); 1940 1940 Error(str); … … 1963 1963 if (fDebugIsOn) 1964 1964 { 1965 stringstream str;1965 ostringstream str; 1966 1966 str << "Grouping " << it->first << " " << *jt; 1967 1967 Debug(str.str()); … … 1972 1972 if (status) 1973 1973 { 1974 stringstream str;1974 ostringstream str; 1975 1975 str << "Could not write row #" << i << "In the fits grouping file " << groupName << ". Cfitsio error code: " << status; 1976 1976 Error(str.str()); -
trunk/FACT++/src/dclient5.cc
r10771 r10780 62 62 if (error && error!=ba::error::basic_errors::operation_aborted) 63 63 { 64 stringstream str;64 ostringstream str; 65 65 66 66 str << "HandleReadTimeout: " << error.message() << " (" << error << ")";// << endl; … … 92 92 if (error && error!=ba::error::basic_errors::not_connected) 93 93 { 94 stringstream str;94 ostringstream str; 95 95 str << "Reading from " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 96 96 Error(str); -
trunk/FACT++/src/ftmctrl.cc
r10749 r10780 211 211 err!=ba::error::basic_errors::operation_aborted) // Connection closed by us 212 212 { 213 stringstream str;213 ostringstream str; 214 214 str << "Reading from " << URL() << ": " << err.message() << " (" << err << ")";// << endl; 215 215 Error(str); … … 225 225 if (bytes_received!=sizeof(FTM::Header)) 226 226 { 227 stringstream str;227 ostringstream str; 228 228 str << "Excepted " << sizeof(FTM::Header) << " bytes (FTM::Header) but received " << bytes_received << "."; 229 229 Error(str); … … 237 237 if (fHeader.fDelimiter!=FTM::kDelimiterStart) 238 238 { 239 stringstream str;239 ostringstream str; 240 240 str << "Invalid header received: start delimiter wrong, received "; 241 241 str << hex << fHeader.fDelimiter << ", expected " << FTM::kDelimiterStart << "."; … … 284 284 285 285 default: 286 stringstream str;286 ostringstream str; 287 287 str << "Unknonw type " << fHeader.fType << " in received header." << endl; 288 288 Error(str); … … 297 297 if (ntohs(fBuffer.back())!=FTM::kDelimiterEnd) 298 298 { 299 stringstream str;299 ostringstream str; 300 300 str << "Invalid data received: end delimiter wrong, received "; 301 301 str << hex << ntohs(fBuffer.back()) << ", expected " << FTM::kDelimiterEnd << "."; … … 356 356 357 357 default: 358 stringstream str;358 ostringstream str; 359 359 str << "Unknonw type " << fHeader.fType << " in header." << endl; 360 360 Error(str); … … 365 365 catch (const logic_error &e) 366 366 { 367 stringstream str;367 ostringstream str; 368 368 str << "Exception converting buffer into data structure: " << e.what(); 369 369 Error(str); … … 405 405 if (error && error!=ba::error::basic_errors::operation_aborted) 406 406 { 407 stringstream str;407 ostringstream str; 408 408 str << "Read timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl; 409 409 Error(str); … … 439 439 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 440 440 441 stringstream msg;441 ostringstream msg; 442 442 msg << "Sending command:" << hex; 443 443 msg << " 0x" << setw(4) << setfill('0') << cmd[0]; … … 461 461 boost::array<uint16_t, 5> cmd = {{ '@', u1, u2, u3, u4 }}; 462 462 463 stringstream msg;463 ostringstream msg; 464 464 msg << "Sending command:" << hex; 465 465 msg << " 0x" << setw(4) << setfill('0') << cmd[0]; … … 1044 1044 return true; 1045 1045 1046 stringstream msg;1046 ostringstream msg; 1047 1047 msg << name << " - Received event has " << has << " bytes, but expected " << size << "."; 1048 1048 T::Fatal(msg); … … 1059 1059 if (dat[1]>uint16_t(-1)) 1060 1060 { 1061 stringstream msg;1061 ostringstream msg; 1062 1062 msg << hex << "Value " << dat[1] << " out of range."; 1063 1063 T::Error(msg); … … 1068 1068 if (dat[0]>uint16_t(-1) || !fFTM.CmdSetRegister(dat[0], dat[1])) 1069 1069 { 1070 stringstream msg;1070 ostringstream msg; 1071 1071 msg << hex << "Address " << dat[0] << " out of range."; 1072 1072 T::Error(msg); … … 1084 1084 if (addr>uint16_t(-1) || !fFTM.CmdGetRegister(addr)) 1085 1085 { 1086 stringstream msg;1086 ostringstream msg; 1087 1087 msg << hex << "Address " << addr << " out of range."; 1088 1088 T::Error(msg); … … 1102 1102 if (dat[1]>uint32_t(-1)) 1103 1103 { 1104 stringstream msg;1104 ostringstream msg; 1105 1105 msg << hex << "Value " << dat[1] << " out of range."; 1106 1106 T::Error(msg); … … 1158 1158 return T::GetCurrentState(); 1159 1159 1160 stringstream msg;1160 ostringstream msg; 1161 1161 msg << "Loading static data from file '" << evt.GetString() << "' failed "; 1162 1162 … … 1176 1176 return T::GetCurrentState(); 1177 1177 1178 stringstream msg;1178 ostringstream msg; 1179 1179 msg << "Writing static data to file '" << evt.GetString() << "' failed "; 1180 1180 msg << "(" << strerror(errno) << ")"; -
trunk/FACT++/src/scheduler.cc
r10765 r10780 213 213 const int port = atoi(string(what[7]).c_str()); 214 214 215 stringstream dbnamemsg;215 ostringstream dbnamemsg; 216 216 dbnamemsg << "Scheduling started -> using database " << fDBName << "."; 217 217 T::Message(dbnamemsg); … … 397 397 counter++; 398 398 } 399 stringstream fixedobsmsg;399 ostringstream fixedobsmsg; 400 400 fixedobsmsg << obsfixedlist.size() << " fixed observations found. "; 401 401 T::Message(fixedobsmsg); 402 402 cout << obsfixedlist.size() << " fixed observations found. " << endl; 403 403 404 stringstream stdobsmsg;404 ostringstream stdobsmsg; 405 405 stdobsmsg << obsstdlist.size() << " standard observations found. "; 406 406 T::Message(stdobsmsg); … … 430 430 || obsfixedlist[counter2].obsfixedstop > stopsched) 431 431 { 432 stringstream skipfixedobsmsg;432 ostringstream skipfixedobsmsg; 433 433 skipfixedobsmsg << "Skip 1 fixed observation (obskey " << obsfixedlist[counter2].obskey_fixed << ") as it is out of scheduling time range."; 434 434 T::Message(skipfixedobsmsg); … … 452 452 delta1=(obsfixedlist[counter2].obsfixedstop-(*vobs5).obsfixedstart)/2; 453 453 finalobsfixedstop=obsfixedlist[counter2].obsfixedstop-delta1; 454 stringstream warndelta1;454 ostringstream warndelta1; 455 455 warndelta1 << "Overlap between two fixed observations (" << obsfixedlist[counter2].obskey_fixed << " " << (*vobs5).obskey_fixed << "). The stoptime of " << obsfixedlist[counter2].obskey_fixed << " has been changed."; 456 456 T::Warn(warndelta1); … … 463 463 delta2=((*vobs5).obsfixedstop-obsfixedlist[counter2].obsfixedstart)/2; 464 464 finalobsfixedstart=obsfixedlist[counter2].obsfixedstart+delta2; 465 stringstream warndelta2;465 ostringstream warndelta2; 466 466 warndelta2 << "Overlap between two fixed observations (" << obsfixedlist[counter2].obskey_fixed << " " << (*vobs5).obskey_fixed << "). The starttime of " << obsfixedlist[counter2].obskey_fixed << " has been changed."; 467 467 T::Warn(warndelta2); … … 483 483 cout << " - " << (*vobs).obsfixedstop << endl; 484 484 } 485 stringstream obsmsg;485 ostringstream obsmsg; 486 486 obsmsg << "Added " << obslist.size() << " fixed observations to ScheduledObs. "; 487 487 T::Message(obsmsg); … … 495 495 { 496 496 cout << "One double sourcekey in std observations: " << obsstdlist[j].sourcekey_std << endl; 497 stringstream errdoublestd;497 ostringstream errdoublestd; 498 498 errdoublestd << "One double sourcekey in std observations: " << obsstdlist[j].sourcekey_std << " (" << obsstdlist[j].sourcename_std << ")."; 499 499 T::Error(errdoublestd); … … 576 576 break; 577 577 } 578 stringstream q1;578 ostringstream q1; 579 579 //cout << (*vobs4).sourcename_run << endl; 580 580 q1 << "INSERT ScheduledRun set fStartTime='" << Time::sql << finalstarttime; … … 601 601 counter3++; 602 602 } 603 stringstream insertmsg;603 ostringstream insertmsg; 604 604 insertmsg << "Inserted " << insertcount << " runs into the DB."; 605 605 T::Message(insertmsg); … … 617 617 int Commit() 618 618 { 619 stringstream str;619 ostringstream str; 620 620 str << "Comitting preview (id=" << fSessionId << ")"; 621 621 T::Message(str);
Note:
See TracChangeset
for help on using the changeset viewer.