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

In This Package:

IHistoTool Class Reference

An abstract interaface for "histogramming tool". More...

#include <GaudiTools/IHistoTool.h>

Inheritance diagram for IHistoTool:

[legend]
Collaboration diagram for IHistoTool:
[legend]
List of all members.

Public Types

typedef Histos::HistoID HistoID
 the actual type for histogram identifier (HBOOK style)
 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  Status

Public Member Functions

virtual 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 =0
 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)
virtual 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 =0
 fill the 1D histogram with forced ID assignement (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)
virtual 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 =0
 fill the 2D histogram (book on demand)
virtual 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 =0
 fill the 2D histogram with forced ID assignment (book on demand)
virtual 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 =0
 fill the 3D histogram (book on demand)
virtual 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 =0
 fill the 3D histogram with forced ID assignment (book on demand)
virtual AIDA::IHistogram1D * book1D (const std::string &title, const double low=0, const double high=100, const unsigned long bins=100) const =0
 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
virtual 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 =0
 book the 2D histogram
virtual 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 =0
 book the 3D histogram
virtual AIDA::IHistogram1D * book1D (const HistoID &ID, const std::string &title="", const double low=0, const double high=100, const unsigned long bins=100) const =0
 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
virtual AIDA::IHistogram2D * book2D (const HistoID &ID, const std::string &title, const double lowX=0, const double highX=100, const unsigned long binsX=100, const double lowY=0, const double highY=100, const unsigned long binsY=100) const =0
 book the 2D histogram with forced ID
virtual 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 =0
 book the 3D histogram with forced ID
virtual AIDA::IHistogram1D * fill (AIDA::IHistogram1D *histo, const double value, const double weight, const std::string &title="") const =0
 fill the 1D histo with the value and weight
virtual AIDA::IHistogram2D * fill (AIDA::IHistogram2D *histo, const double valueX, const double valueY, const double weight, const std::string &title="") const =0
 fill the 2D histo with the value and weight
virtual AIDA::IHistogram3D * fill (AIDA::IHistogram3D *histo, const double valueX, const double valueY, const double valueZ, const double weight, const std::string &title="") const =0
 fill the 3D histo with the value and weight
virtual AIDA::IHistogram1D * histo1D (const std::string &title) const =0
 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
virtual AIDA::IHistogram2D * histo2D (const std::string &title) const =0
 access the EXISTING 2D histogram by title return the pointer to existing 2D histogram or NULL
virtual AIDA::IHistogram3D * histo3D (const std::string &title) const =0
 access the EXISTING 3D histogram by title return the pointer to existing 3D histogram or NULL
virtual AIDA::IHistogram1D * histo1D (const HistoID &ID) const =0
 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
virtual AIDA::IHistogram2D * histo2D (const HistoID &ID) const =0
 access the EXISTING 2D histogram by ID return the pointer to existing 2D histogram or NULL
virtual AIDA::IHistogram3D * histo3D (const HistoID &ID) const =0
 access the EXISTING 3D histogram by ID return the pointer to existing 3D histogram or NULL
virtual bool histoExists (const std::string &title) const =0
 check the existence AND validity of the histogram with given title
virtual bool histoExists (const HistoID &ID) const =0
 check the existence AND validity of the histogram with given title
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
virtual const std::string & type () const =0
virtual const IInterfaceparent () const =0
virtual StatusCode configure ()=0
virtual StatusCode initialize ()=0
virtual StatusCode start ()=0
virtual StatusCode stop ()=0
virtual StatusCode finalize ()=0
virtual StatusCode terminate ()=0
virtual StatusCode reinitialize ()=0
virtual StatusCode restart ()=0
virtual Gaudi::StateMachine::State FSMState () const =0
virtual StatusCode sysInitialize ()=0
virtual StatusCode sysStart ()=0
virtual StatusCode sysStop ()=0
virtual StatusCode sysFinalize ()=0
virtual StatusCode sysReinitialize ()=0
virtual StatusCode sysRestart ()=0
virtual unsigned long refCount () const =0
virtual const std::string & name () const =0
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)=0
virtual unsigned long addRef ()=0
virtual unsigned long release ()=0

Static Public Member Functions

static const InterfaceIDinterfaceID ()
 Return the unique interface ID.

Public Attributes

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR

Protected Member Functions

virtual ~IHistoTool ()
 detsructor

Detailed Description

An abstract interaface for "histogramming tool".

Author:
Vanya BELYAEV Ivan.Belyaev@itep.ru
Date:
2004-06-28

Definition at line 33 of file IHistoTool.h.


Member Typedef Documentation

typedef Histos::HistoID IHistoTool::HistoID

the actual type for histogram identifier (HBOOK style)

Reimplemented in HistoTool.

Definition at line 38 of file IHistoTool.h.


Constructor & Destructor Documentation

IHistoTool::~IHistoTool (  )  [protected, virtual]

detsructor

Definition at line 37 of file IHistoTool.cpp.

00037 {}


Member Function Documentation

const InterfaceID & IHistoTool::interfaceID (  )  [static]

Return the unique interface ID.

Reimplemented from IAlgTool.

Definition at line 31 of file IHistoTool.cpp.

00031 { return IID_IHistoTool ; }

virtual AIDA::IHistogram1D* IHistoTool::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 [pure virtual]

fill the 1D histogram (book on demand)

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

The histogram will get a unique integer identifier automatically assigned.

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

Implemented in HistoTool.

AIDA::IHistogram1D* IHistoTool::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 99 of file IHistoTool.h.

00105   {
00106     return plot1D ( value, title, low, high, bins, weight );
00107   }

virtual AIDA::IHistogram1D* IHistoTool::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 [pure virtual]

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

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

Attention:
If the histogram with given ID is already booked through automatic assignement 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.
Note : This method is more efficient that the similar method without forced ID, since the histogram lookup is faster using a numerical ID.

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 histogram

AIDA::IHistogram1D* IHistoTool::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 histogram

Definition at line 173 of file IHistoTool.h.

00180   {
00181     return plot1D ( value, ID, title, low, high, bins, weight );
00182   };

virtual AIDA::IHistogram2D* IHistoTool::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 [pure virtual]

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 );

The histogram will get a unique integer identifier automatically assigned

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

Implemented in HistoTool.

virtual AIDA::IHistogram2D* IHistoTool::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 [pure virtual]

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 );

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
Note : This method is more efficient that the similar method without forced ID, since the histogram lookup is faster using a numerical ID.

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

virtual AIDA::IHistogram3D* IHistoTool::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 [pure virtual]

fill the 3D histogram (book on demand)

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

The histogram will get a unique integer identifier automatically assigned

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

Implemented in HistoTool.

virtual AIDA::IHistogram3D* IHistoTool::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 [pure virtual]

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

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

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
Note : This method is more efficient that the similar method without forced ID, since the histogram lookup is faster using a numerical ID.

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

virtual AIDA::IHistogram1D* IHistoTool::book1D ( const std::string &  title,
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [pure virtual]

book the 1D 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 histogram

Implemented in HistoTool.

AIDA::IHistogram1D* IHistoTool::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 450 of file IHistoTool.h.

00454   {
00455     return book1D( title, low, high, bins );
00456   }

virtual AIDA::IHistogram2D* IHistoTool::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 [pure virtual]

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

Implemented in HistoTool.

virtual AIDA::IHistogram3D* IHistoTool::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 [pure virtual]

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

Implemented in HistoTool.

virtual AIDA::IHistogram1D* IHistoTool::book1D ( const HistoID ID,
const std::string &  title = "",
const double  low = 0,
const double  high = 100,
const unsigned long  bins = 100 
) const [pure virtual]

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

AIDA::IHistogram1D* IHistoTool::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 541 of file IHistoTool.h.

00546   {
00547     return book1D( ID, title, low, high, bins );
00548   }

virtual AIDA::IHistogram2D* IHistoTool::book2D ( const HistoID ID,
const std::string &  title,
const double  lowX = 0,
const double  highX = 100,
const unsigned long  binsX = 100,
const double  lowY = 0,
const double  highY = 100,
const unsigned long  binsY = 100 
) const [pure virtual]

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

virtual AIDA::IHistogram3D* IHistoTool::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 [pure virtual]

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

virtual AIDA::IHistogram1D* IHistoTool::fill ( AIDA::IHistogram1D *  histo,
const double  value,
const double  weight,
const std::string &  title = "" 
) const [pure virtual]

fill the 1D histo 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

Implemented in HistoTool.

virtual AIDA::IHistogram2D* IHistoTool::fill ( AIDA::IHistogram2D *  histo,
const double  valueX,
const double  valueY,
const double  weight,
const std::string &  title = "" 
) const [pure virtual]

fill the 2D histo 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

Implemented in HistoTool.

virtual AIDA::IHistogram3D* IHistoTool::fill ( AIDA::IHistogram3D *  histo,
const double  valueX,
const double  valueY,
const double  valueZ,
const double  weight,
const std::string &  title = "" 
) const [pure virtual]

fill the 3D histo 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

Implemented in HistoTool.

virtual AIDA::IHistogram1D* IHistoTool::histo1D ( const std::string &  title  )  const [pure virtual]

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

Implemented in HistoTool.

AIDA::IHistogram1D* IHistoTool::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 656 of file IHistoTool.h.

00657   {
00658     return histo1D( title );
00659   };

virtual AIDA::IHistogram2D* IHistoTool::histo2D ( const std::string &  title  )  const [pure virtual]

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

Implemented in HistoTool.

virtual AIDA::IHistogram3D* IHistoTool::histo3D ( const std::string &  title  )  const [pure virtual]

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

Implemented in HistoTool.

virtual AIDA::IHistogram1D* IHistoTool::histo1D ( const HistoID ID  )  const [pure virtual]

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

AIDA::IHistogram1D* IHistoTool::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 684 of file IHistoTool.h.

00685   {
00686     return histo1D( ID );
00687   };

virtual AIDA::IHistogram2D* IHistoTool::histo2D ( const HistoID ID  )  const [pure virtual]

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

virtual AIDA::IHistogram3D* IHistoTool::histo3D ( const HistoID ID  )  const [pure virtual]

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

virtual bool IHistoTool::histoExists ( const std::string &  title  )  const [pure virtual]

check the existence AND validity of the histogram with given title

Implemented in HistoTool.

virtual bool IHistoTool::histoExists ( const HistoID ID  )  const [pure virtual]

check the existence AND validity of the histogram with given title

template<class FUNCTION, class OBJECT>
AIDA::IHistogram1D* IHistoTool::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

The histogram will get a unique integer identifier automatically assigned

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

Note : 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 758 of file IHistoTool.h.

00765   {
00766     // retrieve or book the histogram
00767     AIDA::IHistogram1D* h = histo1D ( title ) ;
00768     if ( 0 == h )     { h = book1D  ( title , low , high , bins ); }
00769     while ( first != last && 0 != h  )
00770     { h = fill ( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00771     return h ;
00772   };

template<class FUNCTION, class OBJECT>
AIDA::IHistogram1D* IHistoTool::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 = ... ;

  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

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

Note : 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.

Note : This method is more efficient that the similar method without forced ID, since the histogram lookup is faster using a numerical ID.

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 825 of file IHistoTool.h.

00833   {
00834     // retrieve or book the histogram
00835     AIDA::IHistogram1D* h = histo1D ( ID ) ;
00836     if ( 0 == h )     { h = book1D  ( ID , title , low , high , bins ); }
00837     while ( first != last && 0 != h )
00838     { h = fill( h , func( *first ) , 1.0 , title  ) ; ++first ; }
00839     return h ;
00840   };

template<class FUNCTION, class OBJECT, class WEIGHT>
AIDA::IHistogram1D* IHistoTool::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

The histogram will get a unique integer identifier automatically assigned

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

Note : 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 898 of file IHistoTool.h.

00906   {
00907     // retrieve or book the histogram
00908     AIDA::IHistogram1D* h = histo1D ( title ) ;
00909     if ( 0 == h     ) { h = book1D  ( title , low , high , bins ); }
00910     while( first != last && 0 != h )
00911     { h = fill ( h                 ,
00912                  func   ( *first ) ,
00913                  weight ( *first ) , title  ) ; ++first ; }
00914     return h ;
00915   };

template<class FUNCTION, class OBJECT, class WEIGHT>
AIDA::IHistogram1D* IHistoTool::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 = ... ;

  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

Attention:
no checks for NaN and Finite is 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

Note : 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.

Note : This method is more efficient that the similar method without forced ID, since the histogram lookup is faster using a numerical ID.

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 978 of file IHistoTool.h.

00987   {
00988     // retrieve or book the histogram
00989     AIDA::IHistogram1D* h = histo1D ( ID ) ;
00990     if ( 0 == h     ) { h = book1D  ( ID , title , low , high , bins ); }
00991     while( first != last && 0 != h )
00992     { h  = fill ( h                 ,
00993                   func   ( *first ) ,
00994                   weight ( *first ) , title  ) ; ++first ; }
00995     return h ;
00996   };


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

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