Index: /trunk/FACT++/src/fadctrl.cc
===================================================================
--- /trunk/FACT++/src/fadctrl.cc	(revision 11079)
+++ /trunk/FACT++/src/fadctrl.cc	(revision 11080)
@@ -846,25 +846,9 @@
     }
 
-    int PrintEvent(const EventImp &evt)
-    {
-        if (!CheckEventSize(evt.GetSize(), "PrintEvent", 2))
-            return T::kSM_FatalError;
-
-        const int16_t slot = evt.Get<int16_t>();
-
-        if (slot<0)
-        {
-            for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
-                i->second.second->PrintEvent();
-        }
-        else
-        {
-            const BoardList::iterator it=fBoards.find(slot);
-            if (it!=fBoards.end())
-            {
-                it->second.second->PrintEvent();
-                return T::GetCurrentState();
-            }
-
+    const BoardList::iterator GetSlot(uint16_t slot)
+    {
+        const BoardList::iterator it=fBoards.find(slot);
+        if (it==fBoards.end())
+        {
             ostringstream str;
             str << "Slot " << slot << " not found.";
@@ -872,4 +856,26 @@
         }
 
+        return it;
+    }
+
+    int PrintEvent(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "PrintEvent", 2))
+            return T::kSM_FatalError;
+
+        const int16_t slot = evt.Get<int16_t>();
+
+        if (slot<0)
+        {
+            for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
+                i->second.second->PrintEvent();
+        }
+        else
+        {
+            const BoardList::iterator it=GetSlot(slot);
+            if (it!=fBoards.end())
+                it->second.second->PrintEvent();
+        }
+
         return T::GetCurrentState();
     }
@@ -882,38 +888,63 @@
         const int16_t slot = evt.Get<int32_t>();
 
-        const BoardList::iterator it=fBoards.find(slot);
-        if (it==fBoards.end())
-        {
-            ostringstream str;
-            str << "Slot " << slot << " not found.";
-            T::Warn(str);
+        const BoardList::iterator it=GetSlot(slot);
+        if (it!=fBoards.end())
+            it->second.second->SetBlockTransmission(evt.Get<uint8_t>(2));
+
+        return T::GetCurrentState();
+    }
+
+    int SetBlockTransmissionRange(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "SetBlockTransmissionRange", 5))
+            return T::kSM_FatalError;
+
+        const int16_t *slot  = evt.Ptr<int16_t>();
+        const bool     block = evt.Get<uint8_t>(4);
+
+        for (int i=slot[0]; i<=slot[1]; i++)
+        {
+            const BoardList::iterator it=GetSlot(i);
+            if (it!=fBoards.end())
+                it->second.second->SetBlockTransmission(block);
+        }
+
+        return T::GetCurrentState();
+    }
+
+    int SetIgnoreSlot(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "SetIgnoreSlot", 3))
+            return T::kSM_FatalError;
+
+        const uint16_t slot = evt.Get<uint16_t>();
+
+        if (slot>39)
+        {
+            T::Warn("Slot out of range (0-39).");
             return T::GetCurrentState();
         }
 
-        it->second.second->SetBlockTransmission(evt.Get<uint8_t>(4));
-
-        return T::GetCurrentState();
-    }
-
-    int SetBlockTransmissionRange(const EventImp &evt)
-    {
-        if (!CheckEventSize(evt.GetSize(), "SetBlockTransmissionRange", 5))
+        SetIgnore(slot, evt.Get<uint8_t>(2));
+
+        return T::GetCurrentState();
+    }
+
+    int SetIgnoreSlots(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "SetIgnoreSlots", 5))
             return T::kSM_FatalError;
 
         const int16_t *slot  = evt.Ptr<int16_t>();
-        const bool     block = evt.Get<uint8_t>(8);
+        const bool     block = evt.Get<uint8_t>(4);
+
+        if (slot[0]<0 || slot[1]>39 || slot[0]>slot[1])
+        {
+            T::Warn("Slot out of range.");
+            return T::GetCurrentState();
+        }
 
         for (int i=slot[0]; i<=slot[1]; i++)
-        {
-            const BoardList::iterator it=fBoards.find(i);
-            if (it==fBoards.end())
-            {
-                ostringstream str;
-                str << "Slot " << i << " not found.";
-                T::Warn(str);
-                continue;
-            }
-            it->second.second->SetBlockTransmission(block);
-        }
+            SetIgnore(i, block);
 
         return T::GetCurrentState();
@@ -995,5 +1026,8 @@
 
             if (c->IsTransmissionBlocked())
-                str << " [blocked]";
+                str << " [cmd_blocked]";
+
+            if (fStatus2[idx]==7 && IsIgnored(idx))
+                str << " [data_ignored]";
 
             T::Out() << str.str() << endl;
@@ -1332,4 +1366,17 @@
              "|enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no)");
 
+        T::AddEvent("IGNORE_EVENTS_FROM_SLOT", "S:1;B:1")
+            (boost::bind(&StateMachineFAD::SetIgnoreSlot, this, _1))
+            ("Instructs the event-builder to ignore events from the given slot but still read the data from the socket."
+             "|slot[short]:Slot from which the data should be ignored when building events"
+             "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
+
+        T::AddEvent("IGNORE_EVENTS_FROM_SLOT_RANGE", "S:2;B:1")
+            (boost::bind(&StateMachineFAD::SetIgnoreSlots, this, _1))
+            ("Instructs the event-builder to ignore events from the given slot but still read the data from the socket."
+             "|first[short]:First slot from which the data should be ignored when building events"
+             "|last[short]:Last slot from which the data should be ignored when building events"
+             "|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no)");
+
         // Conenction commands
         /*
