33{
35 EdbView *edbView = edbRun.GetView();
37
38 int i,n, n_fields;
39 int npre;
41 int stack_,module,tb,
plate,pver;
42 int stage;
44 int n1,num,f1,f2,f3;
45 long scanmode;
46
47 int ph;
48 double ax,ay,x,y,dx,dy;
49 double gap,emulsion,base,shrink;
50 double dr;
51 double axc,ayc,xc,yc,axs,ays,xs,ys;
52 double xmin,xmax,ymin,ymax;
53
54 char str[256];
55
56 FILE *f_fxx = fopen(
file,
"r");
57
58 fgets(str,sizeof(str),f_fxx);
59 fgets(str,sizeof(str),f_fxx);
60 fgets(str,sizeof(str),f_fxx);
61
63
64 int nviews=0;
65 while(fgets(str,sizeof(str),f_fxx)) {
66
67 if( sscanf(str,"%d %d %ld %lf %lf %lf %lf %d %lf %d %d %d",
68 &n1,&runevent,&scanmode,&axc,&ayc,&xc,&yc,&num,&dr,&f1,&f2,&f3) != 12 ) {
69 printf("unexpected format in &f (view line): %s\n",str);
70 break;
71 }
73
79
80 for(i=0;i<num;++i){
81 if( !fgets(str,sizeof(str),f_fxx) ) break;
82 if( sscanf(str,"%d %d %d %lf %lf %lf %lf %lf %lf",
83 &nn,&re,&ph,&ax,&ay,&x,&y,&dx,&dy) != 9) {
84 printf("unexpected format in &f (seg line): %s\n",str);
85 break;
86 }
87
88 edbSegment->
Set(x-xc, y-yc, dx, ax, ay, dy-dx, tob, ph);
90
91 }
92 nviews++;
93 edbRun.AddView(edbView);
94 printf("view %d \t Area = %d\n",nviews,runevent);
95 }
96
98 edbRun.Close();
99
100 return 0;
101}
segment of the track
Definition: EdbSegment.h:63
void Set(float x, float y, float z, float tx, float ty, float dz=0, int side=0, int puls=0, int id=0)
Definition: EdbSegment.cxx:93
Base scanning data object: entry into Run tree.
Definition: EdbView.h:134
EdbViewHeader * GetHeader() const
Definition: EdbView.h:163
EdbSegment * AddSegment(float x, float y, float z, float tx, float ty, float dz=0, int side=0, int puls=0, int id=-1)
Definition: EdbView.h:231
void Clear()
Definition: EdbView.cxx:79
EdbRun * run
Definition: check_raw.C:38
TTree * t
Definition: check_shower.C:4
s
Definition: check_shower.C:55
TFile * file
Definition: write_pvr.C:3
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1
int event
Definition: shower_tr.C:25
p
Definition: testBGReduction_AllMethods.C:8