DisplayManager.h

00001 #ifndef SCTDATADISPLAY_DISPLAYMANAGER_H
00002 #define SCTDATADISPLAY_DISPLAYMANAGER_H
00003 
00004 #include <boost/shared_ptr.hpp>
00005 #include <map>
00006 #include <string>
00007 #include <vector>
00008 
00009 class TDirectory;
00010 
00011 using std::map;
00012 using std::vector;
00013 using std::string;
00014 using boost::shared_ptr;
00015 
00016 namespace Sct {
00017     class Serializable;
00018 }
00019 
00020 namespace SctDataDisplay {
00021     
00022 class Displayer;
00023 class GenericDisplayer;
00024 class DisplayInfo;
00025 class DisplayData;
00026  
00031 class DisplayManager {
00032 public:
00036     static DisplayManager& instance();
00037     
00042     static bool addToMap(string className, shared_ptr<Displayer> displayer);
00043     
00048     static shared_ptr<DisplayData> display(shared_ptr<const Sct::Serializable> ob, const DisplayInfo& info, std::ostream& os);
00049     
00050 
00056     static bool addGeneric(shared_ptr<GenericDisplayer> generic);
00057     
00061     static bool batchMode();
00065     static void setBatchMode(bool b=true);
00066 
00070     static bool rootMode();
00071 
00075     static void setRootMode(bool b=true);
00076 
00080     static shared_ptr<TDirectory> getTDirectory();
00084     static std::string getOutputDir();
00088     static void setOutputDir(const std::string& dirname);
00092     static void OutputCanvases();
00093 private:
00094     DisplayManager();
00095     map<string, shared_ptr<Displayer> > displayerMap;
00096     vector<shared_ptr<GenericDisplayer> > genericList;
00097     bool m_batchMode;
00098     bool m_rootMode;
00099     std::string m_outputdir;
00100     static shared_ptr<TDirectory> s_file;
00101 };
00102 
00103 }
00104 
00105 #endif //SCTDATADISPLAY_DISPLAYMANAGER_H

Generated on Mon Feb 6 14:01:19 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6