StopMuFinderFactory Class Reference

StopMuFinderFactory - creates StopMuFinder objects. More...

#include <StopMuFinderFactory.h>

List of all members.

Public Types

typedef StopMuFinder *(* SMFCreator )()
 pointer to function creating histogram block

Public Member Functions

bool RegisterStopMuFinder (std::string StopMuFinderId, SMFCreator creator)
 Returns 'true' if registration was successful.
bool UnregisterStopMuFinder (std::string StopMuFinderId)
 Returns 'true' if the StopMuFinderId was registered before.
StopMuFinderCreateStopMuFinder (std::string StopMuFinderId)
 create StopMuFinder given its name
StopMuFinderCreateStopMuFinder (const VldContext &vldc)
 create StopMuFinder given validity context

Static Public Member Functions

static StopMuFinderFactoryInstance ()
 get reference to the SMFFactory singleton

Private Types

typedef std::map< std::string,
SMFCreator
CallbackMap
 map of creator function pointers keyed by name

Private Member Functions

 StopMuFinderFactory ()
 SMFFactory is a singleton - ctor/copy-ctor are private.
 StopMuFinderFactory (const StopMuFinderFactory &)

Private Attributes

CallbackMap fCallbacks

Static Private Attributes

static StopMuFinderFactoryfInstance = 0
 initialize singleton

Detailed Description

StopMuFinderFactory - creates StopMuFinder objects.

Author:
Sergei avva@fnal.gov 2005-03
Id
StopMuFinderFactory.cxx,v 1.3 2007/11/11 07:29:53 rhatcher Exp
Author:
Sergei avva@fnal.gov 2005-03

$Id:

Definition at line 17 of file StopMuFinderFactory.h.


Member Typedef Documentation

typedef std::map<std::string, SMFCreator> StopMuFinderFactory::CallbackMap [private]

map of creator function pointers keyed by name

Definition at line 25 of file StopMuFinderFactory.h.

pointer to function creating histogram block

Definition at line 21 of file StopMuFinderFactory.h.


Constructor & Destructor Documentation

StopMuFinderFactory::StopMuFinderFactory (  )  [private]

SMFFactory is a singleton - ctor/copy-ctor are private.

Definition at line 114 of file StopMuFinderFactory.cxx.

00114 {}

StopMuFinderFactory::StopMuFinderFactory ( const StopMuFinderFactory  )  [private]

Definition at line 115 of file StopMuFinderFactory.cxx.

00115 {}


Member Function Documentation

StopMuFinder * StopMuFinderFactory::CreateStopMuFinder ( const VldContext vldc  ) 

create StopMuFinder given validity context

CreateStopMuFinder - calls stop mu finder creator given validity context

Definition at line 91 of file StopMuFinderFactory.cxx.

References CreateStopMuFinder(), VldContext::GetDetector(), Msg::kDebug, Msg::kError, Detector::kFar, and MSG.

00092 {
00093     MSG("StopMuFilter",Msg::kDebug) 
00094         << "StopMuFinderFactory::CreatStopMuFinder(VldContext)" 
00095         << endl;
00096         
00097     string smfname;
00098     if ( vldc.GetDetector() == Detector::kFar ) {
00099         smfname = string("StopMuFinderFar");
00100         StopMuFinder* smf = CreateStopMuFinder(smfname);
00101         return smf;        
00102     } else {   
00103         MSG("StopMuFilter",Msg::kError) 
00104             << "Can not create StopMuFinder for " 
00105             << vldc.GetDetector() << " detctor." << endl;
00106         return 0;
00107     }
00108         
00109 } // StopMuFinder* StopMuFinderFactory::CreateStopMuFinder(string)

StopMuFinder* StopMuFinderFactory::CreateStopMuFinder ( std::string  StopMuFinderId  ) 

create StopMuFinder given its name

Referenced by CreateStopMuFinder().

StopMuFinderFactory & StopMuFinderFactory::Instance (  )  [static]

get reference to the SMFFactory singleton

Get SMFFactory reference

Definition at line 26 of file StopMuFinderFactory.cxx.

References fInstance, Msg::kDebug, and MSG.

Referenced by StopMuFilterModule::Ana().

00027 {
00028     MSG("StopMuFilter",Msg::kDebug) 
00029         << "StopMuFinderFactory::Instance()" << endl;
00030     
00031     if ( !fInstance ) fInstance = new StopMuFinderFactory;
00032     return *fInstance;
00033 } // StopMuFinderFactory& StopMuFinderFactory::Instance()

bool StopMuFinderFactory::RegisterStopMuFinder ( std::string  StopMuFinderId,
SMFCreator  creator 
)

Returns 'true' if registration was successful.

bool StopMuFinderFactory::UnregisterStopMuFinder ( std::string  StopMuFinderId  ) 

Returns 'true' if the StopMuFinderId was registered before.


Member Data Documentation

Definition at line 50 of file StopMuFinderFactory.h.

initialize singleton

Definition at line 48 of file StopMuFinderFactory.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