00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00029 #ifdef HAVE_CONFIG_H
00030 #include <config.h>
00031 #endif
00032
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 #include <math.h>
00036 #include <string.h>
00037
00038 #include "../libcpixe/libcpixe.h"
00039 #include "../libcpixe/compilopt.h"
00040
00041
00042 #define CPIXEVERBOSITY 0
00043
00044 #define OUTPUTABLE 1
00045 #define OUTPUTBLOCK 1
00046
00047 int main(int argc, char *argv[]);
00052 int main(int argc, char *argv[])
00053 {
00054 STATFILENAME crystalfilename="detcrystal.det";
00055 STATFILENAME windowfilename="detwindow.det";
00056 STATFILENAME abscoeffilename="xabs.abs";
00057 STATFILENAME xenerfilename="xener.dat";
00058 TwoCol *EffTable;
00059 CalibYld *EffBlockArray;
00060 double factor=1.;
00061 int i,maxZ,dimEffTable;
00062
00063 if (argc>1)strcpy(crystalfilename,argv[1]);
00064 if (argc>2)strcpy(windowfilename,argv[2]);
00065 if (argc>3)strcpy(abscoeffilename,argv[3]);
00066 if (argc>4)strcpy(xenerfilename,argv[4]);
00067
00068 maxZ=CreateEff(abscoeffilename, xenerfilename, windowfilename,crystalfilename, factor ,&EffBlockArray, &dimEffTable, &EffTable);
00069
00070 #if OUTPUTABLE > 1
00071 for (i=0; i<dimEffTable;i++)printf("\n%le\t%le",EffTable[i].x,EffTable[i].y);
00072 fprintf(stdout,"\n");
00073 #endif
00074 #if OUTPUTBLOCK > 1
00075 for (i=0; i<maxZ;i++)
00076 {
00077 fprintf(stdout,"\n%d\t%2s:", i,ChemicalSymbol[i]);
00078 fprintf(stdout,"\n");
00079 fprintCALIBYLD(stdout,&EffBlockArray[i]);
00080 fprintf(stdout,"\n");
00081 }
00082 #endif
00083
00084 free(EffBlockArray);
00085 free(EffTable);
00086
00087 return EXIT_SUCCESS;
00088 }
00089
00090