This commit was generated by cvs2svn to compensate for changes in r23244,
[u/mrichter/AliRoot.git] / TTherminator / Therminator / ReadPar.h
CommitLineData
2e967919 1/******************************************************************************
2 * T H E R M I N A T O R *
3 * THERMal heavy-IoN generATOR *
4 * version 1.0 *
5 * *
6 * Authors of the model: Wojciech Broniowski, Wojciech.Broniowski@ifj.edu.pl, *
7 * Wojciech Florkowski, Wojciech.Florkowski@ifj.edu.pl *
8 * Authors of the code: Adam Kisiel, kisiel@if.pw.edu.pl *
9 * Tomasz Taluc, ttaluc@if.pw.edu.pl *
10 * Code designers: Adam Kisiel, Tomasz Taluc, Wojciech Broniowski, *
11 * Wojciech Florkowski *
12 * *
13 * For the detailed description of the program and furhter references *
14 * to the description of the model plesase refer to: nucl-th/0504047, *
15 * accessibile at: http://www.arxiv.org/nucl-th/0504047 *
16 * *
17 * Homepage: http://hirg.if.pw.edu.pl/en/therminator/ *
18 * *
19 * This code can be freely used and redistributed. However if you decide to *
20 * make modifications to the code, please contact the authors, especially *
21 * if you plan to publish the results obtained with such modified code. *
22 * Any publication of results obtained using this code must include the *
23 * reference to nucl-th/0504047 and the published version of it, when *
24 * available. *
25 * *
26 *****************************************************************************/
27#ifndef _THERMINATOR_READPAR_
28#define _THERMINATOR_READPAR_
29#include <iostream>
30#include <string>
31#include <vector>
32#include <exception>
33#include "TString.h"
34
35typedef TString STR;
36
37// Ecxeption values
38#define RP_Exception_UnknownException 0
39#define RP_Exception_NoSuchParamter 1
40#define RP_Exception_NoParFile 2
41
42struct struct_option
43{
44 STR keyword;
45 STR value;
46};
47
48typedef struct struct_option option;
49typedef std::vector<option> VOPT;
50
51class ReadPar
52{
53 private:
54 char *fname;
55 VOPT options;
56
57 public:
58 ReadPar(); // Default constructor
59 ReadPar(const char *aFName);
60
61 int readFile(const char *aFName) throw(int);
62 int printOptions();
63 STR getPar(const char *name) throw(STR);
64
65};
66
67#endif