The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
P1D.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 "Generic1D.h"
14#include <AIDA/IProfile1D.h>
17#include <TProfile.h>
18
19#include <nlohmann/json.hpp>
20
21/*
22 * Gaudi namespace
23 */
24namespace Gaudi {
25
32 class GAUDI_API Profile1D : public DataObject, public Generic1D<AIDA::IProfile1D, TProfile> {
33 typedef AIDA::IAnnotation IAnnotation;
34
35 private:
36 void init( const std::string& title, bool initialize_axis = true );
37
38 public:
40 Profile1D();
42 Profile1D( TProfile* rep );
43
45 bool fill( double x, double y, double weight = 1. ) override;
46 virtual bool setBinContents( int i, int entries, double height, double error, double spread, double centre );
47 friend void reset( Profile1D& h ) { h.reset(); }
49 friend void to_json( nlohmann::json& j, Profile1D const& p ) { j = *p.m_rep.get(); }
51 const CLID& clID() const override { return classID(); }
52 static const CLID& classID() { return CLID_ProfileH; }
53
54 private:
56
57 }; // end class IProfile1D
58} // 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:55
static const CLID & classID()
Definition P1D.h:52
friend void reset(Profile1D &h)
Definition P1D.h:47
AIDA::IAnnotation IAnnotation
Definition P1D.h:33
friend void to_json(nlohmann::json &j, Profile1D const &p)
conversion to json via nlohmann library
Definition P1D.h:49
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition P1D.h:51
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