Go to the documentation of this file.
16 template <
class PBASE>
20 if ( !produceHistos() ) {
return nullptr; }
23 auto hist = histo2D( title );
25 if ( hist ) {
return hist; }
29 newHistoID( title, ID );
32 return this->book2D( ID, title, edgesX, edgesY );
37 template <
class PBASE>
41 if ( !produceHistos() ) {
return nullptr; }
45 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
50 auto hist = histo2D( ID );
52 if ( hist ) {
return hist; }
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 {
91 AIDA::IHistogram2D*
h(
nullptr );
92 if ( produceHistos() ) {
95 if ( !
h ) {
h = book2D( title, edgesX, edgesY ); }
97 h =
fill(
h, valueX, valueY, weight, title );
104 template <
class PBASE>
108 AIDA::IHistogram2D*
h(
nullptr );
109 if ( produceHistos() ) {
112 if ( !
h ) {
h = book2D( ID, title, edgesX, edgesY ); }
114 h =
fill(
h, valueX, valueY, weight, title );
NumericID numericID() const noexcept
Returns the numerical ID.
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)
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
bool undefined() const noexcept
Is this ID undefined.
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
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
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
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.
bool literal() const noexcept
Is this ID numeric.