Go to the documentation of this file.
4 #ifndef tools_sg_h2plot
5 #define tools_sg_h2plot
12 #include "../histo/h1d"
13 #include "../histo/h2d"
14 #include "../histo/p1d"
15 #include "../histo/p2d"
31 virtual void*
cast(
const std::string& a_class)
const {
32 if(
void* p = cmp_cast<h1d2plot>(
this,a_class)) {
return p;}
45 virtual void infos(
const std::string& a_opts,std::string& a_sinfos)
const {
47 std::string f_lf(
"\n");
48 std::vector<std::string> ws;
49 words(a_opts,
" ",
false,ws);
50 std::vector<std::string>::const_iterator it;
57 for(it=ws.begin();it!=ws.end();++it) {
58 if(((*it)==
"name") &&
m_name.size()) {
59 if(a_sinfos.size()) a_sinfos += f_lf;
64 }
else if((*it)==
"entries") {
65 if(a_sinfos.size()) a_sinfos += f_lf;
66 a_sinfos +=
"Entries";
70 }
else if((*it)==
"mean") {
71 if(a_sinfos.size()) a_sinfos += f_lf;
76 }
else if((*it)==
"rms") {
77 if(a_sinfos.size()) a_sinfos += f_lf;
80 if(!numas<double>(
m_data.
rms(),a_sinfos)) {}
82 }
else if((*it)==
"underflow") {
83 if(a_sinfos.size()) a_sinfos += f_lf;
88 }
else if((*it)==
"overflow") {
89 if(a_sinfos.size()) a_sinfos += f_lf;
141 virtual void bins_Sw_range(
float& a_mn,
float& a_mx,
bool a_with_entries)
const {
169 mem::increment(s_class().c_str());
174 mem::decrement(s_class().c_str());
185 mem::increment(s_class().c_str());
205 virtual void*
cast(
const std::string& a_class)
const {
206 if(
void* p = cmp_cast<h2d2plot>(
this,a_class)) {
return p;}
218 virtual void infos(
const std::string& a_opts,std::string& a_sinfos)
const {
220 std::string f_lf(
"\n");
221 std::vector<std::string> ws;
222 words(a_opts,
" ",
false,ws);
223 std::vector<std::string>::const_iterator it;
224 for(it=ws.begin();it!=ws.end();++it) {
225 if(((*it)==
"name") &&
m_name.size()) {
226 if(a_sinfos.size()) a_sinfos += f_lf;
227 a_sinfos +=
"Name\n";
230 }
else if((*it)==
"entries") {
231 if(a_sinfos.size()) a_sinfos += f_lf;
232 a_sinfos +=
"Entries\n";
235 }
else if((*it)==
"mean") {
236 if(a_sinfos.size()) a_sinfos += f_lf;
237 a_sinfos +=
"MeanX\n";
240 a_sinfos +=
"MeanY\n";
243 }
else if((*it)==
"rms") {
244 if(a_sinfos.size()) a_sinfos += f_lf;
245 a_sinfos +=
"RMS X\n";
248 a_sinfos +=
"RMS Y\n";
255 virtual void bins_Sw_range(
float& a_mn,
float& a_mx,
bool a_with_entries)
const {
290 mem::increment(s_class().c_str());
295 mem::decrement(s_class().c_str());
306 mem::increment(s_class().c_str());
325 virtual void*
cast(
const std::string& a_class)
const {
326 if(
void* p = cmp_cast<p1d2plot>(
this,a_class)) {
return p;}
338 virtual void infos(
const std::string& a_opts,std::string& a_sinfos)
const {
340 std::string f_lf(
"\n");
341 std::vector<std::string> ws;
342 words(a_opts,
" ",
false,ws);
343 std::vector<std::string>::const_iterator it;
344 for(it=ws.begin();it!=ws.end();++it) {
345 if(((*it)==
"name") &&
m_name.size()) {
346 if(a_sinfos.size()) a_sinfos += f_lf;
347 a_sinfos +=
"Name\n";
350 }
else if((*it)==
"entries") {
351 if(a_sinfos.size()) a_sinfos += f_lf;
352 a_sinfos +=
"Entries\n";
354 }
else if((*it)==
"mean") {
355 if(a_sinfos.size()) a_sinfos += f_lf;
356 a_sinfos +=
"Mean\n";
358 }
else if((*it)==
"rms") {
359 if(a_sinfos.size()) a_sinfos += f_lf;
361 if(!numas<double>(
m_data.
rms(),a_sinfos)) {}
369 virtual void bins_Sw_range(
float& a_mn,
float& a_mx,
bool a_with_entries)
const {
#define TOOLS_SCLASS(a_name)