6 const unsigned long binsX,
const double lowY,
const double highY,
7 const unsigned long binsY )
const {
9 if ( !produceHistos() ) {
return 0; }
12 auto hist = profile2D( title );
14 if ( 0 != hist ) {
return hist; }
18 newHistoID( title, ID );
21 return this->bookProfile2D( ID, title, lowX, highX, binsX, lowY, highY, binsY );
26 template <
class PBASE>
28 const double highX,
const unsigned long binsX,
const double lowY,
29 const double highY,
const unsigned long binsY )
const {
31 if ( !produceHistos() ) {
return 0; }
35 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
39 auto hist = profile2D( ID );
41 if ( 0 != hist ) {
return hist; }
48 hist = this->histoSvc()->bookProf( histoPath(), ID.
numericID(),
htitle, binsX, lowX, highX, binsY, lowY, highY );
50 hist = this->histoSvc()->bookProf( histoPath() +
"/" + ID.
literalID(),
htitle, binsX, lowX, highX, binsY, lowY,
56 this->Error(
"IProfile2D* points to NULL! ID='" + ID.
idAsString() +
"' title='" +
htitle +
"'" ).ignore();
61 m_profile2DMapID[ID] = hist;
62 m_profile2DMapTitle[title] = hist;
69 this->debug() <<
"Booked 2D Profile Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 77 template <
class PBASE>
79 const double valueZ,
const double weight,
const std::string& title )
const {
80 if ( 0 == histo ) {
return 0; }
82 if ( !checkForNaN() ) {
88 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
92 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
102 template <
class PBASE>
104 const std::string& title,
const double lowX,
const double highX,
105 const double lowY,
const double highY,
const unsigned long binsX,
106 const unsigned long binsY,
const double weight )
const {
107 AIDA::IProfile2D* h =
nullptr;
108 if ( produceHistos() ) {
110 h = profile2D( title );
111 if ( 0 == h ) { h = bookProfile2D( title, lowX, highX, binsX, lowY, highY, binsY ); }
113 h =
fill( h, valueX, valueY, valueZ, weight, title );
120 template <
class PBASE>
123 const double highX,
const double lowY,
const double highY,
124 const unsigned long binsX,
const unsigned long binsY,
125 const double weight )
const {
126 AIDA::IProfile2D* h =
nullptr;
127 if ( produceHistos() ) {
130 if ( 0 == h ) { h = bookProfile2D( ID, title, lowX, highX, binsX, lowY, highY, binsY ); }
132 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.