Changeset 11220 for trunk/FACT++/src/datalogger.cc
- Timestamp:
- 06/30/11 14:16:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/datalogger.cc
r11219 r11220 1373 1373 1374 1374 //create the converter for that service 1375 if ( (!sub.fConv.get()) && isItaReport)1375 if (!sub.fConv.get()) 1376 1376 { 1377 1377 sub.fConv = shared_ptr<Converter>(new Converter(Out(), I->getFormat())); … … 1474 1474 return; 1475 1475 } 1476 }1477 else1478 {//write entry to both Nightly and run logs1479 ostringstream msg;1480 msg << I->getName() << ": " << I->getString();1481 1482 if (fNightlyLogFile.is_open())1483 {1484 MessageImp(fNightlyLogFile).Write(cTime, msg.str().c_str(), fQuality);1485 if (!CheckForOfstreamError(fNightlyLogFile, true))1486 return;1487 }1488 if (targetRunFile && targetRunFile->is_open())1489 {1490 MessageImp(*targetRunFile).Write(cTime, msg.str().c_str(), fQuality);1491 if (!CheckForOfstreamError(*targetRunFile, false))1492 return;1493 }1494 }1495 1496 1476 #ifdef HAVE_FITS 1497 if (isItaReport)1498 {1499 1477 //check if the last received event was before noon and if current one is after noon. 1500 1478 //if so, close the file so that it gets reopened. … … 1508 1486 OpenFITSFilesPlease(sub, cRunNumber); 1509 1487 WriteToFITS(sub); 1510 }1511 1488 #endif 1489 } 1490 else 1491 {//write entry to both Nightly and run logs 1492 vector<string> strings = sub.fConv->ToStrings(I->getData()); 1493 if (strings.size() > 1) 1494 { 1495 ostringstream err; 1496 err << "There was more than one string message in service " << I->getName() << " going to fatal error state"; 1497 Error(err.str()); 1498 } 1499 ostringstream msg; 1500 msg << I->getName() << ": " << strings[0]; 1501 1502 if (fNightlyLogFile.is_open()) 1503 { 1504 MessageImp(fNightlyLogFile).Write(cTime, msg.str().c_str(), fQuality); 1505 if (!CheckForOfstreamError(fNightlyLogFile, true)) 1506 return; 1507 } 1508 if (targetRunFile && targetRunFile->is_open()) 1509 { 1510 MessageImp(*targetRunFile).Write(cTime, msg.str().c_str(), fQuality); 1511 if (!CheckForOfstreamError(*targetRunFile, false)) 1512 return; 1513 } 1514 } 1512 1515 1513 1516 }
Note:
See TracChangeset
for help on using the changeset viewer.