Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

H_Factory Class Reference

#include <H_Factory.h>

Inheritance diagram for H_Factory:

H_Naming_Factory List of all members.

Detailed Description

The purpose of this class is to hide the clustering hint required to create a new persistent histogram. The class contains a clustering hint which can be set by the user to refer to a well defined database and (optionally) container. If the container is not defined, the default container of that database will be used. Once the hint is set, the user can create as many histograms as she wants in that place. The creation methods have signatures like the corresponding HTL constructors. This is an example on how to use it:

  HFactory myFactory;
  const int noBins=20;
  // Create histograms in DB "gepo", Container "sbaffini" 
  if (myFactory.init(this,"gepo","sbaffini")) {
    // Create three histograms with different titles:
    HepRef(PHisto1D) h1 = myFactory.Histo1D("Histo-1",noBins,0.0,20.0);
    HepRef(PHisto1D) h2 = myFactory.Histo1D("Histo-2",noBins,0.0,20.0);
    HepRef(PHisto1D) h3 = myFactory.Histo1D("Histo-3",noBins,0.0,20.0);
    // Fill histos with different weights:
    double x;
    for( int i = 0; i < 50000; i++) {   
      x = (i % 22) - 1;          
      h1->fill(x, (x-9.5)*(x-9.5)+3);
      h2->fill(x, (x-9.5)*(x-9.5)+30);
      h3->fill(x, (x-9.5)*(x-9.5)+300);      
    }
  }
  

Definition at line 38 of file H_Factory.h.

Public Methods

 H_Factory ()
 Constructor.

int init (HepDbApplication *sess, char *dbname, char *contname=0)
 Initialise the clustering hint by passing a pointer to the HepDbApplication object used to manage transactions sess , the name of the database dbname and (optionally) the name of the container contname.

int hintSet ()
 Returns 1 of the hint is set, 0 otherwise.

const HepRef (ooContObj) container()
 Retrieve the handle to the container.

 HepRef (P_Histo1D) Histo1D(const char *a_title
 Create a persistent 1D histogram.

 HepRef (P_Histo1DVar) Histo1DVar(const char *
 Create a persistent 1D histogram with variable binning.

 HepRef (P_Histo1DVar) Histo1DVar(const char *
 Create a persistent 1D histogram with variable binning.

 HepRef (P_Histo1DVar) Histo1DVar(const char *
 Create a persistent 1D histogram with variable binning.

 HepRef (P_ProfileHisto1D) ProfileHisto(const char *a_title
 Create a persistent Profile histogram.

 HepRef (P_ProfileHisto1DVar) ProfileHistoVar(const char *
 Create a persistent Profile histogram with variable binning.

 HepRef (P_ProfileHisto1DVar) ProfileHistoVar(const char *
 Create a persistent Profile histogram with variable binning.

 HepRef (P_Histo2D) Histo2D(const char *
 Create a persistent 2D histogram.

 HepRef (P_Histo2DVar) Histo2DVar(const char *
 Create a persistent 2D histogram with variable binning.

 HepRef (P_Histo2DVar) Histo2DVar(const char *
 Create a persistent 2D histogram with variable binning.


Public Attributes

Size n
Size double x1
Size double double x2
Size double double End_Point_Convention epc = RIGHT_OPEN)
HTL_STD::vector< float > End_Point_Convention epc = RIGHT_OPEN )
HTL_STD::vector< double
> End_Point_Convention 
epc = RIGHT_OPEN )
P_Points_Vector End_Point_Convention epc = RIGHT_OPEN )
HTL_STD::vector< float > End_Point_Convention epc = RIGHT_OPEN )
HTL_STD::vector< double
> End_Point_Convention 
epc = RIGHT_OPEN )
 Size
 double
End_Point_Convention epc1 = RIGHT_OPEN
End_Point_Convention End_Point_Convention epc2 = RIGHT_OPEN )
HTL_STD::vector< float > HTL_STD::vector<
float > End_Point_Convention 
epc1 = RIGHT_OPEN
HTL_STD::vector< float > HTL_STD::vector<
float > End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )
HTL_STD::vector< double
> HTL_STD::vector< double
> End_Point_Convention 
epc1 = RIGHT_OPEN
HTL_STD::vector< double
> HTL_STD::vector< double
> End_Point_Convention End_Point_Convention 
epc2 = RIGHT_OPEN )

Protected Methods

 HepRef (ooContObj) histoCont

Protected Attributes

HepDbApplication * dbApp


Constructor & Destructor Documentation

H_Factory::H_Factory   [inline]
 

Definition at line 44 of file H_Factory.h.

References dbApp.


Member Function Documentation

H_Factory::HepRef P_Histo2DVar    const
 

H_Factory::HepRef P_Histo2DVar    const
 

H_Factory::HepRef P_Histo2D    const
 

H_Factory::HepRef P_ProfileHisto1DVar    const
 

H_Factory::HepRef P_ProfileHisto1DVar    const
 

H_Factory::HepRef P_ProfileHisto1D    const
 

H_Factory::HepRef P_Histo1DVar    const
 

H_Factory::HepRef P_Histo1DVar    const
 

H_Factory::HepRef P_Histo1DVar    const
 

H_Factory::HepRef P_Histo1D    const
 

const H_Factory::HepRef ooContObj    [inline]
 

Definition at line 55 of file H_Factory.h.

H_Factory::HepRef ooContObj    [protected]
 

Referenced by init().

int H_Factory::hintSet  
 

Definition at line 32 of file H_Factory.cpp.

References HTL_ERR.

int H_Factory::init HepDbApplication *    sess,
char *    dbname,
char *    contname = 0
 

Definition at line 3 of file H_Factory.cpp.

References dbApp, HepRef(), and HTL_ERR.

Referenced by H_Naming_Factory::init().


Member Data Documentation

HepDbApplication* H_Factory::dbApp [protected]
 

Definition at line 41 of file H_Factory.h.

Referenced by H_Naming_Factory::checkPrevious(), H_Naming_Factory::goHome(), H_Factory(), H_Naming_Factory::init(), init(), and H_Naming_Factory::removeHisto().

H_Factory::double
 

Reimplemented in H_Naming_Factory.

Definition at line 90 of file H_Factory.h.

HTL_STD::vector<double> End_Point_Convention H_Factory::epc = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 87 of file H_Factory.h.

HTL_STD::vector<float> End_Point_Convention H_Factory::epc = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 82 of file H_Factory.h.

P_Points_Vector End_Point_Convention H_Factory::epc = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 72 of file H_Factory.h.

HTL_STD::vector<double> End_Point_Convention H_Factory::epc = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 68 of file H_Factory.h.

HTL_STD::vector<float> End_Point_Convention H_Factory::epc = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 64 of file H_Factory.h.

Size double double End_Point_Convention H_Factory::epc = RIGHT_OPEN)
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 77 of file H_Factory.h.

HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention H_Factory::epc1 = RIGHT_OPEN
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 104 of file H_Factory.h.

HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention H_Factory::epc1 = RIGHT_OPEN
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 98 of file H_Factory.h.

End_Point_Convention H_Factory::epc1 = RIGHT_OPEN
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 92 of file H_Factory.h.

HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention End_Point_Convention H_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 105 of file H_Factory.h.

HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention End_Point_Convention H_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 99 of file H_Factory.h.

End_Point_Convention End_Point_Convention H_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented in H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, H_Naming_Factory, and H_Naming_Factory.

Definition at line 93 of file H_Factory.h.

Size H_Factory::n
 

Reimplemented in H_Naming_Factory.

Definition at line 75 of file H_Factory.h.

H_Factory::Size
 

Reimplemented in H_Naming_Factory.

Definition at line 90 of file H_Factory.h.

Size double H_Factory::x1
 

Reimplemented in H_Naming_Factory.

Definition at line 75 of file H_Factory.h.

Size double double H_Factory::x2
 

Reimplemented in H_Naming_Factory.

Definition at line 75 of file H_Factory.h.


The documentation for this class was generated from the following files:

Anaphe documentation generated by Doxygen (www.doxygen.org)