Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HeatmapAnalyzer.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * ZW, Zef Wolffs, Nikhef, zefwolffs@gmail.com
5 *
6 * Copyright (c) 2022, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef ROOT_ROOFIT_MultiProcess_HeatmapAnalyzer
14#define ROOT_ROOFIT_MultiProcess_HeatmapAnalyzer
15
16#include "TString.h"
17#include "TH2I.h"
18
19#include <memory>
20#include <vector>
21#include <string>
22#include <nlohmann/json.hpp>
24
25namespace RooFit {
26namespace MultiProcess {
27
29public:
30 HeatmapAnalyzer(std::string const& logs_dir);
31
32 // main method of this class, produces heatmap
33 std::unique_ptr<TH2I> analyze(int analyzed_gradient);
34
35 // getters to inspect logfiles
36 std::vector<std::string> const getPartitionNames();
37 std::vector<std::string> const getTaskNames();
38 json const getMetadata();
39
40private:
41 // internal helper functions
42 std::string findTaskForDuration(json durations, int start_t, int end_t);
43 void sortTaskNames(std::vector<std::string> &task_names);
44
46
49 std::vector<json> durations_;
50
51 std::vector<std::string> tasks_names_;
52 std::vector<std::string> eval_partitions_names_;
53};
54
55} // namespace MultiProcess
56} // namespace RooFit
57
58#endif // ROOT_ROOFIT_MultiProcess_HeatmapAnalyzer
nlohmann::json json
Reads and processes logfiles produced by RooFit::MultiProcess::ProcessTimer.
std::unique_ptr< TH2I > analyze(int analyzed_gradient)
This method is the main functionality in this class.
std::vector< std::string > const getPartitionNames()
std::vector< std::string > const getTaskNames()
std::vector< std::string > tasks_names_
std::string findTaskForDuration(json durations, int start_t, int end_t)
void sortTaskNames(std::vector< std::string > &task_names)
std::vector< std::string > eval_partitions_names_
2-D histogram with an int per channel (see TH1 documentation)}
Definition TH2.h:216
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition Common.h:18
basic_json<> json