| The Gaudi Framework v32r1 (f65d50dc)

H1D.h
Go to the documentation of this file.
1 #ifndef HISTOGRAMSVC_H1D_H
2 #define HISTOGRAMSVC_H1D_H 1
3
4 #include "Generic1D.h"
5 #include <AIDA/IHistogram1D.h>
6 #include <GaudiKernel/DataObject.h>
7 #include <TH1D.h>
8
9 #include <mutex>
10
11 namespace Gaudi {
12
19 class GAUDI_API Histogram1D : public DataObject, public Gaudi::Generic1D<AIDA::IHistogram1D, TH1D> {
20 private:
21 void init( const std::string& title, bool initialize_axis = true );
22 void initSums();
23
24 protected:
26 double m_sumwx = 0;
27
28 public:
30 Histogram1D();
32 Histogram1D( TH1D* rep );
33
35 void adoptRepresentation( TObject* rep ) override;
37 virtual bool setBinContents( int i, int entries, double height, double error, double centre );
39 bool reset() override;
41 virtual bool setStatistics( int allEntries, double eqBinEntries, double mean, double rms );
43 bool fill( double x, double weight ) override;
45 bool setRms( double rms );
47 void copyFromAida( const AIDA::IHistogram1D& h );
49 const CLID& clID() const override { return classID(); }
50 static const CLID& classID() { return CLID_H1D; }
55 StreamBuffer& serialize( StreamBuffer& s );
56
61 StreamBuffer& serialize( StreamBuffer& s ) const;
62
63 private:
64 std::mutex m_fillSerialization;
65
66 }; // end class IHistogram1D
67 } // end namespace Gaudi
68 #endif // HISTOGRAMSVC_H1D_H
Gaudi::Histogram1D::m_fillSerialization
std::mutex m_fillSerialization
Definition: H1D.h:64
StreamBuffer
The stream buffer is a small object collecting object data.
Definition: StreamBuffer.h:41
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:35
std::mutex
std::string
STL class.
Generic1D.h
GaudiPython.HistoUtils.mean
mean
Definition: HistoUtils.py:875
Gaudi::Histogram1D
AIDA implementation for 1 D histograms using ROOT THD1.
Definition: H1D.h:19
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Gaudi::Histogram1D::classID
static const CLID & classID()
Definition: H1D.h:50
gaudirun.s
string s
Definition: gaudirun.py:316
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
DataObject.h
GaudiPython.HistoUtils.rms
rms
Definition: HistoUtils.py:879
Gaudi::Generic1D
Common AIDA implementation stuff for histograms and profiles using ROOT implementations.
Definition: Generic1D.h:35
Gaudi::Histogram1D::clID
const CLID & clID() const override
Retrieve reference to class defininition identifier.
Definition: H1D.h:49