CMS 3D CMS Logo

DMRsingle.cc
Go to the documentation of this file.
1 #include <cstdlib>
2 #include <iostream>
3 
4 #include "exceptions.h"
5 #include "toolbox.h"
6 #include "Options.h"
7 
8 #include "boost/filesystem.hpp"
9 #include "boost/property_tree/ptree.hpp"
10 #include "boost/property_tree/json_parser.hpp"
11 
12 using namespace std;
13 using namespace AllInOneConfig;
14 
15 namespace pt = boost::property_tree;
16 namespace fs = boost::filesystem;
17 
18 int single(int argc, char* argv[]) {
19  // parse the command line
21  options.helper(argc, argv);
22  options.parser(argc, argv);
23 
24  pt::ptree main_tree;
25  pt::read_json(options.config, main_tree);
26 
27  pt::ptree alignment = main_tree.get_child("alignment");
28  pt::ptree validation = main_tree.get_child("validation");
29 
30  // just dump the content, to show that it can be used
31  dump(alignment);
33 
34  return EXIT_SUCCESS;
35 }
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 int main(int argc, char* argv[]) { return exceptions<single>(argc, argv); }
39 #endif
int main(int argc, char *argv[])
Definition: DMRsingle.cc:38
int single(int argc, char *argv[])
Definition: DMRsingle.cc:18