11 if ( !produceHistos() ) {
16 auto hist = histo2D( title );
24 newHistoID( title, ID );
27 return this->book2D( ID, title, edgesX, edgesY );
32 template <
class PBASE>
37 if ( !produceHistos() ) {
43 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
48 auto hist = histo2D( ID );
59 hist = this->histoSvc()->book( histoPath(), ID.
numericID(),
htitle, edgesX, edgesY );
61 hist = this->histoSvc()->book( histoPath() +
"/" + ID.
literalID(),
htitle, edgesX, edgesY );
66 this->Error(
"IHistogram2D* points to NULL! ID='" + ID.
idAsString() +
"' title='" + htitle +
"'" ).ignore();
71 m_histo2DMapID[ID] = hist;
72 m_histo2DMapTitle[title] = hist;
79 this->debug() <<
"Booked 2D Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 87 template <
class PBASE>
90 const double weight )
const 92 AIDA::IHistogram2D* h(
nullptr );
93 if ( produceHistos() ) {
97 h = book2D( title, edgesX, edgesY );
100 h =
fill( h, valueX, valueY, weight, title );
107 template <
class PBASE>
112 AIDA::IHistogram2D* h(
nullptr );
113 if ( produceHistos() ) {
117 h = book2D( ID, title, edgesX, edgesY );
120 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.