Index: trunk/FACT++/src/StateMachineImp.cc
===================================================================
--- trunk/FACT++/src/StateMachineImp.cc	(revision 10313)
+++ trunk/FACT++/src/StateMachineImp.cc	(revision 10314)
@@ -124,8 +124,8 @@
     fRunning(false), fExitRequested(0)
 {
-    AddStateName(kSM_NotReady,   "NotReady");
-    AddStateName(kSM_Ready,      "Ready");
-    AddStateName(kSM_Error,      "ERROR");
-    AddStateName(kSM_FatalError, "FATAL");
+    AddStateName(kSM_NotReady,   "NotReady", "State machine not ready, events are ignored.");
+    AddStateName(kSM_Ready,      "Ready",    "State machine ready to receive events.");
+    AddStateName(kSM_Error,      "ERROR",    "Common error state.");
+    AddStateName(kSM_FatalError, "FATAL",    "A fatal error occured, the eventloop is stopped.");
 }
 
@@ -363,7 +363,7 @@
 //!    ostream to which the output should be redirected
 //
-void StateMachineImp::PrintListOfEvents(std::ostream &out)
-{
-    for (vector<EventImp*>::iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
+void StateMachineImp::PrintListOfEvents(std::ostream &out) const
+{
+    for (vector<EventImp*>::const_iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
         (*c)->Print(out);
 }
@@ -373,7 +373,33 @@
 //! Call PrintListOfEvents with fOut as the output stream
 //
-void StateMachineImp::PrintListOfEvents()
+void StateMachineImp::PrintListOfEvents() const
 {
     PrintListOfEvents(Out());
+}
+
+// --------------------------------------------------------------------------
+//
+//! Print a list of all states with descriptions.
+//!
+//! @param out
+//!    ostream to which the output should be redirected
+//
+void StateMachineImp::PrintListOfStates(std::ostream &out) const
+{
+    out << endl;
+    out << kBold << "List of available states:" << endl;
+    out << endl;
+    for (StateNames::const_iterator i=fStateNames.begin(); i!=fStateNames.end(); i++)
+        out << kBold << setw(5) << i->first << kReset << " - " << kBold << i->second.first << kReset << ": " << i->second.second << endl;
+    out << endl;
+}
+
+// --------------------------------------------------------------------------
+//
+//! Print a list of all states with descriptions.
+//
+void StateMachineImp::PrintListOfStates() const
+{
+    PrintListOfStates(Out());
 }
 
@@ -689,4 +715,6 @@
 {
     const string &str = GetStateName(state);
+    if (str==Form("%d", state))
+        return str;
     return str.empty() ? Form("%d", state) : (str+Form("[%d]", state));
 }
Index: trunk/FACT++/src/StateMachineImp.h
===================================================================
--- trunk/FACT++/src/StateMachineImp.h	(revision 10313)
+++ trunk/FACT++/src/StateMachineImp.h	(revision 10314)
@@ -119,6 +119,9 @@
     const std::vector<std::string> GetEventNames() const;
 
-    void PrintListOfEvents(std::ostream &out);
-    void PrintListOfEvents();
+    void PrintListOfEvents(std::ostream &out) const;
+    void PrintListOfEvents() const;
+
+    void PrintListOfStates(std::ostream &out) const;
+    void PrintListOfStates() const;
 
 
