coolchecksum adapted to ProtoStream

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1282 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hellwig
2012-05-30 12:56:29 +00:00
parent 2566658b53
commit 2ab9284f73
6 changed files with 38 additions and 35 deletions

View File

@ -62,8 +62,8 @@ bool CoolChecksumExperiment::run()
tp.restrictMemoryAddresses(&mm);
// record trace
Trace trace;
tp.setTraceMessage(&trace);
std::ofstream of("trace.pb");
tp.setTraceFile(&of);
// this must be done *after* configuring the plugin:
sal::simulator.addFlow(&tp);
@ -86,13 +86,11 @@ bool CoolChecksumExperiment::run()
sal::simulator.removeFlow(&tp);
// serialize trace to file
std::ofstream of("trace.pb");
if (of.fail()) {
log << "failed to write trace.pb" << endl;
sal::simulator.clearEvents(this);
return false;
}
trace.SerializeToOstream(&of);
of.close();
#endif