Index: /trunk/FACT++/src/StateMachineImp.cc
===================================================================
--- /trunk/FACT++/src/StateMachineImp.cc	(revision 13950)
+++ /trunk/FACT++/src/StateMachineImp.cc	(revision 13951)
@@ -122,5 +122,5 @@
 StateMachineImp::StateMachineImp(ostream &out, const std::string &name)
     : MessageImp(out), fName(name), fCurrentState(kSM_NotReady),
-    fRunning(false), fExitRequested(0)
+    fRunning(false), fBufferEvents(true), fExitRequested(0)
 {
     SetDefaultStateNames();
@@ -319,5 +319,5 @@
     }
 
-    if (IsRunning())
+    if (IsRunning() || fBufferEvents)
     {
         Event *event = new Event(evt, ptr, siz);
@@ -367,5 +367,5 @@
     }
 
-    if (IsRunning())
+    if (IsRunning() || fBufferEvents)
         PushEvent(new Event(evt));
     else
Index: /trunk/FACT++/src/StateMachineImp.h
===================================================================
--- /trunk/FACT++/src/StateMachineImp.h	(revision 13950)
+++ /trunk/FACT++/src/StateMachineImp.h	(revision 13951)
@@ -44,4 +44,5 @@
 
     bool fRunning;       /// Machine is in main-loop
+    bool fBufferEvents;  /// Flag if events should be buffered outside the event loop
     int  fExitRequested; /// This is a flag which is set true if the main loop should stop
 
@@ -116,4 +117,7 @@
     /// Used to check if the main loop is already running or still running
     bool IsRunning() const { return fRunning; }
+
+    /// Used to enable or disable buffering of events outside of the main loop
+    void EnableBuffer(bool b=true) { fBufferEvents=b; }
 
     /// Post an event to the event queue
