The Gaudi Framework  master (37c0b60a)
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>
16 #include <GaudiKernel/DataObject.h>
17 #include <TProfile.h>
18 
19 #include <nlohmann/json.hpp>
20 
21 /*
22  * Gaudi namespace
23  */
24 namespace 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
Gaudi::Profile1D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition: P1D.h:51
Gaudi::Generic1D::m_rep
std::unique_ptr< IMPLEMENTATION > m_rep
Reference to underlying implementation.
Definition: Generic1D.h:141
Gaudi::Profile1D::classID
static const CLID & classID()
Definition: P1D.h:52
std::string
STL class.
jsonFromLHCbLog.json
json
Definition: jsonFromLHCbLog.py:86
std::unique_ptr::get
T get(T... args)
Gaudi::Profile1D::to_json
friend void to_json(nlohmann::json &j, Profile1D const &p)
conversion to json via nlohmann library
Definition: P1D.h:49
Utils.h
ProduceConsume.j
j
Definition: ProduceConsume.py:104
Gaudi::Profile1D::reset
friend void reset(Profile1D &h)
Definition: P1D.h:47
AlgSequencer.h
h
Definition: AlgSequencer.py:31
Generic1D.h
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
DataObject.h
DataObject
Definition: DataObject.h:36
std::mutex
STL class.
Gaudi::Generic1D
Definition: Generic1D.h:46
Gaudi::Profile1D::IAnnotation
AIDA::IAnnotation IAnnotation
Definition: P1D.h:33
Gaudi::Profile1D
Definition: P1D.h:32
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
Gaudi::Profile1D::m_fillSerialization
std::mutex m_fillSerialization
Definition: P1D.h:55