14 template <
class PBASE>
16 const unsigned long binsX,
const double lowY,
const double highY,
17 const unsigned long binsY )
const {
19 if ( !produceHistos() ) {
return 0; }
22 auto hist = profile2D( title );
24 if ( 0 != hist ) {
return hist; }
28 newHistoID( title, ID );
31 return this->bookProfile2D( ID, title, lowX, highX, binsX, lowY, highY, binsY );
36 template <
class PBASE>
38 const double highX,
const unsigned long binsX,
const double lowY,
39 const double highY,
const unsigned long binsY )
const {
41 if ( !produceHistos() ) {
return 0; }
45 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
49 auto hist = profile2D( ID );
51 if ( 0 != hist ) {
return hist; }
58 hist = this->histoSvc()->bookProf( histoPath(), ID.
numericID(),
htitle, binsX, lowX, highX, binsY, lowY, highY );
60 hist = this->histoSvc()->bookProf( histoPath() +
"/" + ID.
literalID(),
htitle, binsX, lowX, highX, binsY, lowY,
66 this->Error(
"IProfile2D* points to NULL! ID='" + ID.
idAsString() +
"' title='" +
htitle +
"'" ).ignore();
71 m_profile2DMapID[ID] = hist;
72 m_profile2DMapTitle[title] = hist;
79 this->debug() <<
"Booked 2D Profile Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 87 template <
class PBASE>
89 const double valueZ,
const double weight,
const std::string& title )
const {
90 if ( 0 == histo ) {
return 0; }
92 if ( !checkForNaN() ) {
98 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
102 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
112 template <
class PBASE>
114 const std::string& title,
const double lowX,
const double highX,
115 const double lowY,
const double highY,
const unsigned long binsX,
116 const unsigned long binsY,
const double weight )
const {
117 AIDA::IProfile2D* h =
nullptr;
118 if ( produceHistos() ) {
120 h = profile2D( title );
121 if ( 0 == h ) { h = bookProfile2D( title, lowX, highX, binsX, lowY, highY, binsY ); }
123 h =
fill( h, valueX, valueY, valueZ, weight, title );
130 template <
class PBASE>
133 const double highX,
const double lowY,
const double highY,
134 const unsigned long binsX,
const unsigned long binsY,
135 const double weight )
const {
136 AIDA::IProfile2D* h =
nullptr;
137 if ( produceHistos() ) {
140 if ( 0 == h ) { h = bookProfile2D( ID, title, lowX, highX, binsX, lowY, highY, binsY ); }
142 h =
fill( h, valueX, valueY, valueZ, weight, title );
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
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 noexcept
Returns the numerical ID.
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool undefined() const noexcept
Is this ID undefined.
bool literal() const noexcept
Is this ID numeric.
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)
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
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
bool numeric() const noexcept
Is this ID numeric.
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
ID class for Histogram and Ntuples.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.