The Gaudi Framework
v36r9p1 (5c15b2bb)
H2D.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
#ifndef HISTOGRAMSVC_H2D_H
12
#define HISTOGRAMSVC_H2D_H 1
13
14
#include "AIDA/IHistogram2D.h"
15
#include "
Generic2D.h
"
16
#include <
GaudiKernel/DataObject.h
>
17
#include <TH2D.h>
18
19
namespace
Gaudi
{
20
class
Histogram1D;
21
28
class
GAUDI_API
Histogram2D
:
public
DataObject
,
public
Generic2D
<AIDA::IHistogram2D, TH2D> {
29
public
:
31
Histogram2D
();
33
Histogram2D
( TH2D* rep );
34
36
bool
fill
(
double
x,
double
y,
double
weight = 1. )
override
;
38
virtual
bool
setBinContents(
int
binIndexX,
int
binIndexY,
int
entries,
double
height,
double
error,
double
centreX,
39
double
centreY );
41
bool
setRms(
double
rmsX,
double
rmsY );
42
// overwrite reset
43
bool
reset()
override
;
45
void
copyFromAida(
const
AIDA::IHistogram2D&
h
);
47
const
CLID
&
clID
()
const override
{
return
classID(); }
48
static
const
CLID
&
classID
() {
return
CLID_H2D; }
49
50
protected
:
51
// cache sumwx and sumwy when setting contents since I don't have bin mean
52
double
m_sumwx = 0;
53
double
m_sumwy = 0;
54
55
private
:
56
std::mutex
m_fillSerialization
;
57
};
58
}
// namespace Gaudi
59
#endif // HISTOGRAMSVC_H2D_H
Gaudi::Histogram2D::classID
static const CLID & classID()
Definition:
H2D.h:48
Gaudi::Histogram2D::m_fillSerialization
std::mutex m_fillSerialization
Definition:
H2D.h:56
AlgSequencer.h
h
Definition:
AlgSequencer.py:32
Gaudi::Histogram2D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition:
H2D.h:47
CLID
unsigned int CLID
Class ID definition.
Definition:
ClassID.h:18
Gaudi::Histogram2D
Definition:
H2D.h:28
Gaudi
Header file for std:chrono::duration-based Counters.
Definition:
__init__.py:1
DataObject.h
Generic2D.h
DataObject
Definition:
DataObject.h:40
std::mutex
STL class.
Gaudi::Generic2D
Definition:
Generic2D.h:46
Gaudi::Utils::Histos::fill
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
Definition:
Fill.cpp:45
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:81
GaudiCommonSvc
include
GaudiCommonSvc
H2D.h
Generated on Fri Feb 3 2023 18:02:52 for The Gaudi Framework by
1.8.18