Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cphd xml extraction schema arg #342

Merged
merged 4 commits into from
Jun 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions six/modules/c++/samples/extract_cphd_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ int main(int argc, char** argv)
const bool prettyPrint = options->get<bool>("prettyPrint");
std::string basename = options->get<std::string>("basename");
const bool toConsole = options->get<bool>("console");
const std::string inputFile = options->get<std::string> ("cphd");
const std::string schemaFile = options->get<std::string> ("schema");
const std::string inputFile = options->get<std::string>("cphd");
const std::string schemaFile = options->get<std::string>("schema");

// Check for conflicting input
if (!basename.empty() && toConsole)
Expand All @@ -74,7 +74,10 @@ int main(int argc, char** argv)
std::string outPathname = basename + ".xml";

std::vector<std::string> schemaPathnames;
schemaPathnames.push_back(schemaFile);
if (!schemaFile.empty())
{
schemaPathnames.push_back(schemaFile);
}

// Reads in CPHD and verifies XML using schema
cphd::CPHDReader reader(inputFile, sys::OS().getNumCPUs());
Expand Down