BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcTunningSvc/src/ReadPara.cc
Go to the documentation of this file.
1#include "ReadPara.hh"
2#include <fstream>
3#include <iostream>
4#include <string>
5using namespace std;
6
7ReadPara::ReadPara( string& path ) {
8
9 std::cout << "step1" << std::endl;
10 ifstream incos1;
11 string s1 = path + "/data/fit_1cos.txt";
12 incos1.open( s1.c_str() );
13 for ( int i = 0; i < 5; i++ ) { incos1 >> par_cos[0][i]; }
14
15 ifstream incos2;
16 string s2 = path + "/data/fit_2cos.txt";
17 incos2.open( s2.c_str() );
18 for ( int i = 0; i < 5; i++ ) { incos2 >> par_cos[1][i]; }
19 ifstream incos3;
20 string s3 = path + "/data/fit_3cos.txt";
21 incos3.open( s3.c_str() );
22 for ( int i = 0; i < 5; i++ ) { incos3 >> par_cos[2][i]; }
23 ifstream incos4;
24 string s4 = path + "/data/fit_4cos.txt";
25 incos4.open( s4.c_str() );
26 for ( int i = 0; i < 5; i++ ) { incos4 >> par_cos[3][i]; }
27 ifstream incos5;
28 string s5 = path + "/data/fit_5cos.txt";
29 incos5.open( s5.c_str() );
30 for ( int i = 0; i < 5; i++ ) { incos5 >> par_cos[4][i]; }
31 ifstream incos6;
32 string s6 = path + "/data/fit_6cos.txt";
33 incos6.open( s6.c_str() );
34 for ( int i = 0; i < 5; i++ ) { incos6 >> par_cos[5][i]; }
35 ifstream incos7;
36 string s7 = path + "/data/fit_7cos.txt";
37 incos7.open( s7.c_str() );
38 for ( int i = 0; i < 5; i++ ) { incos7 >> par_cos[6][i]; }
39 ifstream incos8;
40 string s8 = path + "/data/fit_8cos.txt";
41 incos8.open( s8.c_str() );
42 for ( int i = 0; i < 5; i++ ) { incos8 >> par_cos[7][i]; }
43 //***************
44 ifstream incoss1;
45 string ins1 = path + "/sim/fit_1cos_s.txt";
46 incoss1.open( ins1.c_str() );
47 for ( int i = 0; i < 5; i++ ) { incoss1 >> par_coss[0][i]; }
48 ifstream incoss2;
49 string ins2 = path + "/sim/fit_2cos_s.txt";
50 incoss2.open( ins2.c_str() );
51 for ( int i = 0; i < 5; i++ ) { incoss2 >> par_coss[1][i]; }
52 ifstream incoss3;
53 string ins3 = path + "/sim/fit_3cos_s.txt";
54 incoss3.open( ins3.c_str() );
55 for ( int i = 0; i < 5; i++ ) { incoss3 >> par_coss[2][i]; }
56 ifstream incoss4;
57 string ins4 = path + "/sim/fit_4cos_s.txt";
58 incoss4.open( ins4.c_str() );
59 for ( int i = 0; i < 5; i++ ) { incoss4 >> par_coss[3][i]; }
60 ifstream incoss5;
61 string ins5 = path + "/sim/fit_5cos_s.txt";
62 incoss5.open( ins5.c_str() );
63 for ( int i = 0; i < 5; i++ ) { incoss5 >> par_coss[4][i]; }
64 ifstream incoss6;
65 string ins6 = path + "/sim/fit_6cos_s.txt";
66 incoss6.open( ins6.c_str() );
67 for ( int i = 0; i < 5; i++ ) { incoss6 >> par_coss[5][i]; }
68 ifstream incoss7;
69 string ins7 = path + "/sim/fit_7cos_s.txt";
70 incoss7.open( ins7.c_str() );
71 for ( int i = 0; i < 5; i++ ) { incoss7 >> par_coss[6][i]; }
72 ifstream incoss8;
73 string ins8 = path + "/sim/fit_8cos_s.txt";
74 incoss8.open( ins8.c_str() );
75 for ( int i = 0; i < 5; i++ ) { incoss8 >> par_coss[7][i]; }
76 //*********
77 ifstream indd1;
78 string inds1 = path + "/data/fit_1.txt";
79 indd1.open( inds1.c_str() );
80 for ( int i = 0; i < 6; i++ ) { indd1 >> par_dd[0][i]; }
81 ifstream indd2;
82 string inds2 = path + "/data/fit_2.txt";
83 indd2.open( inds2.c_str() );
84 for ( int i = 0; i < 6; i++ ) { indd2 >> par_dd[1][i]; }
85 ifstream indd3;
86 string inds3 = path + "data/fit_3.txt";
87 indd3.open( inds3.c_str() );
88 for ( int i = 0; i < 6; i++ ) { indd3 >> par_dd[2][i]; }
89 ifstream indd4;
90 string inds4 = path + "data/fit_4.txt";
91 indd4.open( inds4.c_str() );
92 for ( int i = 0; i < 6; i++ ) { indd4 >> par_dd[3][i]; }
93 ifstream indd5;
94 string inds5 = path + "data/fit_5.txt";
95 indd5.open( inds5.c_str() );
96 for ( int i = 0; i < 6; i++ ) { indd5 >> par_dd[4][i]; }
97 ifstream indd6;
98 string inds6 = path + "data/fit_6.txt";
99 indd6.open( inds6.c_str() );
100 for ( int i = 0; i < 6; i++ ) { indd6 >> par_dd[5][i]; }
101 ifstream indd7;
102 string inds7 = path + "data/fit_7.txt";
103 indd7.open( inds7.c_str() );
104 for ( int i = 0; i < 6; i++ ) { indd7 >> par_dd[6][i]; }
105 ifstream indd8;
106 string inds8 = path + "data/fit_8.txt";
107 indd8.open( inds8.c_str() );
108 for ( int i = 0; i < 6; i++ ) { indd8 >> par_dd[7][i]; }
109 //*************
110 ifstream indds1;
111 string indd_s1 = path + "/sim/fit_1_s.txt";
112 indds1.open( indd_s1.c_str() );
113 for ( int i = 0; i < 6; i++ ) { indds1 >> par_dds[0][i]; }
114 ifstream indds2;
115 string indd_s2 = path + "/sim/fit_2_s.txt";
116 indds2.open( indd_s2.c_str() );
117 for ( int i = 0; i < 6; i++ ) { indds2 >> par_dds[1][i]; }
118 ifstream indds3;
119 string indd_s3 = path + "/sim/fit_3_s.txt";
120 indds3.open( indd_s3.c_str() );
121 for ( int i = 0; i < 6; i++ ) { indds3 >> par_dds[2][i]; }
122 ifstream indds4;
123 string indd_s4 = path + "/sim/fit_4_s.txt";
124 indds4.open( indd_s4.c_str() );
125 for ( int i = 0; i < 6; i++ ) { indds4 >> par_dds[3][i]; }
126 ifstream indds5;
127 string indd_s5 = path + "/sim/fit_5_s.txt";
128 indds5.open( indd_s5.c_str() );
129 for ( int i = 0; i < 6; i++ ) { indds5 >> par_dds[4][i]; }
130 ifstream indds6;
131 string indd_s6 = path + "/sim/fit_6_s.txt";
132 indds6.open( indd_s6.c_str() );
133 for ( int i = 0; i < 6; i++ ) { indds6 >> par_dds[5][i]; }
134 ifstream indds7;
135 string indd_s7 = path + "/sim/fit_7_s.txt";
136 indds7.open( indd_s7.c_str() );
137 for ( int i = 0; i < 6; i++ ) { indds7 >> par_dds[6][i]; }
138 ifstream indds8;
139 string indd_s8 = path + "/sim/fit_8_s.txt";
140 indds8.open( indd_s8.c_str() );
141 for ( int i = 0; i < 6; i++ ) { indds8 >> par_dds[7][i]; }
142 //******************
143 ifstream inz1;
144 string in_z1 = path + "/data/fit_1z.txt";
145 inz1.open( in_z1.c_str() );
146 for ( int i = 0; i < 7; i++ ) { inz1 >> par_z[0][i]; }
147 ifstream inz2;
148 string in_z2 = path + "/data/fit_2z.txt";
149 inz2.open( in_z2.c_str() );
150 for ( int i = 0; i < 7; i++ ) { inz2 >> par_z[1][i]; }
151 ifstream inz3;
152 string in_z3 = path + "/data/fit_3z.txt";
153 inz3.open( in_z3.c_str() );
154 for ( int i = 0; i < 7; i++ ) { inz3 >> par_z[2][i]; }
155 ifstream inz4;
156 string in_z4 = path + "/data/fit_4z.txt";
157 inz4.open( in_z4.c_str() );
158 for ( int i = 0; i < 7; i++ ) { inz4 >> par_z[3][i]; }
159 ifstream inz5;
160 string in_z5 = path + "/data/fit_5z.txt";
161 inz5.open( in_z5.c_str() );
162 for ( int i = 0; i < 7; i++ ) { inz5 >> par_z[4][i]; }
163 ifstream inz6;
164 string in_z6 = path + "/data/fit_6z.txt";
165 inz6.open( in_z6.c_str() );
166 for ( int i = 0; i < 7; i++ ) { inz6 >> par_z[5][i]; }
167 ifstream inz7;
168 string in_z7 = path + "/data/fit_7z.txt";
169 inz7.open( in_z7.c_str() );
170 for ( int i = 0; i < 7; i++ ) { inz7 >> par_z[6][i]; }
171 ifstream inz8;
172 string in_z8 = path + "/data/fit_8z.txt";
173 inz8.open( in_z8.c_str() );
174 for ( int i = 0; i < 7; i++ ) { inz8 >> par_z[7][i]; }
175 //*************
176 ifstream inzs1;
177 string in_zs1 = path + "/sim/fit_1z_s.txt";
178 inzs1.open( in_zs1.c_str() );
179 for ( int i = 0; i < 7; i++ ) { inzs1 >> par_zs[0][i]; }
180 ifstream inzs2;
181 string in_zs2 = path + "/sim/fit_2z_s.txt";
182 inzs2.open( in_zs2.c_str() );
183 for ( int i = 0; i < 7; i++ ) { inzs2 >> par_zs[1][i]; }
184 ifstream inzs3;
185 string in_zs3 = path + "/sim/fit_3z_s.txt";
186 inzs3.open( in_zs3.c_str() );
187 for ( int i = 0; i < 7; i++ ) { inzs3 >> par_zs[2][i]; }
188 ifstream inzs4;
189 string in_zs4 = path + "/sim/fit_4z_s.txt";
190 inzs4.open( in_zs4.c_str() );
191 for ( int i = 0; i < 7; i++ ) { inzs4 >> par_zs[3][i]; }
192 ifstream inzs5;
193 string in_zs5 = path + "/sim/fit_5z_s.txt";
194 inzs5.open( in_zs5.c_str() );
195 for ( int i = 0; i < 7; i++ ) { inzs5 >> par_zs[4][i]; }
196 ifstream inzs6;
197 string in_zs6 = path + "/sim/fit_6z_s.txt";
198 inzs6.open( in_zs6.c_str() );
199 for ( int i = 0; i < 7; i++ ) { inzs6 >> par_zs[5][i]; }
200 ifstream inzs7;
201 string in_zs7 = path + "/sim/fit_7z_s.txt";
202 inzs7.open( in_zs7.c_str() );
203 for ( int i = 0; i < 7; i++ ) { inzs7 >> par_zs[6][i]; }
204 ifstream inzs8;
205 string in_zs8 = path + "/sim/fit_8z_s.txt";
206 inzs8.open( in_zs8.c_str() );
207 for ( int i = 0; i < 7; i++ ) { inzs8 >> par_zs[7][i]; }
208 //******************
209
210 //******************
211 //******************
212}