#include <Plot.h>
Public Member Functions | |
| Style () | |
| ~Style () | |
| bool | Read (std::string path) |
| bool | Set (std::string name, std::string value) |
| void | Print (std::ostream &o=std::cout) const |
Public Attributes | |
| int | lwidth |
| int | lstyle |
| int | lcolor |
| int | mstyle |
| int | msize |
| int | mcolor |
| int | stat |
| int | rebin |
| double | xmin |
| double | xmax |
| double | statx |
| double | staty |
| double | statw |
| double | stath |
| std::string | option |
| std::string | xtitle |
| std::string | ytitle |
|
|
Definition at line 249 of file Plot.cxx. References option. 00250 :lwidth(2), 00251 lstyle(1), 00252 lcolor(1), 00253 mstyle(-1), 00254 msize(0), 00255 mcolor(0), 00256 stat(1), 00257 rebin(0), 00258 xmin(+1.0), 00259 xmax(-1.0), 00260 statx(0.75), 00261 staty(0.5), 00262 statw(0.25), 00263 stath(0.23), 00264 option(), 00265 xtitle(), 00266 ytitle() 00267 { 00268 }
|
|
|
Definition at line 271 of file Plot.cxx. 00272 {
00273 }
|
|
|
Definition at line 276 of file Plot.cxx. References lcolor, lstyle, lwidth, mcolor, msize, mstyle, option, rebin, stat, stath, statw, statx, staty, xmax, xmin, xtitle, and ytitle. 00277 {
00278 o << "lwidth = " << lwidth << endl;
00279 o << "lstyle = " << lstyle << endl;
00280 o << "lcolor = " << lcolor << endl;
00281 o << "mstyle = " << mstyle << endl;
00282 o << "msize = " << msize << endl;
00283 o << "mcolor = " << mcolor << endl;
00284 o << "stat = " << stat << endl;
00285 o << "rebin = " << rebin << endl;
00286 o << "xmin = " << xmin << endl;
00287 o << "xmax = " << xmax << endl;
00288 o << "statx = " << statx << endl;
00289 o << "staty = " << staty << endl;
00290 o << "statw = " << statw << endl;
00291 o << "stath = " << stath << endl;
00292 o << "option = " << option << endl;
00293 o << "xtitle = " << xtitle << endl;
00294 o << "ytitle = " << ytitle << endl;
00295 }
|
|
|
Definition at line 298 of file Plot.cxx. 00299 {
00300 std::ifstream infile(path.c_str());
00301 if(!infile || !infile.is_open())
00302 {
00303 cerr << "Style::Read - failed to open file " << path << endl;
00304 return false;
00305 }
00306
00307
00308 while(!infile.eof())
00309 {
00310 std::string line;
00311 std::getline(infile, line);
00312
00313 const string::size_type epos = line.find("=");
00314
00315 if(line.empty() || line.find("#") != string::npos || epos == string::npos)
00316 {
00317 continue;
00318 }
00319
00320 Set(line.substr(0, epos), line.substr(epos + 1));
00321 }
00322
00323 return true;
00324 }
|
|
||||||||||||
|
Definition at line 327 of file Plot.cxx. References lcolor, lstyle, lwidth, mcolor, msize, mstyle, option, rebin, stat, stath, statw, statx, staty, xmax, xmin, xtitle, and ytitle. Referenced by Read(). 00328 {
00329 //cout << "(name, value) = (" << name << ", " << value << ")" << endl;
00330
00331 if(name.find("lwidth") != string::npos) lwidth = atoi(value.c_str());
00332 if(name.find("lstyle") != string::npos) lstyle = atoi(value.c_str());
00333 if(name.find("lcolor") != string::npos) lcolor = atoi(value.c_str());
00334 if(name.find("mstyle") != string::npos) mstyle = atoi(value.c_str());
00335 if(name.find("msize" ) != string::npos) msize = atoi(value.c_str());
00336 if(name.find("mcolor") != string::npos) mcolor = atoi(value.c_str());
00337 if(name.find("stat" ) != string::npos) stat = atoi(value.c_str());
00338 if(name.find("rebin" ) != string::npos) rebin = atoi(value.c_str());
00339 if(name.find("xmin" ) != string::npos) xmin = atof(value.c_str());
00340 if(name.find("xmax" ) != string::npos) xmax = atof(value.c_str());
00341 if(name.find("statx" ) != string::npos) statx = atof(value.c_str());
00342 if(name.find("staty" ) != string::npos) staty = atof(value.c_str());
00343 if(name.find("statw" ) != string::npos) statw = atof(value.c_str());
00344 if(name.find("stath" ) != string::npos) stath = atof(value.c_str());
00345 if(name.find("option") != string::npos) option = value;
00346 if(name.find("xtitle") != string::npos) xtitle = value;
00347 if(name.find("ytitle") != string::npos) ytitle = value;
00348
00349 return true;
00350 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1