Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:41

0001 
0002 // Copyright 2020, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 #include <JANA/CLI/JMain.h>
0006 #include <JANA/JVersion.h>
0007 
0008 int main(int argc, char* argv[]) {
0009 
0010     auto options = jana::ParseCommandLineOptions(argc, argv, false);
0011 
0012     if (options.flags[jana::ShowUsage]) {
0013         // Show usage information and exit immediately
0014         jana::PrintUsage();
0015         return -1;
0016     }
0017     if (options.flags[jana::ShowVersion]) {
0018         // Show version information and exit immediately
0019         JVersion::PrintVersionDescription(std::cout);
0020         return -1;
0021     }
0022     auto app = jana::CreateJApplication(options);
0023 
0024     // Keep japp global around for backwards compatibility. Don't use this in new code, however
0025     japp = app;
0026 
0027     auto exit_code = jana::Execute(app, options);
0028     delete app;
0029     return exit_code;
0030 }
0031