| 1 | /* | 
|---|
| 2 | Ecriture des corubes de lumieres individuelles pour database ErosI | 
|---|
| 3 | */ | 
|---|
| 4 | #include "sopnamsp.h" | 
|---|
| 5 | #include "machdefs.h" | 
|---|
| 6 | #include <iostream> | 
|---|
| 7 | #include <string> | 
|---|
| 8 | #include <stdlib.h> | 
|---|
| 9 | #include <math.h> | 
|---|
| 10 | #include <stdio.h> | 
|---|
| 11 | #include <string.h> | 
|---|
| 12 |  | 
|---|
| 13 | #include "fsvcache.h" | 
|---|
| 14 | #include "fsvst.h" | 
|---|
| 15 | #include "nbsread.h" | 
|---|
| 16 | #include "nbgene.h" | 
|---|
| 17 |  | 
|---|
| 18 | FILE* fstlist = NULL; | 
|---|
| 19 | int icount = 0; | 
|---|
| 20 |  | 
|---|
| 21 | /*================================================================*/ | 
|---|
| 22 | void UINIT(void) {} | 
|---|
| 23 | void UDATCLEAN(int coul) {} | 
|---|
| 24 | void UINITCCD(void) | 
|---|
| 25 | { | 
|---|
| 26 | fstlist = fopen("nbsread_stlist.data","w"); | 
|---|
| 27 | icount = 0; | 
|---|
| 28 | } | 
|---|
| 29 | void UENDCCD(void) | 
|---|
| 30 | { | 
|---|
| 31 | if(fstlist != NULL) fclose(fstlist); fstlist = NULL; | 
|---|
| 32 | } | 
|---|
| 33 | void UEND(void) {} | 
|---|
| 34 |  | 
|---|
| 35 | /*================================================================*/ | 
|---|
| 36 | void UEVT(void) | 
|---|
| 37 | { | 
|---|
| 38 | if(icount%1000==0) | 
|---|
| 39 | printf("> Et=%d (%d) %d (%d)  fref=%g %g\n" | 
|---|
| 40 | ,iet[0],staru[0].XRef,iet[1],staru[1].XRef,staru[0].FluxRef,staru[1].FluxRef); | 
|---|
| 41 |  | 
|---|
| 42 | icount++; | 
|---|
| 43 | if(nmesure[0]<=0 || nmesure[1]<=0) return; | 
|---|
| 44 | if(iet[0]<=0 || iet[1]<=0) return; | 
|---|
| 45 |  | 
|---|
| 46 | fprintf(fstlist,"%d %.3f %.3f %.3f  %d %.3f %.3f %.3f\n", | 
|---|
| 47 | staru[0].NumEt,staru[0].XPos,staru[0].YPos,staru[0].FluxRef, | 
|---|
| 48 | staru[1].NumEt,staru[1].XPos,staru[1].YPos,staru[1].FluxRef); | 
|---|
| 49 |  | 
|---|
| 50 | /* | 
|---|
| 51 | fprintf(fstlist,"%d %.3f %.3f %.3f  %d %.3f %.3f %.3f\n", | 
|---|
| 52 | staru[1].NumEt,staru[1].XPos,staru[1].YPos,staru[1].FluxRef, | 
|---|
| 53 | staru[0].NumEt,staru[0].XPos,staru[0].YPos,staru[0].FluxRef); | 
|---|
| 54 | */ | 
|---|
| 55 |  | 
|---|
| 56 | } | 
|---|