Skip to content

Commit

Permalink
cli: add option to set output file
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelHu committed Apr 1, 2024
1 parent 6e91b6d commit a6353a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/remage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ int main(int argc, char** argv) {
bool interactive = false;
std::vector<std::string> gdmls;
std::vector<std::string> macros;
std::string output;
RMGLog::LogLevel loglevel = RMGLog::summary;

app.add_flag("-q", quiet, "Print only warnings and errors");
Expand All @@ -41,6 +42,7 @@ int main(int argc, char** argv) {
app.add_flag("-i,--interactive", interactive, "Run in interactive mode");
app.add_option("-t,--threads", nthreads, "Number of threads");
app.add_option("-g,--gdml-files", gdmls, "GDML files");
app.add_option("-o,--output-file", output, "Output file for detector hits");
app.add_option("macros", macros, "Macro files");

CLI11_PARSE(app, argc, argv);
Expand All @@ -61,6 +63,7 @@ int main(int argc, char** argv) {

for (const auto& g : gdmls) manager.GetDetectorConstruction()->IncludeGDMLFile(g);
for (const auto& m : macros) manager.IncludeMacroFile(m);
if (!output.empty()) manager.SetOutputFileName(output);

manager.Initialize();
manager.Run();
Expand Down

0 comments on commit a6353a9

Please sign in to comment.