22{
24 gSystem->ExpandPathName(fn);
26 list<Double_t> lst;
27 string buf;
28 string token;
29 string message;
30 if (!f)
31 {
32 Fatal("Init","Can't open file %s.", filename);
33 return;
34 }
35
36 while(getline(f, buf))
37 {
38 if (buf.empty()) continue;
39 if (buf.find_first_not_of(" ")==string::npos) continue;
40
41 message=buf.substr(buf.find_first_not_of(" "));
42 if (message.empty()) continue;
43
44 message=message.substr(0,message.find("#"));
45 if (message.empty()) continue;
46 while(!message.empty())
47 {
48 token=message.substr(0,message.find_first_of(" "));
49 if (token.empty()) break;
50 lst.push_back(atof(token.c_str()));
51 if (token==message) break;
52 token=message.substr(message.find_first_of(" "));
53 if (token.empty()) break;
54 if (token.find_first_not_of(" ")==string::npos) break;
55 message=token.substr(token.find_first_not_of(" "));
56 }
57 }
59
60 list<Double_t>::const_iterator
p=lst.begin();
61 Double_t xsize;
62 Double_t ysize;
63 Double_t sqside;
71
72 xsize=(*p); ++
p; ysize=(*p); ++
p; sqside=(*p); ++
p;
73 fS=(Int_t)((xsize+0.00001)/sqside);
78 for(;;)
79 {
80 if (p==lst.end())
break;
l=(*p); ++
p;
81 if (p==lst.end())
break;
x=(*p); ++
p;
82 if (p==lst.end())
break;
y=(*p); ++
p;
83 if (p==lst.end())
break;
z=(*p); ++
p;
84 if (p==lst.end())
break;
v=(*p); ++
p;
88 {
89 Info(
"Init",
"Data is not selfconsistent (%f, %f), %d", x, y,
fSize);
90 }
92 }
93 lst.clear();
96}