9 const unsigned long binsX ,
12 const unsigned long binsY )
const 15 if ( !produceHistos() ) {
return 0 ; }
18 auto hist = profile2D ( title ) ;
20 if( 0 != hist ) {
return hist ; }
24 newHistoID( title, ID );
27 return this -> bookProfile2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY );
32 template <
class PBASE>
38 const unsigned long binsX ,
41 const unsigned long binsY )
const 44 if ( !produceHistos() ) {
return 0 ; }
49 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
53 auto hist = profile2D ( ID ) ;
55 if( 0 != hist ) {
return hist ; }
60 "Unnamed 2D Profile Histogram ID="+ID.
idAsString() : title ) ;
65 hist = this->histoSvc() ->
bookProf ( histoPath() ,
77 hist = this->histoSvc() ->
bookProf ( histoPath()+
"/"+
90 { this->Error(
"IProfile2D* points to NULL! ID='" + ID.
idAsString() +
91 "' title='"+htitle+
"'" ) ;
return 0; }
94 m_profile2DMapID [ ID ] = hist ;
95 m_profile2DMapTitle [ title ] = hist ;
102 { this->debug() <<
"Booked 2D Profile Histogram : ID='" << ID
103 <<
"' Path=" << histoPath()
112 template <
class PBASE>
114 ( AIDA::IProfile2D* histo ,
115 const double valueX ,
116 const double valueY ,
117 const double valueZ ,
118 const double weight ,
121 if ( 0 == histo ) {
return 0 ; }
123 if ( !checkForNaN() )
132 (
"fill():: 'NaN' value is skipped from the histogram '" 138 (
"fill():: 'Infinite' value is skipped from the histogram '" 147 template <
class PBASE>
149 (
const double valueX ,
150 const double valueY ,
151 const double valueZ ,
157 const unsigned long binsX ,
158 const unsigned long binsY ,
159 const double weight )
const 161 AIDA::IProfile2D *
h =
nullptr;
162 if ( produceHistos() )
165 h = profile2D ( title ) ;
166 if ( 0 == h ) { h = bookProfile2D ( title ,
167 lowX , highX , binsX ,
168 lowY , highY , binsY ) ; }
170 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
177 template <
class PBASE>
179 (
const double valueX ,
180 const double valueY ,
181 const double valueZ ,
188 const unsigned long binsX ,
189 const unsigned long binsY ,
190 const double weight )
const 192 AIDA::IProfile2D *
h =
nullptr;
193 if ( produceHistos() )
196 h = profile2D ( ID ) ;
197 if ( 0 == h ) { h = bookProfile2D ( ID , title ,
198 lowX , highX , binsX ,
199 lowY , highY , binsY ) ; }
201 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
AIDA::IProfile2D * bookProfile2D(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 profile 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.
bool undefined() const
Is this ID undefined.
def bookProf(args, kwargs)
The trivial function to book 1D&2D profile histograms:
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool literal() const
Is this ID numeric.
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
AIDA::IProfile2D * profile2D(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 unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
fill the 2D profile histogram (book on demand)
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