LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
fhicl-expand.cc File Reference
#include "cetlib/container_algorithms.h"
#include "cetlib/filepath_maker.h"
#include "cetlib/includer.h"
#include "cetlib/ostream_handle.h"
#include "cetlib/parsed_program_options.h"
#include "cetlib_except/exception.h"
#include <iostream>
#include <memory>
#include <string>
#include <vector>

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 60 of file fhicl-expand.cc.

References e.

61 {
62  Options opts;
63  try {
64  opts = process_arguments(argc, argv);
65  }
66  catch (cet::exception const& e) {
67  if (e.category() == help)
68  return 0;
69  if (e.category() == processing)
70  return 1;
71  }
72 
73  // Set output/error streams
74  auto out = cet::select_stream(opts.output_filename, std::cout);
75  auto err = cet::select_stream(opts.error_filename, std::cerr);
76 
77  int nfailures{};
78  for (std::string const& filename : opts.input_filenames)
79  nfailures += do_including(filename, *opts.policy, out, err);
80 
81  return nfailures;
82 }
Float_t e
Definition: plot.C:35
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33