Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

H_Naming_Factory Class Reference

#include <H_Naming_Factory.h>

Inheritance diagram for H_Naming_Factory:

H_Factory List of all members.

Detailed Description

The class inherits the first functionaly from its base class and implements in addition the naming features. This is an example on how to use it:

  HNamingFactory myFactory(HNamingFactory::Override);
  // Create histograms in DB "gepo", Container "sbaffini" and name them
  // in /usr/.../Histograms/MC
  if (myFactory.init(this,"Histograms/MC","gepo","sbaffini")) {

    // Create two histograms. They're named 10 and "p2" in the name tree
    HepRef(PHisto1D) h1 = myFactory.Histo1D(10,"Histo-1",noBins,0.0,20.0);
    HepRef(PHisto1D) h2 = myFactory.Histo1D("p2","Histo-2",noBins,0.0,20.0);

    // Fill histos with different weights:
    for( int i = 0; i < 50000; i++) {   
      double x = (i % 22) - 1;          
      h1->fill(x, (x-9.5)*(x-9.5)+3);
      h2->fill(x, (x-9.5)*(x-9.5)+30);
    }
  }
  

Definition at line 32 of file H_Naming_Factory.h.

Public Types

enum  collisions { Override, Keep }

Public Methods

 H_Naming_Factory (collisions r)
 Constructor taking a parameter r to manage collisions on existing histograms.

int init (HepDbApplication *sess, char *path=0, char *dbname=0, 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.

 HepRef (P_Histo1D) Histo1D(int
 Create a persistent 1D histogram.

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

 HepRef (P_Histo1DVar) Histo1DVar(int
 Create a persistent 1D histogram with variable binning .

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

 HepRef (P_Histo1DVar) Histo1DVar(int
 Create a persistent 1D histogram with variable binning .

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

 HepRef (P_ProfileHisto1D) ProfileHisto(int
 Create a persistent Profile histogram.

 HepRef (P_ProfileHisto1DVar) ProfileHistoVar(int
 Create a persistent Profile histogram with variable binning.

 HepRef (P_ProfileHisto1DVar) ProfileHistoVar(int
 Create a persistent Profile histogram with variable binning.

 HepRef (P_Histo2D) Histo2D(int
 Create a persistent 2D histogram.

 HepRef (P_Histo2DVar) Histo2DVar(int
 Create a persistent 2D histogram with variable binning.

 HepRef (P_Histo2DVar) Histo2DVar(int
 Create a persistent 2D histogram with variable binning.

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

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

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

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

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

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

int removeHisto (char *path)
 Remove the histogram located by path.

void goHome ()
 Reset naming tree to user "home directory".


Public Attributes

const char Size
const char double
const char End_Point_Convention epc = RIGHT_OPEN)
const char HTL_STD::vector<
float > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
float > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
double > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
double > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
float > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
double > End_Point_Convention 
epc = RIGHT_OPEN )
const char End_Point_Convention epc1 = RIGHT_OPEN
const char End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )
const char HTL_STD::vector<
double > HTL_STD::vector<
double > End_Point_Convention 
epc1 = RIGHT_OPEN
const char HTL_STD::vector<
double > HTL_STD::vector<
double > End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )
const char HTL_STD::vector<
float > HTL_STD::vector<
float > End_Point_Convention 
epc1 = RIGHT_OPEN
const char HTL_STD::vector<
float > HTL_STD::vector<
float > End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )
const char * a_title
const char Size n
const char Size double x1
const char Size double double x2
const char Size double double
End_Point_Convention 
epc = RIGHT_OPEN)
const char HTL_STD::vector<
float > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
double > End_Point_Convention 
epc = RIGHT_OPEN )
const char HTL_STD::vector<
double > HTL_STD::vector<
double > End_Point_Convention 
epc1 = RIGHT_OPEN
const char HTL_STD::vector<
double > HTL_STD::vector<
double > End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )
const char HTL_STD::vector<
float > HTL_STD::vector<
float > End_Point_Convention 
epc1 = RIGHT_OPEN
const char HTL_STD::vector<
float > HTL_STD::vector<
float > End_Point_Convention
End_Point_Convention 
epc2 = RIGHT_OPEN )

Private Methods

int checkPrevious (char *)

Private Attributes

collisions existingHisto


Member Enumeration Documentation

enum H_Naming_Factory::collisions
 

Enumeration values:
Override 
Keep 

Definition at line 34 of file H_Naming_Factory.h.

Referenced by H_Naming_Factory().


Constructor & Destructor Documentation

H_Naming_Factory::H_Naming_Factory collisions    r [inline]
 

If r = Override the new histogram overrides the existing one, otherwise the old histogram is kept and the new one is ignored.

Definition at line 43 of file H_Naming_Factory.h.

References collisions, and existingHisto.


Member Function Documentation

int H_Naming_Factory::checkPrevious char *    [private]
 

Definition at line 45 of file H_Naming_Factory.cpp.

References H_Factory::dbApp, existingHisto, HTL_ERR, and Override.

void H_Naming_Factory::goHome  
 

Definition at line 4 of file H_Naming_Factory.cpp.

References H_Factory::dbApp.

Referenced by init().

H_Naming_Factory::HepRef P_Histo2DVar   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_Histo2DVar   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_Histo2D   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1DVar   
 

The first parameter the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1DVar   
 

The first parameter the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1D   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_Histo2DVar   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_Histo2DVar   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_Histo2D   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1DVar   
 

The first parameter the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1DVar   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_ProfileHisto1D   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_Histo1DVar   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_Histo1DVar   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_Histo1DVar   
 

The first parameter is the histogram name.

H_Naming_Factory::HepRef P_Histo1DVar   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

H_Naming_Factory::HepRef P_Histo1D   
 

The first parameter is the histogram name in the naming tree.

H_Naming_Factory::HepRef P_Histo1D   
 

The first integer parameter is an HBOOK-like id which will represent the histogram name.

Referenced by init().

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

Definition at line 8 of file H_Naming_Factory.cpp.

References H_Factory::dbApp, goHome(), HepRef(), HTL_ERR, and H_Factory::init().

int H_Naming_Factory::removeHisto char *    path
 

Definition at line 35 of file H_Naming_Factory.cpp.

References H_Factory::dbApp.


Member Data Documentation

const char* H_Naming_Factory::a_title
 

Definition at line 130 of file H_Naming_Factory.h.

const char H_Naming_Factory::double
 

Reimplemented from H_Factory.

Definition at line 151 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 147 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 140 of file H_Naming_Factory.h.

const char Size double double End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN)
 

Reimplemented from H_Factory.

Definition at line 133 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 103 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 96 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 82 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 77 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 71 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 66 of file H_Naming_Factory.h.

const char End_Point_Convention H_Naming_Factory::epc = RIGHT_OPEN)
 

Reimplemented from H_Factory.

Definition at line 88 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc1 = RIGHT_OPEN
 

Reimplemented from H_Factory.

Definition at line 167 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc1 = RIGHT_OPEN
 

Reimplemented from H_Factory.

Definition at line 160 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention H_Naming_Factory::epc1 = RIGHT_OPEN
 

Reimplemented from H_Factory.

Definition at line 125 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention H_Naming_Factory::epc1 = RIGHT_OPEN
 

Reimplemented from H_Factory.

Definition at line 117 of file H_Naming_Factory.h.

const char End_Point_Convention H_Naming_Factory::epc1 = RIGHT_OPEN
 

Reimplemented from H_Factory.

Definition at line 153 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention End_Point_Convention H_Naming_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 168 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention End_Point_Convention H_Naming_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 161 of file H_Naming_Factory.h.

const char HTL_STD::vector<float> HTL_STD::vector<float> End_Point_Convention End_Point_Convention H_Naming_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 126 of file H_Naming_Factory.h.

const char HTL_STD::vector<double> HTL_STD::vector<double> End_Point_Convention End_Point_Convention H_Naming_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 118 of file H_Naming_Factory.h.

const char End_Point_Convention End_Point_Convention H_Naming_Factory::epc2 = RIGHT_OPEN )
 

Reimplemented from H_Factory.

Definition at line 154 of file H_Naming_Factory.h.

collisions H_Naming_Factory::existingHisto [private]
 

Definition at line 36 of file H_Naming_Factory.h.

Referenced by checkPrevious(), and H_Naming_Factory().

const char Size H_Naming_Factory::n
 

Reimplemented from H_Factory.

Definition at line 130 of file H_Naming_Factory.h.

const char H_Naming_Factory::Size
 

Reimplemented from H_Factory.

Definition at line 151 of file H_Naming_Factory.h.

const char Size double H_Naming_Factory::x1
 

Reimplemented from H_Factory.

Definition at line 130 of file H_Naming_Factory.h.

const char Size double double H_Naming_Factory::x2
 

Reimplemented from H_Factory.

Definition at line 130 of file H_Naming_Factory.h.


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

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