Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
master (f31105fd)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
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
j
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
Files
File List
File 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
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
q
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
H2D.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include "
Generic2D.h
"
14
#include <AIDA/IHistogram2D.h>
15
#include <
Gaudi/Histograming/Sink/Utils.h
>
16
#include <
GaudiKernel/DataObject.h
>
17
#include <TH2D.h>
18
19
#include <nlohmann/json.hpp>
20
21
namespace
Gaudi
{
22
class
Histogram1D;
23
30
class
GAUDI_API
Histogram2D
:
public
DataObject
,
public
Generic2D
<AIDA::IHistogram2D, TH2D> {
31
public
:
33
Histogram2D
();
35
Histogram2D
( TH2D* rep );
36
38
bool
fill(
double
x,
double
y,
double
weight = 1. )
override
;
40
virtual
bool
setBinContents(
int
binIndexX,
int
binIndexY,
int
entries,
double
height,
double
error,
double
centreX,
41
double
centreY );
43
bool
setRms(
double
rmsX,
double
rmsY );
44
// overwrite reset
45
bool
reset()
override
;
46
// free function reset
47
friend
void
reset
(
Histogram2D
&
h
) {
h
.reset(); }
49
friend
void
to_json
(
nlohmann::json
&
j
,
Histogram2D
const
&
h
) {
j
= *
h
.m_rep.get(); }
51
void
copyFromAida(
const
AIDA::IHistogram2D&
h
);
53
const
CLID
&
clID
()
const override
{
return
classID(); }
54
static
const
CLID
&
classID
() {
return
CLID_H2D; }
55
56
protected
:
57
// cache sumwx and sumwy when setting contents since I don't have bin mean
58
double
m_sumwx = 0;
59
double
m_sumwy = 0;
60
61
private
:
62
std::mutex
m_fillSerialization
;
63
};
64
}
// namespace Gaudi
Gaudi::Histogram2D::to_json
friend void to_json(nlohmann::json &j, Histogram2D const &h)
conversion to json via nlohmann library
Definition:
H2D.h:49
Gaudi::Histogram2D::classID
static const CLID & classID()
Definition:
H2D.h:54
jsonFromLHCbLog.json
json
Definition:
jsonFromLHCbLog.py:86
Utils.h
Gaudi::Histogram2D::reset
friend void reset(Histogram2D &h)
Definition:
H2D.h:47
ProduceConsume.j
j
Definition:
ProduceConsume.py:104
Gaudi::Histogram2D::m_fillSerialization
std::mutex m_fillSerialization
Definition:
H2D.h:62
AlgSequencer.h
h
Definition:
AlgSequencer.py:31
Gaudi::Histogram2D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition:
H2D.h:53
CLID
unsigned int CLID
Class ID definition.
Definition:
ClassID.h:18
Gaudi::Histogram2D
Definition:
H2D.h:30
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition:
__init__.py:1
DataObject.h
Generic2D.h
DataObject
Definition:
DataObject.h:36
std::mutex
STL class.
Gaudi::Generic2D
Definition:
Generic2D.h:46
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:81
GaudiCommonSvc
include
GaudiCommonSvc
H2D.h
Generated on Mon Apr 7 2025 16:26:19 for The Gaudi Framework by
1.8.18