8 const unsigned long binsX,
const double lowY,
const double highY,
9 const unsigned long binsY,
const double lowZ,
const double highZ,
10 const unsigned long binsZ )
const {
12 if ( !produceHistos() ) {
return nullptr; }
15 auto hist = histo3D( title );
17 if ( hist ) {
return hist; }
21 newHistoID( title, ID );
24 return this->book3D( ID, title, lowX, highX, binsX, lowY, highY, binsY, lowZ, highZ, binsZ );
29 template <
class PBASE>
31 const double highX,
const unsigned long binsX,
const double lowY,
32 const double highY,
const unsigned long binsY,
const double lowZ,
33 const double highZ,
const unsigned long binsZ )
const {
35 if ( !produceHistos() ) {
return nullptr; }
39 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
44 auto hist = histo3D( ID );
46 if ( hist ) {
return hist; }
53 hist = this->histoSvc()->book( histoPath(), ID.
numericID(),
htitle, binsX, lowX, highX, binsY, lowY, highY, binsZ,
56 hist = this->histoSvc()->book( histoPath() +
"/" + ID.
literalID(),
htitle, binsX, lowX, highX, binsY, lowY, highY,
62 this->Error(
"IHistogram3D* points to NULL! ID='" + ID.
idAsString() +
"' title='" + htitle +
"'" ).ignore();
67 m_histo3DMapID[ID] = hist;
68 m_histo3DMapTitle[title] = hist;
75 this->debug() <<
"Booked 3D Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 83 template <
class PBASE>
85 const double valueZ,
const double weight,
87 if ( !histo ) {
return nullptr; }
89 if ( !checkForNaN() ) {
95 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
99 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
109 template <
class PBASE>
112 const double lowX,
const double highX,
const double lowY,
const double highY,
113 const double lowZ,
const double highZ,
const unsigned long binsX,
const unsigned long binsY,
114 const unsigned long binsZ,
const double weight )
const {
115 AIDA::IHistogram3D* h(
nullptr );
116 if ( produceHistos() ) {
118 h = histo3D( title );
119 if ( !h ) { h = book3D( title, lowX, highX, binsX, lowY, highY, binsY, lowZ, highZ, binsZ ); }
121 h =
fill( h, valueX, valueY, valueZ, weight, title );
128 template <
class PBASE>
131 const std::string& title,
const double lowX,
const double highX,
const double lowY,
132 const double highY,
const double lowZ,
const double highZ,
const unsigned long binsX,
133 const unsigned long binsY,
const unsigned long binsZ,
const double weight )
const {
134 AIDA::IHistogram3D* h(
nullptr );
135 if ( produceHistos() ) {
138 if ( !h ) { h = book3D( ID, title, lowX, highX, binsX, lowY, highY, binsY, lowZ, highZ, binsZ ); }
140 h =
fill( h, valueX, valueY, valueZ, 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
bool literal() const noexcept
Is this ID numeric.
AIDA::IHistogram3D * plot3D(const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const
fill the 3D 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.
AIDA::IHistogram3D * book3D(const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const
book the 3D histogram
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