]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/AliMonitorTrend.cxx
hopefully the last refinements for correct type conversion in calibration
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorTrend.cxx
index f822591b12c903498c78cc89c83fbd05d8f3f0ae..3cf599b81aa136ad7bfddcaea016dbe47619ea08 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 
-#include "AliMonitorTrend.h"
 #include <TH1.h>
-#include <TVirtualPad.h>
 #include <TLine.h>
+#include <TMath.h>
+#include <TVirtualPad.h>
+
+#include "AliLog.h"
+
+#include "AliMonitorTrend.h"
 
 
 ClassImp(AliMonitorTrend) 
@@ -40,32 +44,35 @@ Int_t AliMonitorTrend::fgIncSize = 10;
 
 
 //_____________________________________________________________________________
-AliMonitorTrend::AliMonitorTrend()
+AliMonitorTrend::AliMonitorTrend():
+  AliMonitorPlot(),
+  fLabel(),
+  fMin(0),
+  fMax(0),
+  fData(),
+  fHistoDraw(NULL),
+  fRefMean(0),
+  fRefSigma(-1),
+  fHistoCompare(NULL)
 {
 // default contructor
 
-  fMin = fMax = 0;
-  fHistoDraw = NULL;
-  fRefMean = 0;
-  fRefSigma = -1;
-  fHistoCompare = NULL;
 }
 
 //_____________________________________________________________________________
 AliMonitorTrend::AliMonitorTrend(const AliMonitorTrend& trend) :
-  AliMonitorPlot(trend)
+  AliMonitorPlot(trend),
+  fLabel(trend.fLabel),
+  fMin(trend.fMin),
+  fMax(trend.fMax),
+  fData(trend.fData),
+  fHistoDraw(NULL),
+  fRefMean(trend.fRefMean),
+  fRefSigma(trend.fRefSigma),
+  fHistoCompare(NULL)
 {
 // copy constructor
 
-  fLabel = trend.fLabel;
-  fMin = trend.fMin;
-  fMax = trend.fMax;
-  trend.fData.Copy(fData);
-
-  fHistoDraw = NULL;
-  fRefMean = trend.fRefMean;
-  fRefSigma = trend.fRefSigma;
-  fHistoCompare = NULL;
 }
 
 //_____________________________________________________________________________
@@ -91,17 +98,18 @@ AliMonitorTrend& AliMonitorTrend::operator =(const AliMonitorTrend& trend)
 //_____________________________________________________________________________
 AliMonitorTrend::AliMonitorTrend(const char* name, const char* title,
                  const char* label, Double_t min, Double_t max) :
-  AliMonitorPlot(name, title)
+  AliMonitorPlot(name, title),
+  fLabel(label),
+  fMin(min),
+  fMax(max),
+  fData(),
+  fHistoDraw(NULL),
+  fRefMean(0),
+  fRefSigma(0),
+  fHistoCompare(NULL)
 {
 // create a monitor trend
 
-  fLabel = label;
-  fMin = min;
-  fMax = max;
-
-  fHistoDraw = NULL;
-  fRefMean = fRefSigma = 0;
-  fHistoCompare = NULL;
 }
 
 //_____________________________________________________________________________
@@ -214,7 +222,7 @@ Bool_t AliMonitorTrend::ComparePlot()
   if (fRefSigma < 0) return kTRUE;
   if (fgThreshold <= 0) return kTRUE;
   if (!fHistoDraw) {
-    Info("Compare", "no data trend available for comparison\ncall DrawSum or DrawRaw before calling Compare");
+    AliWarning("no data trend available for comparison\ncall DrawSum or DrawRaw before calling Compare");
     return kTRUE;
   }
 
@@ -253,8 +261,8 @@ Bool_t AliMonitorTrend::GetSum(Int_t number)
 // get the monitor trend for the last  "number" events
 
   if (number > fNumberOfEvents) {
-    Info("GetSum", "requested number of events (%d) exceeds range of available events (%d)\nusing last %d event(s)", 
-         number, fNumberOfEvents, fNumberOfEvents);
+    AliError(Form("requested number of events (%d) exceeds range of available events (%d)\nusing last %d event(s)", 
+         number, fNumberOfEvents, fNumberOfEvents));
     number = fNumberOfEvents;
   }
   if (number <= 0) return kFALSE;