00001
00006 #ifndef _QEVENTDISPLAY_HH
00007 #define _QEVENTDISPLAY_HH
00008
00009 #include <string>
00010 #include <map>
00011 #include <TObject.h>
00012 #include <TAttLine.h>
00013 #include <TAttMarker.h>
00014 #include <TAttFill.h>
00015
00016 class QEventR;
00017 class QEventAuxDataR;
00018 class QRunDataR;
00019 class TPad;
00020
00021
00022 class QEventDisplayObject : public TObject, public TAttLine, public TAttMarker, public TAttFill
00023 {
00024 public:
00025 bool fEnabled;
00026 std::string fOptions;
00027 };
00028
00029
00030 class QEventDisplay
00031 {
00032 public:
00033
00034 QEventDisplay(std::string name ="");
00035 virtual ~QEventDisplay();
00036 virtual void Draw(TPad &pad, QEventR* ev, QEventAuxDataR* aux=0, QRunDataR * run=0)=0;
00037 virtual void InitDisplayObjects()=0;
00038
00039
00040 std::string GetName() {return fName;}
00041 void ToggleGlobalEnabled(bool enabled) {fGlobalEnabled=enabled;}
00042 bool IsGlobalEnabled() {return fGlobalEnabled;}
00043
00044
00045 const std::map<std::string, QEventDisplayObject > & GetDisplayObjects() {return fDisplayObjects;}
00046 QEventDisplayObject &GetDisplayObject (std::string name);
00047
00048
00049 void AddDisplayObject(std::string name, bool enabled);
00050
00051
00052 void SetFormatToObject(std::string name, TObject * obj);
00053
00054 void SetOptions(std::string name, const std::string options);
00055 void ToggleEnabled(std::string name, bool enabled);
00056
00057
00058
00059 protected:
00060 std::map<std::string, QEventDisplayObject> fDisplayObjects;
00061 std::string fName;
00062 bool fGlobalEnabled;
00063
00064
00065
00066 };
00067
00068
00069 #endif