Index: /trunk/FACT++/src/HeadersFTM.h
===================================================================
--- /trunk/FACT++/src/HeadersFTM.h	(revision 10553)
+++ /trunk/FACT++/src/HeadersFTM.h	(revision 10554)
@@ -336,6 +336,8 @@
         void DisableFTU(int i) { fActiveFTU[i/10] &= ~(1<<(i%10)); }
 
-        void EnableAllFTU()  { for (int i=0; i<4; i++) fActiveFTU[i] = 0x3ff; }
-        void DisableAllFTU() { for (int i=0; i<4; i++) fActiveFTU[i] = 0;     }
+        void EnableAllFTU()    { for (int i=0; i<4; i++) fActiveFTU[i] = 0x3ff; }
+        void DisableAllFTU()   { for (int i=0; i<4; i++) fActiveFTU[i] = 0;     }
+
+        void ToggleFTU(int i)  { fActiveFTU[i/10] ^= (1<<(i%10)); }
 
     } __attribute__((__packed__));
@@ -591,5 +593,8 @@
         DimFtuList(const Header &h, const FtuList &d) :
             fTimeStamp(h.fTimeStamp),
-            fActiveFTU(d.fActiveFTU[0] | (d.fActiveFTU[1]<<10) | (d.fActiveFTU[2]<<20) | (d.fActiveFTU[3]<<30)),
+            fActiveFTU( uint64_t(d.fActiveFTU[0])      |
+                       (uint64_t(d.fActiveFTU[1])<<10) |
+                       (uint64_t(d.fActiveFTU[2])<<20) |
+                       (uint64_t(d.fActiveFTU[3])<<30)),
             fNumBoards(d.fNumBoards)
         {
@@ -605,5 +610,5 @@
         }
 
-        bool IsActive(int i) const { return fActiveFTU&(1<<i); }
+        bool IsActive(int i) const { return fActiveFTU&(uint64_t(1)<<i); }
 
     } __attribute__((__packed__));
