English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sampler: URANIE::Sampler::TSampler Class Reference
Uranie / Sampler v4.9.0
/* @license-end */
URANIE::Sampler::TSampler Class Referenceabstract

Abstraite class for sampling methods More...

#include <TSampler.h>

Inheritance diagram for URANIE::Sampler::TSampler:
Collaboration diagram for URANIE::Sampler::TSampler:

Public Member Functions

Constructor and Destructor
 TSampler (URANIE::DataServer::TDataServer *tds, Option_t *option, Int_t nCalcul)
 Constructor with a TDataServer, the options and the size of the sample.
 
virtual ~TSampler ()
 Default destructor.
 
Setting and Getting global informations
Int_t GetID ()
 Returns the ID of the class.
 
void setMethodName (TString str)
 Sets the method name in a global variable.
 
TString getMethodName ()
 Gets the method name.
 
virtual URANIE::DataServer::TDataServer * getTDS ()
 Return the TDS filling by the sampling algorithm.
 
void parseOption (Option_t *option)
 Parse the option.
 
Generates the sample
virtual void generateSample (Option_t *option="")=0
 Generates the Sample.
 
Treats the TAttributes
virtual void createListOfAttributes ()
 Creates the List of attributes to simulate.
 
virtual void createTuple ()
 Creates the TDSNtupleD of data with only the TStochasticAttributes.
 
URANIE::DataServer::TDSNtupleD * getTuple ()
 Returns the TDSNtupleD of data.
 
virtual void fillOtherAttributes ()
 Fills the TDSNtupleD of data with other TFormulaAttributes.
 
Printing Log
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 
virtual void printLog (Option_t *option="")
 

Public Attributes

Int_t _nS
 The size of the sample.
 
Int_t _nX
 The size of attributes to sample.
 
URANIE::DataServer::TDSNtupleD * _ntsample
 the tntuple of data
 
TString _sMethod
 The title of the sampler method.
 
Bool_t _blog
 Log Printing.
 
Bool_t _bupdateFile
 Update the back up file when generating the attributeformula if there is some.
 
URANIE::DataServer::TDataServer * _tds
 Pointer to a TDS.
 
TList * _lstOfAttributesToSample
 The list of Stochastic Attributes to sample.
 

Detailed Description

Abstraite class for sampling methods

This is the abstract class for sampling methods (determinist, stochastic). Usually, the constructors of these classes follow the following prototype :

TSampler( URANIE::DataServer::TDataServer *tds, Option_t *option , Int_t nCalcul )
Abstraite class for sampling methods
Definition TSampler.h:97

where :

  • tds : this is a pointer to a TDataServer which contains the attributes to be simulated. It can also contain other attributes which will not be sampled as they do not correspond to a recognized type if this method is used.
  • option : it is a list of characters which precises options of the chosen method. For example for qMC methods, a king of sequence ("sobol" ou "halton") can be chosen.
  • nCalcul : the size of the sample to be generated.

The type of the class must be considered be as a machine with 3 states :

dot_inline_dotgraph_1.png

avec

  • init : this method enables the initialisation of all the information needed by the method (matrix, vector of the prime numbers for qMC). Among others, it permits to select the list of variables to be simulated ( _lstOfAttributesToSample ) which changes according to the adopted method : the TAttributes, borned for the determinist methods qMC and the TStochAttribut for the stoachastic methods (SRS, LHS).
  • generateSample : the method of samples generation itself. It consists in filling the TDataServer which is passed as argument to the constructor.
  • terminate

the pure virtual methods

To make the class useful, the daughter classes of TSampler must define the pure virtual method generateSample. This method returns the TDataServer for generating a sample.

The virtual methods

The sampling method generateSample is seen as a state machine,

Constructor & Destructor Documentation

◆ TSampler()

URANIE::Sampler::TSampler::TSampler ( URANIE::DataServer::TDataServer *  tds,
Option_t *  option,
Int_t  nCalcul 
)

Constructor with a TDataServer, the options and the size of the sample.

Referenced by ClassImp().

◆ ~TSampler()

virtual URANIE::Sampler::TSampler::~TSampler ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ changeLog()

void URANIE::Sampler::TSampler::changeLog ( )
inline

References _blog.

◆ createListOfAttributes()

virtual void URANIE::Sampler::TSampler::createListOfAttributes ( )
virtual

Creates the List of attributes to simulate.

Reimplemented in URANIE::Sampler::TImportanceSampling, URANIE::Sampler::TSamplerField, and URANIE::Sampler::TVQ.

Referenced by ClassImp().

◆ createTuple()

◆ fillOtherAttributes()

virtual void URANIE::Sampler::TSampler::fillOtherAttributes ( )
virtual

◆ generateSample()

◆ GetID()

Int_t URANIE::Sampler::TSampler::GetID ( )
inline

Returns the ID of the class.

Todo:
Adapt to the right form, and see location of the file which contains these informations.

Referenced by ClassImp(), ClassImp(), URANIE::Sampler::TSamplerField::printLog(), and URANIE::Sampler::TSamplerStochastic::printLog().

◆ getLog()

Bool_t URANIE::Sampler::TSampler::getLog ( )
inline

References _blog.

◆ getMethodName()

TString URANIE::Sampler::TSampler::getMethodName ( )
inline

Gets the method name.

References _sMethod.

◆ getTDS()

virtual URANIE::DataServer::TDataServer * URANIE::Sampler::TSampler::getTDS ( )
inlinevirtual

Return the TDS filling by the sampling algorithm.

This method returns the TDS filling by the sampling algorithm

Reimplemented in URANIE::Sampler::TImportanceSampling.

References _tds.

◆ getTuple()

URANIE::DataServer::TDSNtupleD * URANIE::Sampler::TSampler::getTuple ( )
inline

Returns the TDSNtupleD of data.

References _ntsample.

◆ parseOption()

void URANIE::Sampler::TSampler::parseOption ( Option_t *  option)

◆ printLog()

◆ setLog()

void URANIE::Sampler::TSampler::setLog ( )
inline

References _blog.

◆ setMethodName()

void URANIE::Sampler::TSampler::setMethodName ( TString  str)
inline

Sets the method name in a global variable.

References _sMethod.

Referenced by URANIE::Sampler::TBasicSampling::TBasicSampling(), and URANIE::Sampler::TSamplerField::TSamplerField().

◆ unsetLog()

void URANIE::Sampler::TSampler::unsetLog ( )
inline

References _blog.

Member Data Documentation

◆ _blog

◆ _bupdateFile

Bool_t URANIE::Sampler::TSampler::_bupdateFile

Update the back up file when generating the attributeformula if there is some.

Referenced by ClassImp().

◆ _lstOfAttributesToSample

◆ _nS

◆ _ntsample

◆ _nX

◆ _sMethod

TString URANIE::Sampler::TSampler::_sMethod

◆ _tds