BmnRoot
Loading...
Searching...
No Matches
BmnDrawOnline.h
Go to the documentation of this file.
1#ifndef BMNDRAWONLINE_H_
2#define BMNDRAWONLINE_H_
3
4#include <TFile.h>
5#include <THttpServer.h>
6#include <TCanvas.h>
7#include "BmnDrawHist.h"
8#include "TSystem.h"
9#include <string>
10#include <vector>
11#include "TH1.h"
12#include "TH1D.h"
13#include "TH2.h"
14#include "TPad.h"
15#include "TLegend.h"
16#include "TEfficiency.h"
17
18using std::string;
19using std::vector;
20
22{
23 public:
27 BmnDrawOnline(TString param, TString storageName = "canvStorage");
28
32 BmnDrawOnline(TFile*, Int_t port = 8080);
33
37 virtual ~BmnDrawOnline();
38
39
54 void DrawH1(
55 TCanvas* canvas,
56 TH1* hist,
57 HistScale logx = kLinear,
58 HistScale logy = kLinear,
59 const string& drawOpt = "",
60 Int_t color = BmnDrawingOptions::Color(0),
61 Int_t lineWidth = BmnDrawingOptions::LineWidth(),
62 Int_t lineStyle = BmnDrawingOptions::LineStyle(0),
63 Float_t markerSize = BmnDrawingOptions::MarkerSize(),
64 Int_t markerStyle = BmnDrawingOptions::MarkerStyle(0),
65 Int_t fillColor = -1);
66
67 void DrawH1(
68 TCanvas* canvas,
69 TEfficiency* hist);
70
71
72
83 void DrawH2(
84 TCanvas* canvas,
85 TH2* hist,
86 HistScale logx = kLinear,
87 HistScale logy = kLinear,
88 HistScale logz = kLinear,
89 const string& drawOpt = "COLZ");
90
106 void DrawH1(
107 TCanvas* canvas,
108 const vector<TH1*>& histos,
109 const vector<string>& histLabels,
110 HistScale logx = kLinear,
111 HistScale logy = kLinear,
112 Bool_t drawLegend = true,
113 Double_t x1 = 0.25,
114 Double_t y1 = 0.99,
115 Double_t x2 = 0.55,
116 Double_t y2 = 0.75,
117 const string& drawOpt = "",
118 Bool_t outputMeanValue01 = kFALSE);
119
124 void InitServer(Int_t);
125
126
127
134 void DrawMainCanvas(TString);
135
142 void RegisterCanvases(TFile*);
143
144private:
145 TFile* canvStorage;
146 THttpServer* fServer;
147 TString canvName;
148 vector<TCanvas*> canvVect;
149 vector<TString> detVect;
150 Int_t maxHeight;
151
152 ClassDef(BmnDrawOnline, 1)
153};
154
155#endif
Helper functions for drawing 1D and 2D histograms and graphs.
void InitServer(Int_t)
void DrawH2(TCanvas *canvas, TH2 *hist, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const string &drawOpt="COLZ")
void DrawMainCanvas(TString)
void DrawH1(TCanvas *canvas, TH1 *hist, HistScale logx=kLinear, HistScale logy=kLinear, const string &drawOpt="", Int_t color=BmnDrawingOptions::Color(0), Int_t lineWidth=BmnDrawingOptions::LineWidth(), Int_t lineStyle=BmnDrawingOptions::LineStyle(0), Float_t markerSize=BmnDrawingOptions::MarkerSize(), Int_t markerStyle=BmnDrawingOptions::MarkerStyle(0), Int_t fillColor=-1)
void RegisterCanvases(TFile *)
virtual ~BmnDrawOnline()
Destructor.
static Int_t LineStyle(Int_t lineStyleIndex)
Definition BmnDrawHist.h:44
static Int_t Color(Int_t colorIndex)
Definition BmnDrawHist.h:34
static Int_t LineWidth()
Definition BmnDrawHist.h:40
static Int_t MarkerStyle(Int_t markerIndex)
Definition BmnDrawHist.h:52
static Float_t MarkerSize()
Definition BmnDrawHist.h:48
HistScale
Define linear or logarithmic scale for drawing.
Definition BmnDrawHist.h:69
@ kLinear
Definition BmnDrawHist.h:71