The Gaudi Framework  master (6507eef1)
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>
17#include <TProfile.h>
18
19#include <mutex>
20#include <nlohmann/json.hpp>
21
22/*
23 * Gaudi namespace
24 */
25namespace 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:
57
58 }; // end class IProfile1D
59} // end namespace Gaudi
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
DataObject()
Standard Constructor.
std::string title() const override
Definition Generic1D.h:65
std::unique_ptr< IMPLEMENTATION > m_rep
Reference to underlying implementation.
Definition Generic1D.h:140
Profile1D()
Default Constructor.
Definition P1D.cpp:80
bool fill(double x, double y, double weight=1.) override
Fill the Profile1D with a value and the corresponding weight.
Definition P1D.cpp:108
std::mutex m_fillSerialization
Definition P1D.h:56
static const CLID & classID()
Definition P1D.h:53
friend void reset(Profile1D &h)
Definition P1D.h:48
AIDA::IAnnotation IAnnotation
Definition P1D.h:34
friend void to_json(nlohmann::json &j, Profile1D const &p)
conversion to json via nlohmann library
Definition P1D.h:50
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition P1D.h:52
virtual bool setBinContents(int i, int entries, double height, double error, double spread, double centre)
Definition P1D.cpp:94
void init(const std::string &title, bool initialize_axis=true)
Definition P1D.cpp:84
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1