Index: trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C	(revision 7327)
+++ trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C	(revision 7328)
@@ -105,9 +105,11 @@
     }
 
-    Double_t exc = fit->GetEventsExcess();
-    Double_t sig = fit->GetEventsSignal();
-    Double_t bgd = fit->GetEventsBackground();
-    Double_t S   = fit->GetSignificance();
-    Double_t f   = fit->GetScaleFactor();
+    Int_t exc = (Int_t)fit->GetEventsExcess();
+    Int_t sig = (Int_t)fit->GetEventsSignal();
+    Int_t bgd = (Int_t)fit->GetEventsBackground();
+    Float_t S = fit->GetSignificance();
+    TString signif = Form("%5.1f", S);
+    Float_t f = fit->GetScaleFactor();
+    TString scale = Form("%5.2f", f);
 
     MStatusArray arr;
@@ -126,5 +128,5 @@
 
 
-    Double_t tm = vstime->Integral();
+    Int_t tm = (Int_t)vstime->Integral();
 
     TString dataset = fname(TRegexp("ganymed[0-9]+[.]root$"));
@@ -145,7 +147,7 @@
     cout << "  Total eff. on-time: " << tm << "s = " << tm/3600. << "h" << endl;
 
-    cout << "  Excess       Rate:  " << exc*60/tm << " evts/min"  << endl;
-    cout << "  Background   Rate:  " << bgd*60/tm << " evts/min"  << endl;
-    cout << "  Significance Rate:  " << S/TMath::Sqrt(tm/3600.) << " sigma/sqrt(h)" << endl;
+//    cout << "  Excess       Rate:  " << exc*60/tm << " evts/min"  << endl;
+//    cout << "  Background   Rate:  " << bgd*60/tm << " evts/min"  << endl;
+//    cout << "  Significance Rate:  " << S/TMath::Sqrt(tm/3600.) << " sigma/sqrt(h)" << endl;
 
 
@@ -155,35 +157,36 @@
         query = Form("INSERT Ganymed SET"
                      " fDataSetNumber=%d,"
-                     " fExcessEvents=%f, "
-                     " fBackgroundEvents=%f, "
-                     " fSignalEvents=%f, "
+                     " fExcessEvents=%d, "
+                     " fBackgroundEvents=%d, "
+                     " fSignalEvents=%d, "
                      " fSignificance=%f, "
                      " fScaleFactor=%f, "
-                     " fEffOnTime=%f, "
-                     " fExcessRate=%f, "
-                     " fBackgroundRate=%f, "
-                     " fSignificanceRate=%f ",
-                     ds, exc, bgd, sig, S, f, tm,
-                     exc*60/tm, bgd*60/tm,
-                     S/TMath::Sqrt(tm/3600));
+                     " fEffOnTime=%d ", //, "
+//                     " fExcessRate=%f, "
+//                     " fBackgroundRate=%f, "
+//                     " fSignificanceRate=%f ",
+                     ds, exc, bgd, sig, S, f, tm);//,
+//                     exc*60/tm, bgd*60/tm,
+//                     S/TMath::Sqrt(tm/3600));
     }
     else
     {
         query = Form("UPDATE Ganymed SET"
-                     " fExcessEvents=%f, "
-                     " fBackgroundEvents=%f, "
-                     " fSignalEvents=%f, "
+                     " fExcessEvents=%d, "
+                     " fBackgroundEvents=%d, "
+                     " fSignalEvents=%d, "
                      " fSignificance=%f, "
                      " fScaleFactor=%f, "
-                     " fEffOnTime=%f, "
-                     " fExcessRate=%f, "
-                     " fBackgroundRate=%f, "
-                     " fSignificanceRate=%f ",
+                     " fEffOnTime=%d " //, "
+//                     " fExcessRate=%f, "
+//                     " fBackgroundRate=%f, "
+//                     " fSignificanceRate=%f ",
                      " WHERE fDataSetNumber=%d ",
-                     exc, bgd, sig, S, f, tm,
-                     exc*60/tm, bgd*60/tm,
-                     S/TMath::Sqrt(tm/3600), ds);
-    }
-
+                     exc, bgd, sig, S, f, tm, ds);
+//                     exc*60/tm, bgd*60/tm,
+//                     S/TMath::Sqrt(tm/3600), ds);
+    }
+
+    cout << "q: " << query << endl;
     if (dummy)
         return 0;
