8 const unsigned long binsX,
const double lowY,
const double highY,
9 const unsigned long binsY )
const 12 if ( !produceHistos() ) {
17 auto hist = histo2D( title );
25 newHistoID( title, ID );
28 return this->book2D( ID, title, lowX, highX, binsX, lowY, highY, binsY );
33 template <
class PBASE>
35 const double highX,
const unsigned long binsX,
const double lowY,
36 const double highY,
const unsigned long binsY )
const 39 if ( !produceHistos() ) {
45 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
50 auto hist = histo2D( ID );
61 hist = this->histoSvc()->book( histoPath(), ID.
numericID(),
htitle, binsX, lowX, highX, binsY, lowY, highY );
63 hist = this->histoSvc()->book( histoPath() +
"/" + ID.
literalID(),
htitle, binsX, lowX, highX, binsY, lowY, highY );
68 this->Error(
"IHistogram2D* points to NULL! ID='" + ID.
idAsString() +
"' title='" + htitle +
"'" ).ignore();
73 m_histo2DMapID[ID] = hist;
74 m_histo2DMapTitle[title] = hist;
81 this->debug() <<
"Booked 2D Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 90 template <
class PBASE>
92 const double weight,
const std::string& title )
const 99 if ( !checkForNaN() ) {
104 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
108 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
118 template <
class PBASE>
120 const double lowX,
const double highX,
const double lowY,
121 const double highY,
const unsigned long binsX,
122 const unsigned long binsY,
const double weight )
const 124 AIDA::IHistogram2D* h(
nullptr );
125 if ( produceHistos() ) {
127 h = histo2D( title );
129 h = book2D( title, lowX, highX, binsX, lowY, highY, binsY );
132 h =
fill( h, valueX, valueY, weight, title );
139 template <
class PBASE>
141 const std::string& title,
const double lowX,
const double highX,
142 const double lowY,
const double highY,
const unsigned long binsX,
143 const unsigned long binsY,
const double weight )
const 145 AIDA::IHistogram2D* h(
nullptr );
147 if ( produceHistos() ) {
151 h = book2D( ID, title, lowX, highX, binsX, lowY, highY, binsY );
154 h =
fill( h, valueX, valueY, weight, title );
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
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
AIDA::IHistogram2D * book2D(const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const
book the 2D histogram
bool literal() const noexcept
Is this ID numeric.
AIDA::IHistogram2D * plot2D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D histogram (book on demand)
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::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