File indexing completed on 2025-02-22 10:36:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #pragma once
0012
0013 #include "Generic1D.h"
0014 #include <AIDA/IProfile1D.h>
0015 #include <Gaudi/Histograming/Sink/Utils.h>
0016 #include <GaudiKernel/DataObject.h>
0017 #include <TProfile.h>
0018
0019 #include <nlohmann/json.hpp>
0020
0021
0022
0023
0024 namespace Gaudi {
0025
0026
0027
0028
0029
0030
0031
0032 class GAUDI_API Profile1D : public DataObject, public Generic1D<AIDA::IProfile1D, TProfile> {
0033 typedef AIDA::IAnnotation IAnnotation;
0034
0035 private:
0036 void init( const std::string& title, bool initialize_axis = true );
0037
0038 public:
0039
0040 Profile1D();
0041
0042 Profile1D( TProfile* rep );
0043
0044
0045 bool fill( double x, double y, double weight = 1. ) override;
0046 virtual bool setBinContents( int i, int entries, double height, double error, double spread, double centre );
0047 friend void reset( Profile1D& h ) { h.reset(); }
0048
0049 friend void to_json( nlohmann::json& j, Profile1D const& p ) { j = *p.m_rep.get(); }
0050
0051 const CLID& clID() const override { return classID(); }
0052 static const CLID& classID() { return CLID_ProfileH; }
0053
0054 private:
0055 std::mutex m_fillSerialization;
0056
0057 };
0058 }