9 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
10 |
#define NSINGMAX 100 |
#define NSINGMAX 100 |
11 |
|
|
12 |
|
#include <CalibTrk1Event.h> |
13 |
|
#include <CalibTrk2Event.h> |
14 |
|
|
15 |
#include <TString.h> |
#include <TString.h> |
16 |
#include <TFile.h> |
#include <TFile.h> |
17 |
|
#include <TTree.h> |
18 |
|
|
19 |
|
#include <fstream> |
20 |
|
#include <iostream> |
21 |
/** |
/** |
22 |
* \brief Struct to pass calibration data to F77 routines |
* \brief Struct to pass calibration parameters to F77 routines |
23 |
*/ |
*/ |
24 |
struct cTrkCalib { |
struct cTrkCalib { |
25 |
|
|
26 |
float pedestal[128][24][12]; |
float pedestal[128][24][12]; |
27 |
float pedestal_t[128][24][12]; |
float pedestal_t[128][24][12]; |
28 |
float sigma[128][24][12]; |
float sigma[128][24][12]; |
29 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
30 |
int bad[128][24][12]; |
int bad[128][24][12]; |
31 |
|
|
32 |
void FillFrom(TFile* , Int_t , Int_t ); |
void FillACalibFrom(TFile* , Int_t , Int_t ); |
33 |
|
void FillFCalibFrom(TFile* , Int_t , Int_t ); |
34 |
|
void FillTCalibFrom(TFile* , Int_t , Int_t ); |
35 |
|
void FillTCalibFrom(TString); |
36 |
|
|
37 |
}; |
}; |
38 |
// ================================================================== |
// ================================================================== |
39 |
/** |
/** |
132 |
struct cPath { |
struct cPath { |
133 |
char path[80]; |
char path[80]; |
134 |
int pathlen; |
int pathlen; |
135 |
int error; |
int error; |
|
int debug; |
|
136 |
/** |
/** |
137 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
138 |
*/ |
*/ |
139 |
void FillWith(TString s){ |
void FillWith(TString s){ |
140 |
pathlen = s.Length(); |
pathlen = s.Length(); |
141 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
142 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
143 |
}; |
}; |
144 |
|
|
145 |
void SetDebug(){ debug=1;}; |
|
|
|
|
146 |
}; |
}; |
147 |
|
|
148 |
// ================================================================== |
// ================================================================== |
153 |
char b_path[80]; |
char b_path[80]; |
154 |
int b_pathlen; |
int b_pathlen; |
155 |
int b_error; |
int b_error; |
|
int b_debug; |
|
156 |
int b_loaded; |
int b_loaded; |
157 |
/** |
/** |
158 |
* Fill the struct variables from a TString object and set |
* Fill the struct variables from a TString object and set |
168 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
169 |
*/ |
*/ |
170 |
int BIsLoaded(){ return b_loaded; }; |
int BIsLoaded(){ return b_loaded; }; |
|
void SetDebug(){ b_debug=1; }; |
|
171 |
|
|
172 |
}; |
}; |
173 |
|
|
174 |
|
// ================================================================== |
175 |
|
/** |
176 |
|
* \brief Struct to set debug mode in F77 routines |
177 |
|
*/ |
178 |
|
struct cDbg { |
179 |
|
int debug; |
180 |
|
int verbose; |
181 |
|
int warning; |
182 |
|
// bool debug; |
183 |
|
// bool verbose; |
184 |
|
void SetNone() {debug=0; verbose=0; warning=0;}; |
185 |
|
void SetWarning(){debug=0; verbose=0; warning=1;}; |
186 |
|
void SetVerbose(){debug=0; verbose=1; warning=1;}; |
187 |
|
void SetDebug() {debug=1; verbose=1; warning=1;}; |
188 |
|
}; |
189 |
|
|
190 |
|
extern "C" { |
191 |
|
extern struct cTrkCalib pedsigbad_; |
192 |
|
extern struct cTrkLevel0 level0event_; |
193 |
|
extern struct cTrkLevel1 level1event_; |
194 |
|
extern struct cTrkLevel2 level2event_; |
195 |
|
extern struct cPath path_; |
196 |
|
extern struct cBPath bpath_; |
197 |
|
extern struct cDbg dbg_; |
198 |
|
void fillpedsigfromdefault_(); |
199 |
|
int readmipparam_(); |
200 |
|
int readchargeparam_(); |
201 |
|
int readvkmask_(); |
202 |
|
int readalignparam_(); |
203 |
|
int readetaparam_(); |
204 |
|
void reductionflight_(int*); |
205 |
|
int analysisflight_(); |
206 |
|
} |
207 |
|
|
208 |
|
|
209 |
#endif |
#endif |
210 |
|
|