LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
catch_main.cc File Reference
#include "catch2/catch_session.hpp"
#include "cetlib/filepath_maker.h"
#include "fhiclcpp/ParameterSet.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include <string>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 14 of file catch_main.cc.

References fhicl::ParameterSet::make(), session, mf::SetIteration(), and mf::StartMessageFacility().

15 {
16  Catch::Session session;
17  std::string fhiclConfigFileName;
18  using namespace Catch::Clara;
19  // Our non-option argument, being non-optional, should be first.
20  auto cli = Arg(fhiclConfigFileName, "config.fcl")("<fhicl-config-file>") |
21  session.cli();
22 
23  session.cli(cli);
24 
25  int result = session.applyCommandLine(argc, argv);
26  if (result == 0) {
27  mf::SetIteration("JobSetup"s);
28  cet::filepath_maker fpm;
29  auto const msg_ps = fhicl::ParameterSet::make(fhiclConfigFileName, fpm);
31  result = session.run();
32  }
33  return (result < 0xff ? result : 0xff);
34 }
void SetIteration(string const &val)
static G4UIterminal * session
static ParameterSet make(intermediate_table const &tbl)
Definition: ParameterSet.cc:68
void StartMessageFacility(fhicl::ParameterSet const &pset, string const &applicationName)