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