The Gaudi Framework
master (2e57474e)
Toggle main menu visibility
Loading...
Searching...
No Matches
H3D.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 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 "
Generic3D.h
"
14
#include <AIDA/IHistogram3D.h>
15
#include <
Gaudi/Histograming/Sink/Utils.h
>
16
#include <
GaudiKernel/DataObject.h
>
17
#include <TH3D.h>
18
19
#include <nlohmann/json.hpp>
20
21
namespace
Gaudi
{
22
29
class
GAUDI_API
Histogram3D
:
public
DataObject
,
public
Generic3D
<AIDA::IHistogram3D, TH3D> {
30
public
:
32
Histogram3D
();
34
Histogram3D
( TH3D* rep );
35
37
bool
fill
(
double
x,
double
y,
double
z,
double
weight )
override
;
39
virtual
bool
setBinContents
(
int
i,
int
j,
int
k,
int
entries
,
double
height,
double
error,
double
centreX,
40
double
centreY,
double
centreZ );
42
virtual
bool
setRms
(
double
rmsX
,
double
rmsY
,
double
rmsZ
);
43
// overwrite reset
44
bool
reset
()
override
;
45
// free function reset
46
friend
void
reset
(
Histogram3D
& h ) { h.reset(); }
48
friend
void
to_json
( nlohmann::json& j,
Histogram3D
const
& h ) { j = *h.m_rep.get(); }
50
void
* cast(
const
std::string& className )
const override
;
52
void
copyFromAida(
const
AIDA::IHistogram3D& h );
54
const
CLID
&
clID
()
const override
{
return
classID
(); }
55
static
const
CLID
&
classID
() {
return
CLID_H3D; }
56
57
protected
:
58
// cache sumwx and sumwy when setting contents since I don't have bin mean
59
double
m_sumwx
= 0;
60
double
m_sumwy
= 0;
61
double
m_sumwz
= 0;
62
63
private
:
64
std::mutex
m_fillSerialization
;
65
};
66
}
// namespace Gaudi
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
DataObject.h
Utils.h
Generic3D.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
DataObject::DataObject
DataObject()
Standard Constructor.
Definition
DataObject.cpp:23
Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rmsX
double rmsX() const override
Definition
Generic3D.h:174
Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rmsZ
double rmsZ() const override
Definition
Generic3D.h:178
Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::Generic3D
Generic3D()=default
Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rmsY
double rmsY() const override
Definition
Generic3D.h:176
Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::entries
int entries() const override
Definition
Generic3D.h:251
Gaudi::Histogram3D::m_sumwy
double m_sumwy
Definition
H3D.h:60
Gaudi::Histogram3D::setBinContents
virtual bool setBinContents(int i, int j, int k, int entries, double height, double error, double centreX, double centreY, double centreZ)
Fast filling method for a given bin. It can be also the over/underflow bin.
Definition
H3D.cpp:91
Gaudi::Histogram3D::reset
bool reset() override
Definition
H3D.cpp:105
Gaudi::Histogram3D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition
H3D.h:54
Gaudi::Histogram3D::setRms
virtual bool setRms(double rmsX, double rmsY, double rmsZ)
Sets the rms of the histogram.
Definition
H3D.cpp:130
Gaudi::Histogram3D::Histogram3D
Histogram3D()
Standard Constructor.
Definition
H3D.cpp:73
Gaudi::Histogram3D::m_fillSerialization
std::mutex m_fillSerialization
Definition
H3D.h:64
Gaudi::Histogram3D::reset
friend void reset(Histogram3D &h)
Definition
H3D.h:46
Gaudi::Histogram3D::m_sumwz
double m_sumwz
Definition
H3D.h:61
Gaudi::Histogram3D::to_json
friend void to_json(nlohmann::json &j, Histogram3D const &h)
conversion to json via nlohmann library
Definition
H3D.h:48
Gaudi::Histogram3D::m_sumwx
double m_sumwx
Definition
H3D.h:59
Gaudi::Histogram3D::classID
static const CLID & classID()
Definition
H3D.h:55
Gaudi::Histogram3D::fill
bool fill(double x, double y, double z, double weight) override
Fill bin content.
Definition
H3D.cpp:114
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition
__init__.py:1
GaudiCommonSvc
include
GaudiCommonSvc
H3D.h
Generated on
for The Gaudi Framework by
1.17.0