cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
N/A
Central exclusive processes event generator
Toggle main menu visibility
Main Page
Related Pages
Packages
Package List
Package Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
x
y
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
x
y
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
b
c
d
e
g
h
i
l
m
n
p
r
t
u
w
x
y
z
Related Symbols
d
g
h
o
u
v
Files
File List
File Members
All
_
a
b
c
d
e
h
o
p
r
s
Functions
Variables
Macros
_
b
c
d
e
p
r
s
▼
CepGen
Reference manual
Bibliography
►
Packages
►
Classes
▼
Files
▼
File List
▼
include
▼
CepGen
►
Cards
►
Core
►
Event
►
EventFilter
►
FormFactors
►
Integration
►
Modules
►
PartonFluxes
►
Physics
►
Process
►
StructureFunctions
▼
Utils
►
AbortHandler.h
►
Algebra.h
►
ArgumentsParser.h
►
Caller.h
►
Collections.h
►
Derivator.h
►
DocumentationGenerator.h
►
Drawable.h
►
Drawer.h
►
Environment.h
►
EventUtils.h
►
Filesystem.h
►
Functional.h
►
FunctionWrapper.h
►
Graph.h
►
GridDrawer.h
►
GridHandler.h
►
GSLFunctionWrapper.h
►
GSLMonteFunctionWrapper.h
►
Hasher.h
►
Histogram.h
►
Limits.h
►
Logger.h
►
Math.h
►
Message.h
►
Piper.h
►
ProcessVariablesAnalyser.h
►
ProgressBar.h
►
RandomGenerator.h
►
StreamCollector.h
►
String.h
►
Test.h
►
TimeKeeper.h
►
Timer.h
►
Value.h
►
Generator.h
►
Version.h
►
CepGenBoost
►
CepGenHepMC2
►
CepGenHepMC3
►
CepGenHerwig6
►
CepGenMadGraph
►
CepGenPythia6
►
CepGenPythia8
►
CepGenPython
►
CepGenRoot
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Drawer.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2022-2025 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_Drawer_h
20
#define CepGen_Utils_Drawer_h
21
22
#include <cstdint>
23
24
#include "
CepGen/Modules/NamedModule.h
"
25
26
namespace
cepgen::utils
{
27
class
Graph1D;
28
class
Graph2D;
29
class
Hist1D;
30
class
Hist2D;
31
class
Drawable;
32
using
DrawableColl
= std::vector<const Drawable*>;
34
class
Drawer
:
public
NamedModule
<Drawer> {
35
public
:
37
explicit
Drawer
(
const
ParametersList
& params);
38
39
class
Mode
{
40
public
:
41
enum
value_t
: uint16_t {
42
none
= 0,
43
logx
= 1 << 0,
44
logy
= 1 << 1,
45
logz
= 1 << 2,
46
nostack
= 1 << 3,
47
grid
= 1 << 4,
48
col
= 1 << 5,
49
cont
= 1 << 6,
50
ratio
= 1 << 7,
51
bar
= 1 << 8
52
};
41
enum
value_t
: uint16_t {
…
};
53
Mode
() : value_(
none
) {}
54
Mode
(
int
val) : value_(static_cast<
value_t
>(val)) {}
55
Mode
(
const
value_t
& val) : value_(val) {}
56
57
friend
std::ostream&
operator<<
(std::ostream&,
const
Mode
&);
58
friend
bool
operator&
(
const
Mode
&,
const
Mode::value_t
&);
59
60
const
value_t
&
value
()
const
{
return
value_; }
61
62
private
:
63
value_t
value_;
64
};
39
class
Mode
{
…
};
65
66
virtual
const
Drawer
&
draw
(
const
Graph1D
&,
const
Mode
& =
Mode::none
)
const
= 0;
67
virtual
const
Drawer
&
draw
(
const
Graph2D
&,
const
Mode
& =
Mode::none
)
const
= 0;
69
virtual
const
Drawer
&
draw
(
const
Hist1D
&,
const
Mode
& =
Mode::none
)
const
= 0;
71
virtual
const
Drawer
&
draw
(
const
Hist2D
&,
const
Mode
& =
Mode::none
)
const
= 0;
72
74
virtual
const
Drawer
&
draw
(
const
DrawableColl
&,
75
const
std::string&
name
=
""
,
76
const
std::string& title =
""
,
77
const
Mode
& =
Mode::none
)
const
= 0;
78
80
inline
virtual
std::ostream&
operator<<
(std::ostream& os)
const
{
return
os; }
81
82
protected
:
83
friend
class
Drawable
;
84
friend
class
Graph1D
;
85
friend
class
Graph2D
;
86
friend
class
Hist1D
;
87
friend
class
Hist2D
;
88
};
34
class
Drawer
:
public
NamedModule
<Drawer> {
…
};
89
}
// namespace cepgen::utils
90
namespace
cepgen
{
91
utils::Drawer::Mode
operator|
(
const
utils::Drawer::Mode
&,
const
utils::Drawer::Mode::value_t
&);
92
utils::Drawer::Mode
operator|
(
const
utils::Drawer::Mode::value_t
&,
const
utils::Drawer::Mode::value_t
&);
93
}
// namespace cepgen
94
cepgen::utils::Drawer::Mode
&
operator|=
(
cepgen::utils::Drawer::Mode
&,
const
cepgen::utils::Drawer::Mode::value_t
&);
95
96
#endif
operator|=
cepgen::utils::Drawer::Mode & operator|=(cepgen::utils::Drawer::Mode &, const cepgen::utils::Drawer::Mode::value_t &)
NamedModule.h
cepgen::NamedModule
Base runtime module object.
Definition
NamedModule.h:28
cepgen::NamedModule< Drawer >::name
const std::string & name() const
Module unique indexing name.
Definition
NamedModule.h:42
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::utils::Drawable
A generic object which can be drawn in the standard output.
Definition
Drawable.h:30
cepgen::utils::Drawer::Mode
Definition
Drawer.h:39
cepgen::utils::Drawer::Mode::Mode
Mode(const value_t &val)
Definition
Drawer.h:55
cepgen::utils::Drawer::Mode::Mode
Mode()
Definition
Drawer.h:53
cepgen::utils::Drawer::Mode::operator&
friend bool operator&(const Mode &, const Mode::value_t &)
cepgen::utils::Drawer::Mode::operator<<
friend std::ostream & operator<<(std::ostream &, const Mode &)
cepgen::utils::Drawer::Mode::Mode
Mode(int val)
Definition
Drawer.h:54
cepgen::utils::Drawer::Mode::value_t
value_t
Definition
Drawer.h:41
cepgen::utils::Drawer::Mode::col
@ col
Definition
Drawer.h:48
cepgen::utils::Drawer::Mode::cont
@ cont
Definition
Drawer.h:49
cepgen::utils::Drawer::Mode::bar
@ bar
Definition
Drawer.h:51
cepgen::utils::Drawer::Mode::logz
@ logz
Definition
Drawer.h:45
cepgen::utils::Drawer::Mode::nostack
@ nostack
Definition
Drawer.h:46
cepgen::utils::Drawer::Mode::grid
@ grid
Definition
Drawer.h:47
cepgen::utils::Drawer::Mode::none
@ none
Definition
Drawer.h:42
cepgen::utils::Drawer::Mode::ratio
@ ratio
Definition
Drawer.h:50
cepgen::utils::Drawer::Mode::logx
@ logx
Definition
Drawer.h:43
cepgen::utils::Drawer::Mode::logy
@ logy
Definition
Drawer.h:44
cepgen::utils::Drawer::Mode::value
const value_t & value() const
Definition
Drawer.h:60
cepgen::utils::Drawer
Definition
Drawer.h:34
cepgen::utils::Drawer::Drawer
Drawer(const ParametersList ¶ms)
Build a drawing utility.
cepgen::utils::Drawer::draw
virtual const Drawer & draw(const Hist2D &, const Mode &=Mode::none) const =0
Draw a two-dimensional histogram.
cepgen::utils::Drawer::draw
virtual const Drawer & draw(const DrawableColl &, const std::string &name="", const std::string &title="", const Mode &=Mode::none) const =0
Draw a collection of drawables.
cepgen::utils::Drawer::draw
virtual const Drawer & draw(const Graph1D &, const Mode &=Mode::none) const =0
Draw a one-dimensional graph.
cepgen::utils::Drawer::operator<<
virtual std::ostream & operator<<(std::ostream &os) const
Output operator (when necessary)
Definition
Drawer.h:80
cepgen::utils::Drawer::draw
virtual const Drawer & draw(const Hist1D &, const Mode &=Mode::none) const =0
cepgen::utils::Drawer::draw
virtual const Drawer & draw(const Graph2D &, const Mode &=Mode::none) const =0
Draw a two-dimensional graph Draw a one-dimensional histogram.
cepgen::utils::Graph1D
A one-dimensional graph object.
Definition
Graph.h:28
cepgen::utils::Graph2D
A two-dimensional graph object.
Definition
Graph.h:49
cepgen::utils::Hist1D
1D histogram container
Definition
Histogram.h:66
cepgen::utils::Hist2D
2D histogram container
Definition
Histogram.h:125
cepgen::utils
Collection of utilities.
Definition
RunParameters.h:33
cepgen::utils::DrawableColl
std::vector< const Drawable * > DrawableColl
Collection of drawable objects A generic drawing utility.
Definition
Drawer.h:32
cepgen
Common namespace for this Monte Carlo generator.
Definition
Handler.h:26
cepgen::operator|
utils::Drawer::Mode operator|(const utils::Drawer::Mode &, const utils::Drawer::Mode::value_t &)
include
CepGen
Utils
Drawer.h
Generated on Tue Apr 22 2025 for CepGen by
1.10.0