Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Config.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl
5 *
6 * Copyright (c) 2021, 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_Config
14#define ROOT_ROOFIT_MultiProcess_Config
15
17
18#include <vector>
19#include <cstddef> // std::size_t
20
21namespace RooFit {
22namespace MultiProcess {
23
24class Config {
25public:
26 static void setDefaultNWorkers(unsigned int N_workers);
27 static unsigned int getDefaultNWorkers();
28
29 static void setTimingAnalysis(bool timingAnalysis);
30 static bool getTimingAnalysis();
31
33 // magic values to indicate that the number of tasks will be set automatically
34 constexpr static std::size_t automaticNEventTasks = 0;
35 constexpr static std::size_t automaticNComponentTasks = 0;
36
37 static std::size_t defaultNEventTasks;
38 static std::size_t defaultNComponentTasks;
39 };
40
41 struct Queue {
42 enum class QueueType {FIFO, Priority};
43 static bool setQueueType(QueueType queueType);
44 static QueueType getQueueType();
45 static void setTaskPriorities(std::size_t job_id, const std::vector<std::size_t>& task_priorities);
46 static void suggestTaskOrder(std::size_t job_id, const std::vector<Task>& task_order);
47 private:
49 };
50private:
51 static unsigned int defaultNWorkers_;
52 static bool timingAnalysis_;
53};
54
55} // namespace MultiProcess
56} // namespace RooFit
57
58#endif // ROOT_ROOFIT_MultiProcess_Config
Configuration for MultiProcess infrastructure.
Definition Config.h:24
static void setDefaultNWorkers(unsigned int N_workers)
Definition Config.cxx:67
static bool getTimingAnalysis()
Definition Config.cxx:87
static unsigned int defaultNWorkers_
Definition Config.h:51
static unsigned int getDefaultNWorkers()
Definition Config.cxx:92
static bool timingAnalysis_
Definition Config.h:52
static void setTimingAnalysis(bool timingAnalysis)
Definition Config.cxx:78
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition Common.h:18
static std::size_t defaultNComponentTasks
Definition Config.h:38
static constexpr std::size_t automaticNEventTasks
Definition Config.h:34
static constexpr std::size_t automaticNComponentTasks
Definition Config.h:35
static void suggestTaskOrder(std::size_t job_id, const std::vector< Task > &task_order)
Set the desired order for executing tasks of a Job in Priority queue mode.
Definition Config.cxx:138
static QueueType getQueueType()
Definition Config.cxx:107
static bool setQueueType(QueueType queueType)
Definition Config.cxx:97
static void setTaskPriorities(std::size_t job_id, const std::vector< std::size_t > &task_priorities)
Set the priority for Job tasks in Priority queue mode.
Definition Config.cxx:119