TrackFilterFactory Class Reference

TrackFilterFactory - creates TrackFilter objects. More...

#include <TrackFilterFactory.h>

List of all members.

Public Types

typedef TrackFilter *(*) Creator ()
 pointer to function creating fitter state

Public Member Functions

TrackFilterGetTrackFilter (const std::string &fitStateId)
 create fitter state given its name
TrackFilterGetTrackFilter (const char *fitStateId)
bool RegisterTrackFilter (const std::string &TrackFilterId, Creator creator)
 Returns 'true' if registration was successful.
bool UnregisterTrackFilter (const std::string &TrackFilterId)
 Returns 'true' if the TrackFilterId was registered before.

Static Public Member Functions

static TrackFilterFactoryInstance ()
 get reference to the FSFactory singleton

Private Types

typedef std::map< std::string,
 map of creator function pointers keyed by name
typedef std::map< std::string,
TrackFilter * > 

Private Member Functions

TrackFilterCreateTrackFilter (const std::string &TrackFilterId)
 create fitter state given its name
 TrackFilterFactory ()
 Those are private.
 TrackFilterFactory (const TrackFilterFactory &)

Private Attributes

CallbackMap fCallbacks
StateMap fTrackFilters

Static Private Attributes

static TrackFilterFactoryfInstance = 0
 initialize singleton

Detailed Description

TrackFilterFactory - creates TrackFilter objects.

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


Definition at line 26 of file TrackFilterFactory.h.

Member Typedef Documentation

typedef std::map<std::string, Creator> TrackFilterFactory::CallbackMap [private]

map of creator function pointers keyed by name

Definition at line 34 of file TrackFilterFactory.h.

typedef TrackFilter*(*) TrackFilterFactory::Creator()

pointer to function creating fitter state

Definition at line 30 of file TrackFilterFactory.h.

typedef std::map<std::string, TrackFilter*> TrackFilterFactory::StateMap [private]

Definition at line 35 of file TrackFilterFactory.h.

Constructor & Destructor Documentation

TrackFilterFactory::TrackFilterFactory (  )  [private]

Those are private.

Definition at line 126 of file TrackFilterFactory.cxx.

00126 {}

TrackFilterFactory::TrackFilterFactory ( const TrackFilterFactory  )  [private]

Definition at line 127 of file TrackFilterFactory.cxx.

00127 {}

Member Function Documentation

TrackFilter* TrackFilterFactory::CreateTrackFilter ( const std::string &  TrackFilterId  )  [private]

create fitter state given its name

TrackFilter * TrackFilterFactory::GetTrackFilter ( const char *  fitStateId  ) 

Definition at line 98 of file TrackFilterFactory.cxx.

References GetTrackFilter().

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

TrackFilter* TrackFilterFactory::GetTrackFilter ( const std::string &  fitStateId  ) 

create fitter state given its name

Referenced by GetTrackFilter(), and AlgFitTrackSA::RunAlg().

TrackFilterFactory & TrackFilterFactory::Instance (  )  [static]

get reference to the FSFactory singleton

Get FSFactory reference

Definition at line 38 of file TrackFilterFactory.cxx.

References fInstance.

Referenced by AlgFitTrackSA::RunAlg().

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

bool TrackFilterFactory::RegisterTrackFilter ( const std::string &  TrackFilterId,
Creator  creator 

Returns 'true' if registration was successful.

bool TrackFilterFactory::UnregisterTrackFilter ( const std::string &  TrackFilterId  ) 

Returns 'true' if the TrackFilterId was registered before.

Member Data Documentation

CallbackMap TrackFilterFactory::fCallbacks [private]

Definition at line 58 of file TrackFilterFactory.h.

TrackFilterFactory * TrackFilterFactory::fInstance = 0 [static, private]

initialize singleton

Definition at line 57 of file TrackFilterFactory.h.

Referenced by Instance().

StateMap TrackFilterFactory::fTrackFilters [private]

Definition at line 59 of file TrackFilterFactory.h.

The documentation for this class was generated from the following files:
Generated on Tue Dec 1 22:48:16 2015 for loon by  doxygen 1.4.7