// $Id: AtmosphereFactory.cc,v 1.19 2005/04/14 15:48:48 moreggia Exp $
// Sylvain Moreggia created Dec, 1 2003
/*****************************************************************************
* ESAF: Euso Simulation and Analysis Framework *
* *
* Id: AtmosphereFactory *
* Package: atmosphere *
* Coordinator: S. Moreggia *
* *
*****************************************************************************/
//_____________________________________________________________________________
//
// AtmosphereFactory
//
// <extensive class description>
//
// Config file parameters
// ======================
//
// <parameter name>: <parameter description>
// -Valid options: <available options>
//
#include "AtmosphereFactory.hh"
#include "TestClouds.hh"
#include "NoClouds.hh"
#include "Config.hh"
#include "UniformLayersClouds.hh"
AtmosphereFactory *AtmosphereFactory::fMe = NULL;
ClassImp(AtmosphereFactory)
//_________________________________________________________________________________________
AtmosphereFactory::AtmosphereFactory() {
//
// ctor
//
}
//_________________________________________________________________________________________
AtmosphereFactory::~AtmosphereFactory() {
//
// dtor
//
}
//_________________________________________________________________________________________
AtmosphereFactory* AtmosphereFactory::Get() {
//
// instance
//
if ( fMe == NULL )
fMe = new AtmosphereFactory();
return fMe;
}
//_________________________________________________________________________________________
Clouds* AtmosphereFactory::GetClouds() {
//
// Build clouds object
//
string type = Conf()->GetStr("Clouds.type");
if(type == "test")
return new TestClouds();
if(type == "uniform")
return new UniformLayersClouds();
if(type == "none")
return new NoClouds();
else Msg(EsafMsg::Panic)<< " Wrong clouds type"<< MsgDispatch;
return 0;
}