Last change
on this file since 117 was
117,
checked in by moretto, 11 years ago
|
ESAF version compilable on mac OS
|
File size:
1008 bytes
|
Line | |
---|
1 | #include"VirtualTelParm.hh" |
---|
2 | |
---|
3 | #include "Ntrace_lenses.hh" |
---|
4 | using namespace NTraceLens; |
---|
5 | ClassImp(VirtualTelParm) |
---|
6 | NTraceLens::tel_param* VirtualTelParm::fOpticalSystemParam = 0; |
---|
7 | |
---|
8 | VirtualTelParm::VirtualTelParm():fLogFile(0){ |
---|
9 | |
---|
10 | } |
---|
11 | |
---|
12 | VirtualTelParm::~VirtualTelParm(){ |
---|
13 | if(fOpticalSystemParam) delete fOpticalSystemParam; |
---|
14 | fOpticalSystemParam=0; |
---|
15 | } |
---|
16 | |
---|
17 | int VirtualTelParm::ReadTelParm(const char* lens_dir,const char* name){ |
---|
18 | |
---|
19 | if(fOpticalSystemParam)return 1; |
---|
20 | |
---|
21 | fOpticalSystemParam = new NTraceLens::tel_param(); |
---|
22 | |
---|
23 | if(read_tel_param(Form("%s/%s.dat",lens_dir,name),fOpticalSystemParam,fLogFile)!=0){ |
---|
24 | fprintf(stderr,"reading tel_param data files failed\n"); |
---|
25 | return 0; |
---|
26 | } |
---|
27 | |
---|
28 | if(ReadLensData(fOpticalSystemParam,fLogFile)<0) { |
---|
29 | fprintf(stderr,"reading lens surface data files failed\n"); |
---|
30 | return 0; |
---|
31 | } |
---|
32 | if(ReadDiffractData(fOpticalSystemParam,fLogFile)<0) { |
---|
33 | fprintf(stderr,"reading diffractive opt. data files failed\n"); |
---|
34 | return 0; |
---|
35 | } |
---|
36 | |
---|
37 | return 2; |
---|
38 | |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.