visitors_.push_back(v);
}
+// Enable the Common Trace Format (CTF) converter for the Application
+void Application::enableCTFLog(const string &outdir)
+{
+ // TODO
+ //NxMessageVisitor* v = new CTFLogVisitor(outdir);
+ //visitors_.push_back(v);
+}
+
// Main application entry
bool Application::process(const string & fn)
{
*/
void enableFmanLog();
+ /*!
+ @abstract Enable the Common Trace Format (CTF) converter for the Application
+ @param outdir output directory for the CTF traces
+ */
+ void enableCTFLog(const string &outdir);
+
/*!
@abstract Open the named file and process the Nexus data
@param fn filename containing data
cout
<< " --summary Display a summary of message count information"
<< endl;
+ cout
+ << " --ctf <outdir> Convert the trace to the Common Trace Format (CTF) in outdir"
+ << endl;
}
void versionOption()
Application app;
string in_filename;
+ string ctf_outdir;
+ bool process_ctf_outdir = false;
// process the options
for (int i = 1; i < argc; i++) {
} else if (argStr.find("--fmlog") == 0) {
app.enableFmanLog();
+ } else if (argStr.find("--ctf") == 0) {
+ process_ctf_outdir = true;
+
+ } else if (process_ctf_outdir) {
+ ctf_outdir = argStr;
+ app.enableCTFLog(ctf_outdir);
+ process_ctf_outdir = false;
+
} else if (in_filename.empty()) {
// treat as the filename
in_filename = argStr;
}
}
+ // no ctf output path specified
+ if (process_ctf_outdir && ctf_outdir.empty()) {
+ helpOption();
+ return -1;
+ }
+
// check if filename not found
if (in_filename.empty()) {
helpOption();