CMS 3D CMS Logo

SplitVmerge.cc
Go to the documentation of this file.
1 #include <cstdlib>
2 #include <string>
3 #include <iostream>
4 #include <numeric>
5 #include <functional>
6 
7 #include "exceptions.h"
8 #include "toolbox.h"
9 #include "Options.h"
10 
11 #include "boost/filesystem.hpp"
12 #include "boost/property_tree/ptree.hpp"
13 #include "boost/property_tree/json_parser.hpp"
14 #include "boost/optional.hpp"
15 
16 #include "TString.h"
17 #include "TASImage.h"
18 
20 #include "Alignment/OfflineValidation/macros/FitPVResolution.C"
22 
23 using namespace std;
24 using namespace AllInOneConfig;
25 
26 namespace pt = boost::property_tree;
27 
28 int merge(int argc, char* argv[]) {
29  // parse the command line
30 
32  options.helper(argc, argv);
33  options.parser(argc, argv);
34 
35  //Read in AllInOne json config
36  pt::ptree main_tree;
37  pt::read_json(options.config, main_tree);
38 
39  pt::ptree alignments = main_tree.get_child("alignments");
40  pt::ptree validation = main_tree.get_child("validation");
41 
42  for (const auto& childTree : alignments) {
43  PVResolution::loadFileList((childTree.second.get<string>("file") + "/SplitV.root").c_str(),
44  "PrimaryVertexResolution",
45  childTree.second.get<string>("title"),
46  childTree.second.get<int>("color"),
47  childTree.second.get<int>("style"));
48  }
49 
50  FitPVResolution("", "");
51 
52  return EXIT_SUCCESS;
53 }
54 
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 int main(int argc, char* argv[]) { return exceptions<merge>(argc, argv); }
57 #endif
int merge(int argc, char *argv[])
Definition: SplitVmerge.cc:28
int main(int argc, char *argv[])
Definition: SplitVmerge.cc:56