Go to the documentation of this file.
16 template <
class PBASE>
19 if ( !produceHistos() ) {
return nullptr; }
22 auto hist = histo1D( title );
24 if ( hist ) {
return hist; }
28 newHistoID( title, ID );
31 return this->book1D( ID, title, edges );
36 template <
class PBASE>
40 if ( !produceHistos() ) {
return nullptr; }
44 this->Error(
"Undefined Histogram ID : Title='" + title +
"'" ).ignore();
49 auto hist = histo1D( ID );
51 if ( hist ) {
return hist; }
58 hist = this->histoSvc()->book( histoPath(), ID.
numericID(),
htitle, edges );
60 hist = this->histoSvc()->book( histoPath() +
"/" + ID.
literalID(),
htitle, edges );
65 this->Error(
"IHistogram1D* points to NULL! ID='" + ID.
idAsString() +
"' title='" +
htitle +
"'" ).ignore();
70 m_histo1DMapID[ID] = hist;
71 m_histo1DMapTitle[title] = hist;
78 this->debug() <<
"Booked 1D Histogram : ID='" << ID <<
"' Path=" << histoPath() <<
" Title='"
86 template <
class PBASE>
89 AIDA::IHistogram1D*
h(
nullptr );
90 if ( produceHistos() ) {
93 if ( !
h ) {
h = book1D( title, edges ); }
95 h =
fill(
h, value, weight, title );
102 template <
class PBASE>
105 AIDA::IHistogram1D*
h(
nullptr );
106 if ( produceHistos() ) {
109 if ( !
h ) {
h = book1D( ID, title, edges ); }
111 h =
fill(
h, value, weight, title );
AIDA::IHistogram1D * plot1D(const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
fill the 1D histogram (book on demand)
NumericID numericID() const noexcept
Returns the numerical ID.
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
bool undefined() const noexcept
Is this ID undefined.
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
AIDA::IHistogram1D * book1D(const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const
book the 1D histogram
const LiteralID & literalID() const noexcept
Returns the ID as a LiteralID.
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool numeric() const noexcept
Is this ID numeric.
bool literal() const noexcept
Is this ID numeric.