FitStateFactory Class Reference

FitStateFactory - creates FitState objects. More...

#include <FitStateFactory.h>

List of all members.

Public Types

typedef FitState *(* FSCreator )()
 pointer to function creating fitter state

Public Member Functions

FitStateGetFitState (const std::string &fitStateId)
 create fitter state given its name
FitStateGetFitState (const char *fitStateId)
bool RegisterFitState (const std::string &FitStateId, FSCreator creator)
 Returns 'true' if registration was successful.
bool UnregisterFitState (const std::string &FitStateId)
 Returns 'true' if the FitStateId was registered before.

Static Public Member Functions

static FitStateFactoryInstance ()
 get reference to the FSFactory singleton

Private Types

typedef std::map< std::string,
FSCreator
CallbackMap
 map of creator function pointers keyed by name
typedef std::map< std::string,
FitState * > 
StateMap

Private Member Functions

FitStateCreateFitState (const std::string &FitStateId)
 create fitter state given its name
 FitStateFactory ()
 Those are private.
 FitStateFactory (const FitStateFactory &)

Private Attributes

CallbackMap fCallbacks
StateMap fFitStates

Static Private Attributes

static FitStateFactoryfInstance = 0
 initialize singleton

Detailed Description

FitStateFactory - creates FitState objects.

FitStateFactory creates FitState objects. Pointers to functions creating different types of FitState are in a map, keyed by names of the fitter state types. Creator functions have to be registered with FSFactory using 'RegisterFitState' method, so that new types of histogram blocks can be added without changing FSFactory code. FSFactory is a singleton.

Author:
Sergei avva@fnal.gov

FitStateFactory creates FitState objects. Pointers to functions creating different types of FitState are in a map, keyed by names of the fitter state types. Creator functions have to be registered with FSFactory using 'RegisterFitState' method, so that new types of histogram blocks can be added without changing FSFactory code. FSFactory is a singleton.

Author:
Sergei avva@fnal.gov
Id
FitStateFactory.h,v 1.1 2006/02/04 07:14:12 avva Exp

Definition at line 26 of file FitStateFactory.h.


Member Typedef Documentation

typedef std::map<std::string, FSCreator> FitStateFactory::CallbackMap [private]

map of creator function pointers keyed by name

Definition at line 34 of file FitStateFactory.h.

pointer to function creating fitter state

Definition at line 30 of file FitStateFactory.h.

typedef std::map<std::string, FitState*> FitStateFactory::StateMap [private]

Definition at line 35 of file FitStateFactory.h.


Constructor & Destructor Documentation

FitStateFactory::FitStateFactory (  )  [private]

Those are private.

Definition at line 126 of file FitStateFactory.cxx.

00126 {}

FitStateFactory::FitStateFactory ( const FitStateFactory  )  [private]

Definition at line 127 of file FitStateFactory.cxx.

00127 {}


Member Function Documentation

FitState* FitStateFactory::CreateFitState ( const std::string &  FitStateId  )  [private]

create fitter state given its name

FitState * FitStateFactory::GetFitState ( const char *  fitStateId  ) 

Definition at line 98 of file FitStateFactory.cxx.

References GetFitState().

00099 {
00100     return GetFitState(std::string(fsname));
00101 }

FitState* FitStateFactory::GetFitState ( const std::string &  fitStateId  ) 

create fitter state given its name

Referenced by AlgFitTrackSA::DoFit(), FitContext::FitContext(), and GetFitState().

FitStateFactory & FitStateFactory::Instance (  )  [static]

get reference to the FSFactory singleton

Get FSFactory reference

Definition at line 38 of file FitStateFactory.cxx.

References fInstance.

Referenced by AlgFitTrackSA::DoFit(), FitContext::FitContext(), FitStateIterating::Iterate(), FitStateInitial::Iterate(), FitStateDiverged::Iterate(), and FitStateConverged::Iterate().

00039 {
00040     TracerSA trace("FitStateFactory::Instance()");
00041     
00042     if ( !fInstance ) fInstance = new FitStateFactory;
00043     return *fInstance;
00044 } // FitStateFactory& FitStateFactory::Instance()

bool FitStateFactory::RegisterFitState ( const std::string &  FitStateId,
FSCreator  creator 
)

Returns 'true' if registration was successful.

bool FitStateFactory::UnregisterFitState ( const std::string &  FitStateId  ) 

Returns 'true' if the FitStateId was registered before.


Member Data Documentation

Definition at line 58 of file FitStateFactory.h.

Definition at line 59 of file FitStateFactory.h.

initialize singleton

Definition at line 57 of file FitStateFactory.h.

Referenced by Instance().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1