]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/AliMonitorTrend.cxx
Typos and error corrceted (Raffaele)
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorTrend.cxx
index ae7254a2ad3d8e2c3578a04f28fc3dccfd61e3e9..3cf599b81aa136ad7bfddcaea016dbe47619ea08 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 
-#include "AliMonitorTrend.h"
-#include <TVirtualPad.h>
+#include <TH1.h>
 #include <TLine.h>
+#include <TMath.h>
+#include <TVirtualPad.h>
+
+#include "AliLog.h"
+
+#include "AliMonitorTrend.h"
 
 
 ClassImp(AliMonitorTrend) 
@@ -39,23 +44,44 @@ 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
 
+}
+
+//_____________________________________________________________________________
+AliMonitorTrend& AliMonitorTrend::operator =(const AliMonitorTrend& trend)
+{
+// assignment operator
+
+  AliMonitorPlot::operator =(trend);
+
   fLabel = trend.fLabel;
   fMin = trend.fMin;
   fMax = trend.fMax;
@@ -65,22 +91,25 @@ AliMonitorTrend::AliMonitorTrend(const AliMonitorTrend& trend) :
   fRefMean = trend.fRefMean;
   fRefSigma = trend.fRefSigma;
   fHistoCompare = NULL;
+
+  return *this;
 }
 
 //_____________________________________________________________________________
 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;
 }
 
 //_____________________________________________________________________________
@@ -193,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;
   }
 
@@ -222,7 +251,7 @@ Bool_t AliMonitorTrend::GetEvent(Int_t)
 {
 // there is no single event trend
 
-  Info("GetEvent", "there is no trend for single events available");
+//  Info("GetEvent", "there is no trend for single events available");
   return kFALSE;
 }
 
@@ -232,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;
@@ -345,7 +374,7 @@ TH1* AliMonitorTrend::CreateHisto(Int_t nBins)
 }
 
 //_____________________________________________________________________________
-Double_t AliMonitorTrend::GetMean()
+Double_t AliMonitorTrend::GetMean() const
 {
 // get the mean value
 
@@ -359,7 +388,7 @@ Double_t AliMonitorTrend::GetMean()
 }
 
 //_____________________________________________________________________________
-Double_t AliMonitorTrend::GetSigma()
+Double_t AliMonitorTrend::GetSigma() const
 {
 // get the rms value