Gaudi Framework, version v22r0

Home   Generated: 9 Feb 2011

GaudiHistos< PBASE > Class Template Reference

Templated base class providing common histogramming methods for GaudiAlgorithm and GaudiTool like classes. More...

#include <GaudiAlg/GaudiHistos.h>

Collaboration diagram for GaudiHistos< PBASE >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef GaudiAlg::HistoID HistoID
 the actual type for histogram identifier
typedef GaudiAlg::Histo1DMapID Histo1DMapID
 the actual type for (ID)->(1D histogram) mapping
typedef GaudiAlg::Histo1DMapTitle Histo1DMapTitle
 the actual type for title->(1D histogram) mapping
typedef GaudiAlg::Histo2DMapID Histo2DMapID
 the actual type for (ID)->(2D histogram) mapping
typedef GaudiAlg::Histo2DMapTitle Histo2DMapTitle
 the actual type for title->(2D histogram) mapping
typedef GaudiAlg::Histo3DMapID Histo3DMapID
 the actual type for (ID)->(3D histogram) mapping
typedef GaudiAlg::Histo3DMapTitle Histo3DMapTitle
 the actual type for title->(3D histogram) mapping
typedef GaudiAlg::Profile1DMapID Profile1DMapID
 the actual type for (ID)->(1D profile histogram) mapping
typedef GaudiAlg::Profile1DMapTitle Profile1DMapTitle
 the actual type for title->(1D profile histogram) mapping
typedef GaudiAlg::Profile2DMapID Profile2DMapID
 the actual type for (ID)->(2D profile histogram) mapping
typedef GaudiAlg::Profile2DMapTitle Profile2DMapTitle
 the actual type for title->(2D profile histogram) mapping
typedef GaudiAlg::HistoBinEdges HistoBinEdges
 Edges for variable binning.

Public Member Functions

AIDA::IHistogram1D * plot1D (const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
 fill the 1D histogram (book on demand)
AIDA::IHistogram1D * plot (const double value, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
 fill the 1D histogram (book on demand)
AIDA::IHistogram1D * plot1D (const double value, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const
 fill the 1D histogram (book on demand)
AIDA::IHistogram1D * plot (const double value, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const
 fill the 1D histogram (book on demand)
AIDA::IHistogram1D * plot1D (const double value, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
 fill the 1D histogram with forced ID assignment (book on demand)
AIDA::IHistogram1D * plot (const double value, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100, const double weight=1.0) const
 fill the 1D histogram with forced ID assignment (book on demand)
AIDA::IHistogram1D * plot1D (const double value, const HistoID &ID, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const
 fill the 1D histogram with forced ID assignment (book on demand)
AIDA::IHistogram1D * plot (const double value, const HistoID &ID, const Gaudi::Histo1DDef &hdef, const double weight=1.0) const
 fill the 1D histogram (book on demand)
template<class FUNCTION , class OBJECT >
AIDA::IHistogram1D * plot (const FUNCTION &func, OBJECT first, OBJECT last, const std::string &title, const double low, const double high, const unsigned long bins=100) const
 fill the 1D histogram with information from [first,last) sequence
template<class FUNCTION , class OBJECT >
AIDA::IHistogram1D * plot (const FUNCTION &func, OBJECT first, OBJECT last, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins=100) const
 fill the 1D histogram with forced ID and information from [first,last) sequence
template<class FUNCTION , class OBJECT , class WEIGHT >
AIDA::IHistogram1D * plot (const FUNCTION &func, OBJECT first, OBJECT last, const std::string &title, const double low, const double high, const unsigned long bins, const WEIGHT &weight) const
 book and fill the 1D histogram with information from [first,last) sequence with given weight
template<class FUNCTION , class OBJECT , class WEIGHT >
AIDA::IHistogram1D * plot (const FUNCTION &func, OBJECT first, OBJECT last, const HistoID &ID, const std::string &title, const double low, const double high, const unsigned long bins, const WEIGHT &weight) const
 book and fill the 1D histogram with forced ID and information from [first,last) sequence with given weight
AIDA::IHistogram1D * plot1D (const double value, const std::string &title, const HistoBinEdges &edges, const double weight=1.0) const
 Fill the 1D variable binning histogram (book on demand).
AIDA::IHistogram1D * plot1D (const double value, const HistoID &ID, const std::string &title, const HistoBinEdges &edges, const double weight=1.0) const
 fill the 1D variable binning histogram with forced ID assignment (book on demand)
AIDA::IHistogram2D * plot2D (const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
 fill the 2D histogram (book on demand)
AIDA::IHistogram2D * plot2D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
 fill the 2D histogram with forced ID assignment (book on demand)
AIDA::IHistogram2D * plot2D (const double valueX, const double valueY, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const double weight=1.0) const
 Fill the 2D variable binning histogram (book on demand).
AIDA::IHistogram2D * plot2D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const double weight=1.0) const
 fill the 2D variable histogram with forced ID assignment (book on demand)
AIDA::IHistogram3D * plot3D (const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const
 fill the 3D histogram (book on demand)
AIDA::IHistogram3D * plot3D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const double lowZ, const double highZ, const unsigned long binsX=10, const unsigned long binsY=10, const unsigned long binsZ=10, const double weight=1.0) const
 fill the 3D histogram with forced ID assignment (book on demand)
AIDA::IHistogram3D * plot3D (const double valueX, const double valueY, const double valueZ, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const HistoBinEdges &edgesZ, const double weight=1.0) const
 Fill the 3D variable binning histogram (book on demand).
AIDA::IHistogram3D * plot3D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const HistoBinEdges &edgesZ, const double weight=1.0) const
 fill the 3D histogram with forced ID assignment (book on demand)
AIDA::IProfile1D * profile1D (const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
 fill the 1D profile histogram (book on demand)
AIDA::IProfile1D * profile1D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max(), const double weight=1.0) const
 fill the 1D profile histogram with forced ID assignment (book on demand)
AIDA::IProfile1D * profile1D (const double valueX, const double valueY, const std::string &title, const HistoBinEdges &edges, const double weight=1.0) const
 fill the 1D variable binning profile histogram (book on demand)
AIDA::IProfile1D * profile1D (const double valueX, const double valueY, const HistoID &ID, const std::string &title, const HistoBinEdges &edges, const double weight=1.0) const
 fill the 1D variable binning profile histogram with forced ID assignment (book on demand)
AIDA::IProfile2D * profile2D (const double valueX, const double valueY, const double valueZ, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
 fill the 2D profile histogram (book on demand)
AIDA::IProfile2D * profile2D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const double lowX, const double highX, const double lowY, const double highY, const unsigned long binsX=50, const unsigned long binsY=50, const double weight=1.0) const
 fill the 2D profile histogram with forced ID assignment (book on demand)
AIDA::IProfile2D * profile2D (const double valueX, const double valueY, const double valueZ, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const double weight=1.0) const
 fill the 2D variable binning profile histogram (book on demand)
AIDA::IProfile2D * profile2D (const double valueX, const double valueY, const double valueZ, const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const double weight=1.0) const
 fill the 2D variable binning profile histogram with forced ID assignment (book on demand)
AIDA::IHistogram1D * book1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const
 book the 1D histogram
AIDA::IHistogram1D * book (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const
 book the 1D histogram
AIDA::IHistogram1D * book (const Gaudi::Histo1DDef &hdef) const
 book the 1D histogram
AIDA::IHistogram1D * book1D (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const
 book the 1D histogram with forced ID
AIDA::IHistogram1D * book (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const
 book the 1D histogram with forced ID
AIDA::IHistogram1D * book (const HistoID &ID, const Gaudi::Histo1DDef &hdef) const
 book the 1D histogram with forced ID
AIDA::IHistogram1D * book1D (const std::string &title, const HistoBinEdges &edges) const
 book the 1D variable binning histogram
AIDA::IHistogram1D * book1D (const HistoID &ID, const std::string &title, const HistoBinEdges &edges) const
 book the 1D variable binning histogram with given ID
AIDA::IHistogram2D * book2D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const
 book the 2D histogram
AIDA::IHistogram2D * book2D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const
 book the 2D histogram with forced ID
AIDA::IHistogram2D * book2D (const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY) const
 book the 2D variable binning histogram
AIDA::IHistogram2D * book2D (const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY) const
 book the 2D variable binning histogram with given ID
AIDA::IHistogram3D * book3D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const
 book the 3D histogram
AIDA::IHistogram3D * book3D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=10, const double lowY=0, const double highY=100, const unsigned long binsY=10, const double lowZ=0, const double highZ=100, const unsigned long binsZ=10) const
 book the 3D histogram with forced ID
AIDA::IHistogram3D * book3D (const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const HistoBinEdges &edgesZ) const
 book the 3D variable binning histogram
AIDA::IHistogram3D * book3D (const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY, const HistoBinEdges &edgesZ) const
 book the 3D variable binning histogram with given ID
AIDA::IProfile1D * bookProfile1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const
 book the 1D profile histogram
AIDA::IProfile1D * bookProfile1D (const HistoID &ID, const std::string &title, const double low=0, const double high=100, const unsigned long bins=100, const std::string &opt="", const double lowY=-std::numeric_limits< double >::max(), const double highY=std::numeric_limits< double >::max()) const
 book the 1D profile histogram
AIDA::IProfile1D * bookProfile1D (const std::string &title, const HistoBinEdges &edges) const
 book the 1D profile histogram
AIDA::IProfile1D * bookProfile1D (const HistoID &ID, const std::string &title, const HistoBinEdges &edges) const
 book the 1D profile histogram
AIDA::IProfile2D * bookProfile2D (const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const
 book the 2D profile histogram
AIDA::IProfile2D * bookProfile2D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=50, const double lowY=0, const double highY=100, const unsigned long binsY=50) const
 book the 2D profile histogram with forced ID
AIDA::IProfile2D * bookProfile2D (const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY) const
 book the 2D profile histogram
AIDA::IProfile2D * bookProfile2D (const HistoID &ID, const std::string &title, const HistoBinEdges &edgesX, const HistoBinEdges &edgesY) const
 book the 2D profile histogram with forced ID
AIDA::IHistogram1D * fill (AIDA::IHistogram1D *histo, const double value, const double weight, const std::string &title="") const
 fill the 1D histogram with the value and weight
AIDA::IHistogram2D * fill (AIDA::IHistogram2D *histo, const double valueX, const double valueY, const double weight, const std::string &title="") const
 fill the 2D histogram with the value and weight
AIDA::IHistogram3D * fill (AIDA::IHistogram3D *histo, const double valueX, const double valueY, const double valueZ, const double weight, const std::string &title="") const
 fill the 3D histogram with the value and weight
AIDA::IProfile1D * fill (AIDA::IProfile1D *histo, const double valueX, const double valueY, const double weight, const std::string &title="") const
 fill the 1D profile histogram with the values and weight
AIDA::IProfile2D * fill (AIDA::IProfile2D *histo, const double valueX, const double valueY, const double valueZ, const double weight, const std::string &title="") const
 fill the 2D profile histogram with the values and weight
AIDA::IHistogram1D * histo1D (const std::string &title) const
 access the EXISTING 1D histogram by title return the pointer to existing 1D histogram or NULL
AIDA::IHistogram1D * histo (const std::string &title) const
 access the EXISTING 1D histogram by title
AIDA::IHistogram2D * histo2D (const std::string &title) const
 access the EXISTING 2D histogram by title return the pointer to existing 2D histogram or NULL
AIDA::IHistogram3D * histo3D (const std::string &title) const
 access the EXISTING 3D histogram by title return the pointer to existing 3D histogram or NULL
AIDA::IProfile1D * profile1D (const std::string &title) const
 access the EXISTING 1D profile histogram by title return the pointer to existing 1D profile histogram or NULL
AIDA::IProfile2D * profile2D (const std::string &title) const
 access the EXISTING 2D profile histogram by title return the pointer to existing 2D profile histogram or NULL
AIDA::IHistogram1D * histo1D (const HistoID &ID) const
 access the EXISTING 1D histogram by ID return the pointer to existing 1D histogram or NULL
AIDA::IHistogram1D * histo (const HistoID &ID) const
 access the EXISTING 1D histogram by ID
AIDA::IHistogram2D * histo2D (const HistoID &ID) const
 access the EXISTING 2D histogram by ID return the pointer to existing 2D histogram or NULL
AIDA::IHistogram3D * histo3D (const HistoID &ID) const
 access the EXISTING 3D histogram by ID return the pointer to existing 3D histogram or NULL
AIDA::IProfile1D * profile1D (const HistoID &ID) const
 access the EXISTING 1D profile histogram by ID return the pointer to existing 1D profile histogram or NULL
AIDA::IProfile2D * profile2D (const HistoID &ID) const
 access the EXISTING 2D profile histogram by ID return the pointer to existing 2D profile histogram or NULL
bool histoExists (const std::string &title) const
 check the existence AND validity of the histogram with given title
bool histoExists (const HistoID &ID) const
 check the existence AND validity of the histogram with given title
unsigned int totalNumberOfHistos () const
 Returns the total number of histograms (of all types) currently booked.
bool produceHistos () const
 get the flag for histogram production (property "HistoProduce")
bool fullDetail () const
 get flag to control output level of histograms
bool checkForNaN () const
 get the flag for NaN checks (property "HistoCheckForNan")
bool splitHistoDir () const
 get the flag for histogram path split (property "HistoSplitDir")
HistoID::NumericID histoOffSet () const
 get the value for histogram offset (property "HistoOffSet")
const std::stringhistoTopDir () const
 get top-level histogram directory (property "HistoTopDir")
const std::stringhistoDir () const
 get histogram directory (property "HistoDir")
std::string histoPath () const
 get the constructed histogram path
bool histosPrint () const
 print histograms at finalization ?
bool useNumericAutoIDs () const
 Use old style sequencial numerical automatically assigned IDs ?
int printHistos (const MSG::Level level=MSG::ALWAYS) const
 perform the actual printout of histograms
const Histo1DMapTitlehisto1DMapTitle () const
 get access to the map of all 1D histograms indexed via their title
const Histo1DMapIDhisto1DMapID () const
 get access to the map of all 1D histograms index via ID
const Histo2DMapTitlehisto2DMapTitle () const
 get access to the map of all 2D histograms indexed via their title
const Histo2DMapIDhisto2DMapID () const
 get access to the map of 2D histograms index via ID
const Histo3DMapTitlehisto3DMapTitle () const
 get access to the map of all 3D histograms indexed via their title
const Histo3DMapIDhisto3DMapID () const
 get access to the map of all 3D histograms index via a ID
const Profile1DMapTitleprofile1DMapTitle () const
 get access to the map of all 1D profile histograms indexed via their title
const Profile1DMapIDprofile1DMapID () const
 get access to the map of 1D profile histograms index via a ID
const Profile2DMapTitleprofile2DMapTitle () const
 get access to the map of all 2D profile histograms indexed via their title
const Profile2DMapIDprofile2DMapID () const
 get access to the map of 2D profile histograms index via a ID
void setProduceHistos (const bool val)
 set the flag for histogram production (property "HistoProduce")
void setFullDetail (const bool val)
 set flag to control output level of histograms
void setCheckForNaN (const bool val)
 set the flag for NaN checks (property "HistoCheckForNan")
void setSplitHistoDir (const bool val)
 set the flag for histogram path split (property "HistoSplitDir")
void setHistoOffSet (const HistoID::NumericID val)
 set a value for histogram offset (property "HistoOffSet"
void setHistoTopDir (const std::string &val)
 set top-level histogram directory (property "HistoTopDir")
void setHistoDir (const std::string &val)
 set histogram directory (property "HistoDir")
 GaudiHistos (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor.
 GaudiHistos (const std::string &type, const std::string &name, const IInterface *parent)
 Tool constructor.
virtual ~GaudiHistos ()
 Destructor.

Protected Member Functions

virtual StatusCode initialize ()
 standard initialization method
virtual StatusCode finalize ()
 standard finalization method
std::string convertTitleToID (const std::string &title) const
 Create an ID string from a title string.

Private Member Functions

bool noHistos () const
 Check if all histogram maps are empty.
void initGaudiHistosConstructor ()
 Constructor initialisation and job options.
void monitorHisto (const AIDA::IBaseHistogram *hist, const HistoID &ID) const
 Declare a histogram to the monitor service.
void newHistoID (const std::string &title, HistoID &ID) const
 Create a new histogram ID using the given title.
void stringSearchReplace (std::string &title, const std::string &A, const std::string &B) const
 Searches 'title' for all instancies of 'A' and replaces them with 'B'.
void printHistoHandler (Property &)
 the handler for "HistoPrint" property

Private Attributes

bool m_produceHistos
 flag to SWITCH ON/SWITCH OFF the histogrm fillling and booking
bool m_fullDetail
 flag to control output level of histograms
bool m_checkForNaN
 flag to control check for Nan/Finite while filling the histogram
bool m_splitHistoDir
 split histogram directory name (very useful for Hbook)
HistoID::NumericID m_histoOffSet
 general histogram ID offset (only works for automatically assigned numeric IDs)
std::string m_histoTopDir
 histogram top level directory
std::string m_histoDir
 histogram directory
bool m_histosPrint
 print histograms at finalization
bool m_declareMoniHists
 Flag to turn on/off the registration of histograms to the Monitoring Service.
Histo1DMapTitle m_histo1DMapTitle
 the actual storage/access of 1D histograms by unique title
Histo1DMapID m_histo1DMapID
 the actual storage/access of 1D histograms by unique ID
Histo2DMapTitle m_histo2DMapTitle
 the actual storage/access of 2D histograms by unique title
Histo2DMapID m_histo2DMapID
 the actual storage/access of 2D histograms by unique ID
Histo3DMapTitle m_histo3DMapTitle
 the actual storage/access of 3D histograms by unique title
Histo3DMapID m_histo3DMapID
 the actual storage/access of 3D histograms by unique ID
Profile1DMapTitle m_profile1DMapTitle
 the actual storage/access of 1D profile histograms by unique title
Profile1DMapID m_profile1DMapID
 the actual storage/access of 1D profile histograms by unique ID
Profile2DMapTitle m_profile2DMapTitle
 the actual storage/access of 2D profile histograms by unique title
Profile2DMapID m_profile2DMapID
 the actual storage/access of 2D profile histograms by unique ID
std::string m_histo1DTableFormat
 format for printout of 1D-histograms as a table
std::string m_histo1DTableFormatShort
 format for printout of 1D-histograms as a table
std::string m_histo1DTableHeader
 the header for the table of 1-D historgrams
bool m_useNumericAutoIDs
 Flag to switch back to the old style sequencial numerical automatic IDs.
std::map< std::string,
std::string
m_idReplaceInfo
 Map of strings to search and replace when using the title as the basis of automatically generated literal IDs.

Detailed Description

template<class PBASE>
class GaudiHistos< PBASE >

Templated base class providing common histogramming methods for GaudiAlgorithm and GaudiTool like classes.

Author:
Chris Jones Christopher.Rob.Jones@cern.ch
Vanya BELYAEV Ivan.Belyaev@itep.ru
Date:
2005-08-08

Definition at line 51 of file GaudiHistos.h.


Member Typedef Documentation

template<class PBASE>
typedef GaudiAlg::Histo1DMapID GaudiHistos< PBASE >::Histo1DMapID

the actual type for (ID)->(1D histogram) mapping

Definition at line 59 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo1DMapTitle GaudiHistos< PBASE >::Histo1DMapTitle

the actual type for title->(1D histogram) mapping

Definition at line 61 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo2DMapID GaudiHistos< PBASE >::Histo2DMapID

the actual type for (ID)->(2D histogram) mapping

Definition at line 64 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo2DMapTitle GaudiHistos< PBASE >::Histo2DMapTitle

the actual type for title->(2D histogram) mapping

Definition at line 66 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo3DMapID GaudiHistos< PBASE >::Histo3DMapID

the actual type for (ID)->(3D histogram) mapping

Definition at line 69 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo3DMapTitle GaudiHistos< PBASE >::Histo3DMapTitle

the actual type for title->(3D histogram) mapping

Definition at line 71 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::HistoBinEdges GaudiHistos< PBASE >::HistoBinEdges

Edges for variable binning.

Definition at line 84 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::HistoID GaudiHistos< PBASE >::HistoID

the actual type for histogram identifier

Reimplemented in GaudiTuples< GaudiHistoTool >, and GaudiTuples< GaudiHistoAlg >.

Definition at line 56 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile1DMapID GaudiHistos< PBASE >::Profile1DMapID

the actual type for (ID)->(1D profile histogram) mapping

Definition at line 74 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile1DMapTitle GaudiHistos< PBASE >::Profile1DMapTitle

the actual type for title->(1D profile histogram) mapping

Definition at line 76 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile2DMapID GaudiHistos< PBASE >::Profile2DMapID

the actual type for (ID)->(2D profile histogram) mapping

Definition at line 79 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile2DMapTitle GaudiHistos< PBASE >::Profile2DMapTitle

the actual type for title->(2D profile histogram) mapping

Definition at line 81 of file GaudiHistos.h.


Constructor & Destructor Documentation

template<class PBASE>
GaudiHistos< PBASE >::GaudiHistos ( const std::string name,
ISvcLocator pSvcLocator 
)

Algorithm constructor.

template<class PBASE>
GaudiHistos< PBASE >::GaudiHistos ( const std::string type,
const std::string name,
const IInterface parent 
)

Tool constructor.

template<class PBASE>
virtual GaudiHistos< PBASE >::~GaudiHistos (  )  [inline, virtual]

Destructor.

Definition at line 3031 of file GaudiHistos.h.

03031 {}


Member Function Documentation

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book ( const HistoID ID,
const Gaudi::Histo1DDef &  hdef 
) const [inline]

book the 1D histogram with forced ID

See also:
IHistogram1D
Parameters:
ID unique histogram ID
hdef histogram descriptor
Returns:
pointer to AIDA histogram

Definition at line 199 of file GaudiHistos_1DFixedBinning.icpp.

00201 {
00202   return book1D ( ID               ,
00203                   hdef.title    () ,
00204                   hdef.lowEdge  () ,
00205                   hdef.highEdge () ,
00206                   hdef.bins     () ) ;
00207 }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::book ( const HistoID ID,
const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [inline]

book the 1D histogram with forced ID

Wrapper method for the equivalent book1D method. Retained for backwards compatibility, please use book1D instead.

See also:
IHistogram1D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA histogram

Definition at line 2082 of file GaudiHistos.h.

02087   {
02088     return book1D( ID, title, low, high, bins );
02089   }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book ( const Gaudi::Histo1DDef &  hdef  )  const [inline]

book the 1D histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IHistogram1D
Parameters:
hdef histogram description/definition
Returns:
pointer to AIDA 1D histogram

Definition at line 186 of file GaudiHistos_1DFixedBinning.icpp.

00187 {
00188   return book1D ( hdef.title    () ,
00189                   hdef.lowEdge  () ,
00190                   hdef.highEdge () ,
00191                   hdef.bins     () ) ;
00192 }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::book ( const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [inline]

book the 1D histogram

Wrapper method for the equivalent book1D method. Retained for backwards compatibility, please use book1D instead.

See also:
IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA 1D histogram

Definition at line 2032 of file GaudiHistos.h.

02036   {
02037     return book1D( title, low, high, bins );
02038   }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book1D ( const HistoID ID,
const std::string title,
const HistoBinEdges edges 
) const [inline]

book the 1D variable binning histogram with given ID

See also:
AIDA::IHistogram1D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
Returns:
pointer to AIDA 1D histogram

Definition at line 31 of file GaudiHistos_1DVariableBinning.icpp.

00034 {
00035   //
00036   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00037   //
00038   // Check ID
00039   if (ID.undefined())
00040   {
00041     this->Error("Undefined Histogram ID : Title='"+title+"'");
00042     return NULL;
00043   }
00044 
00045   // exist?
00046   AIDA::IHistogram1D* hist = histo1D ( ID ) ;
00047   // histogram is already booked
00048   if ( NULL != hist       )                    { return hist ; } // RETURN !!
00049 
00050   // Histogram title
00051   const std::string & htitle =
00052     ( title.empty() ? "Unnamed 1D Histogram ID="+ID.idAsString() : title ) ;
00053 
00054   // book the histogram
00055   if ( ID.numeric() )
00056   {
00057     hist = this->histoSvc() -> book ( histoPath()  ,
00058                                       ID.numericID() ,
00059                                       htitle       ,
00060                                       edges     ) ;
00061   }
00062   else if ( ID.literal() )
00063   {
00064     hist = this->histoSvc() -> book ( histoPath()+"/"+
00065                                       ID.literalID() ,
00066                                       htitle         ,
00067                                       edges        ) ;
00068   }
00069 
00070   // check OK
00071   if( NULL == hist )
00072   { this->Error( "IHistogram1D* points to NULL! ID='" + ID.idAsString() +
00073                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00074 
00075   // add histogram into histogram storages
00076   m_histo1DMapID    [ ID    ] = hist ;
00077   m_histo1DMapTitle [ title ] = hist ;
00078 
00079   // Declare to monitoring service
00080   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00081 
00082   // Printout and return
00083   if ( this->msgLevel(MSG::DEBUG) )
00084   { this->debug() << "Booked 1D Histogram : ID='" << ID
00085                   << "' Path=" << histoPath()
00086                   << " Title='"
00087                   << Gaudi::Utils::Histos::htitle ( hist )
00088                   << "'" << endmsg; }
00089   return hist ;
00090 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book1D ( const std::string title,
const HistoBinEdges edges 
) const [inline]

book the 1D variable binning histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
Returns:
pointer to AIDA 1D histogram

Definition at line 8 of file GaudiHistos_1DVariableBinning.icpp.

00010 {
00011   //
00012   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00013   //
00014   // exist?
00015   AIDA::IHistogram1D* hist = histo1D ( title ) ;
00016   // histogram is already booked
00017   if( NULL != hist      )                      { return hist ; } // RETURN !!
00018 
00019   // propose the histogram ID
00020   HistoID ID;
00021   newHistoID( title, ID );
00022 
00023   // Create a new histogram and return
00024   return this -> book1D ( ID, title, edges );
00025 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book1D ( const HistoID ID,
const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [inline]

book the 1D histogram with forced ID

See also:
IHistogram1D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA histogram

Definition at line 33 of file GaudiHistos_1DFixedBinning.icpp.

00038 {
00039   //
00040   if  ( !produceHistos() ) { return 0 ; }  // RETURN
00041   //
00042 
00043   // Check ID
00044   if ( ID.undefined() )
00045   {
00046     this->Error("Undefined Histogram ID : Title='"+title+"'");
00047     return NULL;
00048   }
00049 
00050   // exist?
00051   AIDA::IHistogram1D* hist = histo1D ( ID ) ;
00052   // histogram is already booked
00053   if ( NULL != hist       )                  { return hist ; } // RETURN !!
00054 
00055   // Histogram title
00056   const std::string & htitle =
00057     ( title.empty() ? "Unnamed 1D Histogram ID="+ID.idAsString() : title ) ;
00058 
00059   // book the histogram
00060   if ( ID.numeric() )
00061   {
00062     hist = this->histoSvc() -> book ( histoPath()  ,
00063                                       ID.numericID() ,
00064                                       htitle       ,
00065                                       bins         ,
00066                                       low          ,
00067                                       high         ) ;
00068   }
00069   else if ( ID.literal() )
00070   {
00071     hist = this->histoSvc() -> book ( histoPath()+"/"+
00072                                       ID.literalID() ,
00073                                       htitle         ,
00074                                       bins           ,
00075                                       low            ,
00076                                       high         ) ;
00077   }
00078 
00079   // check OK
00080   if( NULL == hist )
00081   { this->Error( "IHistogram1D* points to NULL! ID='" + ID.idAsString() +
00082                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00083 
00084   // add histogram into histogram storages
00085   m_histo1DMapID    [ ID    ] = hist ;
00086   m_histo1DMapTitle [ title ] = hist ;
00087 
00088   // Declare to monitoring service
00089   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00090 
00091   // Printout and return
00092   if ( this->msgLevel(MSG::DEBUG) )
00093   { this->debug() << "Booked 1D Histogram : ID='" << ID
00094                   << "' Path=" << histoPath()
00095                   << " Title='"
00096                   << Gaudi::Utils::Histos::htitle ( hist )
00097                   << "'" << endmsg; }
00098   return hist ;
00099 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::book1D ( const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [inline]

book the 1D histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA 1D histogram

Definition at line 8 of file GaudiHistos_1DFixedBinning.icpp.

00012 {
00013   //
00014   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00015   //
00016   // exist?
00017   AIDA::IHistogram1D* hist = histo1D ( title ) ;
00018   // histogram is already booked
00019   if( NULL != hist      )                    { return hist ; } // RETURN !!
00020 
00021   // propose the histogram ID
00022   HistoID ID;
00023   newHistoID( title, ID );
00024 
00025   // Create a new histogram and return
00026   return this -> book1D ( ID, title, low, high, bins );
00027 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::book2D ( const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY 
) const [inline]

book the 2D variable binning histogram with given ID

See also:
AIDA::IHistogram2D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
Returns:
pointer to AIDA 2D histogram

Definition at line 32 of file GaudiHistos_2DVariableBinning.icpp.

00036 {
00037   //
00038   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00039   //
00040   // Check ID
00041   if (ID.undefined())
00042   {
00043     this->Error("Undefined Histogram ID : Title='"+title+"'");
00044     return NULL;
00045   }
00046 
00047   // exist?
00048   AIDA::IHistogram2D * hist = histo2D ( ID ) ;
00049   // histogram is already booked
00050   if ( NULL != hist       )                 { return hist ; } // RETURN !!
00051 
00052   // Histogram title
00053   const std::string & htitle =
00054     ( title.empty() ? "Unnamed 2D Histogram ID="+ID.idAsString() : title ) ;
00055 
00056   // book the histogram
00057   if ( ID.numeric() )
00058   {
00059     hist = this->histoSvc() -> book ( histoPath()  ,
00060                                       ID.numericID() ,
00061                                       htitle       ,
00062                                       edgesX       ,
00063                                       edgesY       ) ;
00064   }
00065   else if ( ID.literal() )
00066   {
00067     hist = this->histoSvc() -> book ( histoPath()+"/"+
00068                                       ID.literalID() ,
00069                                       htitle         ,
00070                                       edgesX         ,
00071                                       edgesY         ) ;
00072   }
00073 
00074   // check OK
00075   if( NULL == hist )
00076   { this->Error( "IHistogram2D* points to NULL! ID='" + ID.idAsString() +
00077                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00078 
00079   // add histogram into histogram storages
00080   m_histo2DMapID    [ ID    ] = hist ;
00081   m_histo2DMapTitle [ title ] = hist ;
00082 
00083   // Declare to monitoring service
00084   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00085 
00086   // Printout and return
00087   if ( this->msgLevel(MSG::DEBUG) )
00088   { this->debug() << "Booked 2D Histogram : ID='" << ID
00089                   << "' Path=" << histoPath()
00090                   << " Title='"
00091                   << Gaudi::Utils::Histos::htitle ( hist )
00092                   << "'" << endmsg; }
00093   return hist ;
00094 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::book2D ( const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY 
) const [inline]

book the 2D variable binning histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IHistogram2D
Parameters:
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
Returns:
pointer to AIDA 2D histogram

Definition at line 8 of file GaudiHistos_2DVariableBinning.icpp.

00011 {
00012   //
00013   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00014   //
00015   // exist?
00016   AIDA::IHistogram2D * hist = histo2D ( title ) ;
00017   // histogram is already booked
00018   if ( NULL != hist      )                  { return hist ; } // RETURN !!
00019 
00020   // propose the histogram ID
00021   HistoID ID;
00022   newHistoID( title, ID );
00023 
00024   // Create a new histogram and return
00025   return this -> book2D ( ID, title, edgesX, edgesY );
00026 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::book2D ( const HistoID ID,
const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 50,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 50 
) const [inline]

book the 2D histogram with forced ID

See also:
IHistogram2D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA histogram

Definition at line 36 of file GaudiHistos_2DFixedBinning.icpp.

00044 {
00045   //
00046   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00047   //
00048   // Check ID
00049   if (ID.undefined())
00050   {
00051     this->Error("Undefined Histogram ID : Title='"+title+"'");
00052     return NULL;
00053   }
00054 
00055   // exist?
00056   AIDA::IHistogram2D* hist = histo2D( ID ) ;
00057   // histogram is already booked
00058   if( NULL != hist       )                  { return hist ; } // RETURN !!
00059 
00060   // Histogram title
00061   const std::string & htitle =
00062     ( title.empty() ? "Unnamed 2D Histogram ID="+ID.idAsString() : title ) ;
00063 
00064   // book the histogram
00065   if ( ID.numeric() )
00066   {
00067     hist = this->histoSvc() -> book ( histoPath()  ,
00068                                       ID.numericID() ,
00069                                       htitle       ,
00070                                       binsX        ,
00071                                       lowX         ,
00072                                       highX        ,
00073                                       binsY        ,
00074                                       lowY         ,
00075                                       highY        ) ;
00076   }
00077   else if ( ID.literal() )
00078   {
00079     hist = this->histoSvc() -> book ( histoPath()+"/"+
00080                                       ID.literalID() ,
00081                                       htitle       ,
00082                                       binsX        ,
00083                                       lowX         ,
00084                                       highX        ,
00085                                       binsY        ,
00086                                       lowY         ,
00087                                       highY        ) ;
00088   }
00089 
00090   // Check OK
00091   if( NULL == hist )
00092   { this->Error( "IHistogram2D* points to NULL! ID='" + ID.idAsString() +
00093                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00094 
00095   // add histogram into histogram storages
00096   m_histo2DMapID    [ ID    ] = hist ;
00097   m_histo2DMapTitle [ title ] = hist ;
00098 
00099   // Declare to monitoring service
00100   monitorHisto( Gaudi::Utils::Histos::toBase ( hist) , ID );
00101 
00102   // Printout and return
00103   if ( this->msgLevel(MSG::DEBUG) )
00104   { this->debug() << "Booked 2D Histogram : ID='"
00105                   << ID << "' Path=" << histoPath()
00106                   << " Title='"
00107                   << Gaudi::Utils::Histos::htitle ( hist )
00108                   << "'" << endmsg; }
00109   // return
00110   return hist ;
00111 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::book2D ( const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 50,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 50 
) const [inline]

book the 2D histogram

The histogram will be assigned a unique identifier

See also:
IHistogram2D
Parameters:
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
lowY low y limit for histogram
highY high y limit for histogram
binsY number of bins in y
Returns:
pointer to AIDA 2D histogram

Definition at line 8 of file GaudiHistos_2DFixedBinning.icpp.

00015 {
00016   //
00017   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00018   //
00019   // exist?
00020   AIDA::IHistogram2D* hist = histo2D ( title ) ;
00021   // histogram is already booked
00022   if( NULL != hist      )                { return hist ; } // RETURN !!
00023 
00024   // propose the histogram ID
00025   HistoID ID;
00026   newHistoID( title, ID );
00027 
00028   // Create a new histogram and return
00029   return this -> book2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY );
00030 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::book3D ( const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const HistoBinEdges edgesZ 
) const [inline]

book the 3D variable binning histogram with given ID

See also:
AIDA::IHistogram3D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
edgesZ The histogram z bin edges
Returns:
pointer to AIDA 3D histogram

Definition at line 33 of file GaudiHistos_3DVariableBinning.icpp.

00038 {
00039   //
00040   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00041   //
00042   // Check ID
00043   if (ID.undefined())
00044   {
00045     this->Error("Undefined Histogram ID : Title='"+title+"'");
00046     return NULL;
00047   }
00048 
00049   // exist?
00050   AIDA::IHistogram3D * hist = histo3D ( ID ) ;
00051   // histogram is already booked
00052   if ( NULL != hist       )                 { return hist ; } // RETURN !!
00053 
00054   // Histogram title
00055   const std::string & htitle =
00056     ( title.empty() ? "Unnamed 3D Histogram ID="+ID.idAsString() : title ) ;
00057 
00058   // book the histogram
00059   if ( ID.numeric() )
00060   {
00061     hist = this->histoSvc() -> book ( histoPath()  ,
00062                                       ID.numericID() ,
00063                                       htitle       ,
00064                                       edgesX       ,
00065                                       edgesY       ,
00066                                       edgesZ       ) ;
00067   }
00068   else if ( ID.literal() )
00069   {
00070     hist = this->histoSvc() -> book ( histoPath()+"/"+
00071                                       ID.literalID() ,
00072                                       htitle         ,
00073                                       edgesX         ,
00074                                       edgesY         ,
00075                                       edgesZ         ) ;
00076   }
00077 
00078   // check OK
00079   if( NULL == hist )
00080   { this->Error( "IHistogram3D* points to NULL! ID='" + ID.idAsString() +
00081                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00082 
00083   // add histogram into histogram storages
00084   m_histo3DMapID    [ ID    ] = hist ;
00085   m_histo3DMapTitle [ title ] = hist ;
00086 
00087   // Declare to monitoring service
00088   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00089 
00090   // Printout and return
00091   if ( this->msgLevel(MSG::DEBUG) )
00092   { this->debug() << "Booked 3D Histogram : ID='" << ID
00093                   << "' Path=" << histoPath()
00094                   << " Title='"
00095                   << Gaudi::Utils::Histos::htitle ( hist )
00096                   << "'" << endmsg; }
00097   return hist ;
00098 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::book3D ( const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const HistoBinEdges edgesZ 
) const [inline]

book the 3D variable binning histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IHistogram3D
Parameters:
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
edgesZ The histogram z bin edges
Returns:
pointer to AIDA 3D histogram

Definition at line 8 of file GaudiHistos_3DVariableBinning.icpp.

00012 {
00013   //
00014   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00015   //
00016   // exist?
00017   AIDA::IHistogram3D * hist = histo3D ( title ) ;
00018   // histogram is already booked
00019   if( NULL != hist      )                   { return hist ; } // RETURN !!
00020 
00021   // propose the histogram ID
00022   HistoID ID;
00023   newHistoID( title, ID );
00024 
00025   // Create a new histogram and return
00026   return this -> book3D ( ID, title, edgesX, edgesY, edgesZ );
00027 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::book3D ( const HistoID ID,
const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 10,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 10,
const double  lowZ = 0,
const double  highZ = 100,
const unsigned long  binsZ = 10 
) const [inline]

book the 3D histogram with forced ID

See also:
IHistogram3D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
lowY low y limit for histogram
highY high y limit for histogram
binsY number of bins in y
lowZ low y limit for histogram
highZ high y limit for histogram
binsZ number of bins in y
Returns:
pointer to AIDA 3D histogram

Definition at line 42 of file GaudiHistos_3DFixedBinning.icpp.

00053 {
00054   //
00055   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00056   //
00057   // Check ID
00058   if (ID.undefined())
00059   {
00060     this->Error("Undefined Histogram ID : Title='"+title+"'");
00061     return NULL;
00062   }
00063 
00064   // exist?
00065   AIDA::IHistogram3D* hist = histo3D( ID ) ;
00066   // histogram is already booked
00067   if( 0 != hist       )                        { return hist ; } // RETURN !!
00068 
00069   // Histogram title
00070   const std::string & htitle =
00071     ( title.empty() ? "Unnamed 3D Histogram ID="+ID.idAsString() : title ) ;
00072 
00073   // book the histogram
00074   if ( ID.numeric() )
00075   {
00076     hist = this->histoSvc() -> book ( histoPath()  ,
00077                                       ID.numericID() ,
00078                                       htitle       ,
00079                                       binsX        ,
00080                                       lowX         ,
00081                                       highX        ,
00082                                       binsY        ,
00083                                       lowY         ,
00084                                       highY        ,
00085                                       binsZ        ,
00086                                       lowZ         ,
00087                                       highZ        ) ;
00088   }
00089   else if ( ID.literal() )
00090   {
00091     hist = this->histoSvc() -> book ( histoPath()+"/"+
00092                                       ID.literalID() ,
00093                                       htitle       ,
00094                                       binsX        ,
00095                                       lowX         ,
00096                                       highX        ,
00097                                       binsY        ,
00098                                       lowY         ,
00099                                       highY        ,
00100                                       binsZ        ,
00101                                       lowZ         ,
00102                                       highZ        ) ;
00103   }
00104 
00105   // Check OK
00106   if( 0 == hist )
00107   { this->Error( "IHistogram3D* points to NULL! ID='" + ID.idAsString() +
00108                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00109 
00110   // add histogram into histogram storages
00111   m_histo3DMapID    [ ID    ] = hist ;
00112   m_histo3DMapTitle [ title ] = hist ;
00113 
00114   // Declare to monitoring service
00115   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00116 
00117   // Printout and return
00118   if ( this->msgLevel(MSG::DEBUG) )
00119   { this->debug() << "Booked 3D Histogram : ID='"
00120                   << ID << "' Path=" << histoPath()
00121                   << " Title='"
00122                   << Gaudi::Utils::Histos::htitle ( hist )
00123                   << "'" << endmsg; }
00124   return hist ;
00125 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::book3D ( const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 10,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 10,
const double  lowZ = 0,
const double  highZ = 100,
const unsigned long  binsZ = 10 
) const [inline]

book the 3D histogram

The histogram will be assigned a unique identifier

See also:
IHistogram3D
Parameters:
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
lowY low y limit for histogram
highY high y limit for histogram
binsY number of bins in y
lowZ low y limit for histogram
highZ high y limit for histogram
binsZ number of bins in y
Returns:
pointer to AIDA 3D histogram

Definition at line 8 of file GaudiHistos_3DFixedBinning.icpp.

00018 {
00019   //
00020   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00021   //
00022   // exist?
00023   AIDA::IHistogram3D* hist = histo3D ( title ) ;
00024   // histogram is already booked
00025   if( 0 != hist      )                           { return hist ; } // RETURN !!
00026 
00027   // propose the histogram ID
00028   HistoID ID;
00029   newHistoID( title, ID );
00030 
00031   // Create a new histogram and return
00032   return this -> book3D ( ID, title,
00033                           lowX, highX, binsX,
00034                           lowY, highY, binsY,
00035                           lowZ, highZ, binsZ );
00036 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::bookProfile1D ( const HistoID ID,
const std::string title,
const HistoBinEdges edges 
) const [inline]

book the 1D profile histogram

The histogram will be assigned a unique identifier

See also:
IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
Returns:
pointer to AIDA 1D profile histogram

Definition at line 29 of file GaudiHistos_1DProfVariableBinning.icpp.

00032 {
00033   //
00034   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00035   //
00036   // Check ID
00037   if (ID.undefined())
00038   {
00039     this->Error("Undefined Histogram ID : Title='"+title+"'");
00040     return NULL;
00041   }
00042 
00043   // exist?
00044   AIDA::IProfile1D* hist = profile1D ( ID ) ;
00045   // histogram is already booked
00046   if ( NULL != hist ) { return hist ; } // RETURN !!
00047 
00048   // Histogram title
00049   const std::string & htitle =
00050     ( title.empty() ?
00051       "Unnamed 1D Profile Histogram ID="+ID.idAsString() : title ) ;
00052 
00053   // book the histogram
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   // test ok
00070   if( NULL == hist )
00071   { this->Error( "IProfile1D* points to NULL! ID='" + ID.idAsString() +
00072                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00073 
00074   // add histogram into histogram storages
00075   m_profile1DMapID    [ ID    ] = hist ;
00076   m_profile1DMapTitle [ title ] = hist ;
00077 
00078   // Declare to monitoring service
00079   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00080 
00081   // printout and return
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 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::bookProfile1D ( const std::string title,
const HistoBinEdges edges 
) const [inline]

book the 1D profile histogram

The histogram will be assigned a unique identifier

See also:
IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
Returns:
pointer to AIDA 1D profile histogram

Definition at line 6 of file GaudiHistos_1DProfVariableBinning.icpp.

00008 {
00009   //
00010   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00011   //
00012   // exist?
00013   AIDA::IProfile1D* hist = profile1D ( title ) ;
00014   // histogram is already booked
00015   if ( NULL != hist ) { return hist ; } // RETURN !!
00016 
00017   // propose the histogram ID
00018   HistoID ID;
00019   newHistoID( title, ID );
00020 
00021   // Book the histo and return
00022   return this -> bookProfile1D ( ID, title, edges );
00023 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::bookProfile1D ( const HistoID ID,
const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100,
const std::string opt = "",
const double  lowY = -std::numeric_limits<double>::max(),
const double  highY = std::numeric_limits<double>::max() 
) const [inline]

book the 1D profile histogram

The histogram will be assigned a unique identifier

See also:
IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
low low limit for histogram
high high limit for histogram
bins number of bins
opt the options, used for evaluation of errors
lowY the min cut-off for y-values
highY the max cut-off for y-values
Returns:
pointer to AIDA 1D profile histogram

Definition at line 34 of file GaudiHistos_1DProfFixedBinning.icpp.

00042 {
00043   //
00044   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00045   //
00046   // Check ID
00047   if (ID.undefined())
00048   {
00049     this->Error("Undefined Histogram ID : Title='"+title+"'");
00050     return NULL;
00051   }
00052 
00053   // exist?
00054   AIDA::IProfile1D* hist = profile1D ( ID ) ;
00055   // histogram is already booked
00056   if( NULL != hist       )                  { return hist ; } // RETURN !!
00057 
00058   // Histogram title
00059   const std::string & htitle =
00060     ( title.empty() ?
00061       "Unnamed 1D Profile Histogram ID="+ID.idAsString() : title ) ;
00062 
00063   // book the histogram
00064   if ( ID.numeric() )
00065   {
00066     hist = this->histoSvc() -> bookProf ( histoPath()  ,
00067                                           ID.numericID() ,
00068                                           htitle       ,
00069                                           bins         ,
00070                                           low          ,
00071                                           high         ,
00072                                           lowY         ,
00073                                           highY        ,
00074                                           opt          ) ;
00075   }
00076   else if ( ID.literal() )
00077   {
00078     hist = this->histoSvc() -> bookProf ( histoPath()+"/"+
00079                                           ID.literalID() ,
00080                                           htitle       ,
00081                                           bins         ,
00082                                           low          ,
00083                                           high         ,
00084                                           lowY         ,
00085                                           highY        ,
00086                                           opt          ) ;
00087   }
00088 
00089   // test ok
00090   if( NULL == hist )
00091   { this->Error( "IProfile1D* points to NULL! ID='" + ID.idAsString() +
00092                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00093 
00094   // add histogram into histogram storages
00095   m_profile1DMapID    [ ID    ] = hist ;
00096   m_profile1DMapTitle [ title ] = hist ;
00097 
00098   // Declare to monitoring service
00099   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00100 
00101   // printout and return
00102   if ( this->msgLevel(MSG::DEBUG) )
00103   { this->debug() << "Booked 1D Profile Histogram : ID='"
00104                   << ID << "' Path=" << histoPath()
00105                   << " Title='"
00106                   << Gaudi::Utils::Histos::htitle ( hist )
00107                   << "'" << endmsg; }
00108   return hist ;
00109 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::bookProfile1D ( const std::string title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100,
const std::string opt = "",
const double  lowY = -std::numeric_limits<double>::max(),
const double  highY = std::numeric_limits<double>::max() 
) const [inline]

book the 1D profile histogram

The histogram will be assigned a unique identifier

See also:
IHistogram1D
Parameters:
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
opt the options, used for evaluation of errors
lowY the min cut-off for y-values
highY the max cut-off for y-values
Returns:
pointer to AIDA 1D profile histogram

Definition at line 6 of file GaudiHistos_1DProfFixedBinning.icpp.

00013 {
00014   //
00015   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00016   //
00017   // exist?
00018   AIDA::IProfile1D* hist = profile1D ( title ) ;
00019   // histogram is already booked
00020   if( NULL != hist      )                       { return hist ; } // RETURN !!
00021 
00022   // propose the histogram ID
00023   HistoID ID;
00024   newHistoID( title, ID );
00025 
00026   // Book the histo and return
00027   return this -> bookProfile1D ( ID, title, low, high, bins , opt , lowY , highY );
00028 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::bookProfile2D ( const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY 
) const [inline]

book the 2D profile histogram with forced ID

See also:
AIDA::IProfile2D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
edgesX x bin edges
edgesY y bin edges
Returns:
pointer to AIDA histogram

Definition at line 30 of file GaudiHistos_2DProfVariableBinning.icpp.

00034 {
00035   //
00036   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00037   //
00038   // Check ID
00039   if (ID.undefined())
00040   {
00041     this->Error("Undefined Histogram ID : Title='"+title+"'");
00042     return NULL;
00043   }
00044   // exist?
00045   AIDA::IProfile2D* hist = profile2D ( ID ) ;
00046   // histogram is already booked
00047   if( NULL != hist )                         { return hist ; } // RETURN !!
00048 
00049   // Histogram title
00050   const std::string & htitle =
00051     ( title.empty() ?
00052       "Unnamed 2D Profile Histogram ID="+ID.idAsString() : title ) ;
00053 
00054   // book the histogram
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   // test OK
00073   if( NULL == hist )
00074   { this->Error( "IProfile2D* points to NULL! ID='" + ID.idAsString() +
00075                  "' title='"+htitle+"'" ) ; return NULL; } // RETURN !!
00076 
00077   // add histogram into histogram storages
00078   m_profile2DMapID    [ ID    ] = hist ;
00079   m_profile2DMapTitle [ title ] = hist ;
00080 
00081   // Declare to monitoring service
00082   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00083 
00084   // printout and return
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 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::bookProfile2D ( const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY 
) const [inline]

book the 2D profile histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IProfile2D
Parameters:
title histogram title (must be unique within the algorithm)
edgesX x bin edges
edgesY y bin edges
Returns:
pointer to AIDA 2D histogram

Definition at line 6 of file GaudiHistos_2DProfVariableBinning.icpp.

00009 {
00010   //
00011   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00012   //
00013   // exist?
00014   AIDA::IProfile2D* hist = profile2D ( title ) ;
00015   // histogram is already booked
00016   if( NULL != hist      )                     { return hist ; } // RETURN !!
00017 
00018   // propose the histogram ID
00019   HistoID ID;
00020   newHistoID( title, ID );
00021 
00022   // book histogram and return
00023   return this -> bookProfile2D ( ID, title, edgesX, edgesY );
00024 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::bookProfile2D ( const HistoID ID,
const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 50,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 50 
) const [inline]

book the 2D profile histogram with forced ID

See also:
AIDA::IProfile2D
Parameters:
ID unique histogram ID
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
lowY low y limit for histogram
highY high y limit for histogram
binsY number of bins in y
Returns:
pointer to AIDA histogram

Definition at line 34 of file GaudiHistos_2DProfFixedBinning.icpp.

00042 {
00043   //
00044   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00045   //
00046   // Check ID
00047   if (ID.undefined())
00048   {
00049     this->Error("Undefined Histogram ID : Title='"+title+"'");
00050     return NULL;
00051   }
00052   // exist?
00053   AIDA::IProfile2D* hist = profile2D ( ID ) ;
00054   // histogram is already booked
00055   if( 0 != hist )                               { return hist ; } // RETURN !!
00056 
00057   // Histogram title
00058   const std::string & htitle =
00059     ( title.empty() ?
00060       "Unnamed 2D Profile Histogram ID="+ID.idAsString() : title ) ;
00061 
00062   // book the histogram
00063   if ( ID.numeric() )
00064   {
00065     hist = this->histoSvc() -> bookProf ( histoPath() ,
00066                                           ID.numericID() ,
00067                                           htitle      ,
00068                                           binsX       ,
00069                                           lowX        ,
00070                                           highX       ,
00071                                           binsY       ,
00072                                           lowY        ,
00073                                           highY        ) ;
00074   }
00075   else if ( ID.literal() )
00076   {
00077     hist = this->histoSvc() -> bookProf ( histoPath()+"/"+
00078                                           ID.literalID() ,
00079                                           htitle      ,
00080                                           binsX       ,
00081                                           lowX        ,
00082                                           highX       ,
00083                                           binsY       ,
00084                                           lowY        ,
00085                                           highY        ) ;
00086   }
00087 
00088   // test OK
00089   if( 0 == hist )
00090   { this->Error( "IProfile2D* points to NULL! ID='" + ID.idAsString() +
00091                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00092 
00093   // add histogram into histogram storages
00094   m_profile2DMapID    [ ID    ] = hist ;
00095   m_profile2DMapTitle [ title ] = hist ;
00096 
00097   // Declare to monitoring service
00098   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00099 
00100   // printout and return
00101   if ( this->msgLevel(MSG::DEBUG) )
00102   {  this->debug() << "Booked 2D Profile Histogram : ID='" << ID
00103                    << "' Path=" << histoPath()
00104                    << " Title='"
00105                    << Gaudi::Utils::Histos::htitle ( hist )
00106                    << "'" << endmsg; }
00107   return hist ;
00108 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::bookProfile2D ( const std::string title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 50,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 50 
) const [inline]

book the 2D profile histogram

The histogram will be assigned a unique identifier

See also:
AIDA::IProfile2D
Parameters:
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
lowY low y limit for histogram
highY high y limit for histogram
binsY number of bins in y
Returns:
pointer to AIDA 2D histogram

Definition at line 6 of file GaudiHistos_2DProfFixedBinning.icpp.

00013 {
00014   //
00015   if  ( !produceHistos() )                   { return 0    ; } // RETURN
00016   //
00017   // exist?
00018   AIDA::IProfile2D* hist = profile2D ( title ) ;
00019   // histogram is already booked
00020   if( 0 != hist      )                          { return hist ; } // RETURN !!
00021 
00022   // propose the histogram ID
00023   HistoID ID;
00024   newHistoID( title, ID );
00025 
00026   // book histogram and return
00027   return this -> bookProfile2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY );
00028 }

template<class PBASE>
bool GaudiHistos< PBASE >::checkForNaN (  )  const [inline]

get the flag for NaN checks (property "HistoCheckForNan")

Definition at line 2698 of file GaudiHistos.h.

02698 { return m_checkForNaN   ; }

template<class PBASE >
std::string GaudiHistos< PBASE >::convertTitleToID ( const std::string title  )  const [inline, protected]

Create an ID string from a title string.

Definition at line 504 of file GaudiHistos.icpp.

00505 {
00506   // clean up the ID string for all unwanted characters
00507   std::string tmp_id = title;
00508   for ( std::map<std::string,std::string>::const_iterator i =
00509           m_idReplaceInfo.begin() ; i != m_idReplaceInfo.end(); ++i )
00510   {
00511     stringSearchReplace( tmp_id, i->first, i->second );
00512   }
00513   return tmp_id;
00514 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::fill ( AIDA::IProfile2D *  histo,
const double  valueX,
const double  valueY,
const double  valueZ,
const double  weight,
const std::string title = "" 
) const [inline]

fill the 2D profile histogram with the values and weight

Parameters:
histo 2D profile histogram to be filled
valueX x value to be put into the histogram
valueY y value to be put into the histogram
valueZ z value to be put into the histogram
weight weight to be used
title histogram title (to be used for error report)
Returns:
pointer to AIDA 1D histogram

Definition at line 114 of file GaudiHistos_2DProfFixedBinning.icpp.

00120 {
00121   if ( 0 == histo ) { return 0 ; } // RETURN
00122   //
00123   if ( !checkForNaN() )
00124   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ); }
00125   else if  ( lfin ( valueX ) && lfin ( valueY ) &&
00126              lfin ( valueZ ) && lfin ( weight ) )
00127   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ); }
00128   else if  ( lnan ( valueX ) || lnan ( valueY ) ||
00129              lnan ( valueZ ) || lnan ( weight ) )
00130   {
00131     this -> Warning
00132       ("fill():: 'NaN'      value is skipped from the histogram '"
00133        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00134   }
00135   else
00136   {
00137     this -> Warning
00138       ("fill():: 'Infinite' value is skipped from the histogram '"
00139        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00140   }
00141   // return
00142   return histo ;
00143 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::fill ( AIDA::IProfile1D *  histo,
const double  valueX,
const double  valueY,
const double  weight,
const std::string title = "" 
) const [inline]

fill the 1D profile histogram with the values and weight

Parameters:
histo 1D profile histogram to be filled
valueX x value to be put into the histogram
valueY y value to be put into the histogram
weight weight to be used
title histogram title (to be used for error report)
Returns:
pointer to AIDA 1D histogram

Definition at line 115 of file GaudiHistos_1DProfFixedBinning.icpp.

00120 {
00121   //
00122   if ( 0 == histo ) { return 0 ; }   // RETURN
00123   //
00124   if ( !checkForNaN() )
00125   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ); }
00126   else if  ( lfin ( valueX ) && lfin ( valueY ) && lfin ( weight ) )
00127   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ); }
00128   else if  ( lnan ( valueX ) || lnan ( valueY ) || lnan ( weight ) )
00129   {
00130     this -> Warning
00131       ("fill():: 'NaN'      value is skipped from the histogram '"
00132        + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00133   }
00134   else
00135   {
00136     this -> Warning
00137       ("fill():: 'Infinite' value is skipped from the histogram '"
00138        + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00139   }
00140   // return
00141   return histo ;
00142 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::fill ( AIDA::IHistogram3D *  histo,
const double  valueX,
const double  valueY,
const double  valueZ,
const double  weight,
const std::string title = "" 
) const [inline]

fill the 3D histogram with the value and weight

Parameters:
histo 3D histogram to be filled
valueX x value to be put into the histogram
valueY y value to be put into the histogram
valueZ z value to be put into the histogram
weight weight to be used
title histogram title (to be used for error report)
Returns:
pointer to AIDA 3D histogram

Definition at line 131 of file GaudiHistos_3DFixedBinning.icpp.

00137 {
00138   if ( 0 == histo ) { return 0 ; } // RETURN
00139   //
00140   if ( !checkForNaN() )
00141   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ) ; }
00142   else if  ( lfin ( valueX ) && lfin ( valueY ) &&
00143              lfin ( valueZ ) && lfin ( weight ) )
00144   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ) ; }
00145   else if  ( lnan ( valueX ) || lnan ( valueY ) ||
00146              lnan ( valueZ ) || lnan ( weight ) )
00147   {
00148     this -> Warning
00149       ("fill():: 'NaN'      value is skipped from the histogram '"
00150        + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00151   }
00152   else
00153   {
00154     this -> Warning
00155       ("fill():: 'Infinite' value is skipped from the histogram '"
00156        + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00157   }
00158   // return
00159   return histo ;
00160 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::fill ( AIDA::IHistogram2D *  histo,
const double  valueX,
const double  valueY,
const double  weight,
const std::string title = "" 
) const [inline]

fill the 2D histogram with the value and weight

Parameters:
histo 2D histogram to be filled
valueX x value to be put into the histogram
valueY y value to be put into the histogram
weight weight to be used
title histogram title (to be used for error report)
Returns:
pointer to AIDA 2D histogram

Definition at line 117 of file GaudiHistos_2DFixedBinning.icpp.

00122 {
00123   //
00124   if ( NULL == histo ) { return 0 ; } // RETURN
00125   //
00126   if ( !checkForNaN() )
00127   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ) ; }
00128   else if  ( lfin ( valueX ) && lfin ( valueY ) && lfin ( weight ) )
00129   { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ) ; }
00130   else if  ( lnan ( valueX ) || lnan ( valueY ) || lnan ( weight ) )
00131   {
00132     this -> Warning
00133       ("fill():: 'NaN'      value is skipped from the histogram '"
00134        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00135   }
00136   else
00137   {
00138     this -> Warning
00139       ("fill():: 'Infinite' value is skipped from the histogram '"
00140        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00141   }
00142   // return
00143   return histo ;
00144 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::fill ( AIDA::IHistogram1D *  histo,
const double  value,
const double  weight,
const std::string title = "" 
) const [inline]

fill the 1D histogram with the value and weight

Parameters:
histo 1D histogram to be filled
value value to be put into the histogram
weight weight to be used
title histogram title (to be used for error report)
Returns:
pointer to AIDA 1D histogram

Definition at line 105 of file GaudiHistos_1DFixedBinning.icpp.

00109 {
00110   if ( 0 == histo     ) { return 0 ; }                          // RETURN
00111   //
00112   if ( !checkForNaN() )
00113   { Gaudi::Utils::Histos::fill ( histo , value , weight ) ; }
00114   else if  ( lfin ( value ) && lfin ( weight ) )
00115   { Gaudi::Utils::Histos::fill ( histo , value , weight ) ; }
00116   else if  ( lnan ( value ) || lnan ( weight ) )
00117   {
00118     this -> Warning
00119       ("fill():: 'NaN'      value is skipped from the histogram '"
00120        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00121   }
00122   else
00123   {
00124     this -> Warning
00125       ("fill():: 'Infinite' value is skipped from the histogram '"
00126        + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00127   }
00128   // return
00129   return histo ;
00130 }

template<class PBASE >
StatusCode GaudiHistos< PBASE >::finalize (  )  [inline, protected, virtual]

standard finalization method

Returns:
status code

Reimplemented in GaudiHistoAlg, GaudiHistoTool, GaudiTupleAlg, GaudiTupleTool, GaudiTuples< GaudiHistoTool >, and GaudiTuples< GaudiHistoAlg >.

Definition at line 173 of file GaudiHistos.icpp.

00174 {
00175 
00176   if ( produceHistos() )
00177   {
00178 
00179     // Count how many histos of each type
00180     if ( !noHistos() )
00181     {
00182       const unsigned int n1D  = histo1DMapID   () . size () ;
00183       const unsigned int n2D  = histo2DMapID   () . size () ;
00184       const unsigned int n3D  = histo3DMapID   () . size () ;
00185       const unsigned int n1DP = profile1DMapID () . size () ;
00186       const unsigned int n2DP = profile2DMapID () . size () ;
00187       const unsigned int total = n1D+n2D+n3D+n1DP+n2DP;
00188       if ( total>0 )
00189       {
00190         this->always() << "Booked " << total << " Histogram(s) : ";
00191         if ( n1D>0  ) this->always() << "1D=" << n1D << " ";
00192         if ( n2D>0  ) this->always() << "2D=" << n2D << " ";
00193         if ( n3D>0  ) this->always() << "3D=" << n3D << " ";
00194         if ( n1DP>0 ) this->always() << "1DProf=" << n1DP << " ";
00195         if ( n2DP>0 ) this->always() << "2DProf=" << n2DP << " ";
00196         this->always() << endmsg;
00197       }
00198     }
00199 
00200     // detailed printing
00201     if ( histosPrint() ) { printHistos() ; }
00202 
00203   }
00204 
00205   // clear all maps
00206   m_histo1DMapTitle   . clear () ;
00207   m_histo2DMapTitle   . clear () ;
00208   m_histo3DMapTitle   . clear () ;
00209   m_histo1DMapID      . clear () ;
00210   m_histo2DMapID      . clear () ;
00211   m_histo3DMapID      . clear () ;
00212   m_profile1DMapTitle . clear () ;
00213   m_profile2DMapTitle . clear () ;
00214   m_profile1DMapID    . clear () ;
00215   m_profile2DMapID    . clear () ;
00216 
00217   // finalize base class
00218   return PBASE::finalize();
00219 }

template<class PBASE>
bool GaudiHistos< PBASE >::fullDetail (  )  const [inline]

get flag to control output level of histograms

Definition at line 2696 of file GaudiHistos.h.

02696 { return m_fullDetail    ; }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::histo ( const HistoID ID  )  const [inline]

access the EXISTING 1D histogram by ID

Wrapper method for the equivalent histo1D method. Retained for backwards compatibility, please use histo1D instead.

return the pointer to existing 1D histogram or NULL

Definition at line 2640 of file GaudiHistos.h.

02641   {
02642     return histo1D( ID );
02643   }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::histo ( const std::string title  )  const [inline]

access the EXISTING 1D histogram by title

Wrapper method for the equivalent histo1D method. Retained for backwards compatibility, please use histo1D instead.

return the pointer to existing 1D histogram or NULL

Definition at line 2585 of file GaudiHistos.h.

02586   {
02587     return histo1D( title );
02588   }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::histo1D ( const HistoID ID  )  const [inline]

access the EXISTING 1D histogram by ID return the pointer to existing 1D histogram or NULL

Definition at line 394 of file GaudiHistos.icpp.

00395 {
00396   AIDA::IHistogram1D * h(NULL);
00397   //
00398   Histo1DMapID::const_iterator found = histo1DMapID().find( ID ) ;
00399   //
00400   h = ( histo1DMapID().end() == found ? NULL : found->second );
00401   //
00402   return h ;
00403 }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::histo1D ( const std::string title  )  const [inline]

access the EXISTING 1D histogram by title return the pointer to existing 1D histogram or NULL

Definition at line 2572 of file GaudiHistos.h.

02573   {
02574     Histo1DMapTitle::const_iterator found = histo1DMapTitle().find( title ) ;
02575     return ( histo1DMapTitle().end() == found ? 0 : found->second );
02576   }

template<class PBASE>
const Histo1DMapID& GaudiHistos< PBASE >::histo1DMapID (  )  const [inline]

get access to the map of all 1D histograms index via ID

  const Histo1DMap& histos = histo1DMap () ;
  // iterate over the map!
  for ( Histo1DMap::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram ID
        const HistoID        ID = entry->first ;
        // histogram itself
        AIDA::IHistogram1D* h  = entry->second ;
        if ( 0 == h ) { continue ;}

        std::cout << " Histogram ID    " << ID
                  << " Histogram title " << h->title() << std::endl ;

     }

Definition at line 2777 of file GaudiHistos.h.

02777 { return m_histo1DMapID ; }

template<class PBASE>
const Histo1DMapTitle& GaudiHistos< PBASE >::histo1DMapTitle (  )  const [inline]

get access to the map of all 1D histograms indexed via their title

Using this method one can inspect e.g. a list of active histograms

  const Histo1DMapTitle& histos = histo1DMapTitle() ;
  // iterate over the map!
  for ( Histo1DMapTitle::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram title
        const std::string&   title = entry->first ;
        // histogram itself
        AIDA::IHistogram1D* hist  = entry->second ;
        if( 0 == hist )  { continue ; }                // ATTENTION!

        std::cout << " Histogram title " << title << std::endl ;

     }
Attention:
The map *COULD* contains NULL pointers, the check before use is mandatory!

Definition at line 2751 of file GaudiHistos.h.

02751 { return m_histo1DMapTitle; }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::histo2D ( const HistoID ID  )  const [inline]

access the EXISTING 2D histogram by ID return the pointer to existing 2D histogram or NULL

Definition at line 408 of file GaudiHistos.icpp.

00409 {
00410   AIDA::IHistogram2D * h(NULL);
00411   //
00412   Histo2DMapID::const_iterator found = histo2DMapID().find( ID ) ;
00413   //
00414   h = ( histo2DMapID().end() == found ? NULL : found->second );
00415   //
00416   return h;
00417 }

template<class PBASE>
AIDA::IHistogram2D* GaudiHistos< PBASE >::histo2D ( const std::string title  )  const [inline]

access the EXISTING 2D histogram by title return the pointer to existing 2D histogram or NULL

Definition at line 2593 of file GaudiHistos.h.

02594   {
02595     Histo2DMapTitle::const_iterator found = histo2DMapTitle().find( title ) ;
02596     return ( histo2DMapTitle().end() == found ? 0 : found->second );
02597   }

template<class PBASE>
const Histo2DMapID& GaudiHistos< PBASE >::histo2DMapID (  )  const [inline]

get access to the map of 2D histograms index via ID

  const Histo2DMapID& histos = histo2DMapID () ;

  // iterate over the map!
  for ( Histo2DMapID::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram ID
        const HistoID        ID = entry->first ;
        // histogram itself
        AIDA::IHistogram2D* h  = entry->second ;
        if ( 0 == h ) { continue ;}

        std::cout << " Histogram ID    " << ID
                  << " Histogram title " << h->title() << std::endl ;

     }

Definition at line 2832 of file GaudiHistos.h.

02832 { return m_histo2DMapID ; }

template<class PBASE>
const Histo2DMapTitle& GaudiHistos< PBASE >::histo2DMapTitle (  )  const [inline]

get access to the map of all 2D histograms indexed via their title

Using this method one can inspect e.g. a list of active histograms

  const Histo2DMapTitle& histos = histo2DMapTitle() ;
  // iterate over the map!
  for ( Histo2DMapTitle::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram title
        const std::string&   title = entry->first ;
        // histogram itself
        AIDA::IHistogram2D* hist  = entry->second ;
        if( 0 == hist )  { continue ; }                // ATTENTION!

        std::cout << " Histogram title " << title << std::endl ;

     }
Attention:
The map *COULD* contains NULL pointers, the check before use is mandatory!

Definition at line 2806 of file GaudiHistos.h.

02806 { return m_histo2DMapTitle ; }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::histo3D ( const HistoID ID  )  const [inline]

access the EXISTING 3D histogram by ID return the pointer to existing 3D histogram or NULL

Definition at line 422 of file GaudiHistos.icpp.

00423 {
00424   AIDA::IHistogram3D * h(NULL);
00425   //
00426   Histo3DMapID::const_iterator found = histo3DMapID().find( ID ) ;
00427   h = ( histo3DMapID().end() == found ? NULL : found->second );
00428   //
00429   return h;
00430 }

template<class PBASE>
AIDA::IHistogram3D* GaudiHistos< PBASE >::histo3D ( const std::string title  )  const [inline]

access the EXISTING 3D histogram by title return the pointer to existing 3D histogram or NULL

Definition at line 2602 of file GaudiHistos.h.

02603   {
02604     Histo3DMapTitle::const_iterator found = histo3DMapTitle().find( title ) ;
02605     return ( histo3DMapTitle().end() == found ? 0 : found->second );
02606   }

template<class PBASE>
const Histo3DMapID& GaudiHistos< PBASE >::histo3DMapID (  )  const [inline]

get access to the map of all 3D histograms index via a ID

  const Histo3DMapID& histos = histo3DMapID() ;

  // iterate over the map!
  for ( Histo3DMapID::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram ID
        const HistoID        ID = entry->first ;
        // histogram itself
        AIDA::IHistogram3D* h  = entry->second ;
        if ( 0 == h ) { continue ;}

        std::cout << " Histogram ID    " << ID
                  << " Histogram title " << h->title() << std::endl ;

     }

Definition at line 2887 of file GaudiHistos.h.

02887 { return m_histo3DMapID; }

template<class PBASE>
const Histo3DMapTitle& GaudiHistos< PBASE >::histo3DMapTitle (  )  const [inline]

get access to the map of all 3D histograms indexed via their title

Using this method one can inspect e.g. a list of active histograms

  const Histo3DMapTitle& histos = histo3DMapTitle() ;
  // iterate over the map!
  for ( Histo3DMapTitle::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram title
        const std::string&   title = entry->first ;
        // histogram itself
        AIDA::IHistogram3D* hist  = entry->second ;
        if( 0 == hist )  { continue ; }                // ATTENTION!

        std::cout << " Histogram title " << title << std::endl ;

     }
Attention:
The map *COULD* contains NULL pointers, the check before use is mandatory!

Definition at line 2861 of file GaudiHistos.h.

02861 { return m_histo3DMapTitle ; }

template<class PBASE>
const std::string& GaudiHistos< PBASE >::histoDir (  )  const [inline]

get histogram directory (property "HistoDir")

Definition at line 2706 of file GaudiHistos.h.

02706 { return m_histoDir      ; }

template<class PBASE>
bool GaudiHistos< PBASE >::histoExists ( const HistoID ID  )  const [inline]

check the existence AND validity of the histogram with given title

Definition at line 2679 of file GaudiHistos.h.

02680   {
02681     return
02682       ( 0 != histo     ( ID ) ||
02683         0 != histo2D   ( ID ) ||
02684         0 != histo3D   ( ID ) ||
02685         0 != profile1D ( ID ) ||
02686         0 != profile2D ( ID ) );
02687   }

template<class PBASE>
bool GaudiHistos< PBASE >::histoExists ( const std::string title  )  const [inline]

check the existence AND validity of the histogram with given title

Definition at line 2668 of file GaudiHistos.h.

02669   {
02670     return
02671       ( 0 != histo     ( title ) ||
02672         0 != histo2D   ( title ) ||
02673         0 != histo3D   ( title ) ||
02674         0 != profile1D ( title ) ||
02675         0 != profile2D ( title ) );
02676   }

template<class PBASE>
HistoID::NumericID GaudiHistos< PBASE >::histoOffSet (  )  const [inline]

get the value for histogram offset (property "HistoOffSet")

Definition at line 2702 of file GaudiHistos.h.

02702 { return m_histoOffSet ; }

template<class PBASE>
std::string GaudiHistos< PBASE >::histoPath (  )  const [inline]

get the constructed histogram path

Definition at line 2708 of file GaudiHistos.h.

02709   {
02710     const std::string path = histoTopDir() + histoDir();
02711     return ( splitHistoDir() ? dirHbookName(path) : path );
02712   }

template<class PBASE>
bool GaudiHistos< PBASE >::histosPrint (  )  const [inline]

print histograms at finalization ?

Definition at line 2714 of file GaudiHistos.h.

02714 { return m_histosPrint ; }

template<class PBASE>
const std::string& GaudiHistos< PBASE >::histoTopDir (  )  const [inline]

get top-level histogram directory (property "HistoTopDir")

Definition at line 2704 of file GaudiHistos.h.

02704 { return m_histoTopDir   ; }

template<class PBASE >
void GaudiHistos< PBASE >::initGaudiHistosConstructor (  )  [inline, private]

Constructor initialisation and job options.

Definition at line 55 of file GaudiHistos.icpp.

00056 {
00057   // SWITCH ON/OFF the histograms
00058   this->declareProperty
00059     ( "HistoProduce"          ,
00060       m_produceHistos = true  ,
00061       "Swith on/off the production of histograms "   ) ;
00062   // print the histograms at finalization
00063   this->declareProperty
00064     ( "HistoPrint"            ,
00065       m_histosPrint   = false ,
00066       "Switch on/off the printout of histograms at finalization"    )
00067     -> declareUpdateHandler ( &GaudiHistos<PBASE>::printHistoHandler, this ) ;
00068   // check for NaN/Finite
00069   this->declareProperty
00070     ( "HistoCheckForNaN"      ,
00071       m_checkForNaN   = true  ,
00072       "Swicth on/off the checks for NaN and Infinity for histogram fill" ) ;
00073   // for HBOOK persistency, 'true' can be useful
00074   this->declareProperty
00075     ( "HistoSplitDir"         ,
00076       m_splitHistoDir = false ,
00077       "Split long directory names into short pieces (suitable for HBOOK)" );
00078   // general OffSet for histogram ID
00079   this->declareProperty
00080     ( "HistoOffSet"           ,
00081       m_histoOffSet   =   0   ,
00082       "OffSet for automatically assigned histogram numerical identifiers " ) ;
00083   // top level histogram directory
00084   this->declareProperty
00085     ( "HistoTopDir"           ,
00086       m_histoTopDir   =   ""  ,
00087       "Top level histogram directory (take care that it ends with '/')" ) ;
00088   // histogram directory
00089   this->declareProperty
00090     ( "HistoDir"             ,
00091       m_histoDir      = this->name() ,
00092       "Histogram Directory" ) ;
00093   // control output level of histograms
00094   this->declareProperty ( "FullDetail"            , m_fullDetail    = false ) ;
00095   // monitor histograms
00096   this->declareProperty ( "MonitorHistograms"     , m_declareMoniHists = true ) ;
00097   // format for 1D-histograms printout
00098   this->declareProperty
00099     ( "FormatFor1DHistoTable" ,
00100       m_histo1DTableFormat   = Gaudi::Utils::Histos::Formats::format () ,
00101       "Format string for printout of 1D histograms"      ) ;
00102   // "short" format for 1D-histograms printout
00103   this->declareProperty
00104     ( "ShortFormatFor1DHistoTable" ,
00105       m_histo1DTableFormatShort   = " | %1$-25.25s %2%"  ,
00106       "Format string for printout of 1D histograms"      ) ;
00107   // the header for 1D-histogram tabkle
00108   this->declareProperty
00109     ( "HeaderFor1DHistoTable" ,
00110       m_histo1DTableHeader   = Gaudi::Utils::Histos::Formats::header () ,
00111       "The table header for printout of 1D histograms "  ) ;
00112   this->declareProperty
00113     ( "UseSequencialNumericAutoIDs", m_useNumericAutoIDs = false,
00114       "Flag to allow users to switch back to the old style of creating numerical automatic IDs" );
00115   m_idReplaceInfo.clear();
00116   m_idReplaceInfo["/"] = "=SLASH=";
00117   this->declareProperty
00118     ( "AutoStringIDPurgeMap", m_idReplaceInfo,
00119       "Map of strings to search and replace when using the title as the basis of automatically generated literal IDs" );
00120 }

template<class PBASE >
StatusCode GaudiHistos< PBASE >::initialize (  )  [inline, protected, virtual]

standard initialization method

Returns:
status code

Reimplemented in GaudiHistoAlg, GaudiHistoTool, GaudiTupleAlg, GaudiTupleTool, GaudiTuples< GaudiHistoTool >, and GaudiTuples< GaudiHistoAlg >.

Definition at line 131 of file GaudiHistos.icpp.

00132 {
00133   // initialize base class
00134   const StatusCode sc = PBASE::initialize();
00135   if ( sc.isFailure() ) return sc;
00136 
00137   // produce histograms?
00138   if ( !produceHistos() )
00139   {
00140     this->debug() << "Histogram production is switched OFF" << endmsg;
00141     return sc;
00142   }
00143 
00144   // check the validity of histogram service
00145   if ( this->histoSvc() == NULL )
00146   { return this->Error("initialize():: IHistogramSvc* is invalid"); }
00147 
00148   // Warn if the user has decided to use numerical automatic IDs
00149   if ( useNumericAutoIDs() )
00150   {
00151     this ->
00152       Warning( "Using numerical automatic IDs. These are not guaranteed to be totally deterministic. Use with care...",
00153                StatusCode::SUCCESS );
00154   }
00155 
00156   // Finally, print the location histogram will be written to
00157   this->Print
00158     ( "The histogram path is set to be '" + histoPath() + "'",
00159       StatusCode( StatusCode::SUCCESS, true )  , MSG::DEBUG );
00160 
00161   return sc;
00162 }

template<class PBASE >
void GaudiHistos< PBASE >::monitorHisto ( const AIDA::IBaseHistogram *  hist,
const HistoID ID 
) const [inline, private]

Declare a histogram to the monitor service.

Uses the histogram ID as the 'name' sent to the monitor service and the histogram title as the long description

Definition at line 374 of file GaudiHistos.icpp.

00376 {
00377   if ( hist && m_declareMoniHists )
00378   {
00379     if ( this->msgLevel(MSG::DEBUG) )
00380     {
00381       this->debug() << "Monitoring histogram '"
00382                     << ID.idAsString() << "' desc = '"
00383                     << Gaudi::Utils::Histos::htitle(hist) << "'" << endmsg;
00384     }
00385     this->declareInfo ( histoPath()+"/"+ID.idAsString() ,
00386                         hist            ,
00387                         Gaudi::Utils::Histos::htitle(hist) ) ;
00388   }
00389 }

template<class PBASE >
void GaudiHistos< PBASE >::newHistoID ( const std::string title,
HistoID ID 
) const [inline, private]

Create a new histogram ID using the given title.

Parameters:
[in] title Histogram title
[out] ID The ID to use for the new histogram

Definition at line 477 of file GaudiHistos.icpp.

00479 {
00480   if ( useNumericAutoIDs() || title.empty() )
00481   {
00482     if ( !useNumericAutoIDs() )
00483     {
00484       this -> Warning( "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID",
00485                        StatusCode::SUCCESS );
00486     }
00487     // propose the histogram ID (always numeric)
00488     ID = HistoID( totalNumberOfHistos() + 1 + histoOffSet() );
00489     // adjust the proposed ID
00490     while ( histoExists( ID ) ) { ID = HistoID ( ID.numeric() + 1 ) ; }
00491   }
00492   else
00493   {
00494     // use the title to create a unique literal ID
00495     ID = HistoID( this->convertTitleToID(title) );
00496     // Just in case ...
00497     while ( histoExists( ID ) ) { ID = HistoID(ID.idAsString()+"_"); }
00498   }
00499 }

template<class PBASE >
bool GaudiHistos< PBASE >::noHistos (  )  const [inline, private]

Check if all histogram maps are empty.

Definition at line 356 of file GaudiHistos.icpp.

00357 {
00358   return ( histo1DMapTitle   () . empty() &&
00359            histo2DMapTitle   () . empty() &&
00360            histo3DMapTitle   () . empty() &&
00361            profile1DMapTitle () . empty() &&
00362            profile2DMapTitle () . empty() &&
00363            histo1DMapID      () . empty() &&
00364            histo2DMapID      () . empty() &&
00365            histo3DMapID      () . empty() &&
00366            profile1DMapID    () . empty() &&
00367            profile2DMapID    () . empty() );
00368 }

template<class PBASE>
template<class FUNCTION , class OBJECT , class WEIGHT >
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const FUNCTION &  func,
OBJECT  first,
OBJECT  last,
const HistoID ID,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins,
const WEIGHT &  weight 
) const [inline]

book and fill the 1D histogram with forced ID and information from [first,last) sequence with given weight

  std::vector<double> v = ... ;

  // example with numerical ID
  plot( sin                 ,   // function
        v.begin() , v.end() ,   // sequence
        100 , " bla-bla "   ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 ,   // number of bins
        sinh                );  // weight function

  // example with literal ID
  plot( sin                 ,   // function
        v.begin() , v.end() ,   // sequence
        "sin" , " bla-bla "   ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 ,   // number of bins
        sinh                );  // weight function
Attention:
no checks for NaN or Finite are performed!

Sequence, objects and function can be non-trivial:

  Particles* p = ... ;

  plot( PT                  ,   // function
        p->begin()   , p->end() , // sequence
        100 , " bla-bla "   ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 ,   // number of bins
        MASS                ) ; // weight function

where PT and MASS can be any function or function object for which the expressions PT(p) and MASS with p of type Particle* have some sense and can be evaluated to the values, which is convertible to double

Attention:
These plot methods using iterator ranges are more efficient than the simplier "value" only methods, since the associated histogram only requires locating from internal storage once per loop, as opposed to once per fill for the simplier functions. It is recommended to use these whenever possible.
See also:
AIDA::IHistogram1D
Parameters:
first begin of the sequence
last end of the sequence
ID histogram identifier
title histogram title
func function to be plotted
low low limit for histogram
high high limit for histogram
bins number of bins for histogram
weight weight function

Definition at line 689 of file GaudiHistos.h.

00698   {
00699     AIDA::IHistogram1D* h(0);
00700     if ( produceHistos() )
00701     {
00702       // retrieve or book the histogram
00703       h = histo1D ( ID ) ;
00704       if ( 0 == h ) { h = book1D  ( ID , title , low , high , bins ); }
00705       // fill histogram
00706       while( first != last && 0 != h )
00707       { h  = fill ( h                 ,
00708                     func   ( *first ) ,
00709                     weight ( *first ) , title  ) ; ++first ; }
00710     }
00711     return h ;
00712   }

template<class PBASE>
template<class FUNCTION , class OBJECT , class WEIGHT >
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const FUNCTION &  func,
OBJECT  first,
OBJECT  last,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins,
const WEIGHT &  weight 
) const [inline]

book and fill the 1D histogram with information from [first,last) sequence with given weight

  std::vector<double> v = ... ;

  plot( sin                 ,   // function
        v.begin() , v.end() ,   // sequence
        " bla-bla "         ,   // title
        -1. , 1.0           ,   // low and high limits
        100                 ,   // number of bins
        tanh                );  // weight function
Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.

Sequence, objects and function can be non-trivial:

  Particles* p = ... ;

  plot( PT                  ,  // function
        p->begin()  , p->end() , // sequence
        " bla-bla "         ,   // title
        -1. , 1.0           ,   // low and high limits
        100                 ,   // number of bins
        MASS                ) ; // weight function

where PT and MASS can be any function or function object for which the expressions PT(p) and MASS with p of type Particle* have some sense and can be evaluated to the values, which is convertible to double

Attention:
These plot methods using iterator ranges are more efficient than the simplier "value" only methods, since the associated histogram only requires locating from internal storage once per loop, as opposed to once per fill for the simplier functions. It is recommended to use these whenever possible.
See also:
AIDA::IHistogram1D
Parameters:
first begin of the sequence
last end of the sequence
title histogram title
func function to be plotted
low low limit for histogram
high high limit for histogram
bins number of bins for histogram
weight weight function

Definition at line 597 of file GaudiHistos.h.

00605   {
00606     AIDA::IHistogram1D* h(0);
00607     if ( produceHistos() )
00608     {
00609       // retrieve or book the histogram
00610       h = histo1D ( title ) ;
00611       if ( 0 == h ) { h = book1D  ( title , low , high , bins ); }
00612       // fill histogram
00613       while ( first != last && 0 != h )
00614       { h = fill ( h                 ,
00615                    func   ( *first ) ,
00616                    weight ( *first ) , title  ) ; ++first ; }
00617     }
00618     return h;
00619   }

template<class PBASE>
template<class FUNCTION , class OBJECT >
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const FUNCTION &  func,
OBJECT  first,
OBJECT  last,
const HistoID ID,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100 
) const [inline]

fill the 1D histogram with forced ID and information from [first,last) sequence

  std::vector<double> v = ... ;

  // Example with numeric ID
  plot( sin                 ,   // function
        v.begin() , v.end() ,   // sequence
        100 , " bla-bla "   ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 );  // number of bins

  // Example with literal ID
  plot( sin                 ,   // function
        v.begin() , v.end() ,   // sequence
        "sin" , " bla-bla " ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 );  // number of bins

Sequence, objects and function can be non-trivial:

  Particles* p = ... ;

  plot( PT                  ,   // function
        p->begin()   , p->end() , // sequence
        100 , " bla-bla "   ,   // ID and title
        -1. , 1.0           ,   // low and high limits
        100                 ) ; // number of bins
Attention:
These plot methods using iterator ranges are more efficient than the simplier "value" only methods, since the associated histogram only requires locating from internal storage once per loop, as opposed to once per fill for the simplier functions. It is recommended to use these whenever possible.
See also:
AIDA::IHistogram1D
Parameters:
func function to be plotted
first begin of the sequence
last end of the sequence
ID histogram identifier
title histogram title
low low limit for histogram
high high limit for histogram
bins number of bins for histogram

Definition at line 505 of file GaudiHistos.h.

00513   {
00514     AIDA::IHistogram1D* h(0);
00515     if ( produceHistos() )
00516     {
00517       // retrieve or book the histogram
00518       h = histo1D ( ID ) ;
00519       if ( 0 == h )     { h = book1D  ( ID , title , low , high , bins ); }
00520       // fill histogram
00521       while( first != last && 0 != h )
00522       { h = fill( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00523     }
00524     return h;
00525   }

template<class PBASE>
template<class FUNCTION , class OBJECT >
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const FUNCTION &  func,
OBJECT  first,
OBJECT  last,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100 
) const [inline]

fill the 1D histogram with information from [first,last) sequence

  std::vector<double> v = ... ;

  plot( sin                 , // function
        v.begin() , v.end() , // sequence
        " bla-bla "         , // title
        -1. , 1.0           , // low and high limits
        100                 ) // number of bins
Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.

Sequence, objects and function can be non-trivial:

  Particles* p = ... ;

  plot( PT                  , // function
        p->begin()  , p->end() , // sequence
        " bla-bla "         , // title
        -1. , 1.0           , // low and high limits
        100                 ) ; // number of bins

where PT can be any function or function object for which the expression PT(p) , with p of type Particle* have some sense and can be evaluated to the values, which is convertible to double

Attention:
These plot methods using iterator ranges are more efficient than the simplier "value" only methods, since the associated histogram only requires locating from internal storage once per loop, as opposed to once per fill for the simplier functions. It is recommended to use these whenever possible.
See also:
AIDA::IHistogram1D
Parameters:
func function to be plotted
first begin of the sequence
last end of the sequence
title histogram title
low low limit for histogram
high high limit for histogram
bins number of bins for histogram

Definition at line 427 of file GaudiHistos.h.

00434   {
00435     AIDA::IHistogram1D* h(0);
00436     if ( produceHistos() )
00437     {
00438       // retrieve or book the histogram
00439       h = histo1D ( title ) ;
00440       if ( 0 == h )     { h = book1D  ( title , low , high , bins ); }
00441       // fill histogram
00442       while( first != last && 0 != h  )
00443       { h = fill ( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00444     }
00445     return h ;
00446   }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const double  value,
const HistoID ID,
const Gaudi::Histo1DDef &  hdef,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram (book on demand)

Wrapper method for the equivalent plot1D method. Retained for backwards compatibility, please use plot1D instead.

Parameters:
value value to be filled
ID histogram identifier
hdef histogram descriptor
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 355 of file GaudiHistos.h.

00359   {
00360     return plot1D ( value, ID, hdef, weight );
00361   }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const double  value,
const HistoID ID,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram with forced ID assignment (book on demand)

Wrapper method for the equivalent plot1D method. Retained for backwards compatibility, please use plot1D instead.

Parameters:
value value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 301 of file GaudiHistos.h.

00308   {
00309     return plot1D ( value, ID, title, low, high, bins, weight );
00310   }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const double  value,
const Gaudi::Histo1DDef &  hdef,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram (book on demand)

Wrapper method for the equivalent plot1D method. Retained for backwards compatibility, please use plot1D instead.

Parameters:
value value to be filled
hdef histogram descriptor
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 205 of file GaudiHistos.h.

00208   {
00209     return plot1D ( value, hdef, weight );
00210   }

template<class PBASE>
AIDA::IHistogram1D* GaudiHistos< PBASE >::plot ( const double  value,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram (book on demand)

Wrapper method for the equivalent plot1D method. Retained for backwards compatibility, please use plot1D instead.

Parameters:
value value to be filled
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 155 of file GaudiHistos.h.

00161   {
00162     return plot1D ( value, title, low, high, bins, weight );
00163   }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const HistoID ID,
const std::string title,
const HistoBinEdges edges,
const double  weight = 1.0 
) const [inline]

fill the 1D variable binning histogram with forced ID assignment (book on demand)

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass = ... ;
     plot1D( mass , 15 , "Invariant Mass" , edges )

This example illustrates the filling of the 1D histogram ID=15 titled "Invariant Mass" with value mass.

If the histogram with given ID does not exist yet it will be automatically booked with the given histogram bin edges.

It is also possible to use literal IDs. For example :-

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass = ... ;
     plot1D( mass , "mass" , "Invariant Mass" , edges )

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass = ... ;
     plot1D( mass , "subdir/mass" , "Invariant Mass" , edges )

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together. It is still desirable to use the unique histogram title to avoid a bad interference.
See also:
AIDA::IHistogram1D
Parameters:
value value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 119 of file GaudiHistos_1DVariableBinning.icpp.

00124 {
00125   AIDA::IHistogram1D* h(NULL);
00126   if ( produceHistos() )
00127   {
00128     // retrieve or book the histogram
00129     h = histo1D ( ID ) ;
00130     if ( NULL == h ) {  h = book1D ( ID , title , edges ) ; }
00131     // fill
00132     h = fill ( h , value , weight , title ) ;
00133   }
00134   return h;
00135 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const std::string title,
const HistoBinEdges edges,
const double  weight = 1.0 
) const [inline]

Fill the 1D variable binning histogram (book on demand).

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass = ... ;
     plot1D( mass , "Invariant Mass" , edges )

This example illustrates the filling of the histogram titled "InvariantMass" with value mass.

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram1D
Parameters:
value value to be filled
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 97 of file GaudiHistos_1DVariableBinning.icpp.

00101 {
00102   AIDA::IHistogram1D * h(NULL);
00103   if ( produceHistos() )
00104   {
00105     // retrieve or book the histogram
00106     h = histo1D ( title ) ;
00107     if ( NULL == h ) { h = book1D ( title , edges ) ; }
00108     // fill the histogram
00109     h = fill ( h , value , weight , title );
00110   }
00111   return h;
00112 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const HistoID ID,
const Gaudi::Histo1DDef &  hdef,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram with forced ID assignment (book on demand)

     // get the histogram descriptor
     const Gaudi::Histo1DDef& hdef = ... ;

     // get the histogram ID
     const HistoID ID = ... ;

     const double mass = ... ;
     plot1D ( mass , ID , hdef  )
See also:
AIDA::IHistogram1D

The histogram descriptor comes e.g. from component properties

Parameters:
value value to be filled
ID histogram identifier
hdef histogram descriptor
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 229 of file GaudiHistos_1DFixedBinning.icpp.

00233 {
00234   return plot1D
00235     ( value  , ID ,
00236       hdef.title() , hdef.lowEdge() , hdef.highEdge() , hdef.bins() ,
00237       weight ) ;
00238 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const HistoID ID,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram with forced ID assignment (book on demand)

     const double mass = ... ;
     plot1D( mass , 15 , "Invariant Mass" , 2.5 , 3.5 , 100 )

This example illustrates the filling of the 1D histogram ID=15 titled "Invariant Mass" with value mass .

If the histogram with given ID does not exist yet it will be automatically booked with parameters low equal to 2.5, parameters high equal to 3.5 and bins equal to 100.

It is also possible to use literal IDs. For example :-

     const double mass = ... ;
     plot1D( mass , "mass" , "Invariant Mass" , 2.5 , 3.5 , 100 )

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double mass = ... ;
     plot1D( mass , "subdir/mass" , "Invariant Mass" , 2.5 , 3.5 , 100 )

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together. It is still desirable to use the unique histogram title to avoid a bad interference.
See also:
AIDA::IHistogram1D
Parameters:
value value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 161 of file GaudiHistos_1DFixedBinning.icpp.

00168 {
00169   AIDA::IHistogram1D* h(NULL);
00170   if ( produceHistos() )
00171   {
00172     // retrieve or book the histogram
00173     h = histo1D ( ID ) ;
00174     if ( NULL == h ) {  h = book1D ( ID , title , low , high , bins ) ; }
00175     // fill
00176     h = fill ( h , value , weight , title ) ;
00177   }
00178   return h;
00179 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const Gaudi::Histo1DDef &  hdef,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram (book on demand)

     const Gaudi::Histo1DDef& hdef = ... ;

     const double mass = ... ;
     plot1D ( mass , hdef ) ;

The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title.

The histogram descriptor comes e.g. from the component properties.

See also:
AIDA::IHistogram1D
Parameters:
value value to be filled
hdef histogram descriptor
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 214 of file GaudiHistos_1DFixedBinning.icpp.

00217 {
00218   return plot1D
00219     ( value  ,
00220       hdef.title() , hdef.lowEdge() , hdef.highEdge() , hdef.bins() ,
00221       weight ) ;
00222 }

template<class PBASE >
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot1D ( const double  value,
const std::string title,
const double  low,
const double  high,
const unsigned long  bins = 100,
const double  weight = 1.0 
) const [inline]

fill the 1D histogram (book on demand)

     const double mass = ... ;
     plot1D( mass , "Invariant Mass" , 2.5 , 3.5 , 100 )

This example illustrates the filling of the histogram titled "InvariantMass" with value mass .

If the histogram with given title does not exist yet it will be automatically booked with parameters low equal to 2.5, parameters high equal to 3.5 and bins equal to 100.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram1D
Parameters:
value value to be filled
title histogram title (must be unique within the algorithm)
low low limit for histogram
high high limit for histogram
bins number of bins
weight weight
Returns:
pointer to AIDA 1D histogram

Definition at line 137 of file GaudiHistos_1DFixedBinning.icpp.

00143 {
00144   AIDA::IHistogram1D * h(NULL);
00145   if ( produceHistos() )
00146   {
00147     // retrieve or book the histogram
00148     h = histo1D ( title ) ;
00149     if ( NULL == h ) { h = book1D  ( title , low , high , bins ) ; }
00150     // fill the histogram
00151     h = fill ( h , value , weight , title );
00152   }
00153   return h;
00154 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::plot2D ( const double  valueX,
const double  valueY,
const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const double  weight = 1.0 
) const [inline]

fill the 2D variable histogram with forced ID assignment (book on demand)

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, 15,
             "Invariant Mass2 versus Mass1", edgesX, edgesY );

This example illustrates the filling of the 2D histogram ID=15 titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

It is also possible to use literal IDs. For example :-

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, "mass",
             "Invariant Mass2 versus Mass1", edgesX, edgesY );

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, "subdir/mass",
             "Invariant Mass2 versus Mass1", edgesX, edgesY );

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together It is still desirable to use the unique histogram title to avoid a bad interference
See also:
AIDA::IHistogram2D
Parameters:
valueX x value to be filled
valueY y value to be filled
ID Histogram ID to use
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
weight weight
Returns:
pointer to AIDA 2D histogram

Definition at line 125 of file GaudiHistos_2DVariableBinning.icpp.

00132 {
00133   AIDA::IHistogram2D * h(NULL);
00134   if ( produceHistos() )
00135   {
00136     // retrieve or book the histogram
00137     h = histo2D ( ID ) ;
00138     if ( NULL == h ) {  h = book2D ( ID , title , edgesX , edgesY ) ; }
00139     // fill
00140     h = fill ( h , valueX , valueY , weight , title ) ;
00141   }
00142   return h;
00143 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::plot2D ( const double  valueX,
const double  valueY,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const double  weight = 1.0 
) const [inline]

Fill the 2D variable binning histogram (book on demand).

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2,
            "Invariant Mass2 versus Mass1" , edgesX, edgesY );

This example illustrates the filling of the 2D histogram titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram2D
Parameters:
valueX x value to be filled
valueY y value to be filled
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
weight weight
Returns:
pointer to AIDA 2D histogram

Definition at line 101 of file GaudiHistos_2DVariableBinning.icpp.

00107 {
00108   AIDA::IHistogram2D * h(NULL);
00109   if ( produceHistos() )
00110   {
00111     // retrieve or book the histogram
00112     h = histo2D ( title ) ;
00113     if ( NULL == h ) { h = book2D ( title , edgesX , edgesY ) ; }
00114     // fill the histogram
00115     h = fill ( h , valueX , valueY , weight , title );
00116   }
00117   return h;
00118 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::plot2D ( const double  valueX,
const double  valueY,
const HistoID ID,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const unsigned long  binsX = 50,
const unsigned long  binsY = 50,
const double  weight = 1.0 
) const [inline]

fill the 2D histogram with forced ID assignment (book on demand)

     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, 15,
             "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 4.5, 5.5, 100, 200 );

This example illustrates the filling of the 2D histogram ID=15 titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, binsX equal to 100 and binsY equal to 200.

It is also possible to use literal IDs. For example :-

     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, "mass",
             "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 4.5, 5.5, 100, 200 );

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2, "subdir/mass",
             "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 4.5, 5.5, 100, 200 );

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together It is still desirable to use the unique histogram title to avoid a bad interference
See also:
AIDA::IHistogram2D
Parameters:
valueX x value to be filled
valueY y value to be filled
ID Histogram ID to use
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
binsX number of bins in x
binsY number of bins in y
weight weight
Returns:
pointer to AIDA 2D histogram

Definition at line 178 of file GaudiHistos_2DFixedBinning.icpp.

00189 {
00190   AIDA::IHistogram2D * h(NULL);
00191   // produce histograms ?
00192   if ( produceHistos() )
00193   {
00194     // retrieve or book the histogram
00195     h = histo2D ( ID ) ;
00196     if ( NULL == h ) { h = book2D ( ID   , title ,
00197                                  lowX , highX , binsX ,
00198                                  lowY , highY , binsY ) ; }
00199     // fill the histogram
00200     h = fill ( h , valueX , valueY , weight , title ) ;
00201   }
00202   return h;
00203 }

template<class PBASE >
AIDA::IHistogram2D * GaudiHistos< PBASE >::plot2D ( const double  valueX,
const double  valueY,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const unsigned long  binsX = 50,
const unsigned long  binsY = 50,
const double  weight = 1.0 
) const [inline]

fill the 2D histogram (book on demand)

     const double mass1 = ... ;
     const double mass2 = ... ;
     plot2D( mass1, mass2,
            "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 4.5, 5.5, 100, 200 );

This example illustrates the filling of the 2D histogram titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, binsX equal to 100 and binsY equal to 200.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram2D
Parameters:
valueX x value to be filled
valueY y value to be filled
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
binsX number of bins in x
binsY number of bins in y
weight weight
Returns:
pointer to AIDA 2D histogram

Definition at line 150 of file GaudiHistos_2DFixedBinning.icpp.

00160 {
00161   AIDA::IHistogram2D * h(NULL);
00162   if ( produceHistos() )
00163   {
00164     // retrieve or book the histogram
00165     h = histo2D ( title ) ;
00166     if ( NULL == h )
00167     { h = book2D ( title , lowX , highX , binsX , lowY , highY , binsY ) ; }
00168     // fill the histogram
00169     h = fill ( h , valueX , valueY , weight , title ) ;
00170   }
00171   return h;
00172 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::plot3D ( const double  valueX,
const double  valueY,
const double  valueZ,
const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const HistoBinEdges edgesZ,
const double  weight = 1.0 
) const [inline]

fill the 3D histogram with forced ID assignment (book on demand)

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const GaudiAlg::HistoBinEdges edgesZ = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z, "Space Points", edgesX, edgesY, edgesZ );

This example illustrates the filling of the 3D histogram ID=15 titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges and histogram ID.

It is also possible to use literal IDs. For example :-

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const GaudiAlg::HistoBinEdges edgesZ = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z,
             "space", "Space Points" ,
             edgesX, edgesY, edgesZ );

Will book the same histogram, using the id "space".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const GaudiAlg::HistoBinEdges edgesZ = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z,
             "subdir/space", "Space Points" ,
             edgesX, edgesY, edgesZ );

Which will create the histogram "space" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together It is still desirable to use the unique histogram title to avoid a bad interference
See also:
AIDA::IHistogram3D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
ID Histogram ID to use
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
edgesZ The histogram z bin edges
weight weight
Returns:
pointer to AIDA 3D histogram

Definition at line 131 of file GaudiHistos_3DVariableBinning.icpp.

00140 {
00141   AIDA::IHistogram3D * h(NULL);
00142   if ( produceHistos() )
00143   {
00144     // retrieve or book the histogram
00145     h = histo3D ( ID ) ;
00146     if ( NULL == h ) {  h = book3D ( ID , title , edgesX , edgesY , edgesZ ) ; }
00147     // fill
00148     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00149   }
00150   return h;
00151 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::plot3D ( const double  valueX,
const double  valueY,
const double  valueZ,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const HistoBinEdges edgesZ,
const double  weight = 1.0 
) const [inline]

Fill the 3D variable binning histogram (book on demand).

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const GaudiAlg::HistoBinEdges edgesZ = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z, "Space Points", edgesX, edgesY, edgesZ );

This example illustrates the filling of the 3D histogram titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram3D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
edgesZ The histogram z bin edges
weight weight
Returns:
pointer to AIDA 3D histogram

Definition at line 105 of file GaudiHistos_3DVariableBinning.icpp.

00113 {
00114   AIDA::IHistogram3D * h(NULL);
00115   if ( produceHistos() )
00116   {
00117     // retrieve or book the histogram
00118     h = histo3D ( title ) ;
00119     if ( NULL == h ) { h = book3D ( title , edgesX , edgesY , edgesZ ) ; }
00120     // fill the histogram
00121     h = fill ( h , valueX , valueY , valueZ , weight , title );
00122   }
00123   return h;
00124 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::plot3D ( const double  valueX,
const double  valueY,
const double  valueZ,
const HistoID ID,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const double  lowZ,
const double  highZ,
const unsigned long  binsX = 10,
const unsigned long  binsY = 10,
const unsigned long  binsZ = 10,
const double  weight = 1.0 
) const [inline]

fill the 3D histogram with forced ID assignment (book on demand)

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z,
            15 , "Space Points" ,
             2.5 ,3.5, 4.5, 5.5, 6.5, 7.5, 10, 20, 30 );

This example illustrates the filling of the 3D histogram ID=15 titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, lowZ equal to 6.5, highZ equal to 7.5, binsX equal to 10, binsY equal to 20 and binsZ equal to 30.

It is also possible to use literal IDs. For example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z,
            "space", "Space Points" ,
              2.5 ,3.5, 4.5, 5.5, 6.5, 7.5, 10, 20, 30 );

Will book the same histogram, using the id "space".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z,
             "subdir/space", "Space Points" ,
             2.5 ,3.5, 4.5, 5.5, 6.5, 7.5, 10, 20, 30 );

Which will create the histogram "space" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

Attention:
If the histogram with given ID is already booked through automatic assignment of histogram ID, the error will not be detected. Therefore it is recommended to use non-trivial histogram ID offset (property "HistoOffSet") if one need to combine these techniques together It is still desirable to use the unique histogram title to avoid a bad interference
See also:
AIDA::IHistogram3D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
ID Histogram ID to use
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
lowZ low z limit for histogram
highZ high z limit for histogram
binsX number of bins in x
binsY number of bins in y
binsZ number of bins in z
weight weight
Returns:
pointer to AIDA 3D histogram

Definition at line 200 of file GaudiHistos_3DFixedBinning.icpp.

00215 {
00216   AIDA::IHistogram3D * h(0);
00217   if ( produceHistos() )
00218   {
00219     // retrieve or book the histogram
00220     h = histo3D ( ID ) ;
00221     if ( 0 == h ) { h = book3D ( ID , title ,
00222                                  lowX , highX , binsX ,
00223                                  lowY , highY , binsY ,
00224                                  lowZ , highZ , binsZ ) ; }
00225     // fill the histogram
00226     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00227   }
00228   return h;
00229 }

template<class PBASE >
AIDA::IHistogram3D * GaudiHistos< PBASE >::plot3D ( const double  valueX,
const double  valueY,
const double  valueZ,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const double  lowZ,
const double  highZ,
const unsigned long  binsX = 10,
const unsigned long  binsY = 10,
const unsigned long  binsZ = 10,
const double  weight = 1.0 
) const [inline]

fill the 3D histogram (book on demand)

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     plot3D( X, Y, Z, "Space Points" ,
            2.5 , 3.5 ,
            4.5 , 5.5 ,
            6.5 , 7.5 ,
            10, 20, 30 );

This example illustrates the filling of the 3D histogram titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, lowZ equal to 6.5, highZ equal to 7.5, binsX equal to 10, binsY equal to 20 and binsZ equal to 30.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IHistogram3D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
lowZ low z limit for histogram
highZ high z limit for histogram
binsX number of bins in x
binsY number of bins in y
binsZ number of bins in z
weight weight
Returns:
pointer to AIDA 3D histogram

Definition at line 166 of file GaudiHistos_3DFixedBinning.icpp.

00180 {
00181   AIDA::IHistogram3D * h(0);
00182   if ( produceHistos() )
00183   {
00184     // retrieve or book the histogram
00185     h = histo3D ( title ) ;
00186     if ( 0 == h ) { h = book3D ( title ,
00187                                  lowX , highX , binsX ,
00188                                  lowY , highY , binsY ,
00189                                  lowZ , highZ , binsZ ) ; }
00190     // fill the histogram
00191     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00192   }
00193   return h;
00194 }

template<class PBASE >
void GaudiHistos< PBASE >::printHistoHandler ( Property  )  [inline, private]

the handler for "HistoPrint" property

Definition at line 535 of file GaudiHistos.icpp.

00536 {
00537   // no action if not yet initialized
00538   if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
00539   if ( this -> histosPrint() ) { this -> printHistos ( MSG::ALWAYS ) ; }
00540 }

template<class PBASE >
int GaudiHistos< PBASE >::printHistos ( const MSG::Level  level = MSG::ALWAYS  )  const [inline]

perform the actual printout of histograms

Parameters:
level The message level to print at
Returns:
number of active histograms

Definition at line 224 of file GaudiHistos.icpp.

00225 {
00226   using namespace Gaudi::Utils::Histos ;
00227 
00228   if ( noHistos() )
00229   {
00230     if ( this->msgLevel(MSG::DEBUG) )
00231     { this->msgStream(level) << "No histograms are booked" << endmsg ; }
00232     return 0 ;                                                        // RETURN
00233   }
00234 
00235   MsgStream & msg = this->msgStream(level);
00236 
00237   // Printout all histograms
00238 
00239   Gaudi::Utils::Histos::Table table
00240     ( m_histo1DTableFormat ,
00241       m_histo1DTableHeader ) ;
00242 
00243   if ( !histo1DMapID().empty() )
00244   {
00245     msg << "List of booked 1D histograms in directory         "
00246         << "\"" << histoPath() << "\" :-"  ;
00247 
00248     if ( !table.header().empty() )
00249     {
00250       msg << std::endl << Gaudi::Utils::Histos::format
00251         ( "ID" , table.header() , m_histo1DTableFormatShort ) ;
00252     }
00253     // temporary map to keep ordered IDs
00254     typedef std::map<HistoID,const AIDA::IHistogram1D*> OrderedMapType;
00255     OrderedMapType OrderedMap ( histo1DMapID().begin() , histo1DMapID().end() );
00256     //
00257     for ( OrderedMapType::const_iterator entry = OrderedMap.begin() ;
00258           OrderedMap.end() != entry ; ++entry )
00259     {
00260       const AIDA::IHistogram1D* aida = entry->second ;
00261       if ( NULL == aida )
00262       { this->error() << "IHistogram1D points to NULL" << endmsg ; continue ; }
00263       // format and print the row
00264       msg << std::endl << table.toString
00265         ( aida                      ,
00266           HistoID ( entry->first )  ,
00267           m_histo1DTableFormatShort ) ;
00268     }
00269     msg << endmsg ;
00270   }
00271   // ==========================================================================
00272   if ( !histo2DMapID().empty() )
00273   {
00274     msg << "List of booked 2D histograms in directory         "
00275         << "\"" << histoPath() << "\" :-" ;
00276 
00277     // temporary map to keep ordered IDs
00278     typedef std::map<HistoID,const AIDA::IHistogram2D*> OrderedMapType;
00279     OrderedMapType OrderedMap ( histo2DMapID().begin() , histo2DMapID().end() ) ;
00280     //
00281     for ( OrderedMapType::const_iterator entry = OrderedMap.begin() ;
00282           OrderedMap.end() != entry ; ++entry )
00283     {
00284       const AIDA::IHistogram2D* aida = entry->second ;
00285       if ( NULL == aida )
00286       { this->error() << "IHistogram2D points to NULL" << endmsg ; continue ; }
00287       msg << std::endl
00288           << GaudiAlg::Print2D::toString ( aida , entry->first );
00289     }
00290     msg << endmsg ;
00291   }
00292   // ==========================================================================
00293   if ( !histo3DMapID().empty() )
00294   {
00295     msg << "List of booked 3D histograms in directory         "
00296         << "\"" << histoPath() << "\" :-" ;
00297     // temporary map to keep ordered IDs
00298     typedef std::map<HistoID,const AIDA::IHistogram3D*> OrderedMapType;
00299     OrderedMapType OrderedMap ( histo3DMapID().begin() , histo3DMapID().end() ) ;
00300     //
00301     for ( OrderedMapType::const_iterator entry = OrderedMap.begin() ;
00302           OrderedMap.end() != entry ; ++entry )
00303     {
00304       const AIDA::IHistogram3D* aida = entry->second ;
00305       if ( NULL == aida )
00306       { this->error() << "IHistogram3D points to NULL" << endmsg ; continue ; }
00307       msg << std::endl << GaudiAlg::Print3D::toString ( aida , entry->first );
00308     }
00309     msg << endmsg ;
00310   }
00311   // ==========================================================================
00312   if ( !profile1DMapID().empty() )
00313   {
00314     msg << "List of booked 1D profile histograms in directory "
00315         << "\"" << histoPath() << "\" :-" ;
00316     // temporary map to keep ordered IDs
00317     typedef std::map<HistoID,const AIDA::IProfile1D*> OrderedMapType;
00318     OrderedMapType OrderedMap ( profile1DMapID().begin() , profile1DMapID().end() ) ;
00319     //
00320     for ( OrderedMapType::const_iterator entry = OrderedMap.begin() ;
00321           OrderedMap.end() != entry ; ++entry )
00322     {
00323       const AIDA::IProfile1D*   aida = entry->second ;
00324       if ( NULL == aida )
00325       { this->error() << "IProfile1D points to NULL" << endmsg ; continue ; }
00326       msg << std::endl << GaudiAlg::Print1DProf::toString  ( aida , entry->first );
00327     }
00328     msg << endmsg ;
00329   }
00330   // ==========================================================================
00331   if ( !profile2DMapID().empty() )
00332   {
00333     msg << "List of booked 2D profile histograms in directory "
00334         << "\"" << histoPath() << "\" :-" ;
00335     // temporary map to keep ordered IDs
00336     typedef std::map<HistoID,const AIDA::IProfile2D*> OrderedMapType;
00337     OrderedMapType OrderedMap ( profile2DMapID().begin() , profile2DMapID().end() ) ;
00338     //
00339     for ( OrderedMapType::const_iterator entry = OrderedMap.begin() ;
00340           OrderedMap.end() != entry ; ++entry )
00341     {
00342       const AIDA::IProfile2D*   aida = entry->second ;
00343       if ( NULL == aida )
00344       { this->error() << "IProfile2D points to NULL" << endmsg ; continue ; }
00345       msg << std::endl << GaudiAlg::Print2DProf::toString ( aida , entry->first );
00346     }
00347     msg << endmsg ;
00348   }
00349   //
00350   return this->totalNumberOfHistos() ;
00351 }

template<class PBASE>
bool GaudiHistos< PBASE >::produceHistos (  )  const [inline]

get the flag for histogram production (property "HistoProduce")

Definition at line 2694 of file GaudiHistos.h.

02694 { return m_produceHistos ; }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::profile1D ( const HistoID ID  )  const [inline]

access the EXISTING 1D profile histogram by ID return the pointer to existing 1D profile histogram or NULL

Definition at line 435 of file GaudiHistos.icpp.

00436 {
00437   AIDA::IProfile1D * h(NULL);
00438   //
00439   Profile1DMapID::const_iterator found = profile1DMapID().find( ID ) ;
00440   //
00441   h = ( profile1DMapID().end() == found ? NULL : found->second );
00442   //
00443   return h;
00444 }

template<class PBASE>
AIDA::IProfile1D* GaudiHistos< PBASE >::profile1D ( const std::string title  )  const [inline]

access the EXISTING 1D profile histogram by title return the pointer to existing 1D profile histogram or NULL

Definition at line 2611 of file GaudiHistos.h.

02612   {
02613     Profile1DMapTitle::const_iterator found = profile1DMapTitle().find( title ) ;
02614     return ( profile1DMapTitle().end() == found ? 0 : found->second );
02615   }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::profile1D ( const double  valueX,
const double  valueY,
const HistoID ID,
const std::string title,
const HistoBinEdges edges,
const double  weight = 1.0 
) const [inline]

fill the 1D variable binning profile histogram with forced ID assignment (book on demand)

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
             15, "Invariant Mass2 versus Mass1", edges );

This example illustrates the filling of the 1D profile histogram with ID=15 titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given ID does not exist yet it will be automatically booked with the given histogram bin edges.

It is also possible to use literal IDs. For example :-

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
             "mass", "Invariant Mass2 versus Mass1", edges );

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
        "subdir/mass", "Invariant Mass2 versus Mass1", edges );

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

See also:
AIDA::IProfile1D
Parameters:
valueX x value to be filled
valueY y value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 117 of file GaudiHistos_1DProfVariableBinning.icpp.

00123 {
00124   AIDA::IProfile1D * h(NULL);
00125   if ( produceHistos() )
00126   {
00127     // retrieve or book the histogram
00128     h = profile1D ( ID ) ;
00129     if ( NULL == h ) { h = bookProfile1D ( ID , title , edges ) ; }
00130     // fill the histogram
00131     h = fill ( h , valueX , valueY , weight , title ) ;
00132   }
00133   return h;
00134 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::profile1D ( const double  valueX,
const double  valueY,
const std::string title,
const HistoBinEdges edges,
const double  weight = 1.0 
) const [inline]

fill the 1D variable binning profile histogram (book on demand)

     const GaudiAlg::HistoBinEdges edges = ...;
     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2, "Invariant Mass2 versus Mass1", edges );

This example illustrates the filling of the 1D profile histogram titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IProfile1D
Parameters:
valueX x value to be filled
valueY y value to be filled
title histogram title (must be unique within the algorithm)
edges The histogram bin edges
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 95 of file GaudiHistos_1DProfVariableBinning.icpp.

00100 {
00101   AIDA::IProfile1D * h(NULL);
00102   if ( produceHistos() )
00103   {
00104     // retrieve or book the histogram
00105     h = profile1D ( title ) ;
00106     if ( NULL == h ) { h = bookProfile1D ( title , edges ) ; }
00107     // fill the histogram
00108     h = fill ( h , valueX , valueY , weight , title ) ;
00109   }
00110   return h;
00111 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::profile1D ( const double  valueX,
const double  valueY,
const HistoID ID,
const std::string title,
const double  lowX,
const double  highX,
const unsigned long  binsX = 100,
const std::string opt = "",
const double  lowY = -std::numeric_limits<double>::max(),
const double  highY = std::numeric_limits<double>::max(),
const double  weight = 1.0 
) const [inline]

fill the 1D profile histogram with forced ID assignment (book on demand)

     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
             15, "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 100 );

This example illustrates the filling of the 1D profile histogram with ID=15 titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, binsX equal to 100

It is also possible to use literal IDs. For example :-

     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
             "mass", "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 100 );

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2,
        "subdir/mass", "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 100 );

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

See also:
AIDA::IProfile1D
Parameters:
valueX x value to be filled
valueY y value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
opt the options, used for evaluation of errors
lowY the min cut-off for y-values
highY the max cut-off for y-values
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 176 of file GaudiHistos_1DProfFixedBinning.icpp.

00187 {
00188   AIDA::IProfile1D * h(NULL);
00189   if ( produceHistos() )
00190   {
00191     // retrieve or book the histogram
00192     h = profile1D ( ID ) ;
00193     if ( NULL == h )
00194     { h = bookProfile1D ( ID , title , lowX , highX , binsX , opt , lowY , highY ) ; }
00195     // fill the histogram
00196     h = fill ( h , valueX , valueY , weight , title ) ;
00197   }
00198   return h;
00199 }

template<class PBASE >
AIDA::IProfile1D * GaudiHistos< PBASE >::profile1D ( const double  valueX,
const double  valueY,
const std::string title,
const double  lowX,
const double  highX,
const unsigned long  binsX = 100,
const std::string opt = "",
const double  lowY = -std::numeric_limits<double>::max(),
const double  highY = std::numeric_limits<double>::max(),
const double  weight = 1.0 
) const [inline]

fill the 1D profile histogram (book on demand)

     const double mass1 = ... ;
     const double mass2 = ... ;
     profile1D( mass1, mass2, "Invariant Mass2 versus Mass1" ,2.5 ,3.5, 100 );

This example illustrates the filling of the 1D profile histogram titled "Invariant Mass2 versus Mass1" with values mass1 and mass2 .

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, binsX equal to 100

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IProfile1D
Parameters:
valueX x value to be filled
valueY y value to be filled
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
binsX number of bins in x
opt the options, used for evaluation of errors
lowY the min cut-off for y-values
highY the max cut-off for y-values
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 148 of file GaudiHistos_1DProfFixedBinning.icpp.

00158 {
00159   AIDA::IProfile1D * h(NULL);
00160   if ( produceHistos() )
00161   {
00162     // retrieve or book the histogram
00163     h = profile1D ( title ) ;
00164     if ( NULL == h )
00165     { h = bookProfile1D ( title , lowX , highX , binsX , opt , lowY , highY ) ; }
00166     // fill the histogram
00167     h = fill ( h , valueX , valueY , weight , title ) ;
00168   }
00169   return h;
00170 }

template<class PBASE>
const Profile1DMapID& GaudiHistos< PBASE >::profile1DMapID (  )  const [inline]

get access to the map of 1D profile histograms index via a ID

  const Profile1DMapID& histos = profile1DMapID() ;

  // iterate over the map!
  for ( Profile1DMapID::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram ID
        const HistoID        ID = entry->first ;
        // histogram itself
        AIDA::IProfile1D* h  = entry->second ;
        if ( 0 == h ) { continue ;}

        std::cout << " Histogram ID    " << ID
                  << " Histogram title " << h->title() << std::endl ;

     }

Definition at line 2942 of file GaudiHistos.h.

02942 { return m_profile1DMapID; }

template<class PBASE>
const Profile1DMapTitle& GaudiHistos< PBASE >::profile1DMapTitle (  )  const [inline]

get access to the map of all 1D profile histograms indexed via their title

Using this method one can inspect e.g. a list of active histograms

  const Profile1DMapTitle& histos = profile1DMapTitle() ;
  // iterate over the map!
  for ( Profile1DMapTitle::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram title
        const std::string&   title = entry->first ;
        // histogram itself
        AIDA::IProfile1D* hist  = entry->second ;
        if( 0 == hist )  { continue ; }                // ATTENTION!

        std::cout << " Histogram title " << title << std::endl ;

     }
Attention:
The map *COULD* contains NULL pointers, the check before use is mandatory!

Definition at line 2916 of file GaudiHistos.h.

02916 { return m_profile1DMapTitle; }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::profile2D ( const HistoID ID  )  const [inline]

access the EXISTING 2D profile histogram by ID return the pointer to existing 2D profile histogram or NULL

Definition at line 449 of file GaudiHistos.icpp.

00450 {
00451   AIDA::IProfile2D * h(NULL);
00452   //
00453   Profile2DMapID::const_iterator found = profile2DMapID().find( ID ) ;
00454   //
00455   h = ( profile2DMapID().end() == found ? NULL : found->second );
00456   //
00457   return h;
00458 }

template<class PBASE>
AIDA::IProfile2D* GaudiHistos< PBASE >::profile2D ( const std::string title  )  const [inline]

access the EXISTING 2D profile histogram by title return the pointer to existing 2D profile histogram or NULL

Definition at line 2620 of file GaudiHistos.h.

02621   {
02622     Profile2DMapTitle::const_iterator found = profile2DMapTitle().find( title ) ;
02623     return ( profile2DMapTitle().end() == found ? 0 : found->second );
02624   }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::profile2D ( const double  valueX,
const double  valueY,
const double  valueZ,
const HistoID ID,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const double  weight = 1.0 
) const [inline]

fill the 2D variable binning profile histogram with forced ID assignment (book on demand)

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2( X, Y, Z, "Space Points", edgesX, edgesY );

This example illustrates the filling of the 2D profile histogram titled "Space Points" with values X, Y and Z.

If the histogram with given ID does not exist yet it will be automatically booked with the given histogram bin edges.

It is also possible to use literal IDs. For example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z, "space", "Space Points", edgesX, edgesY );

Will book the same histogram, using the id "mass".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z,
                "subdir/space", "Space Points", edgesX, edgesY );

Which will create the histogram "mass" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

See also:
AIDA::IProfile2D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram y bin edges
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 122 of file GaudiHistos_2DProfVariableBinning.icpp.

00130 {
00131   AIDA::IProfile2D * h(NULL);
00132   if ( produceHistos() )
00133   {
00134     // retrieve or book the histogram
00135     h = profile2D ( ID ) ;
00136     if ( NULL == h ) { h = bookProfile2D ( ID , title , edgesX , edgesY ) ; }
00137 
00138     // fill the histogram
00139     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00140   }
00141   return h;
00142 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::profile2D ( const double  valueX,
const double  valueY,
const double  valueZ,
const std::string title,
const HistoBinEdges edgesX,
const HistoBinEdges edgesY,
const double  weight = 1.0 
) const [inline]

fill the 2D variable binning profile histogram (book on demand)

     const GaudiAlg::HistoBinEdges edgesX = ...;
     const GaudiAlg::HistoBinEdges edgesY = ...;
     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z, "Space Points", edgesX, edgesY );

This example illustrates the filling of the 2D profile histogram titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with the given histogram bin edges.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IProfile2D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
title histogram title (must be unique within the algorithm)
edgesX The histogram x bin edges
edgesY The histogram x bin edges
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 98 of file GaudiHistos_2DProfVariableBinning.icpp.

00105 {
00106   AIDA::IProfile2D * h(NULL);
00107   if ( produceHistos() )
00108   {
00109     // retrieve or book the histogram
00110     h = profile2D ( title ) ;
00111     if ( NULL == h ) { h = bookProfile2D ( title, edgesX, edgesY ) ; }
00112     // fill the histogram
00113     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00114   }
00115   return h;
00116 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::profile2D ( const double  valueX,
const double  valueY,
const double  valueZ,
const HistoID ID,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const unsigned long  binsX = 50,
const unsigned long  binsY = 50,
const double  weight = 1.0 
) const [inline]

fill the 2D profile histogram with forced ID assignment (book on demand)

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z, 15, "Space Points" ,2.5 ,3.5, 4.5, 5.5, 10, 20 );

This example illustrates the filling of the 2D profile histogram with ID=15 titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, binsX equal to 10, binsY equal to 20.

It is also possible to use literal IDs. For example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z, "space", "Space Points" ,2.5 ,3.5, 4.5, 5.5, 10, 20 );

Will book the same histogram, using the id "space".

It is also possible using literal IDs, to place histograms in sub-directories from the main histogram directory, using for example :-

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( X, Y, Z,
                "subdir/space", "Space Points" ,2.5 ,3.5, 4.5, 5.5, 10, 20 );

Which will create the histogram "space" in the sub-directory "subdir". Histograms can also be created in sub-directories with numeric IDs if IDs such as "subdir/1" are used.

See also:
AIDA::IProfile2D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
ID histogram identifier
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
binsX number of bins in x
binsY number of bins in y
weight weight
Returns:
pointer to AIDA 2D profile histogram

Definition at line 179 of file GaudiHistos_2DProfFixedBinning.icpp.

00191 {
00192   AIDA::IProfile2D * h(0);
00193   if ( produceHistos() )
00194   {
00195     // retrieve or book the histogram
00196     h = profile2D ( ID ) ;
00197     if ( 0 == h ) { h = bookProfile2D ( ID , title ,
00198                                         lowX , highX , binsX ,
00199                                         lowY , highY , binsY ) ; }
00200     // fill the histogram
00201     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00202   }
00203   return h;
00204 }

template<class PBASE >
AIDA::IProfile2D * GaudiHistos< PBASE >::profile2D ( const double  valueX,
const double  valueY,
const double  valueZ,
const std::string title,
const double  lowX,
const double  highX,
const double  lowY,
const double  highY,
const unsigned long  binsX = 50,
const unsigned long  binsY = 50,
const double  weight = 1.0 
) const [inline]

fill the 2D profile histogram (book on demand)

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2( X, Y, Z, "Space Points" ,2.5 ,3.5, 4.5, 5.5, 10, 20 );

This example illustrates the filling of the 2D profile histogram titled "Space Points" with values X, Y and Z.

If the histogram with given title does not exist yet it will be automatically booked with parameters lowX equal to 2.5, highX equal to 3.5, lowY equal to 4.5, highY equal to 5.5, binsX equal to 10, binsY equal to 20.

Attention:
The histogram will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first histogram booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given histogram will be given when filled under conditional statements, since in these circumstances the order in which the histograms are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given histogram could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
See also:
AIDA::IProfile2D
Parameters:
valueX x value to be filled
valueY y value to be filled
valueZ z value to be filled
title histogram title (must be unique within the algorithm)
lowX low x limit for histogram
highX high x limit for histogram
lowY low y limit for histogram
highY high y limit for histogram
binsX number of bins in x
binsY number of bins in y
weight weight
Returns:
pointer to AIDA 2D profile histogram

Definition at line 149 of file GaudiHistos_2DProfFixedBinning.icpp.

00160 {
00161   AIDA::IProfile2D * h(0);
00162   if ( produceHistos() )
00163   {
00164     // retrieve or book the histogram
00165     h = profile2D ( title ) ;
00166     if ( 0 == h ) { h = bookProfile2D ( title ,
00167                                         lowX , highX , binsX ,
00168                                         lowY , highY , binsY ) ; }
00169     // fill the histogram
00170     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
00171   }
00172   return h;
00173 }

template<class PBASE>
const Profile2DMapID& GaudiHistos< PBASE >::profile2DMapID (  )  const [inline]

get access to the map of 2D profile histograms index via a ID

  const Profile2DMapID& histos = profile2DMapID() ;

  // iterate over the map!
  for ( Profile2DMapID::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram ID
        const HistoID        ID = entry->first ;
        // histogram itself
        AIDA::IProfile2D* h  = entry->second ;
        if ( 0 == h ) { continue ;}

        std::cout << " Histogram ID    " << ID
                  << " Histogram title " << h->title() << std::endl ;

     }

Definition at line 2997 of file GaudiHistos.h.

02997 { return m_profile2DMapID; }

template<class PBASE>
const Profile2DMapTitle& GaudiHistos< PBASE >::profile2DMapTitle (  )  const [inline]

get access to the map of all 2D profile histograms indexed via their title

Using this method one can inspect e.g. a list of active histograms

  const Profile2DMapTitle& histos = profile2DMapTitle() ;
  // iterate over the map!
  for ( Profile2DMapTitle::const_iterator entry = histos.begin() ;
        histos.end() != entry ; ++entry  )
     {
        // histogram title
        const std::string&   title = entry->first ;
        // histogram itself
        AIDA::IProfile2D* hist  = entry->second ;
        if( 0 == hist )  { continue ; }                // ATTENTION!

        std::cout << " Histogram title " << title << std::endl ;

     }
Attention:
The map *COULD* contains NULL pointers, the check before use is mandatory!

Definition at line 2971 of file GaudiHistos.h.

02971 { return m_profile2DMapTitle; }

template<class PBASE>
void GaudiHistos< PBASE >::setCheckForNaN ( const bool  val  )  [inline]

set the flag for NaN checks (property "HistoCheckForNan")

Definition at line 3006 of file GaudiHistos.h.

03006 { m_checkForNaN   = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setFullDetail ( const bool  val  )  [inline]

set flag to control output level of histograms

Definition at line 3004 of file GaudiHistos.h.

03004 { m_fullDetail    = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setHistoDir ( const std::string val  )  [inline]

set histogram directory (property "HistoDir")

Definition at line 3017 of file GaudiHistos.h.

03017 { m_histoDir      = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setHistoOffSet ( const HistoID::NumericID  val  )  [inline]

set a value for histogram offset (property "HistoOffSet"

Definition at line 3010 of file GaudiHistos.h.

03011   { m_histoOffSet   = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setHistoTopDir ( const std::string val  )  [inline]

set top-level histogram directory (property "HistoTopDir")

Definition at line 3014 of file GaudiHistos.h.

03014 { m_histoTopDir   = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setProduceHistos ( const bool  val  )  [inline]

set the flag for histogram production (property "HistoProduce")

Definition at line 3002 of file GaudiHistos.h.

03002 { m_produceHistos = val ; }

template<class PBASE>
void GaudiHistos< PBASE >::setSplitHistoDir ( const bool  val  )  [inline]

set the flag for histogram path split (property "HistoSplitDir")

Definition at line 3008 of file GaudiHistos.h.

03008 { m_splitHistoDir = val ; }

template<class PBASE>
bool GaudiHistos< PBASE >::splitHistoDir (  )  const [inline]

get the flag for histogram path split (property "HistoSplitDir")

Definition at line 2700 of file GaudiHistos.h.

02700 { return m_splitHistoDir ; }

template<class PBASE >
void GaudiHistos< PBASE >::stringSearchReplace ( std::string title,
const std::string A,
const std::string B 
) const [inline, private]

Searches 'title' for all instancies of 'A' and replaces them with 'B'.

Definition at line 520 of file GaudiHistos.icpp.

00523 {
00524   std::string::size_type slash = title.find_first_of ( A ) ;
00525   while ( std::string::npos != slash )
00526   {
00527     title = title.substr(0,slash) + B + title.substr(slash+A.size());
00528     slash = title.find_first_of( A );
00529   }
00530 }

template<class PBASE >
unsigned int GaudiHistos< PBASE >::totalNumberOfHistos (  )  const [inline]

Returns the total number of histograms (of all types) currently booked.

Definition at line 463 of file GaudiHistos.icpp.

00464 {
00465   return
00466     histo1DMapID   () . size () +
00467     histo2DMapID   () . size () +
00468     histo3DMapID   () . size () +
00469     profile1DMapID () . size () +
00470     profile2DMapID () . size () ;
00471 }

template<class PBASE>
bool GaudiHistos< PBASE >::useNumericAutoIDs (  )  const [inline]

Use old style sequencial numerical automatically assigned IDs ?

Definition at line 2716 of file GaudiHistos.h.

02716 { return m_useNumericAutoIDs; }


Member Data Documentation

template<class PBASE>
bool GaudiHistos< PBASE >::m_checkForNaN [private]

flag to control check for Nan/Finite while filling the histogram

Definition at line 3100 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_declareMoniHists [private]

Flag to turn on/off the registration of histograms to the Monitoring Service.

Definition at line 3112 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_fullDetail [private]

flag to control output level of histograms

Definition at line 3098 of file GaudiHistos.h.

template<class PBASE>
Histo1DMapID GaudiHistos< PBASE >::m_histo1DMapID [mutable, private]

the actual storage/access of 1D histograms by unique ID

Definition at line 3117 of file GaudiHistos.h.

template<class PBASE>
Histo1DMapTitle GaudiHistos< PBASE >::m_histo1DMapTitle [mutable, private]

the actual storage/access of 1D histograms by unique title

Definition at line 3115 of file GaudiHistos.h.

template<class PBASE>
std::string GaudiHistos< PBASE >::m_histo1DTableFormat [private]

format for printout of 1D-histograms as a table

Definition at line 3140 of file GaudiHistos.h.

template<class PBASE>
std::string GaudiHistos< PBASE >::m_histo1DTableFormatShort [private]

format for printout of 1D-histograms as a table

Definition at line 3142 of file GaudiHistos.h.

template<class PBASE>
std::string GaudiHistos< PBASE >::m_histo1DTableHeader [private]

the header for the table of 1-D historgrams

Definition at line 3144 of file GaudiHistos.h.

template<class PBASE>
Histo2DMapID GaudiHistos< PBASE >::m_histo2DMapID [mutable, private]

the actual storage/access of 2D histograms by unique ID

Definition at line 3122 of file GaudiHistos.h.

template<class PBASE>
Histo2DMapTitle GaudiHistos< PBASE >::m_histo2DMapTitle [mutable, private]

the actual storage/access of 2D histograms by unique title

Definition at line 3120 of file GaudiHistos.h.

template<class PBASE>
Histo3DMapID GaudiHistos< PBASE >::m_histo3DMapID [mutable, private]

the actual storage/access of 3D histograms by unique ID

Definition at line 3127 of file GaudiHistos.h.

template<class PBASE>
Histo3DMapTitle GaudiHistos< PBASE >::m_histo3DMapTitle [mutable, private]

the actual storage/access of 3D histograms by unique title

Definition at line 3125 of file GaudiHistos.h.

template<class PBASE>
std::string GaudiHistos< PBASE >::m_histoDir [private]

histogram directory

Definition at line 3108 of file GaudiHistos.h.

template<class PBASE>
HistoID::NumericID GaudiHistos< PBASE >::m_histoOffSet [private]

general histogram ID offset (only works for automatically assigned numeric IDs)

Definition at line 3104 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_histosPrint [private]

print histograms at finalization

Definition at line 3110 of file GaudiHistos.h.

template<class PBASE>
std::string GaudiHistos< PBASE >::m_histoTopDir [private]

histogram top level directory

Definition at line 3106 of file GaudiHistos.h.

template<class PBASE>
std::map<std::string,std::string> GaudiHistos< PBASE >::m_idReplaceInfo [private]

Map of strings to search and replace when using the title as the basis of automatically generated literal IDs.

Definition at line 3150 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_produceHistos [private]

flag to SWITCH ON/SWITCH OFF the histogrm fillling and booking

Definition at line 3096 of file GaudiHistos.h.

template<class PBASE>
Profile1DMapID GaudiHistos< PBASE >::m_profile1DMapID [mutable, private]

the actual storage/access of 1D profile histograms by unique ID

Definition at line 3132 of file GaudiHistos.h.

template<class PBASE>
Profile1DMapTitle GaudiHistos< PBASE >::m_profile1DMapTitle [mutable, private]

the actual storage/access of 1D profile histograms by unique title

Definition at line 3130 of file GaudiHistos.h.

template<class PBASE>
Profile2DMapID GaudiHistos< PBASE >::m_profile2DMapID [mutable, private]

the actual storage/access of 2D profile histograms by unique ID

Definition at line 3137 of file GaudiHistos.h.

template<class PBASE>
Profile2DMapTitle GaudiHistos< PBASE >::m_profile2DMapTitle [mutable, private]

the actual storage/access of 2D profile histograms by unique title

Definition at line 3135 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_splitHistoDir [private]

split histogram directory name (very useful for Hbook)

Definition at line 3102 of file GaudiHistos.h.

template<class PBASE>
bool GaudiHistos< PBASE >::m_useNumericAutoIDs [private]

Flag to switch back to the old style sequencial numerical automatic IDs.

Definition at line 3146 of file GaudiHistos.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Wed Feb 9 16:30:43 2011 for Gaudi Framework, version v22r0 by Doxygen version 1.6.2 written by Dimitri van Heesch, © 1997-2004