Warning, file /include/GaudiCommonSvc/H2D.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #pragma once
0012
0013 #include "Generic2D.h"
0014 #include <AIDA/IHistogram2D.h>
0015 #include <Gaudi/Histograming/Sink/Utils.h>
0016 #include <GaudiKernel/DataObject.h>
0017 #include <TH2D.h>
0018
0019 #include <nlohmann/json.hpp>
0020
0021 namespace Gaudi {
0022 class Histogram1D;
0023
0024
0025
0026
0027
0028
0029
0030 class GAUDI_API Histogram2D : public DataObject, public Generic2D<AIDA::IHistogram2D, TH2D> {
0031 public:
0032
0033 Histogram2D();
0034
0035 Histogram2D( TH2D* rep );
0036
0037
0038 bool fill( double x, double y, double weight = 1. ) override;
0039
0040 virtual bool setBinContents( int binIndexX, int binIndexY, int entries, double height, double error, double centreX,
0041 double centreY );
0042
0043 bool setRms( double rmsX, double rmsY );
0044
0045 bool reset() override;
0046
0047 friend void reset( Histogram2D& h ) { h.reset(); }
0048
0049 friend void to_json( nlohmann::json& j, Histogram2D const& h ) { j = *h.m_rep.get(); }
0050
0051 void copyFromAida( const AIDA::IHistogram2D& h );
0052
0053 const CLID& clID() const override { return classID(); }
0054 static const CLID& classID() { return CLID_H2D; }
0055
0056 protected:
0057
0058 double m_sumwx = 0;
0059 double m_sumwy = 0;
0060
0061 private:
0062 std::mutex m_fillSerialization;
0063 };
0064 }