]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/AliMonitorPlot.cxx
Avoid linking with pythia.
[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
c4bd737c 57//_____________________________________________________________________________
58AliMonitorPlot& AliMonitorPlot::operator =(const AliMonitorPlot& plot)
59{
60// assignment operator
61
62 TNamed::operator =(plot);
63 fNumberOfEvents = plot.fNumberOfEvents;
64 return *this;
65}
66
04fa961a 67//_____________________________________________________________________________
68AliMonitorPlot::AliMonitorPlot(const char* name, const char* title) :
69 TNamed(name, title)
70{
71// constructor setting name and title
72
73 fNumberOfEvents = 0;
74}
75
76
77
78//_____________________________________________________________________________
79void AliMonitorPlot::SetDrawRef(Bool_t drawRef)
80{
81// set the flag for drawing the reference plot
82
83 fgDrawRef = drawRef;
84}
85
86//_____________________________________________________________________________
87void AliMonitorPlot::SetThreshold(Float_t threshold)
88{
89// set the threshold in standard deviations for the comparison
90// to the reference plot.
91// no comparison is performed, if the threshold is <= 0
92
93 fgThreshold = threshold;
94}
95
96
97//_____________________________________________________________________________
98void AliMonitorPlot::DrawEvent(Int_t number)
99{
100// draw the normalized monitor plot together with the reference
101// plot and the comparison plot (if available)
102// for the "number"th last event
103
104 if (!GetEvent(number)) return;
105 if (fgDrawRef) ComparePlot();
106 DrawPlot();
107}
108
109//_____________________________________________________________________________
110void AliMonitorPlot::DrawSum(Int_t number)
111{
112// draw the normalized monitor plot together with the reference
113// plot and the comparison plot (if available)
114// for the sum of the last "number" events
115
116 if (!GetSum(number)) return;
117 if (fgDrawRef) ComparePlot();
118 DrawPlot();
119}
120
121//_____________________________________________________________________________
122void AliMonitorPlot::DrawRun()
123{
124// draw the normalized monitor plot together with the reference
125// plot and the comparison plot (if available)
126// for all monitored events of the current run
127
128 if (!GetRun()) return;
129 if (fgDrawRef) ComparePlot();
130 DrawPlot();
131}
132
133
134//_____________________________________________________________________________
135Bool_t AliMonitorPlot::CompareEvent(Int_t number)
136{
137// compare the normalized monitor plot for the "number"th last event
138// to the reference plot
139
140 if (!GetEvent(number)) return kTRUE;
141 return ComparePlot();
142}
143
144//_____________________________________________________________________________
145Bool_t AliMonitorPlot::CompareSum(Int_t number)
146{
147// compare the normalized monitor plot for the sum of the last
148// "number" events to the reference plot
149
150 if (!GetSum(number)) return kTRUE;
151 return ComparePlot();
152}
153
154//_____________________________________________________________________________
155Bool_t AliMonitorPlot::CompareRun()
156{
157// compare the normalized monitor plot for all monitored events
158// of the current run to the reference plot
159
160 if (!GetRun()) return kTRUE;
161 return ComparePlot();
162}
163