Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPlot1D.cc File Reference

General purpose plot program for 1D ROOT objects. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <cmath>
#include "TROOT.h"
#include "TFile.h"
#include "TClass.h"
#include "TApplication.h"
#include "TCanvas.h"
#include "TKey.h"
#include "TStyle.h"
#include "TAttMarker.h"
#include "TAttLine.h"
#include "TH1.h"
#include "TH2.h"
#include "TF1.h"
#include "THStack.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TMultiGraph.h"
#include "TProfile.h"
#include "TLegend.h"
#include "TString.h"
#include "TRegexp.h"
#include "TText.h"
#include "JTools/JRange.hh"
#include "JLang/JSinglePointer.hh"
#include "JGizmo/JStyle.hh"
#include "JGizmo/JCanvas.hh"
#include "JGizmo/JMarkerAttributes.hh"
#include "JGizmo/JLineAttributes.hh"
#include "JGizmo/JLegend.hh"
#include "JGizmo/JRootObjectID.hh"
#include "JGizmo/JRootObject.hh"
#include "JGizmo/JGizmoToolkit.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

General purpose plot program for 1D ROOT objects.

The option -f corresponds to <file name>:<object name>.

Author
mdejong

Definition in file JPlot1D.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 58 of file JPlot1D.cc.

59 {
60  using namespace std;
61  using namespace JPP;
62 
63  typedef JRange<double> JRange_t;
64 
65  vector<JRootObjectID> inputFile;
66  string outputFile;
67  JCanvas canvas;
68  int stats;
69  string legend;
70  JRange_t X;
71  JRange_t Y;
72  JRange_t Z;
73  JCounter logx;
74  bool logy;
75  bool logz;
76  char project;
77  string xLabel;
78  string yLabel;
79  JCounter drawLine;
80  bool fillArea;
81  int lineWidth;
82  double markerSize;
83  string option;
84  set<char> grid;
85  bool batch;
86  string title;
87  pair<string, int> Ndivisions;
88  int group;
89  int debug;
90  string xTimeFormat;
91 
92  try {
93 
94  JParser<> zap("General purpose plot program for 1D ROOT objects.");
95 
96  zap['f'] = make_field(inputFile, "<input file>:<object name>");
97  zap['o'] = make_field(outputFile, "graphics output") = "";
98  zap['w'] = make_field(canvas, "size of canvas <nx>x<ny> [pixels]") = JCanvas(500, 500);
99  zap['s'] = make_field(stats) = -1;
100  zap['L'] = make_field(legend, "position legend e.g. TR") = "";
101  zap['x'] = make_field(X, "abscissa range") = JRange_t();
102  zap['y'] = make_field(Y, "ordinate range") = JRange_t();
103  zap['z'] = make_field(Z, "ordinate range of projection)") = JRange_t();
104  zap['X'] = make_field(logx, "logarithmic x-axis (-XX log10 axis)");
105  zap['Y'] = make_field(logy, "logarithmic y-axis");
106  zap['Z'] = make_field(logz, "logarithmic y-axis; after projection");
107  zap['P'] = make_field(project, "projection") = '\0', 'x', 'X', 'y', 'Y';
108  zap['>'] = make_field(xLabel, "x-axis label") = "";
109  zap['^'] = make_field(yLabel, "y-axis label") = "";
110  zap['C'] = make_field(drawLine);
111  zap['F'] = make_field(fillArea);
112  zap['l'] = make_field(lineWidth, "line width") = 2;
113  zap['S'] = make_field(markerSize, "marker size") = 1.0;
114  zap['O'] = make_field(option, "plotting option") = "";
115  zap['G'] = make_field(grid, "grid lines [X][Y]") = JPARSER::initialised();
116  zap['B'] = make_field(batch, "batch processing");
117  zap['T'] = make_field(title, "title") = "KM3NeT preliminary";
118  zap['N'] = make_field(Ndivisions, "axis divisioning (e.g. \"X 505\")") = JPARSER::initialised();
119  zap['g'] = make_field(group, "group colour codes of objects") = 1;
120  zap['t'] = make_field(xTimeFormat, "set time format for x-axis, e.g. \%d\\/\%m\\/\\%y%F1970-01-01 00:00:00") = "";
121  zap['d'] = make_field(debug) = 0;
122 
123  zap(argc, argv);
124  }
125  catch(const exception &error) {
126  FATAL(error.what() << endl);
127  }
128 
129 
130  gROOT->SetBatch(batch);
131 
132  TApplication* tp = new TApplication("user", NULL, NULL);
133  TCanvas* cv = new TCanvas("c1", "c1", canvas.x, canvas.y);
134 
135  JSinglePointer<TStyle> gStyle(new JStyle("gplot", cv->GetWw(), cv->GetWh()));
136 
137  gROOT->SetStyle("gplot");
138  gROOT->ForceStyle();
139 
140 
141  cv->SetFillStyle(4000);
142  cv->SetFillColor(kWhite);
143  cv->Divide(1,1);
144  cv->cd(1);
145 
146 
147  JMarkerAttributes::getInstance().setMarkerSize(markerSize);
148  JLineAttributes ::getInstance().setLineWidth (lineWidth);
149 
150 
151  Double_t xmin = +numeric_limits<double>::max();
152  Double_t xmax = -numeric_limits<double>::max();
153 
154  Double_t ymin = +numeric_limits<double>::max();
155  Double_t ymax = -numeric_limits<double>::max();
156 
157 
158  vector<JRootObject> listOfObjects;
159 
160  const bool px = (project == 'x' || project == 'X'); // projection on x-axis
161  const bool py = (project == 'y' || project == 'Y'); // projection on y-axis
162 
163  logy = (logy || logz);
164 
165  if (px) {
166  swap(Y, Z); // Y becomes range in TH2::ProjectionX() and Z becomes y-axis range
167  }
168 
169  if (py) {
170  swap(X, Z); // X becomes range in TH2::ProjectionY()
171  swap(Y, X); // Y becomes x-axis range and Z becomes y-axis range
172  }
173 
174  TH1* master = NULL;
175 
176  for (vector<JRootObjectID>::const_iterator input = inputFile.begin(); input != inputFile.end(); ++input) {
177 
178  DEBUG("Input: " << *input << endl);
179 
180  TDirectory* dir = getDirectory(*input);
181 
182  if (dir == NULL) {
183  ERROR("File: " << input->getFullFilename() << " not opened." << endl);
184  continue;
185  }
186 
187  const TRegexp regexp(input->getObjectName());
188 
189  TIter iter(dir->GetListOfKeys());
190 
191  for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
192 
193  const TString tag(key->GetName());
194 
195  DEBUG("Key: " << tag << " match = " << tag.Contains(regexp) << endl);
196 
197  // option match
198 
199  if (tag.Contains(regexp)) {
200 
201  if (title == JName_t) {
202  title = key->GetName();
203  } else if (title == JTitle_t) {
204  title = key->GetTitle();
205  }
206 
207  JRootObject object(key->ReadObj());
208 
209  TAttMarker marker = JMarkerAttributes::getInstance().get(0);
210  TAttLine line = JLineAttributes ::getInstance().get(0);
211 
212  if (group > 1)
213  marker.SetMarkerColor(JMarkerAttributes::getInstance().get(listOfObjects.size()/group).GetMarkerColor());
214  else
215  marker = JMarkerAttributes::getInstance().get(listOfObjects.size());
216 
217  if (drawLine == 1)
218  line = JLineAttributes::getInstance().get(listOfObjects.size());
219  else
220  line.SetLineColor(marker.GetMarkerColor());
221 
222  try {
223 
224  TProfile& h1 = dynamic_cast<TProfile&>(*object);
225 
226  object = h1.ProjectionX();
227  }
228  catch(exception&) {}
229 
230  try {
231 
232  TH2& h2 = dynamic_cast<TH2&>(*object);
233 
234  if (px) {
235 
236  if (Z != JRange_t())
237  object = h2.ProjectionX(MAKE_CSTRING(h2.GetName() << "_px" << LABEL_TERMINATOR << listOfObjects.size()),
238  h2.GetYaxis()->FindBin(Z.getLowerLimit()),
239  h2.GetYaxis()->FindBin(Z.getUpperLimit()) - 1);
240  else
241  object = h2.ProjectionX(MAKE_CSTRING(h2.GetName() << "_px" << LABEL_TERMINATOR << listOfObjects.size()),
242  1,
243  h2.GetYaxis()->GetNbins());
244 
245  } else if (py) {
246 
247  if (Z != JRange_t())
248  object = h2.ProjectionY(MAKE_CSTRING(h2.GetName() << "_py" << LABEL_TERMINATOR << listOfObjects.size()),
249  h2.GetXaxis()->FindBin(Z.getLowerLimit()),
250  h2.GetXaxis()->FindBin(Z.getUpperLimit()) - 1);
251  else
252  object = h2.ProjectionY(MAKE_CSTRING(h2.GetName() << "_py" << LABEL_TERMINATOR << listOfObjects.size()),
253  1,
254  h2.GetXaxis()->GetNbins());
255 
256  } else {
257 
258  ERROR("For 2D histograms, use option option -P for projections or use JPlot2D" << endl);
259 
260  continue;
261  }
262  }
263  catch(exception&) {}
264 
265  try {
266 
267  dynamic_cast<TAttMarker&>(*object) = marker;
268  }
269  catch(exception&) {}
270 
271  try {
272 
273  dynamic_cast<TAttLine&> (*object) = line;
274  }
275  catch(exception&) {}
276 
277  try {
278 
279  TH1& h1 = dynamic_cast<TH1&>(*object);
280 
281  h1.SetStats(stats != -1);
282 
283  xmin = min(xmin, h1.GetXaxis()->GetXmin());
284  xmax = max(xmax, h1.GetXaxis()->GetXmax());
285 
286  ymin = min(ymin, logy ? h1.GetMinimum(0.0) : h1.GetMinimum());
287  ymax = max(ymax, h1.GetMaximum());
288 
289  if (drawLine) {
290  for (int i = 1; i <= h1.GetNbinsX(); ++i) {
291  h1.SetBinError(i, 0.0);
292  }
293  }
294  }
295  catch(exception&) {}
296 
297  if (fillArea) {
298 
299  try {
300 
301  TAttFill& fill = dynamic_cast<TAttFill&>(*object);
302 
303  fill.SetFillColor(marker.GetMarkerColor());
304  }
305  catch(exception&) {}
306  }
307 
308  try {
309 
310  TGraph& g1 = dynamic_cast<TGraph&>(*object);
311 
312  for (Int_t i = 0; i != g1.GetN(); ++i) {
313 
314  xmin = min(xmin, g1.GetX()[i]);
315  xmax = max(xmax, g1.GetX()[i]);
316 
317  if (!logy || g1.GetY()[i] > 0.0) {
318  ymin = min(ymin, g1.GetY()[i]);
319  ymax = max(ymax, g1.GetY()[i]);
320  }
321  }
322  }
323  catch(exception&) {}
324 
325  try {
326 
327  TGraphErrors& g1 = dynamic_cast<TGraphErrors&>(*object);
328 
329  if (drawLine) {
330  for (Int_t i = 0; i != g1.GetN(); ++i) {
331  g1.GetEX()[i] = 0.0;
332  g1.GetEY()[i] = 0.0;
333  }
334  }
335  }
336  catch(exception&) {}
337 
338  try {
339 
340  TMultiGraph& mg = dynamic_cast<TMultiGraph&>(*object);
341 
342  TIter next(mg.GetListOfGraphs());
343 
344  while (TGraph* g1 = dynamic_cast<TGraph*>(next())) {
345 
346  for (Int_t j = 0; j != g1->GetN(); ++j) {
347 
348  xmin = min(xmin, g1->GetX()[j]);
349  xmax = max(xmax, g1->GetX()[j]);
350 
351  if (!logy || g1->GetY()[j] > 0.0) {
352  ymin = min(ymin, g1->GetY()[j]);
353  ymax = max(ymax, g1->GetY()[j]);
354  }
355  }
356  }
357  }
358  catch(exception&) {}
359 
360  try {
361 
362  TF1& f1 = dynamic_cast<TF1&>(*object);
363 
364  if (xmin != +numeric_limits<double>::max() &&
365  xmax != -numeric_limits<double>::max()) {
366  ymin = min(ymin, f1.GetMinimum(xmin, xmax));
367  ymax = max(ymax, f1.GetMaximum(xmin, xmax));
368  }
369  }
370  catch(exception&) {}
371 
372 
373  try {
374 
375  THStack& hs = dynamic_cast<THStack&>(*object);
376 
377  NOTICE("THStack" << endl);
378 
379  TIterator* iterator = hs.GetHists()->MakeIterator();
380 
381  for (size_t index = 1; TObject* i = iterator->Next(); ++index) {
382 
383  TH1& h1 = dynamic_cast<TH1&>(*i);
384 
385  NOTICE("TH1[" << index << "] " << h1.GetName() << endl);
386 
387  xmin = min(xmin, h1.GetXaxis()->GetXmin());
388  xmax = max(xmax, h1.GetXaxis()->GetXmax());
389 
390  ymin = min(ymin, logy ? h1.GetMinimum(0.0) : h1.GetMinimum());
391  ymax = max(ymax, h1.GetMaximum());
392 
393  h1.SetLineWidth(1);
394  h1.SetLineColor(kBlack);
395 
396  h1.SetFillColor(JMarkerAttributes::getInstance().get(index).GetMarkerColor());
397  }
398  }
399  catch(exception&) {}
400 
401  for (TString buffer[] = { object.getLabel(), input->getFilename().c_str(), "" }, *i = buffer; *i != ""; ++i) {
402 
403  *i = (*i)(TRegexp("\\[.*\\]"));
404 
405  DEBUG("Label: <" << *i << ">" << endl);
406 
407  if (i->Length() > 2) {
408  object.setLabel((*i)(1, i->Length() - 2));
409  }
410  }
411 
412  DEBUG("Add object: " << tag << " with label " << object.getLabel() << endl);
413 
414  if (master == NULL) {
415  master = dynamic_cast<TH1*>(object.get());
416  }
417 
418  listOfObjects.push_back(object);
419  }
420  }
421  }
422 
423  if (listOfObjects.empty()) {
424  ERROR("Nothing to draw." << endl);
425  }
426 
427  for (vector<JRootObject>::iterator i = listOfObjects.begin(); i != listOfObjects.end(); ++i) {
428 
429  TH1* h1 = dynamic_cast<TH1*> (i->get());
430  TGraph* g1 = dynamic_cast<TGraph*> (i->get());
431  TMultiGraph* mg = dynamic_cast<TMultiGraph*>(i->get());
432  TAttLine* ls = dynamic_cast<TAttLine*> (i->get());
433 
434  TList list;
435  TIterator* iterator = NULL;
436 
437  if (h1 != NULL)
438  iterator = h1->GetListOfFunctions()->MakeIterator();
439  else if (g1 != NULL)
440  iterator = g1->GetListOfFunctions()->MakeIterator();
441  else if (mg != NULL) {
442 
443  TIter next1(mg->GetListOfGraphs());
444 
445  while (TGraph* gi = dynamic_cast<TGraph*>(next1())) {
446 
447  TIter next2(gi->GetListOfFunctions());
448 
449  while (TF1 *fi = dynamic_cast<TF1*>(next2())) {
450  list.Add(fi);
451  }
452  }
453 
454  iterator = list.MakeIterator();
455 
456  } else
457  continue;
458 
459  Double_t x1 = +numeric_limits<Double_t>::max();
460  Double_t x2 = -numeric_limits<Double_t>::max();
461 
462  for (int ns = 0, nc = 1; TF1* f1 = (TF1*) iterator->Next(); ) {
463 
464  Double_t __x1;
465  Double_t __x2;
466 
467  f1->GetRange(__x1, __x2);
468  f1->SetNpx(1000);
469 
470  dynamic_cast<TAttLine&>(*f1) = JLineAttributes::getInstance().get(0);
471 
472  if (listOfObjects.size() == 1) {
473 
474  f1->SetLineStyle(JLineAttributes::getInstance().get(ns).GetLineStyle());
475 
476  if (x1 != +numeric_limits<Double_t>::max() &&
477  x2 != -numeric_limits<Double_t>::max()) {
478 
479  if (x1 == __x1 &&
480  x2 == __x2)
481  ++nc; // follow colour style
482  else
483  ++ns; // follow line style
484  }
485 
486  f1->SetLineColor(JMarkerAttributes::getInstance().get(nc).GetMarkerColor());
487 
488  } else {
489 
490  // keep colour of base object and accordingly modify line style.
491 
492  f1->SetLineColor(ls->GetLineColor());
493  f1->SetLineStyle(JLineAttributes::getInstance().get(ns++).GetLineStyle());
494  }
495 
496  ymin = min(ymin, f1->GetMinimum(xmin, xmax));
497  ymax = max(ymax, f1->GetMaximum(xmin, xmax));
498 
499  x1 = __x1;
500  x2 = __x2;
501  }
502  }
503 
504 
505  // plot frame
506 
507  if (X != JRange_t()) {
508  xmin = X.getLowerLimit();
509  xmax = X.getUpperLimit();
510  }
511 
512  if (Y != JRange_t()) {
513  ymin = Y.getLowerLimit();
514  ymax = Y.getUpperLimit();
515  } else {
516  setRange(ymin, ymax, logy);
517  }
518 
519  cv->cd(1);
520 
521  if (master == NULL) {
522 
523  if (X != JRange_t()) {
524 
525  master = new TH1D("__H__", NULL, 100, X.getLowerLimit(), X.getUpperLimit());
526 
527  master->SetStats(kFALSE);
528 
529  } else if (xmin < xmax) {
530 
531  master = new TH1D("__H__", NULL, 100, xmin, xmax);
532 
533  master->SetStats(kFALSE);
534 
535  } else {
536 
537  TText* p = new TText(0.5, 0.5, MAKE_CSTRING("No data"));
538 
539  p->SetTextAlign(21);
540  p->SetTextAngle(45);
541  p->Draw();
542  }
543  }
544 
545  if (master != NULL) {
546 
547  if (logx) { gPad->SetLogx(); }
548  if (logy) { gPad->SetLogy(); }
549 
550  master->GetXaxis()->SetRangeUser(xmin, xmax);
551 
552  if (logx > 1) {
553  setLogarithm(master->GetXaxis());
554  }
555 
556  master->SetTitle(title.c_str());
557 
558  master->SetMinimum(ymin);
559  master->SetMaximum(ymax);
560 
561  if (xLabel != "") { master->GetXaxis()->SetTitle(xLabel.c_str()); master->GetXaxis()->CenterTitle(true); }
562  if (yLabel != "") { master->GetYaxis()->SetTitle(yLabel.c_str()); master->GetYaxis()->CenterTitle(true); }
563 
564  master->GetXaxis()->SetMoreLogLabels((logx == 1 && log10(xmax/xmin) < 2) ||
565  (logx > 1 && xmax-xmin < 2));
566 
567  master->GetYaxis()->SetMoreLogLabels( logy && log10(ymax/ymin) < 2);
568  master->GetYaxis()->SetNoExponent ( logy && log10(ymax/ymin) < 2);
569 
570  if (Ndivisions.first != "") {
571  master->SetNdivisions(Ndivisions.second, Ndivisions.first.c_str());
572  }
573 
574  if (xTimeFormat != "") {
575  master->GetXaxis()->SetTimeDisplay(1);
576  master->GetXaxis()->SetTimeFormat(xTimeFormat.c_str());
577  }
578 
579  master->Draw(option.c_str());
580  }
581 
582  if (logx > 1) {
583 
584  for (vector<JRootObject>::iterator i = listOfObjects.begin(); i != listOfObjects.end(); ++i) {
585 
586  TH1* h1 = dynamic_cast<TH1*>(i->get());
587 
588  if (h1 != NULL) {
589 
590  if (logx > 0 && h1 != master) {
591  setLogarithm(h1->GetXaxis());
592  }
593 
594  TIter iter(h1->GetListOfFunctions());
595 
596  const TRegexp key("x[^a-zA-Z]"); // replace parameter x by log10(x)
597  const TString rep("log10(x)"); //
598 
599  for (TF1* f1; (f1 = (TF1*) iter.Next()) != NULL; ) {
600 
601  TString formula(f1->GetExpFormula());
602 
603  for (Ssiz_t pos = 0; (pos = formula.Index(key, pos)) != -1; pos += rep.Length()) {
604  formula.Replace(pos, 1, rep);
605  };
606 
607  TF1 f2(f1->GetName(), formula);
608 
609  f2.SetParameters(f1->GetParameters());
610  f2.SetRange(f1->GetXmin(), f1->GetXmax());
611 
612  static_cast<TAttLine&>(f2) = *f1;
613 
614  *f1 = f2;
615 
616  if (f1->GetXmin() != 0.0 && f1->GetXmax() != 1.0)
617  f1->SetRange(pow(10.0,f1->GetXmin()), pow(10.0,f1->GetXmax()));
618  else
619  f1->SetRange(pow(10.0,xmin), pow(10.0,xmax));
620  }
621  }
622  }
623  }
624 
625  if (grid.count('x') || grid.count('X')) { gPad->SetGridx(); }
626  if (grid.count('y') || grid.count('Y')) { gPad->SetGridy(); }
627 
628  if (stats != -1)
629  gStyle->SetOptStat(stats);
630  else
631  gStyle->SetOptFit(kFALSE);
632 
633 
634  for (vector<JRootObject>::const_iterator i = listOfObjects.begin(); i != listOfObjects.end(); ++i) {
635 
636  DEBUG("Draw " << (*i)->GetName() << ' ' << (*i)->GetTitle() << endl);
637 
638  string buffer(option);
639 
640  //if (!dynamic_cast<THStack*>(i->get())) {
641  // buffer += "SAMES";
642  //}
643 
644  buffer += "SAME";
645 
646  TGraph* p1 = dynamic_cast<TGraph*> (i->get());
647  TMultiGraph* q1 = dynamic_cast<TMultiGraph*>(i->get());
648 
649  if (p1 != NULL) {
650 
651  if (p1->GetN() > 1 && drawLine)
652  buffer += "L"; // drawing cut
653  else
654  buffer += "P"; // drawing point(s)
655 
656  p1->Draw(buffer.c_str());
657 
658  } else if (q1 != NULL) {
659 
660  TIter next(q1->GetListOfGraphs());
661 
662  while (TGraph* gi = dynamic_cast<TGraph*>(next())) {
663 
664  if (gi->GetN() > 1 && drawLine)
665  buffer += "L"; // drawing cut
666  else
667  buffer += "P"; // drawing point(s)
668 
669  gi->Draw(buffer.c_str());
670  }
671 
672  } else {
673 
674  (*i).Draw(buffer.c_str());
675  }
676  }
677 
678  //gPad->RedrawAxis();
679 
680  if (legend != "") {
681 
682  Ssiz_t height = listOfObjects.size();
683  Ssiz_t width = 1;
684 
685  for (vector<JRootObject>::const_iterator i = listOfObjects.begin(); i != listOfObjects.end(); ++i) {
686  width = max(width, i->getLabel().Length());
687  }
688 
689  TLegend* lg = getLegend(width, height, legend);
690 
691  for (vector<JRootObject>::const_iterator i = listOfObjects.begin(); i != listOfObjects.end(); ++i) {
692  lg->AddEntry(*i, " " + i->getLabel(), isTAttLine(*i) ? "L" : "LPF");
693  }
694 
695  lg->Draw();
696  }
697 
698  cv->Update();
699 
700  if (outputFile != "") {
701  cv->SaveAs(outputFile.c_str());
702  }
703 
704  if (!batch) {
705  tp->Run();
706  }
707 }
Utility class to parse command line options.
Definition: JParser.hh:1493
TPaveText * p1
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
Definition: JLocation.hh:246
then echo Test string reversed by master(hit< return > to continue)." JProcess -c "JEcho" -rC fi if (( 1 ))
Definition: JRoot.hh:19
#define MAKE_CSTRING(A)
Make C-string.
Definition: JPrint.hh:708
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition: JParser.hh:63
TLegend * getLegend(const Int_t width, const Int_t height, const std::string option="TR")
Get legend.
Definition: JLegend.hh:28
string outputFile
void setLogarithm(TAxis *axis)
Make axis logarithmic (e.g.
bool isTAttLine(const TObject *object)
Get drawing option of TH1.
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:75
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
#define NOTICE(A)
Definition: JMessage.hh:64
#define ERROR(A)
Definition: JMessage.hh:66
int debug
debug level
Definition: JSirene.cc:61
static const char LABEL_TERMINATOR
label terminator
Definition: JRootObject.hh:21
#define FATAL(A)
Definition: JMessage.hh:67
JRange< Double_t > JRange_t
Definition: JFitToT.hh:34
void setRange(double &xmin, double &xmax, const bool logx)
Set axis range.
Auxiliary class to handle multiple boolean-like I/O.
Definition: JParser.hh:218
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer.
int j
Definition: JPolint.hh:634
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62
Double_t g1(const Double_t x)
Function.
Definition: JQuantiles.cc:25