CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DQM/TrackerCommon/interface/ME_MAP.h

Go to the documentation of this file.
00001 #ifndef _ME_MAP_h
00002 #define _ME_MAP_h
00003 
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005 #include <TCanvas.h>
00006 
00007 
00008 typedef std::pair<std::string, MonitorElement *> entry;
00009 typedef std::map<std::string, MonitorElement *> me_map;
00010 
00011 class ME_MAP
00012 {
00013  protected:
00014 
00016   me_map mymap;
00017 
00018  public:
00019   
00020   ME_MAP() 
00021     { 
00022       mymap.clear();
00023     }
00024 
00025   ~ME_MAP(){}
00026 
00027   me_map get_me_map() const
00028     {
00029       return mymap;
00030     }
00031 
00032   int operator==(const ME_MAP &other) const
00033     {
00034       return (get_me_map() == other.get_me_map());
00035     }
00036 
00038   void add(std::string name, MonitorElement *me_p);
00039 
00042   
00044   void print(std::string name);
00045 
00047   void clean_old(std::string gif_name);
00048 
00050   void divide_canvas(int num_elements, TCanvas &canvas);
00051 
00053   void create_gif(std::string name);
00054 
00055   void clear()
00056     {
00057       mymap.clear();
00058     }
00059 };
00060 
00061 #endif