4 #include <TVirtualPad.h>
11 entry newentry(name, me_p);
12 mymap.insert(newentry);
25 std::string gif_name = name +
".gif";
34 ::unlink(gif_name.c_str());
44 if (num_elements == 2)
50 int columns =
static_cast<int>(
sqrt(static_cast<float>(num_elements)));
51 int rows =
static_cast<int>(ceil(static_cast<float>(num_elements) / columns));
52 canvas.Divide(columns, rows);
57 int num_elements =
mymap.size();
60 if (num_elements == 0)
63 ::system(command.c_str());
79 for (it =
mymap.begin(); it !=
mymap.end(); it++)
82 TVirtualPad * current_pad = canvas.cd(i + 1);
83 Color_t color = TColor::GetColor(
"000000");
84 if (it->second->hasOtherReport()) color = TColor::GetColor (
"#FCD116");
85 if (it->second->hasWarning()) color = TColor::GetColor (
"#FF8000");
86 if (it->second->hasError()) color = TColor::GetColor (
"#CC0000");
87 current_pad->HighLight(color, kTRUE);
88 it->second->getRootObject()->Draw();
92 canvas.SaveAs(name.c_str());
void print(std::string name)
print the map into a gif named "name"
void add(std::string name, MonitorElement *me_p)
add the ME named "name" to the map
void create_gif(std::string name)
create the gif file
std::pair< std::string, MonitorElement * > entry
void clean_old(std::string gif_name)
clean old eps and gif files by the same name
me_map mymap
a map of pointers to a subset of the MEs in contents:
void divide_canvas(int num_elements, TCanvas &canvas)
divide the canvas according to the number of elements to display