BinsFactory.cxx
Go to the documentation of this file.
1 
12 // for truncation warning in debug mode
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "BinsFactory.h"
18 
19 // List of default Bins container objects
20 #include "Bins1DHist.h"
21 #include "Bins1DProfile.h"
22 #include "Bins2DHist.h"
23 #include "Bins2DProfile.h"
24 
25 namespace hippodraw {
26 
27 BinsFactory * BinsFactory::s_instance = 0;
28 
30 {
31 }
32 
34 {
35  if ( s_instance == 0 ) {
36  s_instance = new BinsFactory ();
38  }
39  return s_instance;
40 }
41 
43 {
44  add ( new Bins1DHist () );
45  add ( new Bins1DProfile () );
46  add ( new Bins2DHist () );
47  add ( new Bins2DProfile () );
48 }
49 
50 } // namespace hippodraw
hippodraw::Bins2DProfile class interface
The class for the 1D profile binner hierarchy.
Definition: Bins1DProfile.h:32
The class for the 2D profile binner hierarchy.
Definition: Bins2DProfile.h:30
A Factory singleton class for creating objects whose class derives from BinsBase. ...
Definition: BinsFactory.h:31
The class for the one-dimensional histogram binning.
Definition: Bins1DHist.h:38
void initialize()
Initializes the factory with a set of default functions.
Definition: BinsFactory.cxx:42
void add(BinsBase *)
Adds a prototype object to the list of prototypes.
BinsFactory()
A default constructor for prevent creation except by the itself or the derived classes.
Definition: BinsFactory.cxx:29
The class for the 2D histogram binning.
Definition: Bins2DHist.h:28
static BinsFactory * instance()
Returns a pointer to the singleton instance.
Definition: BinsFactory.cxx:33
hippodraw::Bins2DHist class interface
static BinsFactory * s_instance
A pointer to the singleton object.
Definition: BinsFactory.h:37
hippodraw::Bins1DProfile class interface
hippodraw::Bins1DHist class interface

Generated for HippoDraw Class Library by doxygen