25 const std::string& title,
int nBins,
double xlow,
26 double xup,
double ylow,
double yup,
27 const std::string& opt ) {
28 auto _p =
new TProfile( title.
c_str(), title.
c_str(), nBins, xlow, xup, ylow, yup, opt.
c_str() );
35 const std::string& title,
const Edges& e,
double ylow,
36 double yup,
const std::string& opt ) {
44 const AIDA::IProfile1D& hist ) {
54 return int(
m_rep->GetBinEntries(
rIndex( index ) ) + 0.5 );
59 return className ==
"AIDA::IProfile1D"
60 ?
const_cast<AIDA::IProfile1D*
>(
static_cast<const AIDA::IProfile1D*
>( this ) )
61 : className ==
"AIDA::IProfile" ?
const_cast<AIDA::IProfile*
>(
static_cast<const AIDA::IProfile*
>( this ) )
62 : className ==
"AIDA::IBaseHistogram"
63 ?
const_cast<AIDA::IBaseHistogram*
>(
static_cast<const AIDA::IBaseHistogram*
>( this ) )
69 TProfile* imp =
dynamic_cast<TProfile*
>( rep );
70 if ( !imp )
throw std::runtime_error(
"Cannot adopt native histogram representation." );
73 const TArrayD* a =
m_rep->GetSumw2();
74 if ( !a || ( a && a->GetSize() == 0 ) )
m_rep->Sumw2();
87 if ( initialize_axis ) {
axis().initialize(
m_rep->GetXaxis(),
false ); }
89 m_rep->SetDirectory(
nullptr );
99 double sumwy2Bin = ( spread * spread + height * height ) *
entries;
110 m_rep->Fill( x, y, weight );
complex< _Tp > sqrt(const complex< _Tp > &)
const _CharT * c_str() const noexcept
int binEntries(int index) const override
Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
std::string title() const override
void adoptRepresentation(TObject *rep) override
Adopt ROOT histogram representation.
void * cast(const std::string &cl) const override
Manual cast by class name.
bool setTitle(const std::string &title) override
Generic1D< AIDA::IProfile1D, TProfile > Base
virtual int rIndex(int index) const
std::unique_ptr< TH1D > m_rep
int entries() const override
bool setName(const std::string &newName)
Profile1D()
Default Constructor.
bool fill(double x, double y, double weight=1.) override
Fill the Profile1D with a value and the corresponding weight.
std::mutex m_fillSerialization
virtual bool setBinContents(int i, int entries, double height, double error, double spread, double centre)
void init(const std::string &title, bool initialize_axis=true)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Gaudi::Monitoring::Hub & monitoringHub()
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
GAUDI_API ISvcLocator * svcLocator()
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile1D &hist)
Copy constructor.
T * getRepresentation(const Q &hist)
void registerEntity(std::string c, std::string n, std::string t, T &ent)