ConfigurationReader Class Reference

A lua configuration file parser. More...

#include <ConfigurationReader.h>

Detailed Description

A lua configuration file parser.

This class handles the parsing of the lua configuration file. The configuration files describes which modules should be run in order to form an integrand. This integrand is then integrated using CUBA and MoMEMta and the result of the integral is returned.

A module is a single element of a more complex scheme. Itself, it only performs a simple tasks (flattening a Breit-Wigner for example), but combined with other modules, it's possible to define complex integrand.

A module can be seen like a box with a fixed number of inputs and outputs. The configuration file is used to specify a list of module to run, and to connect outputs of modules to inputs of other modules.

Todo:
Discuss the parameters table, cuba table and the concept of freezing and delayed execution

Definition at line 45 of file ConfigurationReader.h.

Inheritance diagram for ConfigurationReader:

Public Member Functions

 ConfigurationReader (const std::string &)
 
 ConfigurationReader (const std::string &, const ParameterSet &)
 
virtual void onModuleDeclared (const std::string &type, const std::string &name) override
 A module is declared in the configuration file. More...
 
virtual void onIntegrandDeclared (const InputTag &tag) override
 The integrand was defined in the configuration file. More...
 
virtual void onNewPath (const ExecutionPath &path) override
 A new path is declared in the configuration file. More...
 
virtual void addIntegrationDimension () override
 A new integration dimension is requested in the configuration file. More...
 
virtual void onNewInputDeclared (const std::string &name) override
 The configuration file declared a new input. More...
 
ParameterSetgetGlobalParameters ()
 
ParameterSetgetCubaConfiguration ()
 
Configuration freeze () const
 Freeze the configuration. More...
 

Friends

class Configuration
 

Member Function Documentation

◆ addIntegrationDimension()

void ConfigurationReader::addIntegrationDimension ( )
overridevirtual

A new integration dimension is requested in the configuration file.

This function is called when the user calls the 'add_dimension' lua function

A lua code like

ps_point = add_dimension()

will result in a call to this function

Implements ILuaCallback.

Definition at line 118 of file ConfigurationReader.cc.

◆ freeze()

Configuration ConfigurationReader::freeze ( ) const

Freeze the configuration.

Returns
A freezed copy of the configuration

Definition at line 134 of file ConfigurationReader.cc.

◆ onIntegrandDeclared()

void ConfigurationReader::onIntegrandDeclared ( const InputTag tag)
overridevirtual

The integrand was defined in the configuration file.

This function is called when the user calls the integrand lua function

A lua code like

integrand("module::parameter")

will result in a call to this function with tag equals to module::parameter

Implements ILuaCallback.

Definition at line 110 of file ConfigurationReader.cc.

◆ onModuleDeclared()

void ConfigurationReader::onModuleDeclared ( const std::string &  type,
const std::string &  name 
)
overridevirtual

A module is declared in the configuration file.

This function is called as soon as a new module is declared in the configuration file.

A lua code like

MatrixElement.module_name = {}

will result in a call to this function with type equals to MatrixElement and name equals to module_name.

Implements ILuaCallback.

Definition at line 102 of file ConfigurationReader.cc.

◆ onNewInputDeclared()

void ConfigurationReader::onNewInputDeclared ( const std::string &  name)
overridevirtual

The configuration file declared a new input.

This function is called when the user calls the declare_input lua function

A lua code like

declare_input("lepton")

will result in a call to this function with name equals to lepton

Implements ILuaCallback.

Definition at line 122 of file ConfigurationReader.cc.

◆ onNewPath()

void ConfigurationReader::onNewPath ( const ExecutionPath path)
overridevirtual

A new path is declared in the configuration file.

This function is called when the user declared a new Path instance

A lua code like

p = Path("my", "path")

will result in a call to this function

Implements ILuaCallback.

Definition at line 114 of file ConfigurationReader.cc.


The documentation for this class was generated from the following files: