11 if ( !produceHistos() ) {
return 0 ; }
14 auto hist = profile2D ( title ) ;
16 if( hist ) {
return hist ; }
20 newHistoID( title, ID );
23 return this -> bookProfile2D ( ID, title, edgesX, edgesY );
28 template <
class PBASE>
36 if ( !produceHistos() ) {
return 0 ; }
41 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
45 auto hist = profile2D ( ID ) ;
47 if( hist ) {
return hist ; }
52 "Unnamed 2D Profile Histogram ID="+ID.
idAsString() : title ) ;
57 hist = this->histoSvc() ->
bookProf ( histoPath() ,
65 hist = this->histoSvc() ->
bookProf ( histoPath()+
"/"+
74 { this->Error(
"IProfile2D* points to NULL! ID='" + ID.
idAsString() +
75 "' title='"+htitle+
"'" ) ;
return nullptr; }
78 m_profile2DMapID [ ID ] = hist ;
79 m_profile2DMapTitle [ title ] = hist ;
86 { this->debug() <<
"Booked 2D Profile Histogram : ID='" << ID
87 <<
"' Path=" << histoPath()
96 template <
class PBASE>
98 (
const double valueX ,
100 const double valueZ ,
104 const double weight )
const 106 AIDA::IProfile2D *
h(
nullptr);
107 if ( produceHistos() )
110 h = profile2D ( title ) ;
111 if ( !h ) { h = bookProfile2D ( title, edgesX, edgesY ) ; }
113 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
120 template <
class PBASE>
122 (
const double valueX ,
123 const double valueY ,
124 const double valueZ ,
129 const double weight )
const 131 AIDA::IProfile2D *
h(
nullptr);
132 if ( produceHistos() )
135 h = profile2D ( ID ) ;
136 if ( !h ) { h = bookProfile2D ( ID , title , edgesX , edgesY ) ; }
139 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.