10 if ( !produceHistos() ) {
return nullptr; }
13 auto hist = histo3D( title );
15 if ( hist ) {
return hist; }
19 newHistoID( title, ID );
22 return this->book3D( ID, title, edgesX, edgesY, edgesZ );
27 template <
class PBASE>
32 if ( !produceHistos() ) {
return nullptr; }
36 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
41 auto hist = histo3D( ID );
43 if ( hist ) {
return hist; }
50 hist = this->histoSvc()->book( histoPath(), ID.
numericID(),
htitle, edgesX, edgesY, edgesZ );
52 hist = this->histoSvc()->book( histoPath() +
"/" + ID.
literalID(),
htitle, edgesX, edgesY, edgesZ );
57 this->Error(
"IHistogram3D* points to NULL! ID='" + ID.
idAsString() +
"' title='" + htitle +
"'" ).ignore();
62 m_histo3DMapID[ID] = hist;
63 m_histo3DMapTitle[title] = hist;
70 this->debug() <<
"Booked 3D Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 78 template <
class PBASE>
82 const double weight )
const {
83 AIDA::IHistogram3D* h(
nullptr );
84 if ( produceHistos() ) {
87 if ( !h ) { h = book3D( title, edgesX, edgesY, edgesZ ); }
89 h =
fill( h, valueX, valueY, valueZ, weight, title );
96 template <
class PBASE>
101 AIDA::IHistogram3D* h(
nullptr );
102 if ( produceHistos() ) {
105 if ( !h ) { h = book3D( ID, title, edgesX, edgesY, edgesZ ); }
107 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.