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 m_profile2DMapID [ ID ] = hist ;
00074 m_profile2DMapTitle [ title ] = hist ;
00075
00076
00077 monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00078
00079
00080 if ( this->msgLevel(MSG::DEBUG) )
00081 { this->debug() << "Booked 2D Profile Histogram : ID='" << ID
00082 << "' Path=" << histoPath()
00083 << " Title='"
00084 << Gaudi::Utils::Histos::htitle ( hist )
00085 << "'" << endmsg; }
00086 return hist ;
00087 }
00088
00089
00090
00091 template <class PBASE>
00092 AIDA::IProfile2D* GaudiHistos<PBASE>::profile2D
00093 ( const double valueX ,
00094 const double valueY ,
00095 const double valueZ ,
00096 const std::string& title ,
00097 const HistoBinEdges& edgesX ,
00098 const HistoBinEdges& edgesY ,
00099 const double weight ) const
00100 {
00101 AIDA::IProfile2D * h(NULL);
00102 if ( produceHistos() )
00103 {
00104
00105 h = profile2D ( title ) ;
00106 if ( NULL == h ) { h = bookProfile2D ( title, edgesX, edgesY ) ; }
00107
00108 h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00109 }
00110 return h;
00111 }
00112
00113
00114
00115 template <class PBASE>
00116 AIDA::IProfile2D* GaudiHistos<PBASE>::profile2D
00117 ( const double valueX ,
00118 const double valueY ,
00119 const double valueZ ,
00120 const HistoID& ID ,
00121 const std::string& title ,
00122 const HistoBinEdges& edgesX ,
00123 const HistoBinEdges& edgesY ,
00124 const double weight ) const
00125 {
00126 AIDA::IProfile2D * h(NULL);
00127 if ( produceHistos() )
00128 {
00129
00130 h = profile2D ( ID ) ;
00131 if ( NULL == h ) { h = bookProfile2D ( ID , title , edgesX , edgesY ) ; }
00132
00133
00134 h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00135 }
00136 return h;
00137 }