The Gaudi Framework
master (6507eef1)
Toggle main menu visibility
Loading...
Searching...
No Matches
P1D.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2026 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 "
Generic1D.h
"
14
#include <AIDA/IProfile1D.h>
15
#include <
Gaudi/Histograming/Sink/Utils.h
>
16
#include <
GaudiKernel/DataObject.h
>
17
#include <TProfile.h>
18
19
#include <mutex>
20
#include <nlohmann/json.hpp>
21
22
/*
23
* Gaudi namespace
24
*/
25
namespace
Gaudi
{
26
33
class
GAUDI_API
Profile1D
:
public
DataObject
,
public
Generic1D
<AIDA::IProfile1D, TProfile> {
34
typedef
AIDA::IAnnotation
IAnnotation
;
35
36
private
:
37
void
init
(
const
std::string&
title
,
bool
initialize_axis =
true
);
38
39
public
:
41
Profile1D
();
43
Profile1D
( TProfile* rep );
44
46
bool
fill
(
double
x,
double
y,
double
weight = 1. )
override
;
47
virtual
bool
setBinContents
(
int
i,
int
entries
,
double
height,
double
error,
double
spread,
double
centre );
48
friend
void
reset
(
Profile1D
& h ) { h.reset(); }
50
friend
void
to_json
( nlohmann::json& j,
Profile1D
const
& p ) { j = *p.
m_rep
.get(); }
52
const
CLID
&
clID
()
const override
{
return
classID
(); }
53
static
const
CLID
&
classID
() {
return
CLID_ProfileH; }
54
55
private
:
56
std::mutex
m_fillSerialization
;
57
58
};
// end class IProfile1D
59
}
// end namespace Gaudi
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
DataObject.h
Utils.h
Generic1D.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
DataObject::DataObject
DataObject()
Standard Constructor.
Definition
DataObject.cpp:23
Gaudi::Generic1D< AIDA::IProfile1D, TProfile >::title
std::string title() const override
Definition
Generic1D.h:65
Gaudi::Generic1D< AIDA::IProfile1D, TProfile >::Generic1D
Generic1D()=default
Gaudi::Generic1D::m_rep
std::unique_ptr< IMPLEMENTATION > m_rep
Reference to underlying implementation.
Definition
Generic1D.h:140
Gaudi::Generic1D< AIDA::IProfile1D, TProfile >::entries
int entries() const override
Definition
Generic1D.h:82
Gaudi::Profile1D::Profile1D
Profile1D()
Default Constructor.
Definition
P1D.cpp:80
Gaudi::Profile1D::fill
bool fill(double x, double y, double weight=1.) override
Fill the Profile1D with a value and the corresponding weight.
Definition
P1D.cpp:108
Gaudi::Profile1D::m_fillSerialization
std::mutex m_fillSerialization
Definition
P1D.h:56
Gaudi::Profile1D::classID
static const CLID & classID()
Definition
P1D.h:53
Gaudi::Profile1D::reset
friend void reset(Profile1D &h)
Definition
P1D.h:48
Gaudi::Profile1D::IAnnotation
AIDA::IAnnotation IAnnotation
Definition
P1D.h:34
Gaudi::Profile1D::to_json
friend void to_json(nlohmann::json &j, Profile1D const &p)
conversion to json via nlohmann library
Definition
P1D.h:50
Gaudi::Profile1D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition
P1D.h:52
Gaudi::Profile1D::setBinContents
virtual bool setBinContents(int i, int entries, double height, double error, double spread, double centre)
Definition
P1D.cpp:94
Gaudi::Profile1D::init
void init(const std::string &title, bool initialize_axis=true)
Definition
P1D.cpp:84
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
P1D.h
Generated on
for The Gaudi Framework by
1.17.0