File indexing completed on 2024-04-06 11:56:55
0001 #include <cstdlib>
0002 #include <string>
0003 #include <iostream>
0004 #include <numeric>
0005 #include <functional>
0006
0007 #include "exceptions.h"
0008 #include "toolbox.h"
0009 #include "Options.h"
0010
0011 #include "boost/filesystem.hpp"
0012 #include "boost/property_tree/ptree.hpp"
0013 #include "boost/property_tree/json_parser.hpp"
0014 #include "boost/optional.hpp"
0015
0016 #include "TString.h"
0017 #include "TASImage.h"
0018
0019 #include "Alignment/OfflineValidation/interface/CompareAlignments.h"
0020 #include "Alignment/OfflineValidation/macros/FitPVResolution.C"
0021 #include "Alignment/OfflineValidation/interface/TkAlStyle.h"
0022
0023 using namespace std;
0024 using namespace AllInOneConfig;
0025
0026 namespace pt = boost::property_tree;
0027
0028 int merge(int argc, char* argv[]) {
0029
0030
0031 Options options;
0032 options.helper(argc, argv);
0033 options.parser(argc, argv);
0034
0035
0036 pt::ptree main_tree;
0037 pt::read_json(options.config, main_tree);
0038
0039 pt::ptree alignments = main_tree.get_child("alignments");
0040 pt::ptree validation = main_tree.get_child("validation");
0041
0042 for (const auto& childTree : alignments) {
0043 PVResolution::loadFileList((childTree.second.get<string>("file") + "/SplitV.root").c_str(),
0044 "PrimaryVertexResolution",
0045 childTree.second.get<string>("title"),
0046 childTree.second.get<int>("color"),
0047 childTree.second.get<int>("style"));
0048 }
0049
0050 FitPVResolution("", "");
0051
0052 return EXIT_SUCCESS;
0053 }
0054
0055 #ifndef DOXYGEN_SHOULD_SKIP_THIS
0056 int main(int argc, char* argv[]) { return exceptions<merge>(argc, argv); }
0057 #endif