CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME_MAP.h
Go to the documentation of this file.
1 #ifndef _ME_MAP_h
2 #define _ME_MAP_h
3 
5 #include <TCanvas.h>
6 
7 
8 typedef std::pair<std::string, MonitorElement *> entry;
9 typedef std::map<std::string, MonitorElement *> me_map;
10 
11 class ME_MAP
12 {
13  protected:
14 
17 
18  public:
19 
20  ME_MAP()
21  {
22  mymap.clear();
23  }
24 
25  ~ME_MAP(){}
26 
28  {
29  return mymap;
30  }
31 
32  int operator==(const ME_MAP &other) const
33  {
34  return (get_me_map() == other.get_me_map());
35  }
36 
38  void add(std::string name, MonitorElement *me_p);
39 
42 
44  void print(std::string name);
45 
47  void clean_old(std::string gif_name);
48 
50  void divide_canvas(int num_elements, TCanvas &canvas);
51 
53  void create_gif(std::string name);
54 
55  void clear()
56  {
57  mymap.clear();
58  }
59 };
60 
61 #endif
void print(std::string name)
print the map into a gif named &quot;name&quot;
Definition: ME_MAP.cc:23
me_map get_me_map() const
Definition: ME_MAP.h:27
void add(std::string name, MonitorElement *me_p)
add the ME named &quot;name&quot; to the map
Definition: ME_MAP.cc:9
void clear()
Definition: ME_MAP.h:55
ME_MAP()
Definition: ME_MAP.h:20
~ME_MAP()
Definition: ME_MAP.h:25
def canvas
Definition: svgfig.py:481
void create_gif(std::string name)
create the gif file
Definition: ME_MAP.cc:55
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
std::map< std::string, MonitorElement * > me_map
Definition: ME_MAP.h:9
Definition: ME_MAP.h:11
int operator==(const ME_MAP &other) const
Definition: ME_MAP.h:32
void clean_old(std::string gif_name)
clean old eps and gif files by the same name
Definition: ME_MAP.cc:32
me_map mymap
a map of pointers to a subset of the MEs in contents:
Definition: ME_MAP.h:16
void divide_canvas(int num_elements, TCanvas &canvas)
divide the canvas according to the number of elements to display
Definition: ME_MAP.cc:37