Index: fact/tools/rootmacros/fbsl.C
===================================================================
--- fact/tools/rootmacros/fbsl.C	(revision 12521)
+++ fact/tools/rootmacros/fbsl.C	(revision 12527)
@@ -134,5 +134,6 @@
 
   BookHistos( RegionOfInterest, npixel );
-    
+	size_t calib_RC = 1;
+ 
 		// loop over events
     for ( int ev = firstevent; ev < firstevent + nevents; ev++) {
@@ -151,7 +152,10 @@
 			// apply the Drs Calibration and cut off 12 slices at the beginning
 			// and at the end.
-			applyDrsCalibration( Ameas,pix,12,12,
+			calib_RC = applyDrsCalibration( Ameas,pix,12,12,
 				Offset, Gain, TriggerOffset,
 				RegionOfInterest, Data, StartCells);
+			if (calib_RC == 0){
+				break;
+			}
 
 			// finds spikes in the raw data, and interpolates the value
@@ -168,5 +172,16 @@
             }   
 	    }
-	}
+
+			if (calib_RC == 0){
+				break;
+			}
+	
+	}
+
+
+			if (calib_RC == 0){
+				cout << "DRS Calibration didn't work ... aborting" << endl;
+				return 2;
+			}
 
     FILE *fp;
