// ESAF : Euso Simulation and Analysis Framework
// $Id: DialogFactory.cc,v 1.3 2004/06/15 12:02:30 thea Exp $
// Marco Pallavicini created Oct, 4 2002
#include "DialogFactory.hh"
#include "DetectorConfigDlg.hh"
ClassImp(DialogFactory)
DialogFactory* DialogFactory::fMe = NULL;
//______________________________________________________________________________
DialogFactory::DialogFactory() : BaseDialogFactory() {
// constructor
}
//______________________________________________________________________________
DialogFactory::~DialogFactory() {
// destructor
}
//______________________________________________________________________________
BaseDialogFactory* DialogFactory::Get() {
// singleton
if ( fMe == NULL )
fMe = new DialogFactory();
return fMe;
}
//______________________________________________________________________________
TGTransientFrame* DialogFactory::BuildFrame( const string& name,
EusoApplication *myApp, TGWindow *myWin, TGMainFrame *myFrm) const {
// main factory method
// according to the value of name, the right
// TGTransientFrame object is returned
// a single frame handles all electronics
if ( name == "Photomultiplier" ||
name == "PmtSignal" || name == "PmtGeometry" ||
name == "Macrocell" || name == "FrontEndChip" ) {
return new DetectorConfigDlg( myApp, myWin, myFrm );
}
return 0;
}