Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

DialogFactory - source file

// ESAF : Euso Simulation and Analysis Framework
// $Id: DialogFactory.cc,v 1.4 2005/10/18 23:17: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, 
		SimuApplication *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;
}


About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:57:39 2005 Wed Nov 16 16:29:22 2005