45 std::cout <<
" new tcanvas" << std::endl;
46 fCanvas =
new TCanvas (
"TMVA Monitoring",
"Monitoring", 1000, 500);
47 std::cout <<
" draw" << std::endl;
49 std::cout <<
" update" << std::endl;
51 std::cout <<
" process events" << std::endl;
53 std::cout <<
" run app" << std::endl;
55 std::cout <<
" run app executed" << std::endl;
70 void pads (
int numPads);
71 void create (std::string histoName,
int bins,
double min,
double max);
72 void create (std::string histoName,
int bins,
double min,
double max,
int bins2,
double min2,
double max2);
73 void addPoint (std::string histoName,
double x);
74 void addPoint (std::string histoName,
double x,
double y);
75 void plot (std::string histoName, std::string options =
"L",
int pad = 0,
EColor color =
kBlue);
76 void clear (std::string histoName);
77 bool exists (std::string histoName);
78 bool exists (
TH1F* dummy, std::string histoName);
79 bool exists (
TH2F* dummy, std::string histoName);
83 TH1F*
getHistogram (
const TH1F* dummy, std::string histoName,
int bins = 0,
double min = 0,
double max = 0);
84 TH2F*
getHistogram (
const TH2F* dummy, std::string histoName,
int bins = 0,
double min = 0,
double max = 0,
int bins2 = 0,
double min2 = 0,
double max2 = 0);
118 TH1F* dummy1D (NULL);
119 TH2F* dummy2D (NULL);
120 return exists (dummy1D, histoName) ||
exists (dummy2D, histoName);
127 std::cout <<
"divide canvas " << canvas <<
" into " << numPads <<
"numPads" << std::endl;
138 inline void Monitoring::create (std::string histoName,
int bins,
double min,
double max,
int bins2,
double min2,
double max2)
141 getHistogram (dummy, histoName, bins, min, max, bins2, min2, max2);
151 std::cout <<
"new 1D histogram " << histoName << std::endl;
152 TH1F* histogram =
m_histos1D.insert (std::make_pair (histoName,
new TH1F (histoName.c_str (), histoName.c_str (), bins, min, max))).first->second;
163 std::cout <<
"new 2D histogram " << histoName << std::endl;
164 TH2F* histogram =
m_histos2D.insert (std::make_pair (histoName,
new TH2F (histoName.c_str (), histoName.c_str (), bins, min, max, bins2, min2, max2))).first->second;
192 if (
exists (hist1D, histoName))
199 if (
exists (hist2D, histoName))
201 hist2D =
getHistogram (hist2D, histoName, 100, 0,1,100,0,1);
220 histogram->
Draw (options.c_str ());
234 histogram->
Draw (options.c_str ());
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
void Draw(Option_t *option="") override
Draw a canvas.
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Update() override
Update canvas pad buffers.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void Reset(Option_t *option="")
Reset.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)}
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Int_t Fill(Double_t)
Invalid Fill method.
void addPoint(std::string histoName, double x)
TH1F * getHistogram(const TH1F *dummy, std::string histoName, int bins=0, double min=0, double max=0)
void create(std::string histoName, int bins, double min, double max)
std::map< std::string, TH1F * > m_histos1D
bool exists(std::string histoName)
void plot(std::string histoName, std::string options="L", int pad=0, EColor color=kBlue)
void clear(std::string histoName)
std::map< std::string, TH2F * > m_histos2D
virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
"n" is the total number of sub-pads.
void Modified(Bool_t flag=1) override
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
create variable transformations