| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GaudiHistos.h

Go to the documentation of this file.
00001 // $Id: GaudiHistos.h,v 1.11 2008/10/27 19:22:20 marcocle Exp $
00002 // ============================================================================
00003 #ifndef GAUDIALG_GAUDIHISTOS_H
00004 #define GAUDIALG_GAUDIHISTOS_H 1
00005 // ============================================================================
00006 /* @file GaudiHistos.h
00007  *
00008  *  Header file for class : GaudiHistos
00009  *
00010  *  @author Chris Jones   Christopher.Rob.Jones@cern.ch
00011  *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
00012  *  @date   2005-08-08
00013  */
00014 // ============================================================================
00015 // Include files#
00016 // ============================================================================
00017 // STD& STL
00018 // ============================================================================
00019 #include <limits>
00020 // ============================================================================
00021 // GaudiKernel
00022 // ============================================================================
00023 #include "GaudiKernel/HistoProperty.h"
00024 // ============================================================================
00025 // GaudiAlg
00026 // ============================================================================
00027 #include "GaudiAlg/Maps.h"
00028 #include "GaudiAlg/HbookName.h"
00029 // ============================================================================
00030 // Forward declarations
00031 namespace AIDA
00032 {
00033   class IHistogram1D;
00034   class IHistogram2D;
00035   class IHistogram3D;
00036   class IProfile1D;
00037   class IProfile2D;
00038 }
00039 // ============================================================================
00049 template <class PBASE>
00050 class GaudiHistos : public PBASE
00051 {
00052 public:
00053   // ==========================================================================
00055   typedef GaudiAlg::HistoID                HistoID;
00056   // ==========================================================================
00058   typedef GaudiAlg::Histo1DMapNumericID    Histo1DMapNumID;
00060   typedef GaudiAlg::Histo1DMapLiteralID    Histo1DMapLitID;
00062   typedef GaudiAlg::Histo1DMapTitle        Histo1DMapTitle;
00063   // ==========================================================================
00065   typedef GaudiAlg::Histo2DMapNumericID    Histo2DMapNumID;
00067   typedef GaudiAlg::Histo2DMapLiteralID    Histo2DMapLitID;
00069   typedef GaudiAlg::Histo2DMapTitle        Histo2DMapTitle;
00070   // ==========================================================================
00072   typedef GaudiAlg::Histo3DMapNumericID    Histo3DMapNumID;
00074   typedef GaudiAlg::Histo3DMapLiteralID    Histo3DMapLitID;
00076   typedef GaudiAlg::Histo3DMapTitle        Histo3DMapTitle;
00077   // ==========================================================================
00079   typedef GaudiAlg::Profile1DMapNumericID  Profile1DMapNumID;
00081   typedef GaudiAlg::Profile1DMapLiteralID  Profile1DMapLitID;
00083   typedef GaudiAlg::Profile1DMapTitle      Profile1DMapTitle;
00084   // ==========================================================================
00086   typedef GaudiAlg::Profile2DMapNumericID  Profile2DMapNumID;
00088   typedef GaudiAlg::Profile2DMapLiteralID  Profile2DMapLitID;
00090   typedef GaudiAlg::Profile2DMapTitle      Profile2DMapTitle;
00091   // ==========================================================================
00092 public:
00093   // ==========================================================================
00094   // ================================= 1D Histograms ==========================
00095   // ==========================================================================
00138   AIDA::IHistogram1D*  plot1D
00139   ( const double        value        ,
00140     const std::string&  title        ,
00141     const double        low          ,
00142     const double        high         ,
00143     const unsigned long bins   = 100 ,
00144     const double        weight = 1.0 ) const ;
00145   // ==========================================================================
00159   inline AIDA::IHistogram1D*  plot
00160   ( const double        value        ,
00161     const std::string&  title        ,
00162     const double        low          ,
00163     const double        high         ,
00164     const unsigned long bins   = 100 ,
00165     const double        weight = 1.0 ) const
00166   {
00167     return plot1D ( value, title, low, high, bins, weight );
00168   }
00169   // ==========================================================================
00197   AIDA::IHistogram1D*  plot
00198   ( const double             value        ,
00199     const Gaudi::Histo1DDef& hdef         ,
00200     const double             weight = 1.0 ) const ;
00201   // ==========================================================================
00266   // ==========================================================================
00267   AIDA::IHistogram1D*  plot1D
00268   ( const double        value        ,
00269     const HistoID&      ID           ,
00270     const std::string&  title        ,
00271     const double        low          ,
00272     const double        high         ,
00273     const unsigned long bins   = 100 ,
00274     const double        weight = 1.0 ) const ;
00275   // ==========================================================================
00290   inline AIDA::IHistogram1D*  plot
00291   ( const double        value        ,
00292     const HistoID&      ID           ,
00293     const std::string&  title        ,
00294     const double        low          ,
00295     const double        high         ,
00296     const unsigned long bins   = 100 ,
00297     const double        weight = 1.0 ) const
00298   {
00299     return plot1D ( value, ID, title, low, high, bins, weight );
00300   }
00301   // ==========================================================================
00326   AIDA::IHistogram1D*  plot
00327   ( const double             value        ,
00328     const HistoID&           ID           ,
00329     const Gaudi::Histo1DDef& hdef         ,
00330     const double             weight = 1.0 ) const ;
00331   // ==========================================================================
00395   template <class FUNCTION,class OBJECT>
00396   inline AIDA::IHistogram1D*   plot
00397   ( const FUNCTION&     func         ,
00398     OBJECT              first        ,
00399     OBJECT              last         ,
00400     const std::string&  title        ,
00401     const double        low          ,
00402     const double        high         ,
00403     const unsigned long bins  = 100  ) const
00404   {
00405     AIDA::IHistogram1D* h(0);
00406     if ( produceHistos() )
00407     {
00408       // retrieve or book the histogram
00409       h = histo1D ( title ) ;
00410       if ( 0 == h )     { h = book1D  ( title , low , high , bins ); }
00411       // fill histogram
00412       while( first != last && 0 != h  )
00413       { h = fill ( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00414     }
00415     return h ;
00416   }
00417   // ==========================================================================
00473   template <class FUNCTION,class OBJECT>
00474   inline AIDA::IHistogram1D*   plot
00475   ( const FUNCTION&     func         ,
00476     OBJECT              first        ,
00477     OBJECT              last         ,
00478     const HistoID&      ID           ,
00479     const std::string&  title        ,
00480     const double        low          ,
00481     const double        high         ,
00482     const unsigned long bins  = 100  ) const
00483   {
00484     AIDA::IHistogram1D* h(0);
00485     if ( produceHistos() )
00486     {
00487       // retrieve or book the histogram
00488       h = histo1D ( ID ) ;
00489       if ( 0 == h )     { h = book1D  ( ID , title , low , high , bins ); }
00490       // fill histogram
00491       while( first != last && 0 != h )
00492       { h = fill( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00493     }
00494     return h;
00495   }
00496   // ==========================================================================
00565   template <class FUNCTION,class OBJECT,class WEIGHT>
00566   inline AIDA::IHistogram1D*   plot
00567   ( const FUNCTION&     func         ,
00568     OBJECT              first        ,
00569     OBJECT              last         ,
00570     const std::string&  title        ,
00571     const double        low          ,
00572     const double        high         ,
00573     const unsigned long bins         ,
00574     const WEIGHT&       weight       ) const
00575   {
00576     AIDA::IHistogram1D* h(0);
00577     if ( produceHistos() )
00578     {
00579       // retrieve or book the histogram
00580       h = histo1D ( title ) ;
00581       if ( 0 == h ) { h = book1D  ( title , low , high , bins ); }
00582       // fill histogram
00583       while ( first != last && 0 != h )
00584       { h = fill ( h                 ,
00585                    func   ( *first ) ,
00586                    weight ( *first ) , title  ) ; ++first ; }
00587     }
00588     return h;
00589   }
00590   // ==========================================================================
00657   template <class FUNCTION,class OBJECT,class WEIGHT>
00658   inline AIDA::IHistogram1D*   plot
00659   ( const FUNCTION&     func         ,
00660     OBJECT              first        ,
00661     OBJECT              last         ,
00662     const HistoID&      ID           ,
00663     const std::string&  title        ,
00664     const double        low          ,
00665     const double        high         ,
00666     const unsigned long bins         ,
00667     const WEIGHT&       weight       ) const
00668   {
00669     AIDA::IHistogram1D* h(0);
00670     if ( produceHistos() )
00671     {
00672       // retrieve or book the histogram
00673       h = histo1D ( ID ) ;
00674       if ( 0 == h ) { h = book1D  ( ID , title , low , high , bins ); }
00675       // fill histogram
00676       while( first != last && 0 != h )
00677       { h  = fill ( h                 ,
00678                     func   ( *first ) ,
00679                     weight ( *first ) , title  ) ; ++first ; }
00680     }
00681     return h ;
00682   }
00683   // ==========================================================================
00684   // ================================= 2D Histograms ==========================
00685   // ==========================================================================
00736   AIDA::IHistogram2D*  plot2D
00737   ( const double        valueX       ,
00738     const double        valueY       ,
00739     const std::string&  title        ,
00740     const double        lowX         ,
00741     const double        highX        ,
00742     const double        lowY         ,
00743     const double        highY        ,
00744     const unsigned long binsX  = 50  ,
00745     const unsigned long binsY  = 50  ,
00746     const double        weight = 1.0 ) const;
00747   // ==========================================================================
00824   AIDA::IHistogram2D*  plot2D
00825   ( const double        valueX       ,
00826     const double        valueY       ,
00827     const HistoID&      ID           ,
00828     const std::string&  title        ,
00829     const double        lowX         ,
00830     const double        highX        ,
00831     const double        lowY         ,
00832     const double        highY        ,
00833     const unsigned long binsX  = 50  ,
00834     const unsigned long binsY  = 50  ,
00835     const double        weight = 1.0 ) const;
00836   // ==========================================================================
00837   // ================================= 3D Histograms ==========================
00838   // ==========================================================================
00897   AIDA::IHistogram3D*  plot3D
00898   ( const double        valueX       ,
00899     const double        valueY       ,
00900     const double        valueZ       ,
00901     const std::string&  title        ,
00902     const double        lowX         ,
00903     const double        highX        ,
00904     const double        lowY         ,
00905     const double        highY        ,
00906     const double        lowZ         ,
00907     const double        highZ        ,
00908     const unsigned long binsX  = 10  ,
00909     const unsigned long binsY  = 10  ,
00910     const unsigned long binsZ  = 10  ,
00911     const double        weight = 1.0 ) const;
00912   // ==========================================================================
00999   AIDA::IHistogram3D*  plot3D
01000   ( const double        valueX       ,
01001     const double        valueY       ,
01002     const double        valueZ       ,
01003     const HistoID&      ID           ,
01004     const std::string&  title        ,
01005     const double        lowX         ,
01006     const double        highX        ,
01007     const double        lowY         ,
01008     const double        highY        ,
01009     const double        lowZ         ,
01010     const double        highZ        ,
01011     const unsigned long binsX  = 10  ,
01012     const unsigned long binsY  = 10  ,
01013     const unsigned long binsZ  = 10  ,
01014     const double        weight = 1.0 ) const;
01015   // ==========================================================================
01016   // ================================= 1D Profile =============================
01017   // ==========================================================================
01066   AIDA::IProfile1D* profile1D
01067   ( const double        valueX       ,
01068     const double        valueY       ,
01069     const std::string&  title        ,
01070     const double        lowX         ,
01071     const double        highX        ,
01072     const unsigned long binsX  = 100 ,
01073     const std::string&  opt    = ""  ,
01074     const double        lowY   = -std::numeric_limits<double>::max() ,
01075     const double        highY  =  std::numeric_limits<double>::max() ,
01076     const double        weight = 1.0 ) const ;
01077   // ==========================================================================
01143   AIDA::IProfile1D* profile1D
01144   ( const double        valueX       ,
01145     const double        valueY       ,
01146     const HistoID&      ID           ,
01147     const std::string&  title        ,
01148     const double        lowX         ,
01149     const double        highX        ,
01150     const unsigned long binsX  = 100 ,
01151     const std::string&  opt    = ""  ,
01152     const double        lowY   = -std::numeric_limits<double>::max() ,
01153     const double        highY  =  std::numeric_limits<double>::max() ,
01154     const double        weight = 1.0 ) const;
01155   // ==========================================================================
01156   // ================================= 2D Profile =============================
01157   // ==========================================================================
01208   AIDA::IProfile2D* profile2D
01209   ( const double        valueX       ,
01210     const double        valueY       ,
01211     const double        valueZ       ,
01212     const std::string&  title        ,
01213     const double        lowX         ,
01214     const double        highX        ,
01215     const double        lowY         ,
01216     const double        highY        ,
01217     const unsigned long binsX  = 50  ,
01218     const unsigned long binsY  = 50  ,
01219     const double        weight = 1.0 ) const;
01220   // ==========================================================================
01288   AIDA::IProfile2D* profile2D
01289   ( const double        valueX       ,
01290     const double        valueY       ,
01291     const double        valueZ       ,
01292     const HistoID&      ID           ,
01293     const std::string&  title        ,
01294     const double        lowX         ,
01295     const double        highX        ,
01296     const double        lowY         ,
01297     const double        highY        ,
01298     const unsigned long binsX  = 50  ,
01299     const unsigned long binsY  = 50  ,
01300     const double        weight = 1.0 ) const;
01301   // ==========================================================================
01302 public:
01303   // ==========================================================================
01315   AIDA::IHistogram1D*  book1D
01316   ( const std::string&  title        ,
01317     const double        low    =   0 ,
01318     const double        high   = 100 ,
01319     const unsigned long bins   = 100 ) const ;
01320   // ==========================================================================
01333   inline AIDA::IHistogram1D*  book
01334   ( const std::string&  title        ,
01335     const double        low    =   0 ,
01336     const double        high   = 100 ,
01337     const unsigned long bins   = 100 ) const
01338   {
01339     return book1D( title, low, high, bins );
01340   }
01341   // ==========================================================================
01350    AIDA::IHistogram1D*  book
01351   ( const Gaudi::Histo1DDef& hdef ) const ;
01352   // ==========================================================================
01367   AIDA::IHistogram2D*  book2D
01368   ( const std::string&  title         ,
01369     const double        lowX    =   0 ,
01370     const double        highX   = 100 ,
01371     const unsigned long binsX   =  50 ,
01372     const double        lowY    =   0 ,
01373     const double        highY   = 100 ,
01374     const unsigned long binsY   =  50 ) const ;
01375   // ==========================================================================
01393   AIDA::IHistogram3D*  book3D
01394   ( const std::string&  title         ,
01395     const double        lowX    =   0 ,
01396     const double        highX   = 100 ,
01397     const unsigned long binsX   =  10 ,
01398     const double        lowY    =   0 ,
01399     const double        highY   = 100 ,
01400     const unsigned long binsY   =  10 ,
01401     const double        lowZ    =   0 ,
01402     const double        highZ   = 100 ,
01403     const unsigned long binsZ   =  10 ) const ;
01404   // ==========================================================================
01415   AIDA::IHistogram1D*  book1D
01416   ( const HistoID&      ID           ,
01417     const std::string&  title        ,
01418     const double        low    =   0 ,
01419     const double        high   = 100 ,
01420     const unsigned long bins   = 100 ) const ;
01421   // ==========================================================================
01435   inline AIDA::IHistogram1D*  book
01436   ( const HistoID&      ID           ,
01437     const std::string&  title        ,
01438     const double        low    =   0 ,
01439     const double        high   = 100 ,
01440     const unsigned long bins   = 100 ) const
01441   {
01442     return book1D( ID, title, low, high, bins );
01443   }
01444   // ==========================================================================
01452   inline AIDA::IHistogram1D*  book
01453   ( const HistoID&           ID   ,
01454     const Gaudi::Histo1DDef& hdef ) const ;
01455   // ==========================================================================
01466   AIDA::IHistogram2D*  book2D
01467   ( const HistoID&      ID            ,
01468     const std::string&  title         ,
01469     const double        lowX    =   0 ,
01470     const double        highX   = 100 ,
01471     const unsigned long binsX   =  50 ,
01472     const double        lowY    =   0 ,
01473     const double        highY   = 100 ,
01474     const unsigned long binsY   =  50 ) const ;
01475   // ==========================================================================
01492   AIDA::IHistogram3D*  book3D
01493   ( const HistoID&      ID            ,
01494     const std::string&  title         ,
01495     const double        lowX    =   0 ,
01496     const double        highX   = 100 ,
01497     const unsigned long binsX   =  10 ,
01498     const double        lowY    =   0 ,
01499     const double        highY   = 100 ,
01500     const unsigned long binsY   =  10 ,
01501     const double        lowZ    =   0 ,
01502     const double        highZ   = 100 ,
01503     const unsigned long binsZ   =  10 ) const ;
01504   // ==========================================================================
01519   AIDA::IProfile1D*  bookProfile1D
01520   ( const std::string&  title        ,
01521     const double        low    =   0 ,
01522     const double        high   = 100 ,
01523     const unsigned long bins   = 100 ,
01524     const std::string&  opt    = ""  ,
01525     const double        lowY   = -std::numeric_limits<double>::max() ,
01526     const double        highY  =  std::numeric_limits<double>::max() ) const;
01527   // ==========================================================================
01542   AIDA::IProfile1D*  bookProfile1D
01543   ( const HistoID&      ID           ,
01544     const std::string&  title        ,
01545     const double        low    =   0 ,
01546     const double        high   = 100 ,
01547     const unsigned long bins   = 100 ,
01548     const std::string&  opt    = ""  ,
01549     const double        lowY   = -std::numeric_limits<double>::max() ,
01550     const double        highY  =  std::numeric_limits<double>::max() ) const;
01551   // ==========================================================================
01566   AIDA::IProfile2D*  bookProfile2D
01567   ( const std::string&  title         ,
01568     const double        lowX    =   0 ,
01569     const double        highX   = 100 ,
01570     const unsigned long binsX   =  50 ,
01571     const double        lowY    =   0 ,
01572     const double        highY   = 100 ,
01573     const unsigned long binsY   =  50 ) const ;
01574   // ==========================================================================
01585   AIDA::IProfile2D*  bookProfile2D
01586   ( const HistoID&      ID            ,
01587     const std::string&  title         ,
01588     const double        lowX    =   0 ,
01589     const double        highX   = 100 ,
01590     const unsigned long binsX   =  50 ,
01591     const double        lowY    =   0 ,
01592     const double        highY   = 100 ,
01593     const unsigned long binsY   =  50 ) const ;
01594   // ==========================================================================
01595 public:
01596   // ==========================================================================
01604   AIDA::IHistogram1D* fill
01605   ( AIDA::IHistogram1D* histo  ,
01606     const double        value  ,
01607     const double        weight ,
01608     const std::string&  title  = "" ) const ;
01609   // ==========================================================================
01618   AIDA::IHistogram2D* fill
01619   ( AIDA::IHistogram2D* histo  ,
01620     const double        valueX ,
01621     const double        valueY ,
01622     const double        weight ,
01623     const std::string&  title  = "" ) const ;
01624   // ==========================================================================
01634   AIDA::IHistogram3D* fill
01635   ( AIDA::IHistogram3D* histo  ,
01636     const double        valueX ,
01637     const double        valueY ,
01638     const double        valueZ ,
01639     const double        weight ,
01640     const std::string&  title  = "" ) const ;
01641   // ==========================================================================
01650   AIDA::IProfile1D* fill
01651   ( AIDA::IProfile1D*   histo  ,
01652     const double        valueX ,
01653     const double        valueY ,
01654     const double        weight ,
01655     const std::string&  title  = "" ) const ;
01656   // ==========================================================================
01666   AIDA::IProfile2D* fill
01667   ( AIDA::IProfile2D*   histo  ,
01668     const double        valueX ,
01669     const double        valueY ,
01670     const double        valueZ ,
01671     const double        weight ,
01672     const std::string&  title  = "" ) const ;
01673   // ==========================================================================
01674 public:
01675   // ==========================================================================
01679   inline AIDA::IHistogram1D* histo1D ( const std::string& title  )  const
01680   {
01681     Histo1DMapTitle::const_iterator found = histo1DMapTitle().find( title ) ;
01682     return ( histo1DMapTitle().end() == found ? 0 : found->second );
01683   }
01684   // ==========================================================================
01692   inline AIDA::IHistogram1D* histo ( const std::string& title  )  const
01693   {
01694     return histo1D( title );
01695   }
01696   // ==========================================================================
01700   inline AIDA::IHistogram2D* histo2D ( const std::string& title  )  const
01701   {
01702     Histo2DMapTitle::const_iterator found = histo2DMapTitle().find( title ) ;
01703     return ( histo2DMapTitle().end() == found ? 0 : found->second );
01704   }
01705   // ==========================================================================
01709   inline AIDA::IHistogram3D* histo3D ( const std::string& title  )  const
01710   {
01711     Histo3DMapTitle::const_iterator found = histo3DMapTitle().find( title ) ;
01712     return ( histo3DMapTitle().end() == found ? 0 : found->second );
01713   }
01714   // ==========================================================================
01718   inline AIDA::IProfile1D* profile1D ( const std::string& title  )  const
01719   {
01720     Profile1DMapTitle::const_iterator found = profile1DMapTitle().find( title ) ;
01721     return ( profile1DMapTitle().end() == found ? 0 : found->second );
01722   }
01723   // ==========================================================================
01727   inline AIDA::IProfile2D* profile2D ( const std::string& title  )  const
01728   {
01729     Profile2DMapTitle::const_iterator found = profile2DMapTitle().find( title ) ;
01730     return ( profile2DMapTitle().end() == found ? 0 : found->second );
01731   }
01732   // ==========================================================================
01733 public:
01734   // ==========================================================================
01738   AIDA::IHistogram1D* histo1D ( const HistoID&     ID     )  const;
01739   // ==========================================================================
01747   inline AIDA::IHistogram1D* histo ( const HistoID&     ID     )  const
01748   {
01749     return histo1D( ID );
01750   }
01751   // ==========================================================================
01755   AIDA::IHistogram2D* histo2D ( const HistoID&     ID     )  const;
01756   // ==========================================================================
01760   AIDA::IHistogram3D* histo3D ( const HistoID&     ID     )  const;
01761   // ==========================================================================
01765   AIDA::IProfile1D* profile1D ( const HistoID&     ID  )  const;
01766   // ==========================================================================
01770   AIDA::IProfile2D* profile2D ( const HistoID&     ID  )  const;
01771   // ==========================================================================
01772 public:
01773   // ==========================================================================
01775   inline bool histoExists ( const std::string& title  )  const
01776   {
01777     return
01778       ( 0 != histo     ( title ) ||
01779         0 != histo2D   ( title ) ||
01780         0 != histo3D   ( title ) ||
01781         0 != profile1D ( title ) ||
01782         0 != profile2D ( title ) );
01783   }
01784   // ==========================================================================
01786   inline bool histoExists ( const HistoID&     ID     )  const
01787   {
01788     return
01789       ( 0 != histo     ( ID ) ||
01790         0 != histo2D   ( ID ) ||
01791         0 != histo3D   ( ID ) ||
01792         0 != profile1D ( ID ) ||
01793         0 != profile2D ( ID ) );
01794   }
01796   unsigned int totalNumberOfHistos() const;
01797   // ==========================================================================
01798 public: // trivial & non-trivial accessors
01799   // ==========================================================================
01801   inline bool               produceHistos () const { return m_produceHistos ; }
01803   inline bool               fullDetail    () const { return m_fullDetail    ; }
01805   inline bool               checkForNaN   () const { return m_checkForNaN   ; }
01807   inline bool               splitHistoDir () const { return m_splitHistoDir ; }
01809   inline HistoID::NumericID histoOffSet   () const { return m_histoOffSet ; }
01811   inline const std::string& histoTopDir   () const { return m_histoTopDir   ; }
01813   inline const std::string& histoDir      () const { return m_histoDir      ; }
01815   inline std::string histoPath () const
01816   {
01817     const std::string path = histoTopDir() + histoDir();
01818     return ( splitHistoDir() ? dirHbookName(path) : path );
01819   }
01821   inline bool histosPrint () const  { return m_histosPrint ; }
01823   inline bool useNumericAutoIDs() const { return m_useNumericAutoIDs; }
01824   // ==========================================================================
01829   int printHistos ( const MSG::Level level = MSG::ALWAYS ) const ;
01830   // ==========================================================================
01858   const Histo1DMapTitle & histo1DMapTitle() const { return m_histo1DMapTitle; }
01859   // ==========================================================================
01889   const Histo1DMapNumID & histo1DMapNumID () const { return m_histo1DMapNumID; }
01890   // ==========================================================================
01919   const Histo1DMapLitID & histo1DMapLitID () const { return m_histo1DMapLitID; }
01920   // ==========================================================================
01948   const Histo2DMapTitle & histo2DMapTitle() const { return m_histo2DMapTitle ; }
01949   // ==========================================================================
01979   const Histo2DMapNumID & histo2DMapNumID () const { return m_histo2DMapNumID; }
01980   // ==========================================================================
02009   const Histo2DMapLitID & histo2DMapLitID () const { return m_histo2DMapLitID; }
02010   // ==========================================================================
02038   const Histo3DMapTitle & histo3DMapTitle () const { return m_histo3DMapTitle ; }
02039   // ==========================================================================
02069   const Histo3DMapNumID & histo3DMapNumID () const { return m_histo3DMapNumID; }
02070   // ==========================================================================
02099   const Histo3DMapLitID & histo3DMapLitID () const { return m_histo3DMapLitID; }
02100   // ==========================================================================
02128   const Profile1DMapTitle & profile1DMapTitle() const { return m_profile1DMapTitle; }
02129   // ==========================================================================
02159   const Profile1DMapNumID & profile1DMapNumID () const { return m_profile1DMapNumID; }
02160   // ==========================================================================
02190   const Profile1DMapLitID & profile1DMapLitID () const { return m_profile1DMapLitID; }
02191   // ==========================================================================
02219   const Profile2DMapTitle & profile2DMapTitle() const { return m_profile2DMapTitle; }
02220   // ==========================================================================
02250   const Profile2DMapNumID & profile2DMapNumID () const { return m_profile2DMapNumID; }
02251   // ==========================================================================
02281   const Profile2DMapLitID & profile2DMapLitID () const { return m_profile2DMapLitID; }
02282   // ==========================================================================
02283 public: // trivial setters
02284   // ==========================================================================
02286   inline void setProduceHistos ( const bool         val ) { m_produceHistos = val ; }
02288   inline void setFullDetail    ( const bool         val ) { m_fullDetail    = val ; }
02290   inline void setCheckForNaN   ( const bool         val ) { m_checkForNaN   = val ; }
02292   inline void setSplitHistoDir ( const bool         val ) { m_splitHistoDir = val ; }
02294   inline void setHistoOffSet   ( const HistoID::NumericID val )
02295   { m_histoOffSet   = val ; }
02296   // ==========================================================================
02298   inline void setHistoTopDir   ( const std::string& val ) { m_histoTopDir   = val ; }
02299   // ==========================================================================
02301   inline void setHistoDir      ( const std::string& val ) { m_histoDir      = val ; }
02302   // ==========================================================================
02303 public:
02304   // ==========================================================================
02306   GaudiHistos ( const std::string & name,
02307                 ISvcLocator * pSvcLocator );
02308   // ==========================================================================
02310   GaudiHistos ( const std::string& type   ,
02311                 const std::string& name   ,
02312                 const IInterface*  parent );
02313   // ==========================================================================
02315   virtual ~GaudiHistos();
02316   // ==========================================================================
02317 protected:
02318   // ==========================================================================
02322   virtual StatusCode initialize ();
02323   // ==========================================================================
02327   virtual StatusCode finalize   ();
02328   // ==========================================================================
02329 private:
02330   // ==========================================================================
02332   bool noHistos() const;
02333   // ===========================================unsigned===============================
02335   void initGaudiHistosConstructor();
02336   // ==========================================================================
02342   void monitorHisto( const AIDA::IBaseHistogram* hist,
02343                      const HistoID& ID ) const;
02344   // ==========================================================================
02349   void newHistoID( const std::string & title,
02350                    HistoID& ID ) const;
02351   // ==========================================================================
02353   void stringSearchReplace( std::string & title,
02354                             const std::string & A,
02355                             const std::string & B ) const;
02356   // ==========================================================================
02357 protected:
02358   // ==========================================================================
02360   std::string convertTitleToID( const std::string & title ) const;
02361   // ==========================================================================
02362 private:
02363   // ==========================================================================
02365   bool        m_produceHistos ;
02367   bool        m_fullDetail;
02369   bool        m_checkForNaN   ;
02371   bool        m_splitHistoDir ;
02373   HistoID::NumericID     m_histoOffSet ;
02375   std::string m_histoTopDir   ;
02377   std::string m_histoDir      ;
02379   bool        m_histosPrint   ;
02381   bool        m_declareMoniHists;
02382   // ==========================================================================
02384   mutable Histo1DMapTitle     m_histo1DMapTitle ;
02386   mutable Histo1DMapNumID     m_histo1DMapNumID ;
02388   mutable Histo1DMapLitID     m_histo1DMapLitID ;
02389   // ==========================================================================
02391   mutable Histo2DMapTitle     m_histo2DMapTitle ;
02393   mutable Histo2DMapNumID     m_histo2DMapNumID ;
02395   mutable Histo2DMapLitID     m_histo2DMapLitID ;
02396   // ==========================================================================
02398   mutable Histo3DMapTitle     m_histo3DMapTitle ;
02400   mutable Histo3DMapNumID     m_histo3DMapNumID ;
02402   mutable Histo3DMapLitID     m_histo3DMapLitID ;
02403   // ==========================================================================
02405   mutable Profile1DMapTitle   m_profile1DMapTitle ;
02407   mutable Profile1DMapNumID   m_profile1DMapNumID ;
02409   mutable Profile1DMapLitID   m_profile1DMapLitID ;
02410   // ==========================================================================
02412   mutable Profile2DMapTitle   m_profile2DMapTitle ;
02414   mutable Profile2DMapNumID   m_profile2DMapNumID ;
02416   mutable Profile2DMapLitID   m_profile2DMapLitID ;
02417   // ==========================================================================
02419   std::string  m_histo1DTableFormat      ;
02421   std::string  m_histo1DTableFormatShort ;
02423   std::string  m_histo1DTableHeader      ;
02425   bool        m_useNumericAutoIDs;
02429   std::map<std::string,std::string> m_idReplaceInfo;
02430 };
02431 // ============================================================================
02432 // The END
02433 // ============================================================================
02434 #endif // GAUDIALG_GAUDIHISTOS_H
02435 // ============================================================================
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:58:13 2011 for GaudiAlg by doxygen 1.4.7