8 (
const std::string& title ,
14 if ( !produceHistos() ) {
return 0 ; }
17 AIDA::IHistogram3D * hist = histo3D ( title ) ;
19 if( NULL != hist ) {
return hist ; }
23 newHistoID( title, ID );
26 return this -> book3D ( ID, title, edgesX, edgesY, edgesZ );
31 template <
class PBASE>
34 const std::string& title ,
40 if ( !produceHistos() ) {
return 0 ; }
45 this->Error(
"Undefined Histogram ID : Title='"+title+
"'");
50 AIDA::IHistogram3D * hist = histo3D ( ID ) ;
52 if ( NULL != hist ) {
return hist ; }
55 const std::string &
htitle =
56 ( title.empty() ?
"Unnamed 3D Histogram ID="+ID.
idAsString() : title ) ;
61 hist = this->histoSvc() ->
book ( histoPath() ,
70 hist = this->histoSvc() ->
book ( histoPath()+
"/"+
80 { this->Error(
"IHistogram3D* points to NULL! ID='" + ID.
idAsString() +
81 "' title='"+htitle+
"'" ) ;
return NULL; }
84 m_histo3DMapID [ ID ] = hist ;
85 m_histo3DMapTitle [ title ] = hist ;
92 { this->debug() <<
"Booked 3D Histogram : ID='" << ID
93 <<
"' Path=" << histoPath()
102 template <
class PBASE>
105 (
const double valueX ,
106 const double valueY ,
107 const double valueZ ,
108 const std::string& title ,
112 const double weight )
const
114 AIDA::IHistogram3D * h(NULL);
115 if ( produceHistos() )
118 h = histo3D ( title ) ;
119 if ( NULL == h ) { h = book3D ( title , edgesX , edgesY , edgesZ ) ; }
121 h =
fill ( h , valueX , valueY , valueZ , weight , title );
128 template <
class PBASE>
131 (
const double valueX ,
132 const double valueY ,
133 const double valueZ ,
135 const std::string& title ,
139 const double weight )
const
141 AIDA::IHistogram3D * h(NULL);
142 if ( produceHistos() )
146 if ( NULL == h ) { h = book3D ( ID , title , edgesX , edgesY , edgesZ ) ; }
148 h =
fill ( h , valueX , valueY , valueZ , weight , title ) ;
GAUDI_API std::string htitle(const AIDA::IBaseHistogram *histo, const std::string &title="")
get the title
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
GaudiAlg::HistoBinEdges HistoBinEdges
Edges for variable binning.
NumericID numericID() const
Returns the numerical ID.
const LiteralID & literalID() const
Returns the ID as a LiteralID.
AIDA::IHistogram3D * plot3D(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 double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const
fill the 3D histogram (book on demand)
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.
AIDA::IHistogram3D * book3D(const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const
book the 3D histogram
GAUDI_API AIDA::IBaseHistogram * toBase(AIDA::IHistogram1D *histo)
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.