6 (
const std::string& title ,
10 if ( !produceHistos() ) {
return 0 ; }
13 AIDA::IProfile1D* hist = profile1D ( title ) ;
15 if ( NULL != hist ) {
return hist ; }
19 newHistoID( title, ID );
22 return this -> bookProfile1D ( ID, title, edges );
27 template <
class PBASE>
30 const std::string& title ,
34 if ( !produceHistos() ) {
return 0 ; }
39 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
44 AIDA::IProfile1D* hist = profile1D ( ID ) ;
46 if ( NULL != hist ) {
return hist ; }
49 const std::string &
htitle =
51 "Unnamed 1D Profile Histogram ID="+ID.
idAsString() : title ) ;
56 hist = this->histoSvc() ->
bookProf ( histoPath() ,
63 hist = this->histoSvc() ->
bookProf ( histoPath()+
"/"+
71 { this->Error(
"IProfile1D* points to NULL! ID='" + ID.
idAsString() +
72 "' title='"+htitle+
"'" ) ;
return NULL; }
75 m_profile1DMapID [ ID ] = hist ;
76 m_profile1DMapTitle [ title ] = hist ;
83 { this->debug() <<
"Booked 1D Profile Histogram : ID='"
84 << ID <<
"' Path=" << histoPath()
93 template <
class PBASE>
95 (
const double valueX ,
97 const std::string& title ,
99 const double weight )
const
101 AIDA::IProfile1D * h(NULL);
102 if ( produceHistos() )
105 h = profile1D ( title ) ;
106 if ( NULL == h ) { h = bookProfile1D ( title , edges ) ; }
108 h =
fill ( h , valueX , valueY , weight , title ) ;
115 template <
class PBASE>
117 (
const double valueX ,
118 const double valueY ,
120 const std::string& title ,
122 const double weight )
const
124 AIDA::IProfile1D * h(NULL);
125 if ( produceHistos() )
128 h = profile1D ( ID ) ;
129 if ( NULL == h ) { h = bookProfile1D ( ID , title , edges ) ; }
131 h =
fill ( h , valueX , valueY , weight , title ) ;
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
def bookProf(args, kwargs)
The trivial function to book 1D&2D profile histograms:
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
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)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
GaudiAlg::HistoBinEdges HistoBinEdges
Edges for variable binning.
NumericID numericID() const
Returns the numerical ID.
const LiteralID & literalID() const
Returns the ID as a LiteralID.
bool undefined() const
Is this ID undefined.
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
bool literal() const
Is this ID numeric.
ID class for Histogram and Ntuples.
bool numeric() const
Is this ID numeric.
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
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