7 const double lowY,
const double highY )
const {
9 if ( !produceHistos() ) {
return nullptr; }
12 auto hist = profile1D( title );
14 if ( hist ) {
return hist; }
18 newHistoID( title, ID );
21 return this->bookProfile1D( ID, title, low, high, bins, opt, lowY, highY );
26 template <
class PBASE>
28 const double high,
const unsigned long bins,
30 const double highY )
const {
32 if ( !produceHistos() ) {
return nullptr; }
36 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
41 auto hist = profile1D( ID );
43 if ( hist ) {
return hist; }
50 hist = this->histoSvc()->bookProf( histoPath(), ID.
numericID(),
htitle, bins, low, high, lowY, highY, opt );
52 hist = this->histoSvc()->bookProf( histoPath() +
"/" + ID.
literalID(),
htitle, bins, low, high, lowY, highY, opt );
57 this->Error(
"IProfile1D* points to NULL! ID='" + ID.
idAsString() +
"' title='" + htitle +
"'" ).ignore();
62 m_profile1DMapID[ID] = hist;
63 m_profile1DMapTitle[title] = hist;
70 this->debug() <<
"Booked 1D Profile Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 78 template <
class PBASE>
80 const double weight,
const std::string& title )
const {
82 if ( !histo ) {
return nullptr; }
84 if ( !checkForNaN() ) {
89 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
93 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
103 template <
class PBASE>
105 const double lowX,
const double highX,
const unsigned long binsX,
106 const std::string& opt,
const double lowY,
const double highY,
107 const double weight )
const {
108 AIDA::IProfile1D* h =
nullptr;
109 if ( produceHistos() ) {
111 h = profile1D( title );
112 if ( !h ) { h = bookProfile1D( title, lowX, highX, binsX, opt, lowY, highY ); }
114 h =
fill( h, valueX, valueY, weight, title );
121 template <
class PBASE>
123 const std::string& title,
const double lowX,
const double highX,
124 const unsigned long binsX,
const std::string& opt,
const double lowY,
125 const double highY,
const double weight )
const {
126 AIDA::IProfile1D* h =
nullptr;
127 if ( produceHistos() ) {
130 if ( !h ) { h = bookProfile1D( ID, title, lowX, highX, binsX, opt, lowY, highY ); }
132 h =
fill( h, valueX, valueY, weight, title );
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
AIDA::IProfile1D * profile1D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
fill the 1D profile histogram (book on demand)
NumericID numericID() const noexcept
Returns the numerical ID.
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
bool literal() const noexcept
Is this ID numeric.
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool numeric() const noexcept
Is this ID numeric.
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
bool undefined() const noexcept
Is this ID undefined.
ID class for Histogram and Ntuples.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
AIDA::IProfile1D * bookProfile1D(const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const
book the 1D profile histogram
AIDA::IHistogram1D * fill(AIDA::IHistogram1D *histo, const double value, const double weight, const std::string &title="") const
fill the 1D histogram with the value and weight