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