]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/AliMonitorPlot.cxx
Classes for reading raw data moved to the RAW module. New on-line MONITORING module...
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorPlot.cxx
CommitLineData
04fa961a 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// This is the base class for plots used to monitor the quality of the //
21// recorded data. //
22// //
23///////////////////////////////////////////////////////////////////////////////
24
25
26#include "AliMonitorPlot.h"
27
28
29ClassImp(AliMonitorPlot)
30
31
32Bool_t AliMonitorPlot::fgDrawRef = kTRUE;
33Float_t AliMonitorPlot::fgThreshold = 5.0;
34
35Color_t AliMonitorPlot::fgColorData = kBlack;
36Color_t AliMonitorPlot::fgColorRef = kBlue;
37Color_t AliMonitorPlot::fgColorCompare = kRed;
38
39
40//_____________________________________________________________________________
41AliMonitorPlot::AliMonitorPlot() : TNamed()
42{
43// default contructor
44
45 fNumberOfEvents = 0;
46}
47
48//_____________________________________________________________________________
49AliMonitorPlot::AliMonitorPlot(const AliMonitorPlot& plot) :
50 TNamed(plot)
51{
52// copy constructor
53
54 fNumberOfEvents = plot.fNumberOfEvents;
55}
56
57//_____________________________________________________________________________
58AliMonitorPlot::AliMonitorPlot(const char* name, const char* title) :
59 TNamed(name, title)
60{
61// constructor setting name and title
62
63 fNumberOfEvents = 0;
64}
65
66
67
68//_____________________________________________________________________________
69void AliMonitorPlot::SetDrawRef(Bool_t drawRef)
70{
71// set the flag for drawing the reference plot
72
73 fgDrawRef = drawRef;
74}
75
76//_____________________________________________________________________________
77void AliMonitorPlot::SetThreshold(Float_t threshold)
78{
79// set the threshold in standard deviations for the comparison
80// to the reference plot.
81// no comparison is performed, if the threshold is <= 0
82
83 fgThreshold = threshold;
84}
85
86
87//_____________________________________________________________________________
88void AliMonitorPlot::DrawEvent(Int_t number)
89{
90// draw the normalized monitor plot together with the reference
91// plot and the comparison plot (if available)
92// for the "number"th last event
93
94 if (!GetEvent(number)) return;
95 if (fgDrawRef) ComparePlot();
96 DrawPlot();
97}
98
99//_____________________________________________________________________________
100void AliMonitorPlot::DrawSum(Int_t number)
101{
102// draw the normalized monitor plot together with the reference
103// plot and the comparison plot (if available)
104// for the sum of the last "number" events
105
106 if (!GetSum(number)) return;
107 if (fgDrawRef) ComparePlot();
108 DrawPlot();
109}
110
111//_____________________________________________________________________________
112void AliMonitorPlot::DrawRun()
113{
114// draw the normalized monitor plot together with the reference
115// plot and the comparison plot (if available)
116// for all monitored events of the current run
117
118 if (!GetRun()) return;
119 if (fgDrawRef) ComparePlot();
120 DrawPlot();
121}
122
123
124//_____________________________________________________________________________
125Bool_t AliMonitorPlot::CompareEvent(Int_t number)
126{
127// compare the normalized monitor plot for the "number"th last event
128// to the reference plot
129
130 if (!GetEvent(number)) return kTRUE;
131 return ComparePlot();
132}
133
134//_____________________________________________________________________________
135Bool_t AliMonitorPlot::CompareSum(Int_t number)
136{
137// compare the normalized monitor plot for the sum of the last
138// "number" events to the reference plot
139
140 if (!GetSum(number)) return kTRUE;
141 return ComparePlot();
142}
143
144//_____________________________________________________________________________
145Bool_t AliMonitorPlot::CompareRun()
146{
147// compare the normalized monitor plot for all monitored events
148// of the current run to the reference plot
149
150 if (!GetRun()) return kTRUE;
151 return ComparePlot();
152}
153