Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8311)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8312)
@@ -36,4 +36,11 @@
      - replaced all MF by MFDataPhrase
 
+   * mjobs/MJCalibrateSignal.cc:
+     - changed the extraction range used in the lo-gains from the
+       hi-gain range to the lo-gain range
+
+   * datacenter/macros/fillstar.C:
+     - added filling the spark rate into the database
+
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 8311)
+++ trunk/MagicSoft/Mars/NEWS	(revision 8312)
@@ -4,4 +4,7 @@
 
    - database: Website to plot values from the database has been added. 
+
+   - database: The rate of spark events as found by star is now kept
+     and the rate after cleaning is now with spark events subtracted
 
    - general: The changes to the interpretation of phrases lead to
Index: trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 8311)
+++ trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 8312)
@@ -125,4 +125,11 @@
     }
 
+    MHCamera *hsparks = (MHCamera*)arr.FindObjectInCanvas("Sparks;avg", "MHCamera", "Sparks");
+    if (!hsparks)
+    {
+        cout << "WARNING - Reading of Sparks failed." << endl;
+        return 2;
+    }
+
     TH2F *hcog = (TH2F*)arr.FindObjectInCanvas("Center", "TH2F", "MHHillas");
     if (!hcog)
@@ -197,6 +204,9 @@
     }
 
-    Int_t numevents = (int)h->GetEntries();
+    Int_t numsparks = (int)hsparks->GetEntries()
+    Int_t numevents = (int)h->GetEntries() - numsparks;
     Int_t datarate  = (int)(numevents/effon);
+
+    TString sparksrate = Form("%5.2f", numsparks/effon);
 
     TGraph *g = (TGraph*)arr.FindObjectInCanvas("Humidity", "TGraph", "MHWeather");
@@ -258,17 +268,19 @@
 
     cout << "Sequence #" << seq << endl;
-    cout << "  Inhomogeneity         " << inhomogen << endl;
-    cout << "  PSF [mm]              " << PSF       << endl;
-    cout << "  Island Quality        " << islands   << endl;
-    cout << "  Ratio [%]             " << ratio     << endl;
-    cout << "  Muon Number           " << num       << endl;
-    cout << "  EffOnTime [s]         " << effontime << endl;
-    cout << "  Muon Rate [Hz]        " << muonrate  << endl;
-    cout << "  # of Events           " << numevents << endl;
-    cout << "  Rate after ImgCl [Hz] " << datarate  << endl;
-    cout << "  Maximum Humidity [%]  " << maxhum    << endl;
-    cout << "  Number of Stars       " << numstarsmed      << " +/- " << numstarsrms       << endl;
-    cout << "  Number of cor. Stars  " << numcormed        << " +/- " << numcorrms         << endl;
-    cout << "  Skybrightness         " << skybrightnessmed << " +/- " << skybrightnessrms  << endl;
+    cout << "  Inhomogeneity            " << inhomogen << endl;
+    cout << "  PSF [mm]                 " << PSF       << endl;
+    cout << "  Island Quality           " << islands   << endl;
+    cout << "  Ratio [%]                " << ratio     << endl;
+    cout << "  Muon Number              " << num       << endl;
+    cout << "  EffOnTime [s]            " << effontime << endl;
+    cout << "  Muon Rate [Hz]           " << muonrate  << endl;
+    cout << "  # of Events (w/o sparks) " << numevents << endl;
+    cout << "  # of Sparks              " << numsparks << endl;
+    cout << "  Rate after ImgCl [Hz]    " << datarate  << endl;
+    cout << "  Rate of sparks [Hz]      " << sparkrate << endl;
+    cout << "  Maximum Humidity [%]     " << maxhum    << endl;
+    cout << "  Number of Stars          " << numstarsmed      << " +/- " << numstarsrms       << endl;
+    cout << "  Number of cor. Stars     " << numcormed        << " +/- " << numcorrms         << endl;
+    cout << "  Skybrightness            " << skybrightnessmed << " +/- " << skybrightnessrms  << endl;
 
     TString query;
@@ -284,4 +296,5 @@
                      " fPSF=%s, "
                      " fDataRate=%d, "
+                     " fSparkRate=%s, "
                      " fMaxHumidity=%s ,"
                      " fNumStarsMed=%s ,"
@@ -295,5 +308,5 @@
                      num, effontime,
                      muonrate.Data(), PSF.Data(),
-                     datarate, maxhum.Data(),
+                     datarate, sparkrate.Data(), maxhum.Data(),
                      numstarsmed.Data(), numstarsrms.Data(),
                      numcorsmed.Data(), numcorsrms.Data(),
@@ -311,4 +324,5 @@
                      " fPSF=%s, "
                      " fDataRate=%d, "
+                     " fSparkRate=%s, "
                      " fMaxHumidity=%s, "
                      " fNumStarsMed=%s ,"
@@ -323,5 +337,5 @@
                      num, effontime,
                      muonrate.Data(), PSF.Data(),
-                     datarate, maxhum.Data(),
+                     datarate, sparkrate.Data(), maxhum.Data(),
                      numstarsmed.Data(), numstarsrms.Data(),
                      numcorsmed.Data(), numcorsrms.Data(),
