Gaudi Framework, version v20r2

Generated: 18 Jul 2008

GaudiHistos< PBASE > Class Template Reference

#include <GaudiAlg/GaudiHistos.h>

Collaboration diagram for GaudiHistos< PBASE >:

Collaboration graph
[legend]
List of all members.

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 41 of file GaudiHistos.h.

Public Types

typedef GaudiAlg::HistoID HistoID
 the actual type for histogram identifier
typedef GaudiAlg::Histo1DMapNumericID Histo1DMapNumID
 the actual type for (Numeric ID)->(1D histogram) mapping
typedef GaudiAlg::Histo1DMapLiteralID Histo1DMapLitID
 the actual type for (Literal ID)->(1D histogram) mapping
typedef GaudiAlg::Histo1DMapTitle Histo1DMapTitle
 the actual type for title->(1D histogram) mapping
typedef GaudiAlg::Histo2DMapNumericID Histo2DMapNumID
 the actual type for (Numeric ID)->(2D histogram) mapping
typedef GaudiAlg::Histo2DMapLiteralID Histo2DMapLitID
 the actual type for (Literal ID)->(2D histogram) mapping
typedef GaudiAlg::Histo2DMapTitle Histo2DMapTitle
 the actual type for title->(2D histogram) mapping
typedef GaudiAlg::Histo3DMapNumericID Histo3DMapNumID
 the actual type for (Numeric ID)->(3D histogram) mapping
typedef GaudiAlg::Histo3DMapLiteralID Histo3DMapLitID
 the actual type for (Literal ID)->(3D histogram) mapping
typedef GaudiAlg::Histo3DMapTitle Histo3DMapTitle
 the actual type for title->(3D histogram) mapping
typedef GaudiAlg::Profile1DMapNumericID Profile1DMapNumID
 the actual type for (Numeric ID)->(1D profile histogram) mapping
typedef GaudiAlg::Profile1DMapLiteralID Profile1DMapLitID
 the actual type for (Literal ID)->(1D profile histogram) mapping
typedef GaudiAlg::Profile1DMapTitle Profile1DMapTitle
 the actual type for title->(1D profile histogram) mapping
typedef GaudiAlg::Profile2DMapNumericID Profile2DMapNumID
 the actual type for (Numeric ID)->(2D profile histogram) mapping
typedef GaudiAlg::Profile2DMapLiteralID Profile2DMapLitID
 the actual type for (Literal ID)->(2D profile histogram) mapping
typedef GaudiAlg::Profile2DMapTitle Profile2DMapTitle
 the actual type for title->(2D profile histogram) mapping

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 * 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 * plot (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)
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::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::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::IProfile1D * profile1D (const double valueX, const double valueY, const std::string &title, const double lowX, const double highX, const unsigned long binsX=100, 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 double weight=1.0) const
 fill the 1D 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::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::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::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::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::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::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::IProfile1D * bookProfile1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) 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
 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::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")
const 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 Histo1DMapNumIDhisto1DMapNumID () const
 get access to the map of 1D histograms index via a numeric ID
const Histo1DMapLitIDhisto1DMapLitID () const
 get access to the map of all 1D histograms index via a literal (string) ID
const Histo2DMapTitlehisto2DMapTitle () const
 get access to the map of all 2D histograms indexed via their title
const Histo2DMapNumIDhisto2DMapNumID () const
 get access to the map of 2D histograms index via a numeric ID
const Histo2DMapLitIDhisto2DMapLitID () const
 get access to the map of all 2D histograms index via a literal (string) ID
const Histo3DMapTitlehisto3DMapTitle () const
 get access to the map of all 3D histograms indexed via their title
const Histo3DMapNumIDhisto3DMapNumID () const
 get access to the map of 3D histograms index via a numeric ID
const Histo3DMapLitIDhisto3DMapLitID () const
 get access to the map of all 3D histograms index via a literal (string) ID
const Profile1DMapTitleprofile1DMapTitle () const
 get access to the map of all 1D profile histograms indexed via their title
const Profile1DMapNumIDprofile1DMapNumID () const
 get access to the map of 1D profile histograms index via a numeric ID
const Profile1DMapLitIDprofile1DMapLitID () const
 get access to the map of 1D profile histograms index via a literal ID
const Profile2DMapTitleprofile2DMapTitle () const
 get access to the map of all 2D profile histograms indexed via their title
const Profile2DMapNumIDprofile2DMapNumID () const
 get access to the map of 2D profile histograms index via a numeric ID
const Profile2DMapLitIDprofile2DMapLitID () const
 get access to the map of 2D profile histograms index via a literal 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'.

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
Histo1DMapNumID m_histo1DMapNumID
 the actual storage/access of 1D histograms by unique numeric ID
Histo1DMapLitID m_histo1DMapLitID
 the actual storage/access of 1D histograms by unique literal ID
Histo2DMapTitle m_histo2DMapTitle
 the actual storage/access of 2D histograms by unique title
Histo2DMapNumID m_histo2DMapNumID
 the actual storage/access of 2D histograms by unique numeric ID
Histo2DMapLitID m_histo2DMapLitID
 the actual storage/access of 2D histograms by unique literal ID
Histo3DMapTitle m_histo3DMapTitle
 the actual storage/access of 3D histograms by unique title
Histo3DMapNumID m_histo3DMapNumID
 the actual storage/access of 3D histograms by unique numeric ID
Histo3DMapLitID m_histo3DMapLitID
 the actual storage/access of 3D histograms by unique literal ID
Profile1DMapTitle m_profile1DMapTitle
 the actual storage/access of 1D profile histograms by unique title
Profile1DMapNumID m_profile1DMapNumID
 the actual storage/access of 1D profile histograms by unique numeric ID
Profile1DMapLitID m_profile1DMapLitID
 the actual storage/access of 1D profile histograms by unique literal ID
Profile2DMapTitle m_profile2DMapTitle
 the actual storage/access of 2D profile histograms by unique title
Profile2DMapNumID m_profile2DMapNumID
 the actual storage/access of 2D profile histograms by unique numeric ID
Profile2DMapLitID m_profile2DMapLitID
 the actual storage/access of 2D profile histograms by unique literal 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::stringm_idReplaceInfo
 Map of strings to search and replace when using the title as the basis of automatically generated literal IDs.


Member Typedef Documentation

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

the actual type for histogram identifier

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

Definition at line 46 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo1DMapNumericID GaudiHistos< PBASE >::Histo1DMapNumID

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

Definition at line 49 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo1DMapLiteralID GaudiHistos< PBASE >::Histo1DMapLitID

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

Definition at line 51 of file GaudiHistos.h.

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

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

Definition at line 53 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo2DMapNumericID GaudiHistos< PBASE >::Histo2DMapNumID

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

Definition at line 56 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo2DMapLiteralID GaudiHistos< PBASE >::Histo2DMapLitID

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

Definition at line 58 of file GaudiHistos.h.

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

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

Definition at line 60 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo3DMapNumericID GaudiHistos< PBASE >::Histo3DMapNumID

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

Definition at line 63 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Histo3DMapLiteralID GaudiHistos< PBASE >::Histo3DMapLitID

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

Definition at line 65 of file GaudiHistos.h.

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

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

Definition at line 67 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile1DMapNumericID GaudiHistos< PBASE >::Profile1DMapNumID

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

Definition at line 70 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile1DMapLiteralID GaudiHistos< PBASE >::Profile1DMapLitID

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

Definition at line 72 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 74 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile2DMapNumericID GaudiHistos< PBASE >::Profile2DMapNumID

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

Definition at line 77 of file GaudiHistos.h.

template<class PBASE>
typedef GaudiAlg::Profile2DMapLiteralID GaudiHistos< PBASE >::Profile2DMapLitID

the actual type for (Literal 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>
GaudiHistos< PBASE >::~GaudiHistos (  )  [virtual]

Destructor.

Definition at line 55 of file GaudiHistos.icpp.

00055 {}


Member Function Documentation

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

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

Reimplemented in HistoTool.

Definition at line 1161 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

Referenced by GaudiHistos< GaudiTool >::plot(), and GaudiPython::HistoDecorator::plot1D().

01167 {
01168   AIDA::IHistogram1D * h(0);
01169   if ( produceHistos() )
01170   {
01171     // retrieve or book the histogram
01172     h = histo1D ( title ) ;
01173     if ( 0 == h )     { h = book1D  ( title , low , high , bins ) ; }
01174     // fill the histogram
01175     h = fill ( h , value , weight , title );
01176   }
01177   return h;
01178 }

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 151 of file GaudiHistos.h.

Referenced by GaudiPython::HistoDecorator::plot1D().

00157   {
00158     return plot1D ( value, title, low, high, bins, weight );
00159   }

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

fill the 1D histogram (book on demand)

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

     const double mass = ... ;
     plot ( 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
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 1476 of file GaudiHistos.icpp.

01479 {
01480   return plot1D
01481     ( value  ,
01482       hdef.title() , hdef.lowEdge() , hdef.highEdge() , hdef.bins() ,
01483       weight ) ;
01484 }

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

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

Reimplemented in HistoTool.

Definition at line 1185 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01192 {
01193   AIDA::IHistogram1D* h(0);
01194   if ( produceHistos() )
01195   {
01196     // retrieve or book the histogram
01197     h = histo1D ( ID ) ;
01198     if ( 0 == h ) {  h = book1D ( ID , title , low , high , bins ) ; }
01199     // fill
01200     h = fill ( h , value , weight , title ) ;
01201   }
01202   return h;
01203 }

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 282 of file GaudiHistos.h.

00289   {
00290     return plot1D ( value, ID, title, low, high, bins, weight );
00291   }

template<class PBASE>
AIDA::IHistogram1D * GaudiHistos< PBASE >::plot ( 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)

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

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

     const double mass = ... ;
     plot ( 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
Returns:
pointer to AIDA 1D histogram

Definition at line 1491 of file GaudiHistos.icpp.

01495 {
01496   return plot1D
01497     ( value  , ID ,
01498       hdef.title() , hdef.lowEdge() , hdef.highEdge() , hdef.bins() ,
01499       weight ) ;
01500 }

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 388 of file GaudiHistos.h.

00395   {
00396     AIDA::IHistogram1D* h(0);
00397     if ( produceHistos() )
00398     {
00399       // retrieve or book the histogram
00400       h = histo1D ( title ) ;
00401       if ( 0 == h )     { h = book1D  ( title , low , high , bins ); }
00402       // fill histogram
00403       while( first != last && 0 != h  )
00404       { h = fill ( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00405     }
00406     return h ;
00407   }

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 466 of file GaudiHistos.h.

00474   {
00475     AIDA::IHistogram1D* h(0);
00476     if ( produceHistos() )
00477     {
00478       // retrieve or book the histogram
00479       h = histo1D ( ID ) ;
00480       if ( 0 == h )     { h = book1D  ( ID , title , low , high , bins ); }
00481       // fill histogram
00482       while( first != last && 0 != h )
00483       { h = fill( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00484     }
00485     return h;
00486   }

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 558 of file GaudiHistos.h.

00566   {
00567     AIDA::IHistogram1D* h(0);
00568     if ( produceHistos() )
00569     {
00570       // retrieve or book the histogram
00571       h = histo1D ( title ) ;
00572       if ( 0 == h ) { h = book1D  ( title , low , high , bins ); }
00573       // fill histogram
00574       while ( first != last && 0 != h )
00575       { h = fill ( h                 ,
00576                    func   ( *first ) ,
00577                    weight ( *first ) , title  ) ; ++first ; }
00578     }
00579     return h;
00580   }

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 650 of file GaudiHistos.h.

00659   {
00660     AIDA::IHistogram1D* h(0);
00661     if ( produceHistos() )
00662     {
00663       // retrieve or book the histogram
00664       h = histo1D ( ID ) ;
00665       if ( 0 == h ) { h = book1D  ( ID , title , low , high , bins ); }
00666       // fill histogram
00667       while( first != last && 0 != h )
00668       { h  = fill ( h                 ,
00669                     func   ( *first ) ,
00670                     weight ( *first ) , title  ) ; ++first ; }
00671     }
00672     return h ;
00673   }

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

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

Reimplemented in HistoTool.

Definition at line 1209 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

Referenced by GaudiPython::HistoDecorator::plot2D().

01219 {
01220   AIDA::IHistogram2D * h(0);
01221   if ( produceHistos() )
01222   {
01223     // retrieve or book the histogram
01224     h = histo2D ( title ) ;
01225     if ( 0 == h )
01226     { h = book2D ( title , lowX , highX , binsX , lowY , highY , binsY ) ; }
01227     // fill the histogram
01228     h = fill ( h , valueX , valueY , weight , title ) ;
01229   }
01230   return h;
01231 }

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

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

Reimplemented in HistoTool.

Definition at line 1237 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01248 {
01249   AIDA::IHistogram2D * h(0);
01250   // produce histograms ?
01251   if ( produceHistos() )
01252   {
01253     // retrieve or book the histogram
01254     h = histo2D ( ID ) ;
01255     if ( 0 == h ) { h = book2D ( ID   , title ,
01256                                  lowX , highX , binsX ,
01257                                  lowY , highY , binsY ) ; }
01258     // fill the histogram
01259     h = fill ( h , valueX , valueY , weight , title ) ;
01260   }
01261   return h;
01262 }

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

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

Reimplemented in HistoTool.

Definition at line 1268 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01282 {
01283   AIDA::IHistogram3D * h(0);
01284   if ( produceHistos() )
01285   {
01286     // retrieve or book the histogram
01287     h = histo3D ( title ) ;
01288     if ( 0 == h ) { h = book3D ( title ,
01289                                  lowX , highX , binsX ,
01290                                  lowY , highY , binsY ,
01291                                  lowZ , highZ , binsZ ) ; }
01292     // fill the histogram
01293     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
01294   }
01295   return h;
01296 }

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

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

Reimplemented in HistoTool.

Definition at line 1302 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01317 {
01318   AIDA::IHistogram3D * h(0);
01319   if ( produceHistos() )
01320   {
01321     // retrieve or book the histogram
01322     h = histo3D ( ID ) ;
01323     if ( 0 == h ) { h = book3D ( ID , title ,
01324                                  lowX , highX , binsX ,
01325                                  lowY , highY , binsY ,
01326                                  lowZ , highZ , binsZ ) ; }
01327     // fill the histogram
01328     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
01329   }
01330   return h;
01331 }

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 double  weight = 1.0 
) const

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
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 1337 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

Referenced by GaudiHistos< GaudiTool >::histoExists(), and GaudiPython::HistoDecorator::profile1D().

01344 {
01345   AIDA::IProfile1D * h(0);
01346   if ( produceHistos() )
01347   {
01348     // retrieve or book the histogram
01349     h = profile1D ( title ) ;
01350     if ( 0 == h ) { h = bookProfile1D ( title , lowX , highX , binsX ) ; }
01351     // fill the histogram
01352     h = fill ( h , valueX , valueY , weight , title ) ;
01353   }
01354   return h;
01355 }

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 double  weight = 1.0 
) const

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
weight weight
Returns:
pointer to AIDA 1D profile histogram

Definition at line 1361 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01369 {
01370   AIDA::IProfile1D * h(0);
01371   if ( produceHistos() )
01372   {
01373     // retrieve or book the histogram
01374     h = profile1D ( ID ) ;
01375     if ( 0 == h ) { h = bookProfile1D ( ID , title , lowX , highX , binsX ) ; }
01376     // fill the histogram
01377     h = fill ( h , valueX , valueY , weight , title ) ;
01378   }
01379   return h;
01380 }

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

fill the 2D profile histogram (book on demand)

     const double X = ... ;
     const double Y = ... ;
     const double Z = ... ;
     profile2D( 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 1386 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

Referenced by GaudiHistos< GaudiTool >::histoExists(), and GaudiPython::HistoDecorator::profile2D().

01397 {
01398   AIDA::IProfile2D * h(0);
01399   if ( produceHistos() )
01400   {
01401     // retrieve or book the histogram
01402     h = profile2D ( title ) ;
01403     if ( 0 == h ) { h = bookProfile2D ( title ,
01404                                         lowX , highX , binsX ,
01405                                         lowY , highY , binsY ) ; }
01406     // fill the histogram
01407     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
01408   }
01409   return h;
01410 }

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

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 1416 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill().

01428 {
01429   AIDA::IProfile2D * h(0);
01430   if ( produceHistos() )
01431   {
01432     // retrieve or book the histogram
01433     h = profile2D ( ID ) ;
01434     if ( 0 == h ) { h = bookProfile2D ( ID , title ,
01435                                         lowX , highX , binsX ,
01436                                         lowY , highY , binsY ) ; }
01437     // fill the histogram
01438     h = fill ( h , valueX , valueY , valueZ , weight , title ) ;
01439   }
01440   return h;
01441 }

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

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

Reimplemented in HistoTool.

Definition at line 465 of file GaudiHistos.icpp.

Referenced by GaudiHistos< GaudiTool >::book(), and GaudiHistos< GaudiTool >::plot().

00469 {
00470   // exist?
00471   AIDA::IHistogram1D* hist = histo1D ( title ) ;
00472   // histogram is already booked
00473   if( 0 != hist      )                           { return hist ; } // RETURN !!
00474 
00475   // propose the histogram ID
00476   HistoID ID;
00477   newHistoID( title, ID );
00478 
00479   // Create a new histogram and return
00480   return this -> book1D ( ID, title, low, high, bins );
00481 }

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 1313 of file GaudiHistos.h.

01317   {
01318     return book1D( title, low, high, bins );
01319   }

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

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 1448 of file GaudiHistos.icpp.

01449 {
01450   return book1D ( hdef.title    () ,
01451                   hdef.lowEdge  () ,
01452                   hdef.highEdge () ,
01453                   hdef.bins     () ) ;
01454 }

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

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

Reimplemented in HistoTool.

Definition at line 592 of file GaudiHistos.icpp.

00599 {
00600   // exist?
00601   AIDA::IHistogram2D* hist = histo2D ( title ) ;
00602   // histogram is already booked
00603   if( 0 != hist      )                                { return hist ; } // RETURN !!
00604 
00605   // propose the histogram ID
00606   HistoID ID;
00607   newHistoID( title, ID );
00608 
00609   // Create a new histogram and return
00610   return this -> book2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY );
00611 }

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

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

Reimplemented in HistoTool.

Definition at line 733 of file GaudiHistos.icpp.

00743 {
00744   // exist?
00745   AIDA::IHistogram3D* hist = histo3D ( title ) ;
00746   // histogram is already booked
00747   if( 0 != hist      )                           { return hist ; } // RETURN !!
00748 
00749   // propose the histogram ID
00750   HistoID ID;
00751   newHistoID( title, ID );
00752 
00753   // Create a new histogram and return
00754   return this -> book3D ( ID, title,
00755                           lowX, highX, binsX,
00756                           lowY, highY, binsY,
00757                           lowZ, highZ, binsZ );
00758 }

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

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

Reimplemented in HistoTool.

Definition at line 487 of file GaudiHistos.icpp.

References Gaudi::Histos::book(), MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), endreq(), Gaudi::Utils::Histos::htitle(), and Gaudi::Utils::Histos::toBase().

00492 {
00493   // Check ID
00494   if (ID.undefined())
00495   { 
00496     this->Error("Undefined Histogram ID : Title='"+title+"'"); 
00497     return NULL; 
00498   }
00499 
00500   // exist?
00501   AIDA::IHistogram1D* hist = histo1D ( ID ) ;
00502   // histogram is already booked
00503   if ( 0 != hist       )                         { return hist ; } // RETURN !!
00504 
00505   // Histogram title
00506   const std::string & htitle =
00507     ( title.empty() ? "Unnamed 1D Histogram ID="+ID.idAsString() : title ) ;
00508 
00509   // book the histogram
00510   if ( ID.numeric() )
00511   {
00512     hist = this->histoSvc() -> book ( histoPath()  ,
00513                                       ID.numericID() ,
00514                                       htitle       ,
00515                                       bins         ,
00516                                       low          ,
00517                                       high         ) ;
00518   }
00519   else if ( ID.literal() )
00520   {
00521     hist = this->histoSvc() -> book ( histoPath()+"/"+
00522                                       ID.literalID() ,
00523                                       htitle         ,
00524                                       bins           ,
00525                                       low            ,
00526                                       high         ) ;
00527   }
00528 
00529   // check OK
00530   if( 0 == hist )
00531   { this->Error( "IHistogram1D* points to NULL! ID='" + ID.idAsString() +
00532                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00533 
00534   // add histogram into histogram storages
00535   if      ( ID.numeric() )
00536   { m_histo1DMapNumID [ ID.numericID() ] = hist ; }
00537   else if ( ID.literal() )
00538   { m_histo1DMapLitID [ ID.literalID() ] = hist ; }
00539   m_histo1DMapTitle [ title ] = hist ;
00540 
00541   // Declare to monitoring service
00542   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00543 
00544   // Printout and return
00545   if ( this->msgLevel(MSG::DEBUG) )
00546   { this->debug() << "Booked 1D Histogram : ID='" << ID
00547                   << "' Path=" << histoPath()
00548                   << " Title='"
00549                   << Gaudi::Utils::Histos::htitle ( hist )
00550                   << "'" << endreq; }
00551   return hist ;
00552 }

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 1415 of file GaudiHistos.h.

01420   {
01421     return book1D( ID, title, low, high, bins );
01422   }

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 1461 of file GaudiHistos.icpp.

01463 {
01464   return book1D ( ID               ,
01465                   hdef.title    () ,
01466                   hdef.lowEdge  () ,
01467                   hdef.highEdge () ,
01468                   hdef.bins     () ) ;
01469 }

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

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

Reimplemented in HistoTool.

Definition at line 617 of file GaudiHistos.icpp.

References Gaudi::Histos::book(), MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), endreq(), Gaudi::Utils::Histos::htitle(), and Gaudi::Utils::Histos::toBase().

00625 {
00626   // Check ID
00627   if (ID.undefined())
00628   { 
00629     this->Error("Undefined Histogram ID : Title='"+title+"'"); 
00630     return NULL;
00631   }
00632 
00633   // exist?
00634   AIDA::IHistogram2D* hist = histo2D( ID ) ;
00635   // histogram is already booked
00636   if( 0 != hist       )                         { return hist ; } // RETURN !!
00637 
00638   // Histogram title
00639   const std::string & htitle =
00640     ( title.empty() ? "Unnamed 2D Histogram ID="+ID.idAsString() : title ) ;
00641 
00642   // book the histogram
00643   if ( ID.numeric() )
00644   {
00645     hist = this->histoSvc() -> book ( histoPath()  ,
00646                                       ID.numericID() ,
00647                                       htitle       ,
00648                                       binsX        ,
00649                                       lowX         ,
00650                                       highX        ,
00651                                       binsY        ,
00652                                       lowY         ,
00653                                       highY        ) ;
00654   }
00655   else if ( ID.literal() )
00656   {
00657     hist = this->histoSvc() -> book ( histoPath()+"/"+
00658                                       ID.literalID() ,
00659                                       htitle       ,
00660                                       binsX        ,
00661                                       lowX         ,
00662                                       highX        ,
00663                                       binsY        ,
00664                                       lowY         ,
00665                                       highY        ) ;
00666   }
00667 
00668   // Check OK
00669   if( 0 == hist )
00670   { this->Error( "IHistogram2D* points to NULL! ID='" + ID.idAsString() +
00671                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00672 
00673   // add histogram into histogram storages
00674   if      ( ID.numeric() )
00675   { m_histo2DMapNumID [ ID.numericID() ] = hist ; }
00676   else if ( ID.literal() )
00677   { m_histo2DMapLitID [ ID.literalID() ] = hist ; }
00678   m_histo2DMapTitle [ title ] = hist ;
00679 
00680   // Declare to monitoring service
00681   monitorHisto( Gaudi::Utils::Histos::toBase ( hist) , ID );
00682 
00683   // Printout and return
00684   if ( this->msgLevel(MSG::DEBUG) )
00685   { this->debug() << "Booked 2D Histogram : ID='"
00686                   << ID << "' Path=" << histoPath()
00687                   << " Title='"
00688                   << Gaudi::Utils::Histos::htitle ( hist )
00689                   << "'" << endreq; }
00690   // return
00691   return hist ;
00692 }

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

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

Reimplemented in HistoTool.

Definition at line 764 of file GaudiHistos.icpp.

References Gaudi::Histos::book(), MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), endreq(), Gaudi::Utils::Histos::htitle(), and Gaudi::Utils::Histos::toBase().

00775 {
00776   // Check ID
00777   if (ID.undefined())
00778   { 
00779     this->Error("Undefined Histogram ID : Title='"+title+"'");
00780     return NULL;
00781   }
00782 
00783   // exist?
00784   AIDA::IHistogram3D* hist = histo3D( ID ) ;
00785   // histogram is already booked
00786   if( 0 != hist       )                        { return hist ; } // RETURN !!
00787 
00788   // Histogram title
00789   const std::string & htitle =
00790     ( title.empty() ? "Unnamed 3D Histogram ID="+ID.idAsString() : title ) ;
00791 
00792   // book the histogram
00793   if ( ID.numeric() )
00794   {
00795     hist = this->histoSvc() -> book ( histoPath()  ,
00796                                       ID.numericID() ,
00797                                       htitle       ,
00798                                       binsX        ,
00799                                       lowX         ,
00800                                       highX        ,
00801                                       binsY        ,
00802                                       lowY         ,
00803                                       highY        ,
00804                                       binsZ        ,
00805                                       lowZ         ,
00806                                       highZ        ) ;
00807   }
00808   else if ( ID.literal() )
00809   {
00810     hist = this->histoSvc() -> book ( histoPath()+"/"+
00811                                       ID.literalID() ,
00812                                       htitle       ,
00813                                       binsX        ,
00814                                       lowX         ,
00815                                       highX        ,
00816                                       binsY        ,
00817                                       lowY         ,
00818                                       highY        ,
00819                                       binsZ        ,
00820                                       lowZ         ,
00821                                       highZ        ) ;
00822   }
00823 
00824   // Check OK
00825   if( 0 == hist )
00826   { this->Error( "IHistogram3D* points to NULL! ID='" + ID.idAsString() +
00827                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00828 
00829   // add histogram into histogram storages
00830   if      ( ID.numeric() )
00831   { m_histo3DMapNumID [ ID.numericID() ] = hist ; }
00832   else if ( ID.literal() )
00833   { m_histo3DMapLitID [ ID.literalID() ] = hist ; }
00834   m_histo3DMapTitle [ title ] = hist ;
00835 
00836   // Declare to monitoring service
00837   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00838 
00839   // Printout and return
00840   if ( this->msgLevel(MSG::DEBUG) )
00841   { this->debug() << "Booked 3D Histogram : ID='"
00842                   << ID << "' Path=" << histoPath()
00843                   << " Title='"
00844                   << Gaudi::Utils::Histos::htitle ( hist )
00845                   << "'" << endreq; }
00846   return hist ;
00847 }

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

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
Returns:
pointer to AIDA 1D profile histogram

Definition at line 891 of file GaudiHistos.icpp.

00895 {
00896   // exist?
00897   AIDA::IProfile1D* hist = profile1D ( title ) ;
00898   // histogram is already booked
00899   if( 0 != hist      )                              { return hist ; } // RETURN !!
00900 
00901   // propose the histogram ID
00902   HistoID ID;
00903   newHistoID( title, ID );
00904 
00905   // Book the histo and return
00906   return this -> bookProfile1D ( ID, title, low, high, bins );
00907 }

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

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
Returns:
pointer to AIDA 1D profile histogram

Definition at line 913 of file GaudiHistos.icpp.

References MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), endreq(), Gaudi::Utils::Histos::htitle(), and Gaudi::Utils::Histos::toBase().

00918 {
00919   // Check ID
00920   if (ID.undefined())
00921   { 
00922     this->Error("Undefined Histogram ID : Title='"+title+"'"); 
00923     return NULL;
00924   }
00925 
00926   // exist?
00927   AIDA::IProfile1D* hist = profile1D ( ID ) ;
00928   // histogram is already booked
00929   if( 0 != hist       )                         { return hist ; } // RETURN !!
00930 
00931   // Histogram title
00932   const std::string & htitle =
00933     ( title.empty() ?
00934       "Unnamed 1D Profile Histogram ID="+ID.idAsString() : title ) ;
00935 
00936   // book the histogram
00937   if ( ID.numeric() )
00938   {
00939     hist = this->histoSvc() -> bookProf ( histoPath()  ,
00940                                           ID.numericID() ,
00941                                           htitle       ,
00942                                           bins         ,
00943                                           low          ,
00944                                           high         ) ;
00945   }
00946   else if ( ID.literal() )
00947   {
00948     hist = this->histoSvc() -> bookProf ( histoPath()+"/"+
00949                                           ID.literalID() ,
00950                                           htitle       ,
00951                                           bins         ,
00952                                           low          ,
00953                                           high         ) ;
00954   }
00955 
00956   // test ok
00957   if( 0 == hist )
00958   { this->Error( "IProfile1D* points to NULL! ID='" + ID.idAsString() +
00959                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
00960 
00961   // add histogram into histogram storages
00962   if      ( ID.numeric() )
00963   { m_profile1DMapNumID [ ID.numericID() ] = hist ; }
00964   else if ( ID.literal() )
00965   { m_profile1DMapLitID [ ID.literalID() ] = hist ; }
00966   m_profile1DMapTitle [ title ] = hist ;
00967 
00968   // Declare to monitoring service
00969   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
00970 
00971   // printout and return
00972   if ( this->msgLevel(MSG::DEBUG) )
00973   { this->debug() << "Booked 1D Profile Histogram : ID='"
00974                   << ID << "' Path=" << histoPath()
00975                   << " Title='"
00976                   << Gaudi::Utils::Histos::htitle ( hist )
00977                   << "'" << endreq; }
00978   return hist ;
00979 }

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

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 1018 of file GaudiHistos.icpp.

01025 {
01026   // exist?
01027   AIDA::IProfile2D* hist = profile2D ( title ) ;
01028   // histogram is already booked
01029   if( 0 != hist      )                          { return hist ; } // RETURN !!
01030 
01031   // propose the histogram ID
01032   HistoID ID;
01033   newHistoID( title, ID );
01034 
01035   // book histogram and return
01036   return this -> bookProfile2D ( ID, title, lowX, highX, binsX, lowY, highY, binsY );
01037 }

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

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)
low low limit for histogram
high high limit for histogram
bins number of bins
Returns:
pointer to AIDA histogram

Definition at line 1043 of file GaudiHistos.icpp.

References MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), endreq(), Gaudi::Utils::Histos::htitle(), and Gaudi::Utils::Histos::toBase().

01051 {
01052   // Check ID
01053   if (ID.undefined())
01054   { 
01055     this->Error("Undefined Histogram ID : Title='"+title+"'"); 
01056     return NULL;
01057   }
01058 
01059   // exist?
01060   AIDA::IProfile2D* hist = profile2D ( ID ) ;
01061   // histogram is already booked
01062   if( 0 != hist )                               { return hist ; } // RETURN !!
01063 
01064   // Histogram title
01065   const std::string & htitle =
01066     ( title.empty() ?
01067       "Unnamed 2D Profile Histogram ID="+ID.idAsString() : title ) ;
01068 
01069   // book the histogram
01070   if ( ID.numeric() )
01071   {
01072     hist = this->histoSvc() -> bookProf ( histoPath() ,
01073                                           ID.numericID() ,
01074                                           htitle      ,
01075                                           binsX       ,
01076                                           lowX        ,
01077                                           highX       ,
01078                                           binsY       ,
01079                                           lowY        ,
01080                                           highY        ) ;
01081   }
01082   else if ( ID.literal() )
01083   {
01084     hist = this->histoSvc() -> bookProf ( histoPath()+"/"+
01085                                           ID.literalID() ,
01086                                           htitle      ,
01087                                           binsX       ,
01088                                           lowX        ,
01089                                           highX       ,
01090                                           binsY       ,
01091                                           lowY        ,
01092                                           highY        ) ;
01093   }
01094 
01095   // test OK
01096   if( 0 == hist )
01097   { this->Error( "IProfile2D* points to NULL! ID='" + ID.idAsString() +
01098                  "' title='"+htitle+"'" ) ; return 0; } // RETURN !!
01099 
01100   // add histogram into histogram storages
01101   if      ( ID.numeric() )
01102   { m_profile2DMapNumID [ ID.numericID() ] = hist ; }
01103   else if ( ID.literal() )
01104   { m_profile2DMapLitID [ ID.literalID() ] = hist ; }
01105   m_profile2DMapTitle [ title ] = hist ;
01106 
01107   // Declare to monitoring service
01108   monitorHisto( Gaudi::Utils::Histos::toBase ( hist ) , ID );
01109 
01110   // printout and return
01111   if ( this->msgLevel(MSG::DEBUG) )
01112   {  this->debug() << "Booked 2D Profile Histogram : ID='" << ID
01113                    << "' Path=" << histoPath()
01114                    << " Title='"
01115                    << Gaudi::Utils::Histos::htitle ( hist )
01116                    << "'" << endreq; }
01117   return hist ;
01118 }

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

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

Reimplemented in HistoTool.

Definition at line 558 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill(), Gaudi::Utils::Histos::htitle(), lfin(), and lnan().

Referenced by GaudiHistos< GaudiTool >::plot().

00562 {
00563   if ( 0 != histo && produceHistos() )
00564   {
00565     if ( !checkForNaN() )
00566     { Gaudi::Utils::Histos::fill ( histo , value , weight ) ; }
00567     else if  ( lfin ( value ) && lfin ( weight ) )
00568     { Gaudi::Utils::Histos::fill ( histo , value , weight ) ; }
00569     else if  ( lnan ( value ) || lnan ( weight ) )
00570     {
00571       this -> Warning
00572         ("fill():: 'NaN'      value is skipped from the histogram '"
00573          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00574     }
00575     else
00576     {
00577       this -> Warning
00578         ("fill():: 'Infinite' value is skipped from the histogram '"
00579          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00580     }
00581   }
00582   // return
00583   return histo ;
00584 }

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

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

Reimplemented in HistoTool.

Definition at line 698 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill(), Gaudi::Utils::Histos::htitle(), lfin(), and lnan().

00703 {
00704   if ( 0 != histo && produceHistos() )
00705   {
00706     if ( !checkForNaN() )
00707     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ) ; }
00708     else if  ( lfin ( valueX ) && lfin ( valueY ) && lfin ( weight ) )
00709     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ) ; }
00710     else if  ( lnan ( valueX ) || lnan ( valueY ) || lnan ( weight ) )
00711     {
00712       this -> Warning
00713         ("fill():: 'NaN'      value is skipped from the histogram '"
00714          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00715     }
00716     else
00717     {
00718       this -> Warning
00719         ("fill():: 'Infinite' value is skipped from the histogram '"
00720          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
00721     }
00722   }
00723   // return
00724   return histo ;
00725 }

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

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

Reimplemented in HistoTool.

Definition at line 853 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill(), Gaudi::Utils::Histos::htitle(), lfin(), and lnan().

00859 {
00860   if ( 0 != histo && produceHistos() )
00861   {
00862     if ( !checkForNaN() )
00863     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ) ; }
00864     else if  ( lfin ( valueX ) && lfin ( valueY ) &&
00865                lfin ( valueZ ) && lfin ( weight ) )
00866     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ) ; }
00867     else if  ( lnan ( valueX ) || lnan ( valueY ) ||
00868                lnan ( valueZ ) || lnan ( weight ) )
00869     {
00870       this -> Warning
00871         ("fill():: 'NaN'      value is skipped from the histogram '"
00872          + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00873     }
00874     else
00875     {
00876       this -> Warning
00877         ("fill():: 'Infinite' value is skipped from the histogram '"
00878          + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
00879     }
00880   }
00881   // return
00882   return histo ;
00883 }

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

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 985 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill(), Gaudi::Utils::Histos::htitle(), lfin(), and lnan().

00990 {
00991   if ( 0 != histo && produceHistos() )
00992   {
00993     if ( !checkForNaN() )
00994     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ); }
00995     else if  ( lfin ( valueX ) && lfin ( valueY ) && lfin ( weight ) )
00996     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , weight ); }
00997     else if  ( lnan ( valueX ) || lnan ( valueY ) || lnan ( weight ) )
00998     {
00999       this -> Warning
01000         ("fill():: 'NaN'      value is skipped from the histogram '"
01001          + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
01002     }
01003     else
01004     {
01005       this -> Warning
01006         ("fill():: 'Infinite' value is skipped from the histogram '"
01007          + Gaudi::Utils::Histos::htitle ( histo , title  ) + "'" ) ;
01008     }
01009   }
01010   // return
01011   return histo ;
01012 }

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

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 1124 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::fill(), Gaudi::Utils::Histos::htitle(), lfin(), and lnan().

01130 {
01131   if ( 0 != histo && produceHistos() )
01132   {
01133     if ( !checkForNaN() )
01134     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ); }
01135     else if  ( lfin ( valueX ) && lfin ( valueY ) &&
01136                lfin ( valueZ ) && lfin ( weight ) )
01137     { Gaudi::Utils::Histos::fill ( histo , valueX , valueY , valueZ , weight ); }
01138     else if  ( lnan ( valueX ) || lnan ( valueY ) ||
01139                lnan ( valueZ ) || lnan ( weight ) )
01140     {
01141       this -> Warning
01142         ("fill():: 'NaN'      value is skipped from the histogram '"
01143          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
01144     }
01145     else
01146     {
01147       this -> Warning
01148         ("fill():: 'Infinite' value is skipped from the histogram '"
01149          + Gaudi::Utils::Histos::htitle ( histo , title ) + "'" ) ;
01150     }
01151   }
01152   // return
01153   return histo ;
01154 }

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

Reimplemented in HistoTool.

Definition at line 1646 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histo(), and GaudiHistos< GaudiTool >::plot().

01647   {
01648     Histo1DMapTitle::const_iterator found = histo1DMapTitle().find( title ) ;
01649     return ( histo1DMapTitle().end() == found ? 0 : found->second );
01650   }

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 1659 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoExists().

01660   {
01661     return histo1D( title );
01662   }

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

Reimplemented in HistoTool.

Definition at line 1667 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoExists().

01668   {
01669     Histo2DMapTitle::const_iterator found = histo2DMapTitle().find( title ) ;
01670     return ( histo2DMapTitle().end() == found ? 0 : found->second );
01671   }

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

Reimplemented in HistoTool.

Definition at line 1676 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoExists().

01677   {
01678     Histo3DMapTitle::const_iterator found = histo3DMapTitle().find( title ) ;
01679     return ( histo3DMapTitle().end() == found ? 0 : found->second );
01680   }

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 1685 of file GaudiHistos.h.

01686   {
01687     Profile1DMapTitle::const_iterator found = profile1DMapTitle().find( title ) ;
01688     return ( profile1DMapTitle().end() == found ? 0 : found->second );
01689   }

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 1694 of file GaudiHistos.h.

01695   {
01696     Profile2DMapTitle::const_iterator found = profile2DMapTitle().find( title ) ;
01697     return ( profile2DMapTitle().end() == found ? 0 : found->second );
01698   }

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

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

Reimplemented in HistoTool.

Definition at line 1505 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::end(), GaudiUtils::Map< K, T, M >::find(), GaudiHistos< PBASE >::histo1DMapLitID(), and GaudiHistos< PBASE >::histo1DMapNumID().

01506 {
01507   AIDA::IHistogram1D * h(0);
01508   if ( ID.numeric() )
01509   {
01510     Histo1DMapNumID::const_iterator found =
01511       histo1DMapNumID().find( ID.numericID() ) ;
01512     h = ( histo1DMapNumID().end() == found ? 0 : found->second );
01513   }
01514   else
01515   {
01516     Histo1DMapLitID::const_iterator found =
01517       histo1DMapLitID().find( ID.literalID() ) ;
01518     h = ( histo1DMapLitID().end() == found ? 0 : found->second );
01519   }
01520   return h;
01521 }

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 1714 of file GaudiHistos.h.

01715   {
01716     return histo1D( ID );
01717   }

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

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

Reimplemented in HistoTool.

Definition at line 1526 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::end(), GaudiUtils::Map< K, T, M >::find(), GaudiHistos< PBASE >::histo2DMapLitID(), and GaudiHistos< PBASE >::histo2DMapNumID().

01527 {
01528   AIDA::IHistogram2D * h(0);
01529   if ( ID.numeric() )
01530   {
01531     Histo2DMapNumID::const_iterator found =
01532       histo2DMapNumID().find( ID.numericID() ) ;
01533     h = ( histo2DMapNumID().end() == found ? 0 : found->second );
01534   }
01535   else
01536   {
01537     Histo2DMapLitID::const_iterator found =
01538       histo2DMapLitID().find( ID.literalID() ) ;
01539     h = ( histo2DMapLitID().end() == found ? 0 : found->second );
01540   }
01541   return h;
01542 }

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

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

Reimplemented in HistoTool.

Definition at line 1547 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::end(), GaudiUtils::Map< K, T, M >::find(), GaudiHistos< PBASE >::histo3DMapLitID(), and GaudiHistos< PBASE >::histo3DMapNumID().

01548 {
01549   AIDA::IHistogram3D * h(0);
01550   if ( ID.numeric() )
01551   {
01552     Histo3DMapNumID::const_iterator found =
01553       histo3DMapNumID().find( ID.numericID() ) ;
01554     h = ( histo3DMapNumID().end() == found ? 0 : found->second );
01555   }
01556   else
01557   {
01558     Histo3DMapLitID::const_iterator found =
01559       histo3DMapLitID().find( ID.literalID() ) ;
01560     h = ( histo3DMapLitID().end() == found ? 0 : found->second );
01561   }
01562   return h;
01563 }

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

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

Definition at line 1568 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::end(), GaudiUtils::Map< K, T, M >::find(), GaudiHistos< PBASE >::profile1DMapLitID(), and GaudiHistos< PBASE >::profile1DMapNumID().

01569 {
01570   AIDA::IProfile1D * h(0);
01571   if ( ID.numeric() )
01572   {
01573     Profile1DMapNumID::const_iterator found =
01574       profile1DMapNumID().find( ID.numericID() ) ;
01575     h = ( profile1DMapNumID().end() == found ? 0 : found->second );
01576   }
01577   else
01578   {
01579     Profile1DMapLitID::const_iterator found =
01580       profile1DMapLitID().find( ID.literalID() ) ;
01581     h = ( profile1DMapLitID().end() == found ? 0 : found->second );
01582   }
01583   return h;
01584 }

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

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

Definition at line 1589 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::end(), GaudiUtils::Map< K, T, M >::find(), GaudiHistos< PBASE >::profile2DMapLitID(), and GaudiHistos< PBASE >::profile2DMapNumID().

01590 {
01591   AIDA::IProfile2D * h(0);
01592   if ( ID.numeric() )
01593   {
01594     Profile2DMapNumID::const_iterator found =
01595       profile2DMapNumID().find( ID.numericID() ) ;
01596     h = ( profile2DMapNumID().end() == found ? 0 : found->second );
01597   }
01598   else
01599   {
01600     Profile2DMapLitID::const_iterator found =
01601       profile2DMapLitID().find( ID.literalID() ) ;
01602     h = ( profile2DMapLitID().end() == found ? 0 : found->second );
01603   }
01604   return h;
01605 }

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

check the existence AND validity of the histogram with given title

Reimplemented in HistoTool.

Definition at line 1742 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::newHistoID().

01743   {
01744     return
01745       ( 0 != histo     ( title ) ||
01746         0 != histo2D   ( title ) ||
01747         0 != histo3D   ( title ) ||
01748         0 != profile1D ( title ) ||
01749         0 != profile2D ( title ) );
01750   }

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

check the existence AND validity of the histogram with given title

Reimplemented in HistoTool.

Definition at line 1753 of file GaudiHistos.h.

01754   {
01755     return
01756       ( 0 != histo     ( ID ) ||
01757         0 != histo2D   ( ID ) ||
01758         0 != histo3D   ( ID ) ||
01759         0 != profile1D ( ID ) ||
01760         0 != profile2D ( ID ) );
01761   }

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

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

Definition at line 1610 of file GaudiHistos.icpp.

References GaudiHistos< PBASE >::histo1DMapLitID(), GaudiHistos< PBASE >::histo1DMapNumID(), GaudiHistos< PBASE >::histo2DMapLitID(), GaudiHistos< PBASE >::histo2DMapNumID(), GaudiHistos< PBASE >::histo3DMapLitID(), GaudiHistos< PBASE >::histo3DMapNumID(), GaudiHistos< PBASE >::profile1DMapLitID(), GaudiHistos< PBASE >::profile1DMapNumID(), GaudiHistos< PBASE >::profile2DMapLitID(), GaudiHistos< PBASE >::profile2DMapNumID(), and GaudiUtils::Map< K, T, M >::size().

Referenced by GaudiHistos< PBASE >::newHistoID().

01611 {
01612   const unsigned int n1D  = histo1DMapNumID().size()+histo1DMapLitID().size();
01613   const unsigned int n2D  = histo2DMapNumID().size()+histo2DMapLitID().size();
01614   const unsigned int n3D  = histo3DMapNumID().size()+histo3DMapLitID().size();
01615   const unsigned int n1DP = profile1DMapNumID().size()+profile1DMapLitID().size();
01616   const unsigned int n2DP = profile2DMapNumID().size()+profile2DMapLitID().size();
01617   return n1D+n2D+n3D+n1DP+n2DP;
01618 }

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

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

Definition at line 1768 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::initialize(), and GaudiHistos< GaudiTool >::plot().

01768 { return m_produceHistos ; }

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

get flag to control output level of histograms

Definition at line 1770 of file GaudiHistos.h.

01770 { return m_fullDetail    ; }

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

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

Definition at line 1772 of file GaudiHistos.h.

01772 { return m_checkForNaN   ; }

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

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

Definition at line 1774 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoPath().

01774 { return m_splitHistoDir ; }

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

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

Definition at line 1776 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::newHistoID().

01776 { return m_histoOffSet ; }

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

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

Definition at line 1778 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoPath().

01778 { return m_histoTopDir   ; }

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

get histogram directory (property "HistoDir")

Definition at line 1780 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoPath().

01780 { return m_histoDir      ; }

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

get the constructed histogram path

Definition at line 1782 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initialize(), and GaudiHistos< PBASE >::printHistos().

01783   {
01784     const std::string path = histoTopDir() + histoDir();
01785     return ( splitHistoDir() ? dirHbookName(path) : path );
01786   }

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

print histograms at finalization ?

Definition at line 1788 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize().

01788 { return m_histosPrint ; }

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

Use old style sequencial numerical automatically assigned IDs ?

Definition at line 1790 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initialize(), and GaudiHistos< PBASE >::newHistoID().

01790 { return m_useNumericAutoIDs; }

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

perform the actual printout of histograms

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

Definition at line 221 of file GaudiHistos.icpp.

References MSG::DEBUG, std::basic_string< _CharT, _Traits, _Alloc >::empty(), std::set< _Key, _Compare, _Alloc >::end(), GaudiUtils::Map< K, T, M >::end(), std::endl(), endreq(), std::set< _Key, _Compare, _Alloc >::find(), Gaudi::Utils::Histos::format(), Gaudi::Utils::Histos::Table::header(), GaudiHistos< PBASE >::histo1DMapLitID(), GaudiHistos< PBASE >::histo1DMapNumID(), GaudiHistos< PBASE >::histo2DMapLitID(), GaudiHistos< PBASE >::histo2DMapNumID(), GaudiHistos< PBASE >::histo3DMapLitID(), GaudiHistos< PBASE >::histo3DMapNumID(), GaudiHistos< PBASE >::histoPath(), std::set< _Key, _Compare, _Alloc >::insert(), GaudiHistos< PBASE >::m_histo1DTableFormat, GaudiHistos< PBASE >::m_histo1DTableFormatShort, GaudiHistos< PBASE >::m_histo1DTableHeader, GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::profile1DMapLitID(), GaudiHistos< PBASE >::profile1DMapNumID(), GaudiHistos< PBASE >::profile2DMapLitID(), GaudiHistos< PBASE >::profile2DMapNumID(), std::set< _Key, _Compare, _Alloc >::size(), Gaudi::Utils::Histos::toBase(), GaudiAlg::Print2DProf::toString(), GaudiAlg::Print1DProf::toString(), GaudiAlg::Print3D::toString(), GaudiAlg::Print2D::toString(), and Gaudi::Utils::Histos::Table::toString().

Referenced by GaudiHistos< PBASE >::finalize().

00222 {
00223   // temporary storage
00224   std::set<const AIDA::IBaseHistogram*> histos   ;
00225   std::set<const AIDA::IBaseHistogram*> profiles ;
00226 
00227   using namespace Gaudi::Utils::Histos ;
00228 
00229   if ( noHistos() )
00230   { if (this->msgLevel(MSG::DEBUG)) this->msgStream(level) << "No histograms are booked" << endreq ; }
00231   else
00232   {
00233     MsgStream & msg = this->msgStream(level);
00234 
00235     // Printout all histograms
00236     // Note, each must appear in either the numeric or literal map
00237 
00238     Gaudi::Utils::Histos::Table table
00239       ( m_histo1DTableFormat ,
00240         m_histo1DTableHeader ) ;
00241 
00242     if ( !histo1DMapNumID().empty() || !histo1DMapLitID().empty() )
00243     {
00244       msg << "List of booked 1D histograms in directory         "
00245           << "\"" << histoPath() << "\" :-"  ;
00246 
00247       if ( !table.header().empty() )
00248       {
00249         msg << std::endl << Gaudi::Utils::Histos::format
00250           ( "ID" , table.header() , m_histo1DTableFormatShort ) ;
00251       }
00252       {
00253         for ( Histo1DMapNumID::const_iterator entry = histo1DMapNumID().begin() ;
00254               histo1DMapNumID().end() != entry ; ++entry )
00255         {
00256           AIDA::IHistogram1D* aida = entry->second ;
00257           if ( 0 == aida )
00258           { this->error() << "IHistogram1D points to NULL" << endreq ; continue ; }
00259           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00260           histos.insert ( toBase ( aida  ) ) ;
00261           // format and print the row
00262           msg << std::endl << table.toString
00263             ( aida                      ,
00264               HistoID ( entry->first )  ,
00265               m_histo1DTableFormatShort ) ;
00266         }
00267       }
00268       {
00269         for ( Histo1DMapLitID::const_iterator entry = histo1DMapLitID().begin() ;
00270               histo1DMapLitID().end() != entry ; ++entry )
00271         {
00272           AIDA::IHistogram1D* aida = entry->second ;
00273           if ( 0 == aida )
00274           { this->error() << "IHistogram1D points to NULL" << endreq ; continue ; }
00275           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00276           histos.insert ( toBase ( aida  ) ) ;
00277           // format and print the row
00278           msg << std::endl << table.toString
00279             ( aida                      ,
00280               entry->first              ,
00281               m_histo1DTableFormatShort ) ;
00282         }
00283       }
00284       msg << endreq ;
00285     }
00286     if ( !histo2DMapNumID().empty() || !histo2DMapLitID().empty() )
00287     {
00288       msg << "List of booked 2D histograms in directory         "
00289           << "\"" << histoPath() << "\" :-" ;
00290       {
00291         for ( Histo2DMapNumID::const_iterator entry = histo2DMapNumID().begin() ;
00292               histo2DMapNumID().end() != entry ; ++entry )
00293         {
00294           AIDA::IHistogram2D* aida = entry->second ;
00295           if ( 0 == aida )
00296           { this->error() << "IHistogram2D points to NULL" << endreq ; continue ; }
00297           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00298           histos.insert ( toBase ( aida  ) ) ;
00299           msg << std::endl 
00300               << GaudiAlg::Print2D::toString ( aida , entry->first );
00301         }
00302       }
00303       {
00304         for ( Histo2DMapLitID::const_iterator entry = histo2DMapLitID().begin() ;
00305               histo2DMapLitID().end() != entry ; ++entry )
00306         {
00307           AIDA::IHistogram2D* aida = entry->second ;
00308           if ( 0 == aida )
00309           { this->error() << "IHistogram2D points to NULL" << endreq ; continue ; }
00310           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00311           histos.insert ( toBase ( aida  ) ) ;
00312           msg << std::endl 
00313               << GaudiAlg::Print2D::toString ( aida , entry->first );
00314         }
00315       }
00316       msg << endreq ;
00317     }
00318     
00319     if ( !histo3DMapNumID().empty() || !histo3DMapLitID().empty() )
00320     {
00321       msg << "List of booked 3D histograms in directory         "
00322           << "\"" << histoPath() << "\" :-" ;
00323       {
00324         for ( Histo3DMapNumID::const_iterator entry = histo3DMapNumID().begin() ;
00325               histo3DMapNumID().end() != entry ; ++entry )
00326         {
00327           AIDA::IHistogram3D* aida = entry->second ;
00328           if ( 0 == aida )
00329           { this->error() << "IHistogram3D points to NULL" << endreq ; continue ; }
00330           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00331           histos.insert ( toBase ( aida  ) ) ;
00332           msg << std::endl << GaudiAlg::Print3D::toString ( aida , entry->first );
00333         }
00334       }
00335       {
00336         for ( Histo3DMapLitID::const_iterator entry = histo3DMapLitID().begin() ;
00337               histo3DMapLitID().end() != entry ; ++entry )
00338         {
00339           AIDA::IHistogram3D* aida = entry->second ;
00340           if ( 0 == aida )
00341           { this->error() << "IHistogram3D points to NULL" << endreq ; continue ; }
00342           if ( histos.end() != histos.find( toBase ( aida ) ) ) { continue ; }
00343           histos.insert ( toBase ( aida  ) ) ;
00344           msg << std::endl << GaudiAlg::Print3D::toString ( aida , entry->first ) ;
00345         }
00346       }
00347       msg << endreq ;
00348     }
00349     if ( !profile1DMapNumID().empty() || !profile1DMapLitID().empty() )
00350     {
00351       msg << "List of booked 1D profile histograms in directory "
00352           << "\"" << histoPath() << "\" :-" ;
00353       {
00354         for ( Profile1DMapNumID::const_iterator entry = profile1DMapNumID().begin() ;
00355               profile1DMapNumID().end() != entry ; ++entry )
00356         {
00357           AIDA::IProfile1D*   aida = entry->second ;
00358           if ( 0 == aida )
00359           { this->error() << "IProfile1D points to NULL" << endreq ; continue ; }
00360           if ( profiles.end() != profiles.find( toBase ( aida ) ) ) { continue ; }
00361           profiles.insert ( toBase ( aida  ) ) ;
00362           msg << std::endl << GaudiAlg::Print1DProf::toString  ( aida , entry->first );
00363         }
00364       }
00365       {
00366         for ( Profile1DMapLitID::const_iterator entry = profile1DMapLitID().begin() ;
00367               profile1DMapLitID().end() != entry ; ++entry )
00368         {
00369           AIDA::IProfile1D*   aida = entry->second ;
00370           if ( 0 == aida )
00371           { this->error() << "IProfile1D points to NULL" << endreq ; continue ; }
00372           if ( profiles.end() != profiles.find( toBase ( aida ) ) ) { continue ; }
00373           profiles.insert ( toBase ( aida  ) ) ;
00374           msg << std::endl << GaudiAlg::Print1DProf::toString ( aida , entry->first );
00375         }
00376       }
00377       msg << endreq ;
00378     }
00379     if ( !profile2DMapNumID().empty() || !profile2DMapLitID().empty() )
00380     {
00381       msg << "List of booked 2D profile histograms in directory "
00382           << "\"" << histoPath() << "\" :-" ;
00383       {
00384         for ( Profile2DMapNumID::const_iterator entry = profile2DMapNumID().begin() ;
00385               profile2DMapNumID().end() != entry ; ++entry )
00386         {
00387           AIDA::IProfile2D*   aida = entry->second ;
00388           if ( 0 == aida )
00389           { this->error() << "IProfile2D points to NULL" << endreq ; continue ; }
00390           if ( profiles.end() != profiles.find( toBase ( aida ) ) ) { continue ; }
00391           profiles.insert ( toBase ( aida  ) ) ;
00392           msg << std::endl << GaudiAlg::Print2DProf::toString ( aida , entry->first );
00393         }
00394       }
00395       {
00396         for ( Profile2DMapLitID::const_iterator entry = profile2DMapLitID().begin() ;
00397               profile2DMapLitID().end() != entry ; ++entry )
00398         {
00399           AIDA::IProfile2D*   aida = entry->second ;
00400           if ( 0 == aida )
00401           { this->error() << "IProfile2D points to NULL" << endreq ; continue ; }
00402           if ( profiles.end() != profiles.find( toBase ( aida ) ) ) { continue ; }
00403           profiles.insert ( toBase ( aida  ) ) ;
00404           msg << std::endl << GaudiAlg::Print2DProf::toString ( aida , entry->first );
00405         }
00406       }
00407       msg << endreq ;
00408     }
00409 
00410   }
00411   return histos.size() + profiles.size() ;
00412 }

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 1825 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histo1D(), and GaudiHistos< PBASE >::noHistos().

01825 { return m_histo1DMapTitle; }

template<class PBASE>
const Histo1DMapNumID& GaudiHistos< PBASE >::histo1DMapNumID (  )  const [inline]

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

Attention:
This map only contains 1D histogram booked via a numeric ID, either forced or automatically assigned.
  const Histo1DMapNumID& histos = histo1DMapNumID() ;
  // iterate over the map!
  for ( Histo1DMapNumID::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 ;

     }

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

Definition at line 1856 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo1D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

01856 { return m_histo1DMapNumID; }

template<class PBASE>
const Histo1DMapLitID& GaudiHistos< PBASE >::histo1DMapLitID (  )  const [inline]

get access to the map of all 1D histograms index via a literal (string) ID

Attention:
This map only contains 1D histogram booked via a literal ID.
  const Histo1DMapLitID& histos = histo1DMapLitID() ;
  // iterate over the map!
  for ( Histo1DMapLitID::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 ;

     }

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

Definition at line 1886 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo1D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

01886 { return m_histo1DMapLitID; }

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 1915 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histo2D(), and GaudiHistos< PBASE >::noHistos().

01915 { return m_histo2DMapTitle ; }

template<class PBASE>
const Histo2DMapNumID& GaudiHistos< PBASE >::histo2DMapNumID (  )  const [inline]

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

Attention:
This map only contains 2D histogram booked via a numeric ID, either forced or automatically assigned.
  const Histo2DMapNumID& histos = histo2DMapNumID() ;
  // iterate over the map!
  for ( Histo2DMapNumID::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 ;

     }

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

Definition at line 1946 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo2D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

01946 { return m_histo2DMapNumID; }

template<class PBASE>
const Histo2DMapLitID& GaudiHistos< PBASE >::histo2DMapLitID (  )  const [inline]

get access to the map of all 2D histograms index via a literal (string) ID

Attention:
This map only contains 2D histogram booked via a literal ID.
  const Histo2DMapLitID& histos = histo2DMapLitID() ;
  // iterate over the map!
  for ( Histo2DMapLitID::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 ;

     }

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

Definition at line 1976 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo2D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

01976 { return m_histo2DMapLitID; }

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 2005 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histo3D(), and GaudiHistos< PBASE >::noHistos().

02005 { return m_histo3DMapTitle ; }

template<class PBASE>
const Histo3DMapNumID& GaudiHistos< PBASE >::histo3DMapNumID (  )  const [inline]

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

Attention:
This map only contains 3D histogram booked via a numeric ID, either forced or automatically assigned.
  const Histo3DMapNumID& histos = histo3DMapNumID() ;
  // iterate over the map!
  for ( Histo3DMapNumID::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 ;

     }

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

Definition at line 2036 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo3D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02036 { return m_histo3DMapNumID; }

template<class PBASE>
const Histo3DMapLitID& GaudiHistos< PBASE >::histo3DMapLitID (  )  const [inline]

get access to the map of all 3D histograms index via a literal (string) ID

Attention:
This map only contains 3D histogram booked via a literal ID.
  const Histo3DMapLitID& histos = histo3DMapLitID() ;
  // iterate over the map!
  for ( Histo3DMapLitID::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 ;

     }

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

Definition at line 2066 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::histo3D(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02066 { return m_histo3DMapLitID; }

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 2095 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::noHistos(), and GaudiHistos< GaudiTool >::profile1D().

02095 { return m_profile1DMapTitle; }

template<class PBASE>
const Profile1DMapNumID& GaudiHistos< PBASE >::profile1DMapNumID (  )  const [inline]

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

Attention:
This map only contains 2D histogram booked via a numeric ID, either forced or automatically assigned.
  const Profile1DMapNumID& histos = profile1DMapNumID() ;
  // iterate over the map!
  for ( Profile1DMapNumID::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 ;

     }

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

Definition at line 2126 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), GaudiHistos< PBASE >::profile1D(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02126 { return m_profile1DMapNumID; }

template<class PBASE>
const Profile1DMapLitID& GaudiHistos< PBASE >::profile1DMapLitID (  )  const [inline]

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

Attention:
This map only contains 2D histogram booked via a literal ID, either forced or automatically assigned.
  const Profile1DMapLitID& histos = profile1DMapLitID() ;
  // iterate over the map!
  for ( Profile1DMapLitID::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 ;

     }

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

Definition at line 2157 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), GaudiHistos< PBASE >::profile1D(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02157 { return m_profile1DMapLitID; }

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 2186 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::noHistos(), and GaudiHistos< GaudiTool >::profile2D().

02186 { return m_profile2DMapTitle; }

template<class PBASE>
const Profile2DMapNumID& GaudiHistos< PBASE >::profile2DMapNumID (  )  const [inline]

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

Attention:
This map only contains 2D histogram booked via a numeric ID, either forced or automatically assigned.
  const Profile2DMapNumID& histos = profile2DMapNumID() ;
  // iterate over the map!
  for ( Profile2DMapNumID::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 ;

     }

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

Definition at line 2217 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), GaudiHistos< PBASE >::profile2D(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02217 { return m_profile2DMapNumID; }

template<class PBASE>
const Profile2DMapLitID& GaudiHistos< PBASE >::profile2DMapLitID (  )  const [inline]

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

Attention:
This map only contains 2D histogram booked via a literal ID, either forced or automatically assigned.
  const Profile2DMapLitID& histos = profile2DMapLitID() ;
  // iterate over the map!
  for ( Profile2DMapLitID::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 ;

     }

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

Definition at line 2248 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), GaudiHistos< PBASE >::profile2D(), and GaudiHistos< PBASE >::totalNumberOfHistos().

02248 { return m_profile2DMapLitID; }

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

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

Definition at line 2253 of file GaudiHistos.h.

02253 { m_produceHistos = val ; }

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

set flag to control output level of histograms

Definition at line 2255 of file GaudiHistos.h.

02255 { m_fullDetail    = val ; }

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

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

Definition at line 2257 of file GaudiHistos.h.

02257 { m_checkForNaN   = val ; }

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

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

Definition at line 2259 of file GaudiHistos.h.

02259 { m_splitHistoDir = val ; }

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

set a value for histogram offset (property "HistoOffSet"

Definition at line 2261 of file GaudiHistos.h.

02262   { 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 2265 of file GaudiHistos.h.

02265 { m_histoTopDir   = val ; }

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

set histogram directory (property "HistoDir")

Definition at line 2268 of file GaudiHistos.h.

02268 { m_histoDir      = val ; }

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

standard initialization method

Returns:
status code

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

Definition at line 129 of file GaudiHistos.icpp.

References MSG::DEBUG, endreq(), GaudiHistos< PBASE >::histoPath(), StatusCode::isFailure(), GaudiHistos< PBASE >::produceHistos(), StatusCode::SUCCESS, and GaudiHistos< PBASE >::useNumericAutoIDs().

Referenced by GaudiHistoTool::initialize(), and GaudiHistoAlg::initialize().

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

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

standard finalization method

Returns:
status code

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

Definition at line 165 of file GaudiHistos.icpp.

References GaudiUtils::Map< K, T, M >::clear(), endreq(), GaudiHistos< PBASE >::histo1DMapLitID(), GaudiHistos< PBASE >::histo1DMapNumID(), GaudiHistos< PBASE >::histo2DMapLitID(), GaudiHistos< PBASE >::histo2DMapNumID(), GaudiHistos< PBASE >::histo3DMapLitID(), GaudiHistos< PBASE >::histo3DMapNumID(), GaudiHistos< PBASE >::histosPrint(), GaudiHistos< PBASE >::m_histo1DMapLitID, GaudiHistos< PBASE >::m_histo1DMapNumID, GaudiHistos< PBASE >::m_histo1DMapTitle, GaudiHistos< PBASE >::m_histo2DMapLitID, GaudiHistos< PBASE >::m_histo2DMapNumID, GaudiHistos< PBASE >::m_histo2DMapTitle, GaudiHistos< PBASE >::m_histo3DMapLitID, GaudiHistos< PBASE >::m_histo3DMapNumID, GaudiHistos< PBASE >::m_histo3DMapTitle, GaudiHistos< PBASE >::m_profile1DMapLitID, GaudiHistos< PBASE >::m_profile1DMapNumID, GaudiHistos< PBASE >::m_profile1DMapTitle, GaudiHistos< PBASE >::m_profile2DMapLitID, GaudiHistos< PBASE >::m_profile2DMapNumID, GaudiHistos< PBASE >::m_profile2DMapTitle, GaudiHistos< PBASE >::noHistos(), GaudiHistos< PBASE >::printHistos(), GaudiHistos< PBASE >::produceHistos(), GaudiHistos< PBASE >::profile1DMapLitID(), GaudiHistos< PBASE >::profile1DMapNumID(), GaudiHistos< PBASE >::profile2DMapLitID(), GaudiHistos< PBASE >::profile2DMapNumID(), and GaudiUtils::Map< K, T, M >::size().

Referenced by GaudiHistoTool::finalize(), and GaudiHistoAlg::finalize().

00166 {
00167 
00168   if ( produceHistos() )
00169   {
00170 
00171     // Count how many histos of each type
00172     if ( !noHistos() )
00173     {
00174       const unsigned int n1D  = histo1DMapNumID().size()+histo1DMapLitID().size();
00175       const unsigned int n2D  = histo2DMapNumID().size()+histo2DMapLitID().size();
00176       const unsigned int n3D  = histo3DMapNumID().size()+histo3DMapLitID().size();
00177       const unsigned int n1DP = profile1DMapNumID().size()+profile1DMapLitID().size();
00178       const unsigned int n2DP = profile2DMapNumID().size()+profile2DMapLitID().size();
00179       const unsigned int total = n1D+n2D+n3D+n1DP+n2DP;
00180       if ( total>0 )
00181       {
00182         this->always() << "Booked " << total << " Histogram(s) : ";
00183         if ( n1D>0  ) this->always() << "1D=" << n1D << " ";
00184         if ( n2D>0  ) this->always() << "2D=" << n2D << " ";
00185         if ( n3D>0  ) this->always() << "3D=" << n3D << " ";
00186         if ( n1DP>0 ) this->always() << "1DProf=" << n1DP << " ";
00187         if ( n2DP>0 ) this->always() << "2DProf=" << n2DP << " ";
00188         this->always() << endreq;
00189       }
00190     }
00191 
00192     // detailed printing
00193     if ( histosPrint() ) { printHistos() ; }
00194 
00195   }
00196 
00197   // clear all maps
00198   m_histo1DMapTitle   .clear() ;
00199   m_histo2DMapTitle   .clear() ;
00200   m_histo3DMapTitle   .clear() ;
00201   m_histo1DMapNumID   .clear() ;
00202   m_histo1DMapLitID   .clear() ;
00203   m_histo2DMapNumID   .clear() ;
00204   m_histo2DMapLitID   .clear() ;
00205   m_histo3DMapNumID   .clear() ;
00206   m_histo3DMapLitID   .clear() ;
00207   m_profile1DMapTitle .clear() ;
00208   m_profile2DMapTitle .clear() ;
00209   m_profile1DMapNumID .clear() ;
00210   m_profile1DMapLitID .clear() ;
00211   m_profile2DMapNumID .clear() ;
00212   m_profile2DMapLitID .clear() ;
00213 
00214   // finalize base class
00215   return PBASE::finalize();
00216 }

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

Check if all histogram maps are empty.

Definition at line 417 of file GaudiHistos.icpp.

References GaudiHistos< PBASE >::histo1DMapLitID(), GaudiHistos< PBASE >::histo1DMapNumID(), GaudiHistos< PBASE >::histo1DMapTitle(), GaudiHistos< PBASE >::histo2DMapLitID(), GaudiHistos< PBASE >::histo2DMapNumID(), GaudiHistos< PBASE >::histo2DMapTitle(), GaudiHistos< PBASE >::histo3DMapLitID(), GaudiHistos< PBASE >::histo3DMapNumID(), GaudiHistos< PBASE >::histo3DMapTitle(), GaudiHistos< PBASE >::profile1DMapLitID(), GaudiHistos< PBASE >::profile1DMapNumID(), GaudiHistos< PBASE >::profile1DMapTitle(), GaudiHistos< PBASE >::profile2DMapLitID(), GaudiHistos< PBASE >::profile2DMapNumID(), and GaudiHistos< PBASE >::profile2DMapTitle().

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< PBASE >::printHistos().

00418 {
00419   return ( histo1DMapTitle()   .empty() &&
00420            histo2DMapTitle()   .empty() &&
00421            histo3DMapTitle()   .empty() &&
00422            profile1DMapTitle() .empty() &&
00423            profile2DMapTitle() .empty() &&
00424            histo1DMapNumID()   .empty() &&
00425            histo1DMapLitID()   .empty() &&
00426            histo2DMapNumID()   .empty() &&
00427            histo2DMapLitID()   .empty() &&
00428            histo3DMapNumID()   .empty() &&
00429            histo3DMapLitID()   .empty() &&
00430            profile1DMapNumID() .empty() &&
00431            profile1DMapLitID() .empty() &&
00432            profile2DMapNumID() .empty() &&
00433            profile2DMapLitID() .empty() );
00434 }

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

Constructor initialisation and job options.

Definition at line 60 of file GaudiHistos.icpp.

References Gaudi::Utils::Histos::Formats::format(), Gaudi::Utils::Histos::Formats::header(), GaudiHistos< PBASE >::m_checkForNaN, GaudiHistos< PBASE >::m_declareMoniHists, GaudiHistos< PBASE >::m_fullDetail, GaudiHistos< PBASE >::m_histo1DTableFormat, GaudiHistos< PBASE >::m_histo1DTableFormatShort, GaudiHistos< PBASE >::m_histo1DTableHeader, GaudiHistos< PBASE >::m_histoDir, GaudiHistos< PBASE >::m_histoOffSet, GaudiHistos< PBASE >::m_histosPrint, GaudiHistos< PBASE >::m_histoTopDir, GaudiHistos< PBASE >::m_idReplaceInfo, GaudiHistos< PBASE >::m_produceHistos, GaudiHistos< PBASE >::m_splitHistoDir, and GaudiHistos< PBASE >::m_useNumericAutoIDs.

Referenced by GaudiHistos< GaudiTool >::GaudiHistos(), and GaudiHistos< GaudiAlgorithm >::GaudiHistos().

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

template<class PBASE>
void GaudiHistos< PBASE >::monitorHisto ( const AIDA::IBaseHistogram *  hist,
const HistoID ID 
) const [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 442 of file GaudiHistos.icpp.

References MSG::DEBUG, endreq(), and Gaudi::Utils::Histos::htitle().

00444 {
00445   if ( hist && m_declareMoniHists )
00446   {
00447     if ( this->msgLevel(MSG::DEBUG) )
00448     {
00449       this->debug() << "Monitoring histogram '"
00450                     << ID.idAsString() << "' desc = '"
00451                     << Gaudi::Utils::Histos::htitle  ( hist ) << endreq;
00452     }
00453     this->declareInfo ( histoPath()+"/"+ID.idAsString() ,
00454                         hist            ,
00455                         Gaudi::Utils::Histos::htitle ( hist ) ) ;
00456   }
00457 }

template<class PBASE>
void GaudiHistos< PBASE >::newHistoID ( const std::string title,
HistoID ID 
) const [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 1623 of file GaudiHistos.icpp.

References std::basic_string< _CharT, _Traits, _Alloc >::empty(), GaudiHistos< PBASE >::histoExists(), GaudiHistos< PBASE >::histoOffSet(), StatusCode::SUCCESS, GaudiHistos< PBASE >::totalNumberOfHistos(), and GaudiHistos< PBASE >::useNumericAutoIDs().

01625 {
01626   if ( useNumericAutoIDs() || title.empty() )
01627   {
01628     if ( !useNumericAutoIDs() )
01629     {
01630       this -> Warning( "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID",
01631                        StatusCode::SUCCESS );
01632     }
01633     // propose the histogram ID (always numeric)
01634     ID = HistoID( totalNumberOfHistos() + 1 + histoOffSet() );
01635     // adjust the proposed ID
01636     while ( histoExists( ID ) ) { ++ID; }
01637   }
01638   else
01639   {
01640     // use the title to create a unique literal ID
01641     ID = HistoID( this->convertTitleToID(title) );
01642     // Just in case ...
01643     while ( histoExists( ID ) ) { ID = HistoID(ID.idAsString()+"_"); }
01644   }
01645 }

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

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

Definition at line 1665 of file GaudiHistos.icpp.

References std::basic_string< _CharT, _Traits, _Alloc >::find_first_of(), std::basic_string< _CharT, _Traits, _Alloc >::npos, std::basic_string< _CharT, _Traits, _Alloc >::size(), and std::basic_string< _CharT, _Traits, _Alloc >::substr().

Referenced by GaudiHistos< PBASE >::convertTitleToID().

01668 {
01669   std::string::size_type slash = title.find_first_of ( A ) ;
01670   while ( std::string::npos != slash ) 
01671   {
01672     title = title.substr(0,slash) + B + title.substr(slash+A.size());
01673     slash = title.find_first_of( A );
01674   }
01675 }

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

Create an ID string from a title string.

Definition at line 1650 of file GaudiHistos.icpp.

References GaudiHistos< PBASE >::m_idReplaceInfo, and GaudiHistos< PBASE >::stringSearchReplace().

01651 {
01652   // clean up the ID string for all unwanted characters
01653   std::string tmp_id = title;
01654   for ( std::map<std::string,std::string>::const_iterator i = m_idReplaceInfo.begin();
01655         i != m_idReplaceInfo.end(); ++i )
01656   {
01657     stringSearchReplace( tmp_id, i->first, i->second );
01658   }
01659   return tmp_id;
01660 }


Member Data Documentation

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

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

Definition at line 2332 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), GaudiHistos< GaudiTool >::produceHistos(), and GaudiHistos< GaudiTool >::setProduceHistos().

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

flag to control output level of histograms

Definition at line 2334 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::fullDetail(), GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::setFullDetail().

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

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

Definition at line 2336 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::checkForNaN(), GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::setCheckForNaN().

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

split histogram directory name (very useful for Hbook)

Definition at line 2338 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), GaudiHistos< GaudiTool >::setSplitHistoDir(), and GaudiHistos< GaudiTool >::splitHistoDir().

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

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

Definition at line 2340 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoOffSet(), GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::setHistoOffSet().

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

histogram top level directory

Definition at line 2342 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoTopDir(), GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::setHistoTopDir().

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

histogram directory

Definition at line 2344 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histoDir(), GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::setHistoDir().

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

print histograms at finalization

Definition at line 2346 of file GaudiHistos.h.

Referenced by GaudiHistos< GaudiTool >::histosPrint(), and GaudiHistos< PBASE >::initGaudiHistosConstructor().

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 2348 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor().

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

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

Definition at line 2351 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo1DMapTitle().

template<class PBASE>
Histo1DMapNumID GaudiHistos< PBASE >::m_histo1DMapNumID [mutable, private]

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

Definition at line 2353 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo1DMapNumID().

template<class PBASE>
Histo1DMapLitID GaudiHistos< PBASE >::m_histo1DMapLitID [mutable, private]

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

Definition at line 2355 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo1DMapLitID().

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

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

Definition at line 2358 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo2DMapTitle().

template<class PBASE>
Histo2DMapNumID GaudiHistos< PBASE >::m_histo2DMapNumID [mutable, private]

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

Definition at line 2360 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo2DMapNumID().

template<class PBASE>
Histo2DMapLitID GaudiHistos< PBASE >::m_histo2DMapLitID [mutable, private]

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

Definition at line 2362 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo2DMapLitID().

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

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

Definition at line 2365 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo3DMapTitle().

template<class PBASE>
Histo3DMapNumID GaudiHistos< PBASE >::m_histo3DMapNumID [mutable, private]

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

Definition at line 2367 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo3DMapNumID().

template<class PBASE>
Histo3DMapLitID GaudiHistos< PBASE >::m_histo3DMapLitID [mutable, private]

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

Definition at line 2369 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::histo3DMapLitID().

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

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

Definition at line 2372 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile1DMapTitle().

template<class PBASE>
Profile1DMapNumID GaudiHistos< PBASE >::m_profile1DMapNumID [mutable, private]

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

Definition at line 2374 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile1DMapNumID().

template<class PBASE>
Profile1DMapLitID GaudiHistos< PBASE >::m_profile1DMapLitID [mutable, private]

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

Definition at line 2376 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile1DMapLitID().

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

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

Definition at line 2379 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile2DMapTitle().

template<class PBASE>
Profile2DMapNumID GaudiHistos< PBASE >::m_profile2DMapNumID [mutable, private]

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

Definition at line 2381 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile2DMapNumID().

template<class PBASE>
Profile2DMapLitID GaudiHistos< PBASE >::m_profile2DMapLitID [mutable, private]

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

Definition at line 2383 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::finalize(), and GaudiHistos< GaudiTool >::profile2DMapLitID().

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

format for printout of 1D-histograms as a table

Definition at line 2386 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< PBASE >::printHistos().

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

format for printout of 1D-histograms as a table

Definition at line 2388 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< PBASE >::printHistos().

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

the header for the table of 1-D historgrams

Definition at line 2390 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< PBASE >::printHistos().

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

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

Definition at line 2392 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::initGaudiHistosConstructor(), and GaudiHistos< GaudiTool >::useNumericAutoIDs().

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 2396 of file GaudiHistos.h.

Referenced by GaudiHistos< PBASE >::convertTitleToID(), and GaudiHistos< PBASE >::initGaudiHistosConstructor().


The documentation for this class was generated from the following files:
Generated at Fri Jul 18 12:07:35 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004