source: trunk/MagicSoft/Simulation/Detector/StarResponse/srreadparam.h@ 6724

Last change on this file since 6724 was 5407, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 3.8 KB
Line 
1//=//////////////////////////////////////////////////////////////////////
2//=
3//= srreadparam
4//=
5//= @file srreadparam.h
6//= @desc Header file
7//= @author O Blanch Bigas
8//= @email blanch@ifae.es
9//= @date Wed Feb 21 17:21:26 CET 2001
10//=
11//=----------------------------------------------------------------------
12//=
13//= Created: Wed Feb 21 17:21:26 CET 2001
14//= Author: O Blanch Bigas
15//= Purpose: Program for star response simulation
16//= Notes: See files README for details
17//=
18//=----------------------------------------------------------------------
19//=
20//= $RCSfile: srreadparam.h,v $
21//= $Revision: 1.6 $
22//= $Author: moralejo $
23//= $Date: 2004-11-16 11:09:24 $
24//=
25//=//////////////////////////////////////////////////////////////////////
26
27// @T \newpage
28
29//!@section Source code of |srreadparam.h|.
30
31/*!@"
32
33 In this section you can find the source code for the file
34 |srreadparam.h|. This file is mainly needed by
35 |srreadparam.cxx|. Here is located the definition of the commands you
36 can use in the parameters file.
37
38 The commands now available for the parameters file are:
39
40 @itemize
41
42 @- |input_file| filename :
43 @enditemize
44
45 @ignoreHTML
46 A parameters file (a small one) looks like this:
47
48 @endignoreHTML
49
50@"*/
51
52//!@{
53
54#ifndef _srreadparam_
55#define _srreadparam_
56
57//!@}
58
59//!@subsection Include files.
60
61//!@{
62
63#include <iostream>
64#include <fstream>
65#include <stdlib.h>
66#include <stdio.h>
67#include <string>
68#include <math.h>
69#include <float.h>
70
71#include "jcmacros.h"
72#include "jcdebug.h"
73
74#include "MFadcDefine.h"
75#include "MTriggerDefine.h"
76
77//!@}
78
79//!@subsection Macro-definitions, and constants.
80
81//!@{
82
83// now we define the list ITEM_LIST of possible items in
84// the parameters file. note that they are functions of
85// T(x). we will change T(x) to be the real item or the
86// string of this item when needed
87
88#define ITEM_LIST /* LIST OF ITEMS IN THE PARAMETERS FILE */ \
89T(database_path), /* path to store the database */ \
90T(simulated_phe), /* starfield file */ \
91T(trig_properties), /* shape for the single phe trigger response */ \
92T(fadc_properties), /* shape for the single phe fadc response */ \
93T(fadc_GHz), /* FADC sampling frequency in GHz */ \
94T(gain_fluctuations_off), /* Switches off PMT gain fluctuations */ \
95T(write_root), /* write root file with some histograms */ \
96T(end_file) /* end of the parameters file */
97
98#define T(x) x // define T() as the name as it is
99
100enum ITEM_TYPE {
101 ITEM_LIST
102};
103
104#undef T
105
106#define T(x) #x // define T() as the string of x
107
108const char *const ITEM_NAMES[] = {
109 ITEM_LIST
110};
111
112#undef T
113
114#define LINE_MAX_LENGTH 400
115#define ITEM_MAX_LENGTH 40
116#define PATH_MAX_LENGTH 120
117
118//!@}
119
120//!@subsection Prototypes of functions.
121
122//!@{
123
124//++
125// prototypes
126//--
127
128void readparam(char * filename);
129char *get_database_path(void);
130void get_simulated_phe(float *lphe, float *uphe, float *pphe);
131void get_trig_properties(int *shape, float *ampl, float *fwhm);
132void get_fadc_properties(int *shape, float *ampl, float *fwhm, float *slicesperns);
133int apply_gain_fluctuations();
134int get_write_root();
135//!@}
136
137//!@{
138
139#endif // ! _srreadparam_
140
141//!@}
142
143//=------------------------------------------------------------
144//!@subsection Log of this file.
145
146//!@{
147
148/*
149 * $Log: not supported by cvs2svn $
150 * Revision 1.5 2004/10/12 13:41:09 moralejo
151 * *** empty log message ***
152 *
153 * Revision 1.4 2004/09/17 13:51:02 moralejo
154 *
155 * Adapted headers to current c++ style, removed -Wno-deprecated from
156 * compilation options.
157 *
158 * Revision 1.3 2004/09/16 16:20:13 moralejo
159 * *** empty log message ***
160 *
161 * Revision 1.2 2001/03/05 11:02:10 blanch
162 * Header file for srreadparam.cxx 1.2
163 *
164 * Revision 1.1 2001/02/23 10:14:13 magicsol
165 * Header file for srreadparam.cxx version 1.1
166 *
167 */
168
169//!@}
170//=EOF
Note: See TracBrowser for help on using the repository browser.