Changeset 11359 for trunk/FACT++/src/EventBuilderWrapper.h
- Timestamp:
- 07/12/11 13:12:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11350 r11359 197 197 198 198 public: 199 DataFileRaw(uint32_t id) : DataFileImp(id) 199 DataFileRaw(uint32_t id) : DataFileImp(id), fPosTail(0) { } 200 200 ~DataFileRaw() { Close(); } 201 201 … … 751 751 bool fDebugStream; 752 752 bool fDebugRead; 753 bool fDebugLog; 753 754 754 755 int Write(const Time &time, const std::string &txt, int qos) … … 798 799 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:2;X:4;I:3;I:1;I:2;C:40;I:40;I:40;X:40", ""), 799 800 fDimStatistics2 ("FAD_CONTROL/STATISTICS2", "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40", ""), 800 fDebugStream(false), fDebugRead(false) 801 fDebugStream(false), fDebugRead(false), fDebugLog(false) 801 802 { 802 803 if (This) … … 851 852 return; 852 853 } 854 855 fLastMessage.clear(); 853 856 854 857 for (size_t i=0; i<40; i++) … … 974 977 975 978 void SetOutputFormat(FileFormat_t f) { fFileFormat = f; } 979 980 void SetDebugLog(bool b) { fDebugLog = b; } 976 981 977 982 void SetDebugStream(bool b) … … 1332 1337 } 1333 1338 1339 map<boost::thread::id, string> fLastMessage; 1340 1334 1341 void factOut(int severity, int err, const char *message) 1335 1342 { 1336 // FIXME: Make the output to the console stream thread-safe 1343 if (!fDebugLog && severity==99) 1344 return; 1345 1337 1346 ostringstream str; 1347 //str << boost::this_thread::get_id() << " "; 1338 1348 str << "EventBuilder("; 1339 1349 if (err<0) … … 1343 1353 str << "): " << message; 1344 1354 1345 static string last; 1346 if (str.str()==last) 1355 string &old = fLastMessage[boost::this_thread::get_id()]; 1356 1357 if (str.str()==old) 1347 1358 return; 1348 1349 last = str.str(); 1359 old = str.str(); 1360 1350 1361 fMsg.Update(str, severity); 1351 1362 } … … 1705 1716 void factOut(int severity, int err, const char *message) 1706 1717 { 1707 if (severity!=99) 1708 EventBuilderWrapper::This->factOut(severity, err, message); 1718 EventBuilderWrapper::This->factOut(severity, err, message); 1709 1719 } 1710 1720
Note:
See TracChangeset
for help on using the changeset viewer.