14 template <
class PBASE>
17 const double lowY,
const double highY )
const {
19 if ( !produceHistos() ) {
return nullptr; }
22 auto hist = profile1D( title );
24 if ( hist ) {
return hist; }
28 newHistoID( title, ID );
31 return this->bookProfile1D( ID, title, low, high, bins, opt, lowY, highY );
36 template <
class PBASE>
38 const double high,
const unsigned long bins,
40 const double highY )
const {
42 if ( !produceHistos() ) {
return nullptr; }
46 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
51 auto hist = profile1D( ID );
53 if ( hist ) {
return hist; }
60 hist = this->histoSvc()->bookProf( histoPath(), ID.
numericID(),
htitle, bins, low, high, lowY, highY, opt );
62 hist = this->histoSvc()->bookProf( histoPath() +
"/" + ID.
literalID(),
htitle, bins, low, high, lowY, highY, opt );
67 this->Error(
"IProfile1D* points to NULL! ID='" + ID.
idAsString() +
"' title='" +
htitle +
"'" ).ignore();
72 m_profile1DMapID[ID] = hist;
73 m_profile1DMapTitle[title] = hist;
80 this->debug() <<
"Booked 1D Profile Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='" 88 template <
class PBASE>
90 const double weight,
const std::string& title )
const {
92 if ( !histo ) {
return nullptr; }
94 if ( !checkForNaN() ) {
99 this->Warning(
"fill():: 'NaN' value is skipped from the histogram '" +
103 this->Warning(
"fill():: 'Infinite' value is skipped from the histogram '" +
113 template <
class PBASE>
115 const double lowX,
const double highX,
const unsigned long binsX,
116 const std::string& opt,
const double lowY,
const double highY,
117 const double weight )
const {
118 AIDA::IProfile1D* h =
nullptr;
119 if ( produceHistos() ) {
121 h = profile1D( title );
122 if ( !h ) { h = bookProfile1D( title, lowX, highX, binsX, opt, lowY, highY ); }
124 h =
fill( h, valueX, valueY, weight, title );
131 template <
class PBASE>
133 const std::string& title,
const double lowX,
const double highX,
134 const unsigned long binsX,
const std::string& opt,
const double lowY,
135 const double highY,
const double weight )
const {
136 AIDA::IProfile1D* h =
nullptr;
137 if ( produceHistos() ) {
140 if ( !h ) { h = bookProfile1D( ID, title, lowX, highX, binsX, opt, lowY, highY ); }
142 h =
fill( h, valueX, valueY, 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::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::IProfile1D * profile1D(const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
fill the 1D profile histogram (book on demand)
AIDA::IProfile1D * bookProfile1D(const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const
book the 1D 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.