00001
00002
00003
00004 template <class PBASE>
00005 AIDA::IProfile2D* GaudiHistos<PBASE>::bookProfile2D
00006 ( const std::string& title ,
00007 const HistoBinEdges& edgesX,
00008 const HistoBinEdges& edgesY ) const
00009 {
00010
00011 AIDA::IProfile2D* hist = profile2D ( title ) ;
00012
00013 if( NULL != hist ) { return hist ; }
00014
00015
00016 HistoID ID;
00017 newHistoID( title, ID );
00018
00019
00020 return this -> bookProfile2D ( ID, title, edgesX, edgesY );
00021 }
00022
00023
00024
00025 template <class PBASE>
00026 AIDA::IProfile2D* GaudiHistos<PBASE>::bookProfile2D
00027 ( const HistoID& ID ,
00028 const std::string& title ,
00029 const HistoBinEdges& edgesX ,
00030 const HistoBinEdges& edgesY ) const
00031 {
00032
00033 if (ID.undefined())
00034 {
00035 this->Error("Undefined Histogram ID : Title='"+title+"'");
00036 return NULL;
00037 }
00038
00039
00040 AIDA::IProfile2D* hist = profile2D ( ID ) ;
00041
00042 if( NULL != hist ) { return hist ; }
00043
00044
00045 const std::string & htitle =
00046 ( title.empty() ?
00047 "Unnamed 2D Profile Histogram ID="+ID.idAsString() : title ) ;
00048
00049
00050 if ( ID.numeric() )
00051 {
00052 hist = this->histoSvc() -> bookProf ( histoPath() ,
00053 ID.numericID() ,
00054 htitle ,
00055 edgesX ,
00056 edgesY ) ;
00057 }
00058 else if ( ID.literal() )
00059 {
00060 hist = this->histoSvc() -> bookProf ( histoPath()+"/"+
00061 ID.literalID() ,
00062 htitle ,
00063 edgesX ,
00064 edgesY ) ;
00065 }
00066
00067
00068 if( NULL == hist )
00069 { this->Error( "IProfile2D* points to NULL! ID='" + ID.idAsString() +
00070 "' title='"+htitle+"'" ) ; return NULL; }
00071
00072
00073 if ( ID.numeric() )
00074 { m_profile2DMapNumID [ ID.numericID() ] = hist ; }
00075 else if ( ID.literal() )
00076 { m_profile2DMapLitID [ ID.literalID() ] = hist ; }
00077 m_profile2DMapTitle [ title ] = hist ;
00078
00079
00080 monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00081
00082
00083 if ( this->msgLevel(MSG::DEBUG) )
00084 { this->debug() << "Booked 2D Profile Histogram : ID='" << ID
00085 << "' Path=" << histoPath()
00086 << " Title='"
00087 << Gaudi::Utils::Histos::htitle ( hist )
00088 << "'" << endmsg; }
00089 return hist ;
00090 }
00091
00092
00093
00094 template <class PBASE>
00095 AIDA::IProfile2D* GaudiHistos<PBASE>::profile2D
00096 ( const double valueX ,
00097 const double valueY ,
00098 const double valueZ ,
00099 const std::string& title ,
00100 const HistoBinEdges& edgesX ,
00101 const HistoBinEdges& edgesY ,
00102 const double weight ) const
00103 {
00104 AIDA::IProfile2D * h(NULL);
00105 if ( produceHistos() )
00106 {
00107
00108 h = profile2D ( title ) ;
00109 if ( NULL == h ) { h = bookProfile2D ( title, edgesX, edgesY ) ; }
00110
00111 h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00112 }
00113 return h;
00114 }
00115
00116
00117
00118 template <class PBASE>
00119 AIDA::IProfile2D* GaudiHistos<PBASE>::profile2D
00120 ( const double valueX ,
00121 const double valueY ,
00122 const double valueZ ,
00123 const HistoID& ID ,
00124 const std::string& title ,
00125 const HistoBinEdges& edgesX ,
00126 const HistoBinEdges& edgesY ,
00127 const double weight ) const
00128 {
00129 AIDA::IProfile2D * h(NULL);
00130 if ( produceHistos() )
00131 {
00132
00133 h = profile2D ( ID ) ;
00134 if ( NULL == h ) { h = bookProfile2D ( ID , title , edgesX , edgesY ) ; }
00135
00136
00137 h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00138 }
00139 return h;
00140 }