Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8306)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8307)
@@ -19,4 +19,11 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2007/02/06 Thomas Bretz
+
+   * mpointing/MPointingDevCalc.cc:
+     - included check for monitoring flag
+
+
+
  2007/02/04 Daniela Dorner
 
Index: trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 8306)
+++ trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 8307)
@@ -138,5 +138,5 @@
 // Increase fSkip[i] by one. If the data in fDeviation is outdated (older
 // than fMaxAge) and the current report should be skipped reset DevZdAz and
-// DevXY and fSkip[5] is increased by one.
+// DevXY and fSkip[6] is increased by one.
 //
 void MPointingDevCalc::Skip(Int_t i)
@@ -150,17 +150,22 @@
     fDeviation->SetDevZdAz(0, 0);
     fDeviation->SetDevXY(0, 0);
-    fSkip[5]++;
+    fSkip[6]++;
 }
 
 Int_t MPointingDevCalc::ProcessStarguiderReport()
 {
+    /************* CHECK STATUS!!! ******************/
+
     Double_t devzd = fReport->GetDevZd(); // [deg]
     Double_t devaz = fReport->GetDevAz(); // [deg]
     if (devzd==0 && devaz==0)
     {
-        fDeviation->SetDevZdAz(0, 0);
-        fDeviation->SetDevXY(0, 0);   //?!?
-        fSkip[1]++;
-        fLastMjd = fReport->GetMjd();
+        Skip(1);
+        return kTRUE;
+    }
+
+    if (!fReport->IsMonitoring())
+    {
+        Skip(2);
         return kTRUE;
     }
@@ -188,5 +193,5 @@
             if (nsb<sum-rms || nsb>sum+rms)
             {
-                Skip(2);
+                Skip(3);
                 return kTRUE;
             }
@@ -195,5 +200,5 @@
         if (fReport->GetNumIdentifiedStars()<fNumMinStars)
         {
-            Skip(3);
+            Skip(4);
             return kTRUE;
         }
@@ -206,5 +211,5 @@
     if (dev*60>fMaxAbsDev)
     {
-        Skip(4);
+        Skip(5);
         return kTRUE;
     }
@@ -257,8 +262,9 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     PrintSkipped(fSkip[1], "Starguider deviation not set, is exactly 0/0");
-    PrintSkipped(fSkip[2], Form("NSB out of %.1f sigma range", fNsbLevel));
-    PrintSkipped(fSkip[3], Form("Number of identified stars < %d", fNumMinStars));
-    PrintSkipped(fSkip[4], Form("Absolute deviation > %.1farcmin", fMaxAbsDev));
-    PrintSkipped(fSkip[5], Form("Events set to 0 because older than %.1fmin", fMaxAge));
+    PrintSkipped(fSkip[2], "Starguider was not monitoring (eg. LEDs off)");
+    PrintSkipped(fSkip[3], Form("NSB out of %.1f sigma range", fNsbLevel));
+    PrintSkipped(fSkip[4], Form("Number of identified stars < %d", fNumMinStars));
+    PrintSkipped(fSkip[5], Form("Absolute deviation > %.1farcmin", fMaxAbsDev));
+    PrintSkipped(fSkip[6], Form("Events set to 0 because older than %.1fmin", fMaxAge));
     *fLog << " " << (int)fSkip[0] << " (" << Form("%5.1f", 100.*fSkip[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl;
     *fLog << endl;
