Last change
on this file since 117 was
117,
checked in by moretto, 11 years ago
|
ESAF version compilable on mac OS
|
File size:
1.4 KB
|
Line | |
---|
1 | %------------------------------------------------------------------------------ |
---|
2 | \section{EsafConfigClass and configuration files}% \ref{Euso Simulation and Analysis Framework, pallas & ddm} |
---|
3 | %------------------------------------------------------------------------------ |
---|
4 | |
---|
5 | Many \ESAF{} Classes are initialized via config files contained in \path{config/} directory. |
---|
6 | The interface between \code{.cfg} files and classes is handled by the \code{Config} singleton and \code{EusoConfigurable} objects. |
---|
7 | |
---|
8 | All the classes inheriting from \code{EusoConfigurable} can access the parameters stored in the \code{.cfg} files using \code{EusoConfigurable::Conf()} interface. |
---|
9 | \code{Conf()} returns a pointer to the correct \code{EusoConfigFileParser} object stored in \code{Config}. |
---|
10 | Each class must be properly set to get the correct parser from \code{Conf()}. |
---|
11 | |
---|
12 | This is done adding the following line in the class definition: |
---|
13 | |
---|
14 | \begin{displaycode} |
---|
15 | EsafConfigClass(Optics, ParamOpticalSystem) |
---|
16 | \end{displaycode} |
---|
17 | |
---|
18 | \code{EsafConfigClass()} macro has two arguments, the first is \code{ClassType} and the second \code{ClassName}. |
---|
19 | \code{ClassType} refers to the \path{config/} subdirectory where the class config file is, while \code{ClassName} is the file name. |
---|
20 | In \ESAF{} each class has its own config file.% Violations of this rule must be considered exceptional and must always be well motivated. |
---|
21 | |
---|
22 | A detailed description of \ESAF{} configuration system can be found in \cite{bib:esaf} |
---|
Note: See
TracBrowser
for help on using the repository browser.