Index: trunk/FACT++/src/EventImp.cc
===================================================================
--- trunk/FACT++/src/EventImp.cc	(revision 10485)
+++ trunk/FACT++/src/EventImp.cc	(revision 10486)
@@ -186,4 +186,18 @@
 
     return find(fAllowedStates.begin(), fAllowedStates.end(), state)!=fAllowedStates.end();
+}
+
+// --------------------------------------------------------------------------
+//
+//! @returns the event data converted to a std::string. Trailing redundant
+//!          \0's are removed.
+//!
+string EventImp::GetString() const
+{
+    size_t s = GetSize()-1;
+    while (s>0 && GetText()[s]==0)
+        s--;
+
+    return std::string(GetText(), s+1);
 }
 
Index: trunk/FACT++/src/EventImp.h
===================================================================
--- trunk/FACT++/src/EventImp.h	(revision 10485)
+++ trunk/FACT++/src/EventImp.h	(revision 10486)
@@ -35,4 +35,5 @@
     EventImp &operator()(const std::string str) { SetDescription(str); return *this; }
     EventImp &operator()(const char *str) { SetDescription(str); return *this; }
+    EventImp &operator()(int state) { fAllowedStates.push_back(state); return *this; }
 
     // Print contents
@@ -65,7 +66,6 @@
     double            GetDouble() const { return *reinterpret_cast<const double*>(GetData()); }
     const char       *GetText() const   { return  reinterpret_cast<const char*>(GetData()); }
-    std::string       GetString() const { return std::string(GetText(), GetSize()); }
     std::vector<char> GetVector() const { return std::vector<char>(GetText(), GetText()+GetSize()); }
-
+    std::string       GetString() const;
 };
 
