11 const unsigned long binsX ,
14 const unsigned long binsY ,
17 const unsigned long binsZ )
const 20 if ( !produceHistos() ) {
return nullptr ; }
23 auto hist = histo3D ( title ) ;
25 if( hist ) {
return hist ; }
29 newHistoID( title, ID );
32 return this -> book3D ( ID, title,
40 template <
class PBASE>
46 const unsigned long binsX ,
49 const unsigned long binsY ,
52 const unsigned long binsZ )
const 55 if ( !produceHistos() ) {
return nullptr; }
60 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
65 auto hist = histo3D( ID ) ;
67 if( hist ) {
return hist ; }
71 ( title.
empty() ?
"Unnamed 3D Histogram ID="+ID.
idAsString() : title ) ;
76 hist = this->histoSvc() ->
book ( histoPath() ,
91 hist = this->histoSvc() ->
book ( histoPath()+
"/"+
107 { this->Error(
"IHistogram3D* points to NULL! ID='" + ID.
idAsString() +
108 "' title='"+htitle+
"'" ) ;
return nullptr; }
111 m_histo3DMapID [ ID ] = hist ;
112 m_histo3DMapTitle [ title ] = hist ;
119 { this->debug() <<
"Booked 3D Histogram : ID='" 120 << ID <<
"' Path=" << histoPath()
129 template <
class PBASE>
131 ( AIDA::IHistogram3D* histo ,
132 const double valueX ,
133 const double valueY ,
134 const double valueZ ,
135 const double weight ,
138 if ( !histo ) {
return nullptr ; }
140 if ( !checkForNaN() )
149 (
"fill():: 'NaN' value is skipped from the histogram '" 155 (
"fill():: 'Infinite' value is skipped from the histogram '" 164 template <
class PBASE>
166 (
const double valueX ,
167 const double valueY ,
168 const double valueZ ,
176 const unsigned long binsX ,
177 const unsigned long binsY ,
178 const unsigned long binsZ ,
179 const double weight )
const 181 AIDA::IHistogram3D *
h(
nullptr);
182 if ( produceHistos() )
185 h = histo3D ( title ) ;
186 if ( !h ) { h = book3D ( title ,
187 lowX , highX , binsX ,
188 lowY , highY , binsY ,
189 lowZ , highZ , binsZ ) ; }
191 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
198 template <
class PBASE>
200 (
const double valueX ,
201 const double valueY ,
202 const double valueZ ,
211 const unsigned long binsX ,
212 const unsigned long binsY ,
213 const unsigned long binsZ ,
214 const double weight )
const 216 AIDA::IHistogram3D *
h(
nullptr);
217 if ( produceHistos() )
221 if ( !h ) { h = book3D ( ID , title ,
222 lowX , highX , binsX ,
223 lowY , highY , binsY ,
224 lowZ , highZ , binsZ ) ; }
226 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
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
NumericID numericID() const
Returns the numerical ID.
const LiteralID & literalID() const
Returns the ID as a LiteralID.
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)
bool undefined() const
Is this ID undefined.
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool literal() const
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)
ID class for Histogram and Ntuples.
bool numeric() const
Is this ID numeric.
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