EventDebugger.hh

Go to the documentation of this file.
00001 // $Header: /cvs/lcd/slic/include/EventDebugger.hh,v 1.5 2006/09/05 23:21:42 jeremy Exp $
00002 
00003 #ifndef SLIC_EVENTDEBUGGER_HH
00004 #define SLIC_EVENTDEBUGGER_HH 1
00005 
00006 // slic
00007 #include "Module.hh"
00008 #include "Singleton.hh"
00009 
00010 // geant4
00011 #include "globals.hh"
00012 
00013 // std
00014 #include <string>
00015 #include <vector>
00016 
00017 class G4Run;
00018 class G4Event;
00019 
00020 namespace slic
00021 {
00022   class EventDebuggerMessenger;
00023 
00028   class EventDebugger : public Module, public Singleton<EventDebugger>
00029   {
00030   public:
00031 
00032     typedef std::vector<G4int> DebugEventList;
00033 
00034   public:
00035     virtual ~EventDebugger();
00036     //static EventDebugger* instance();
00037 
00038     //protected:
00039     EventDebugger();
00040 
00041   public:
00042 
00043     void enableDebug(bool e = true);
00044 
00045     void addDebugEvent(G4int eventNum);
00046     void clearDebugEvents();
00047     bool haveDebugEvent(G4int) const;
00048 
00049     void setDebugMacro(std::string);
00050     void setCleanupMacro(std::string);
00051 
00052     void beginRun(const G4Run*);
00053     void beginEvent(const G4Event*);
00054     void endEvent(const G4Event*);
00055 
00056   private:
00057 
00058     void sortDebugEvents();
00059 
00060     void execDebugMacro();
00061     void execCleanupMacro();
00062 
00063   private:
00064 
00065     //static EventDebugger* m_instance;
00066 
00067     EventDebuggerMessenger* m_messenger;
00068 
00069     std::string m_debugMacro;
00070     std::string m_cleanupMacro;
00071 
00072     DebugEventList m_events;
00073     bool m_debugging;
00074     bool m_haveDebugMacro;
00075     bool m_haveCleanupMacro;
00076     bool m_forceDebugMode;
00077   };
00078 }
00079 
00080 #endif

Generated on Thu Nov 15 15:24:15 2007 for Simulator for the Linear Collider by  doxygen 1.5.4