#include <ME_MAP.h>
Public Member Functions | |
void | add (std::string name, MonitorElement *me_p) |
add the ME named "name" to the map | |
void | clean_old (std::string gif_name) |
clean old eps and gif files by the same name | |
void | clear () |
void | create_gif (std::string name) |
create the gif file | |
void | divide_canvas (int num_elements, TCanvas &canvas) |
divide the canvas according to the number of elements to display | |
me_map | get_me_map () const |
ME_MAP () | |
int | operator== (const ME_MAP &other) const |
void | print (std::string name) |
print the map into a gif named "name" | |
~ME_MAP () | |
Protected Attributes | |
me_map | mymap |
a map of pointers to a subset of the MEs in contents: |
ME_MAP::ME_MAP | ( | ) | [inline] |
void ME_MAP::add | ( | std::string | name, |
MonitorElement * | me_p | ||
) |
void ME_MAP::clean_old | ( | std::string | gif_name | ) |
void ME_MAP::clear | ( | void | ) | [inline] |
void ME_MAP::create_gif | ( | std::string | name | ) |
create the gif file
Definition at line 55 of file ME_MAP.cc.
References MultipleCompare::canvas, edmPickEvents::command, divide_canvas(), i, mymap, and mergeVDriftHistosByStation::name.
Referenced by print().
{ int num_elements = mymap.size(); // If we (still) don't have anything, create empty eps if (num_elements == 0) { std::string command = "cp empty.eps " + name; ::system(command.c_str()); // std::cout << "ME_MAP has no elements" << std::endl; return; } else { // std::cout << "ME_MAP has " << mymap.size() << " elements" << std::endl; TCanvas canvas("display"); divide_canvas(num_elements, canvas); int i = 0; me_map::iterator it; for (it = mymap.begin(); it != mymap.end(); it++) { // move to the next place in the canvas TVirtualPad * current_pad = canvas.cd(i + 1); Color_t color = TColor::GetColor("000000"); if (it->second->hasOtherReport()) color = TColor::GetColor ("#FCD116"); if (it->second->hasWarning()) color = TColor::GetColor ("#FF8000"); if (it->second->hasError()) color = TColor::GetColor ("#CC0000"); current_pad->HighLight(color, kTRUE); it->second->getRootObject()->Draw(); i++; } canvas.SaveAs(name.c_str()); } }
void ME_MAP::divide_canvas | ( | int | num_elements, |
TCanvas & | canvas | ||
) |
divide the canvas according to the number of elements to display
Definition at line 37 of file ME_MAP.cc.
References tablePrinter::rows, and mathSSE::sqrt().
Referenced by create_gif().
me_map ME_MAP::get_me_map | ( | ) | const [inline] |
Definition at line 27 of file ME_MAP.h.
References mymap.
Referenced by operator==().
{ return mymap; }
int ME_MAP::operator== | ( | const ME_MAP & | other | ) | const [inline] |
Definition at line 32 of file ME_MAP.h.
References get_me_map().
{ return (get_me_map() == other.get_me_map()); }
void ME_MAP::print | ( | std::string | name | ) |
print the map into a gif named "name"
remove the ME named "name" from the map void remove(std::string name);
Definition at line 23 of file ME_MAP.cc.
References clean_old(), and create_gif().
Referenced by WebInterface::printMap().
{ std::string gif_name = name + ".gif"; clean_old(gif_name); create_gif(gif_name); }
me_map ME_MAP::mymap [protected] |
a map of pointers to a subset of the MEs in contents:
Definition at line 16 of file ME_MAP.h.
Referenced by add(), clear(), create_gif(), get_me_map(), and ME_MAP().