/[PAMELA software]/root2paw/inc/ctofinclude.h
ViewVC logotype

Contents of /root2paw/inc/ctofinclude.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Mon Dec 5 16:17:38 2005 UTC (18 years, 11 months ago) by mocchiut
Branch: GroundDataConvert, MAIN
CVS Tags: start, v3r00, v4r00, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Imported sources

1 #include <TTree.h>
2
3 void settoflev1(TTree *tree, Toflev1 & toflev1){
4 tree->SetBranchAddress("good2",&toflev1.good2);
5 tree->SetBranchAddress("nev2",&toflev1.nev2);
6 tree->SetBranchAddress("pkt_type",&toflev1.pkt_type);
7 tree->SetBranchAddress("pkt_num",&toflev1.pkt_num);
8 tree->SetBranchAddress("obt",&toflev1.obt);
9 tree->SetBranchAddress("which_calib",&toflev1.which_calib);
10 tree->SetBranchAddress("tdcid",toflev1.tdcid);
11 tree->SetBranchAddress("evcount",toflev1.evcount);
12 tree->SetBranchAddress("tdcmask",toflev1.tdcmask);
13 tree->SetBranchAddress("adc",toflev1.adc);
14 tree->SetBranchAddress("tdc",toflev1.tdc);
15 tree->SetBranchAddress("temp1",toflev1.temp1);
16 tree->SetBranchAddress("temp2",toflev1.temp2);
17 tree->SetBranchAddress("beta",toflev1.beta);
18 tree->SetBranchAddress("xtof",toflev1.xtof);
19 tree->SetBranchAddress("ytof",toflev1.ytof);
20 tree->SetBranchAddress("adc_c",toflev1.adc_c);
21 tree->SetBranchAddress("iflag",toflev1.iflag);
22 tree->SetBranchAddress("jflag",toflev1.jflag);
23 tree->SetBranchAddress("xout",toflev1.xout);
24 tree->SetBranchAddress("yout",toflev1.yout);
25 tree->SetBranchAddress("trig_evcount",&toflev1.trig_evcount);
26 tree->SetBranchAddress("pmtpl",toflev1.pmtpl);
27 tree->SetBranchAddress("trigrate",toflev1.trigrate);
28 tree->SetBranchAddress("dltime",toflev1.dltime);
29 tree->SetBranchAddress("s4calcount",toflev1.s4calcount);
30 tree->SetBranchAddress("pmtcount1",toflev1.pmtcount1);
31 tree->SetBranchAddress("pmtcount2",toflev1.pmtcount2);
32 tree->SetBranchAddress("patternbusy",toflev1.patternbusy);
33 tree->SetBranchAddress("patterntrig",toflev1.patterntrig);
34 tree->SetBranchAddress("trigconf",&toflev1.trigconf);
35 tree->SetBranchAddress("ntrk",&toflev1.ntrk);
36 tree->SetBranchAddress("image",&toflev1.image);
37 tree->SetBranchAddress("xm",toflev1.xm);
38 tree->SetBranchAddress("ym",toflev1.ym);
39 tree->SetBranchAddress("zm",toflev1.zm);
40 tree->SetBranchAddress("resx",toflev1.resx);
41 tree->SetBranchAddress("resy",toflev1.resy);
42 tree->SetBranchAddress("al",toflev1.al);
43 tree->SetBranchAddress("coval",toflev1.coval);
44 tree->SetBranchAddress("chi2",toflev1.chi2);
45 tree->SetBranchAddress("xgood",toflev1.xgood);
46 tree->SetBranchAddress("ygood",toflev1.ygood);
47 tree->SetBranchAddress("xv",toflev1.xv);
48 tree->SetBranchAddress("yv",toflev1.yv);
49 tree->SetBranchAddress("zv",toflev1.zv);
50 tree->SetBranchAddress("axv",toflev1.axv);
51 tree->SetBranchAddress("ayv",toflev1.ayv);
52 tree->SetBranchAddress("dedxp",toflev1.dedxp);
53 tree->SetBranchAddress("nclsx",toflev1.nclsx);
54 tree->SetBranchAddress("nclsy",toflev1.nclsy);
55 }
56
57 void accesstoflev1(Toflev1 & toflev1, CToflev1 & ctoflev1){
58 ctoflev1.good2 = toflev1.good2;
59 ctoflev1.nev2 = toflev1.nev2;
60 ctoflev1.pkt_type = toflev1.pkt_type;
61 ctoflev1.pkt_num = toflev1.pkt_num;
62 ctoflev1.obt = toflev1.obt;
63 ctoflev1.which_calib = toflev1.which_calib;
64 ctoflev1.ntrk = toflev1.ntrk;
65 for (Int_t i = 0; i<4; i++){
66 for (Int_t j = 0; j<24; j++){
67 if ( i == 0 ){
68 ctoflev1.pmtcount1[j] = toflev1.pmtcount1[j];
69 ctoflev1.pmtcount2[j] = toflev1.pmtcount2[j];
70 };
71 if ( j < 12 ){
72 ctoflev1.adc[i][j] = toflev1.adc[j][i];
73 ctoflev1.tdc[i][j] = toflev1.tdc[j][i];
74 ctoflev1.adc_c[i][j] = toflev1.adc_c[j][i];
75 if ( i == 0 ){
76 ctoflev1.tdcid[j] = toflev1.tdcid[j];
77 ctoflev1.evcount[j] = toflev1.evcount[j];
78 ctoflev1.tdcmask[j] = toflev1.tdcmask[j];
79 ctoflev1.temp1[j] = toflev1.temp1[j];
80 ctoflev1.temp2[j] = toflev1.temp2[j];
81 if ( j < 6 ){
82 ctoflev1.trigrate[j] = toflev1.trigrate[j];
83 ctoflev1.patterntrig[j] = toflev1.patterntrig[j];
84 ctoflev1.jflag[j] = toflev1.jflag[j];
85 ctoflev1.iflag[j] = toflev1.iflag[j];
86 if ( j < 5 ){
87 ctoflev1.beta[j] = toflev1.beta[j];
88 };
89 };
90 };
91 };
92 };
93 if ( i < 3 ){
94 ctoflev1.xtof[i] = toflev1.xtof[i];
95 ctoflev1.ytof[i] = toflev1.ytof[i];
96 ctoflev1.xout[i] = toflev1.xout[i];
97 ctoflev1.yout[i] = toflev1.yout[i];
98 ctoflev1.patternbusy[i] = toflev1.patternbusy[i];
99 ctoflev1.pmtpl[i] = toflev1.pmtpl[i];
100 };
101 if ( i < 2 ){
102 ctoflev1.dltime[i] = toflev1.dltime[i];
103 ctoflev1.s4calcount[i] = toflev1.s4calcount[i];
104 };
105 };
106 ctoflev1.trigconf = toflev1.trigconf;
107 ctoflev1.trig_evcount = toflev1.trig_evcount;
108 //
109 for (Int_t i = 0; i<toflev1.ntrk; i++){
110 ctoflev1.chi2[i] = toflev1.chi2[i];
111 ctoflev1.image[i] = toflev1.image[i];
112 for (Int_t j = 0; j<6; j++){
113 ctoflev1.xm[j][i] = toflev1.xm[i][j];
114 ctoflev1.ym[j][i] = toflev1.ym[i][j];
115 ctoflev1.zm[j][i] = toflev1.zm[i][j];
116 ctoflev1.resx[j][i] = toflev1.resx[i][j];
117 ctoflev1.resy[j][i] = toflev1.resy[i][j];
118 ctoflev1.dedxp[j][i] = toflev1.dedxp[i][j];
119 if ( j<5 ) {
120 ctoflev1.al[j][i] = toflev1.al[i][j];
121 for (Int_t jp = 0; jp<5; jp++){
122 ctoflev1.coval[j][jp][i] = toflev1.coval[i][jp][j];
123 };
124 };
125 ctoflev1.xgood[j][i] = toflev1.xgood[i][j];
126 ctoflev1.ygood[j][i] = toflev1.ygood[i][j];
127 ctoflev1.xv[j][i] = toflev1.xv[i][j];
128 ctoflev1.yv[j][i] = toflev1.yv[i][j];
129 ctoflev1.zv[j][i] = toflev1.zv[i][j];
130 ctoflev1.axv[j][i] = toflev1.axv[i][j];
131 ctoflev1.ayv[j][i] = toflev1.ayv[i][j];
132 if ( j == 0 ){
133 ctoflev1.nclsx[j] = toflev1.nclsx[j];
134 ctoflev1.nclsy[j] = toflev1.nclsy[j];
135 };
136 };
137 };
138 }

  ViewVC Help
Powered by ViewVC 1.1.23