#include <fstream>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <map>
#include <vector>
#include <dlfcn.h>
#include <fhiclcpp/ParameterSet.h>
#include <core/ProcessorBase.hh>
#include <core/ProcessorBlock.hh>
Go to the source code of this file.
Load a Processor.
Definition at line 20 of file sbn_static.cxx.
struct core::export_table exports
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 25 of file sbn_static.cxx.
27 std::vector<char*> config_names;
30 while ((c=getopt(argc, argv,
"c:")) != -1) {
33 config_names.push_back(optarg);
37 fprintf(stderr,
"Option -%c requires an argument.\n", optopt);
38 else if (isprint(optopt))
39 fprintf(stderr,
"Unknown option `-%c'.\n", optopt);
41 fprintf(stderr,
"Unknown option character `\\x%x'.\n", optopt);
48 if (argc - optind < 1) {
49 std::cout <<
"Usage: " << argv[0] <<
" [-c [Config]] "
50 <<
"INPUTDEF [...]" << std::endl;
55 std::vector<std::string> filenames;
56 for (
int i=optind; i<argc; i++) {
57 filenames.push_back(argv[i]);
59 assert(!filenames.empty());
62 int n_processors = config_names.empty() ? 1 : config_names.size();
63 std::vector<fhicl::ParameterSet*>
configs(n_processors);
64 std::vector<core::ProcessorBase*> procs(n_processors);
66 std::cout <<
"Configuring... " << std::endl;
67 for (
size_t i=0; i<n_processors; i++) {
73 for (
int i=0; i<procs.size(); i++) {
process_name WireCellLarsoft configs
ProcessorBase *(* create)(void)
virtual void DeleteProcessors()
core::export_table * LoadProcessor()
fhicl::ParameterSet * LoadConfig(char *configfile)
virtual void ProcessFiles(std::vector< std::string > filenames)
virtual void AddProcessor(ProcessorBase *processor, fhicl::ParameterSet *config)
BEGIN_PROLOG could also be cout