1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // This is the base class for the creation and filling of monitor //
22 // Derived classes have to implement the methods CreateHistos and //
23 // FillHistos. CreateHistos has to create the monitor histograms, put //
24 // them into a new folder and add this folder to the given root folder. //
25 // FillHistos has to fill the data of the current event into the created //
26 // monitor histograms. //
28 ///////////////////////////////////////////////////////////////////////////////
36 #include "AliMonitorTrend.h"
38 #include "AliMonitor.h"
44 //_____________________________________________________________________________
45 AliMonitor::AliMonitor():
51 //_____________________________________________________________________________
52 void AliMonitor::CreateBranches(TTree*)
54 // add branches to the monitor tree
55 // by default no branches are added
56 // this method can be overwritten by derived classes
61 //_____________________________________________________________________________
62 AliMonitorHisto* AliMonitor::CreateHisto1(const char* name, const char* title,
63 Int_t xBins, Double_t xMin, Double_t xMax,
64 const char* xTitle, const char* yTitle,
65 AliMonitorHisto::ENorm norm)
67 // create a 1 dimensional monitor histogram and add it to fFolder
69 TH1F* histo = new TH1F(name, title, xBins, xMin, xMax);
70 histo->SetMarkerStyle(kFullCircle);
71 histo->GetXaxis()->SetTitle(xTitle);
72 histo->GetYaxis()->SetTitle(yTitle);
73 AliMonitorHisto* result = new AliMonitorHisto(histo, norm);
78 //_____________________________________________________________________________
79 AliMonitorHisto* AliMonitor::CreateHisto2(const char* name, const char* title,
80 Int_t xBins, Double_t xMin, Double_t xMax,
81 Int_t yBins, Double_t yMin, Double_t yMax,
82 const char* xTitle, const char* yTitle,
84 AliMonitorHisto::ENorm norm)
86 // create a 2 dimensional monitor histogram and add it to fFolder
88 TH2F* histo = new TH2F(name, title, xBins, xMin, xMax, yBins, yMin, yMax);
89 histo->SetOption("BOX");
90 histo->GetXaxis()->SetTitle(xTitle);
91 histo->GetYaxis()->SetTitle(yTitle);
92 histo->GetZaxis()->SetTitle(zTitle);
93 AliMonitorHisto* result = new AliMonitorHisto(histo, norm);
98 //_____________________________________________________________________________
99 AliMonitorTrend* AliMonitor::CreateTrend(const char* name, const char* title,
101 Double_t min, Double_t max)
103 // create a trend monitor histogram and add it to fFolder
105 AliMonitorTrend* result = new AliMonitorTrend(name, title, label, min, max);
106 fFolder->Add(result);