14 if ( !produceHistos() ) {
return nullptr; }
17 auto hist = histo3D ( title ) ;
19 if( hist ) {
return hist ; }
23 newHistoID( title, ID );
26 return this -> book3D ( ID, title, edgesX, edgesY, edgesZ );
31 template <
class PBASE>
40 if ( !produceHistos() ) {
return nullptr; }
45 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
50 auto hist = histo3D ( ID ) ;
52 if ( hist ) {
return hist ; }
56 ( title.
empty() ?
"Unnamed 3D Histogram ID="+ID.
idAsString() : title ) ;
61 hist = this->histoSvc() ->
book ( histoPath() ,
70 hist = this->histoSvc() ->
book ( histoPath()+
"/"+
80 { this->Error(
"IHistogram3D* points to NULL! ID='" + ID.
idAsString() +
81 "' title='"+htitle+
"'" ) ;
return nullptr; }
84 m_histo3DMapID [ ID ] = hist ;
85 m_histo3DMapTitle [ title ] = hist ;
92 { this->debug() <<
"Booked 3D Histogram : ID='" << ID
93 <<
"' Path=" << histoPath()
102 template <
class PBASE>
105 (
const double valueX ,
106 const double valueY ,
107 const double valueZ ,
112 const double weight )
const 114 AIDA::IHistogram3D *
h(
nullptr);
115 if ( produceHistos() )
118 h = histo3D ( title ) ;
119 if ( !h ) { h = book3D ( title , edgesX , edgesY , edgesZ ) ; }
121 h =
fill ( h , valueX , valueY , valueZ , weight , title );
128 template <
class PBASE>
131 (
const double valueX ,
132 const double valueY ,
133 const double valueZ ,
139 const double weight )
const 141 AIDA::IHistogram3D *
h(
nullptr);
142 if ( produceHistos() )
146 if ( !h ) { h = book3D ( ID , title , edgesX , edgesY , edgesZ ) ; }
148 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
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.