cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
ProgressBar.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-2021 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef CepGen_Utils_ProgressBar_h
20
#define CepGen_Utils_ProgressBar_h
21
22
#include <string>
23
24
namespace
cepgen
{
25
namespace
utils {
26
class
Timer;
28
class
ProgressBar
{
29
public
:
33
explicit
ProgressBar
(
size_t
tot,
size_t
freq = 10);
34
~ProgressBar
();
37
void
update
(
size_t
iter)
const
;
38
39
private
:
40
std::unique_ptr<Timer> tmr_;
41
const
size_t
bar_length_;
42
const
std::string bar_pattern_;
43
const
bool
enabled_;
44
size_t
total_, frequency_;
45
};
46
}
// namespace utils
47
}
// namespace cepgen
48
49
#endif
cepgen::utils::ProgressBar
A simple progress indicator.
Definition
ProgressBar.h:28
cepgen::utils::ProgressBar::~ProgressBar
~ProgressBar()
Definition
ProgressBar.cpp:37
cepgen::utils::ProgressBar::update
void update(size_t iter) const
Broadcast the current progress to the bar.
Definition
ProgressBar.cpp:43
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
Utils
ProgressBar.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7