#include "QFramework/TQROOTPlotter.h"

#include "TCanvas.h"
#include "TStyle.h"
#include "TROOT.h"
#include "TFile.h"
#include "TLegend.h"
#include "TLegendEntry.h"
#include "TLatex.h"
#include "THStack.h"
#include "TMath.h"
#include "TArrow.h"
#include "TLine.h"
#include "TGaxis.h"

#include "TH1.h"
#include "TH2.h"
#include "TProfile.h"

#include "QFramework/TQIterator.h"
#include "QFramework/TQLibrary.h"
#include "QFramework/TQNamedTaggable.h"
#include "QFramework/TQHistogramUtils.h"
#include "QFramework/TQStringUtils.h"
#include "QFramework/TQUtils.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <cmath>

////////////////////////////////////////////////////////////////////////////////////////////////
//
// TQROOTPlotter:
//
// The abstract TQROOTPlotter class provides a base class for custom,
// analysis-specific plotters like the TQHWWPlotter.
// By inheriting from the TQROOTPlotter, a base plotting interface is provided
// for the daughter classes. The only purely virtual function
// that needs to be implemented by the user is the
// TCanvas* TQPlotter::makePlot
// Other functionality like data management is provided by the TQPlotter class.
//
////////////////////////////////////////////////////////////////////////////////////////////////

ClassImp(TQROOTPlotter)

//__________________________________________________________________________________|___________

TQROOTPlotter::TQROOTPlotter() :
  TQPlotter(),
  pads(new TObjArray())
{
  // Constructor of TQPlotter class
}

//__________________________________________________________________________________|___________

TQROOTPlotter::TQROOTPlotter(TQSampleFolder * baseSampleFolder) :
  TQPlotter(baseSampleFolder),
  pads(new TObjArray())
{
  // Constructor of TQPlotter class
}

//__________________________________________________________________________________|___________

TQROOTPlotter::TQROOTPlotter(TQSampleDataReader * dataSource) :
  TQPlotter(dataSource),
  pads(new TObjArray())
{
  // Constructor of TQPlotter class
}


//__________________________________________________________________________________|___________

void TQROOTPlotter::reset() {
  TQPlotter::reset();

  // set the official ATLAS style
  this->setStyleAtlas();
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::addHistogramToLegend(TQTaggable& tags, TLegend * legend, TQNamedTaggable* process, const TString& options){
  // add a single histogram to the legend
  if(!process) return;
  // transfer process tags to the options container locally to avoid having to pass around spurious data
  TQTaggable opts(options);
  opts.importTags(process);
  this->addHistogramToLegend(tags,legend,this->makeHistogramIdentifier(process),opts);
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::addHistogramToLegend(TQTaggable& tags, TLegend * legend, const TString& identifier, TQTaggable& options){
  // add a single histogram to the legend
  this->addHistogramToLegend(tags,legend,this->getObject<TH1>(identifier),options);
}


//__________________________________________________________________________________|___________

void TQROOTPlotter::addHistogramToLegend(TQTaggable& tags, TLegend * legend, TH1* histo, const TString& options){
  // add a single histogram to the legend
  TQTaggable opts(options);
  this->addHistogramToLegend(tags,legend,histo,opts);
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::addHistogramToLegend(TQTaggable& tags, TLegend * legend, TH1* histo, TQTaggable& options){
  // add a single histogram to the legend
  bool showMissing = tags.getTagBoolDefault("style.showMissing",true);
  bool showEventYields = tags.getTagBoolDefault("style.showEventYields",false);
  bool showMean = tags.getTagBoolDefault("style.showMean");
  bool showRMS = tags.getTagBoolDefault("style.showRMS");
  bool showUnderOverflow = tags.getTagBoolDefault("style.showEventYields.useUnderOverflow",true);
  bool showEventYieldErrors = tags.getTagBoolDefault("style.showEventYields.showErrors",false);
  bool verbose = tags.getTagBoolDefault("verbose",false);

  TString title = options.getTagStringDefault("defaultTitle", "");
  if (histo) title = histo->GetTitle();
  options.getTagString("title", title);
  title = TQStringUtils::convertLaTeX2ROOTTeX(title);

  /* add an entry to the legend */
  if (options.getTagBoolDefault("showInLegend", true)) {
    if (histo) {
      if (showEventYields){
        double err;
        double val = TQHistogramUtils::getIntegralAndError(histo,err,showUnderOverflow);
        if(showEventYieldErrors){
          title.Append(TString::Format(" {%.3g #pm %.3g}", val, err));
        } else {
          title.Append(TString::Format(" {%.3g}", val ));
        }
      }
      if (showMean)
        title.Append(TString::Format("#mu=%.3g", histo->GetMean()));
      if (showRMS)
        title.Append(TString::Format("(%.3g)", histo->GetRMS()));
      if(verbose) VERBOSEclass("adding legend entry '%s', attributed to histogram '%s'",title.Data(),histo->GetName());
      title.Prepend(" ");
      legend->AddEntry(histo, title, options.getTagStringDefault(".legendOptions", "f"));
    } else {
      if (showMissing){
        if(verbose) VERBOSEclass("adding empty legend entry for missing histogram (showMissing=true)");
        title.Prepend(" ");
        legend->AddEntry(new TObject(), title, "");
      }
    }
  } else {
    DEBUGclass("process '%s' is not added to legend (showInLegend=false)",title.Data());
  }
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::addAllHistogramsToLegend(TQTaggable& tags, TLegend * legend, const TString& processFilter,
                                         const TString& options, bool reverse){

  // add all histograms matching the process filter to the legend
  bool verbose = tags.getTagBoolDefault("verbose",false);
  if(verbose) VERBOSEclass("entering function, processFilter='%s'",processFilter.Data());

  TQTaggableIterator itr(this->fProcesses->MakeIterator(reverse ? kIterBackward : kIterForward),true);
  while(itr.hasNext()){
    TQNamedTaggable * process = itr.readNext();
    if(!process){
      if(verbose) VERBOSEclass("skipping NULL entry");
    } else {
      if(!processFilter.IsNull() && !process->getTagBoolDefault(processFilter,false)){
        if(verbose) VERBOSEclass("skipping empty legend entry for '%s' - does not match filter '%s'",process->getTagStringDefault(".path",process->GetName()).Data(),processFilter.Data());
      } else {
        this->addHistogramToLegend(tags,legend,process,options);
      }
    }
  }
}


//__________________________________________________________________________________|___________

TCanvas * TQROOTPlotter::plot(TString histogram, const TString& inputTags) {
  // plot the given histogram using the given tags
  // the tags are forwarded to and interpreted by the makeplot function
  TQTaggable taggable(inputTags);
  return plot(histogram, taggable);
}

//__________________________________________________________________________________|___________

TCanvas * TQROOTPlotter::plot(TString histogram, TQTaggable* inputTags) {
  // plot the given histogram using the given tags
  // the tags are forwarded to and interpreted by the makeplot function
  TQTaggable tags;
  tags.importTags(inputTags);
  TCanvas* c = this->plot(histogram, tags);
  return c;
}

//__________________________________________________________________________________|___________

TCanvas * TQROOTPlotter::plot(TString histogram, TQTaggable& tags) {
  // plot the given histogram using the given tags
  // the tags are forwarded to and interpreted by the makeplot function
  bool verbose = tags.getTagBoolDefault("verbose",false);
  if(verbose) VERBOSEclass("TQROOTPlotter::plot");
  this->deleteObjects();
  this->clearObjects();
  //@tags: printProcesses: print processes to the console before plotting
  if(tags.getTagBoolDefault("printProcesses",false)){
    this->printProcesses();
  }
  TQTaggable copyOfTags(tags);
  //@tags: useNamePrefix: prefix histogram names with the variable names. will not affect the look of the plot, but possibly required for elaborate plots to be saved in .C format
  if(copyOfTags.getTagBoolDefault("useNamePrefix",true)){
    TString tmp(histogram);
    TString prefix = TQFolder::getPathTail(tmp);
    TQStringUtils::ensureTrailingText(prefix,".");
    copyOfTags.importTagsWithoutPrefix(tags,prefix);
  }
  copyOfTags.setGlobalOverwrite(false);
  copyOfTags.importTags(this);
  if(histogram.Contains("=")){
    copyOfTags.importTagsWithPrefix(histogram,"input");
  } else {
    copyOfTags.setTagString("input.histogram",histogram);
  }
  if(copyOfTags.getTagBoolDefault("printTags",false)){
    copyOfTags.printTags();
  }  
  TCanvas* c = this->makePlot(copyOfTags);
  //@tags: printObjects: print the objects created for plotting
  if(copyOfTags.getTagBoolDefault("printObjects",false)){
    std::cout << TQStringUtils::makeBoldBlue(this->Class()->GetName()) << TQStringUtils::makeBoldWhite(" - objects:") << std::endl;
    this->printObjects();
  }
  //@tags: printLegend: print the legend entries
  if(copyOfTags.getTagBoolDefault("printLegend",false)){
    std::cout << TQStringUtils::makeBoldBlue("TQPlotter") << TQStringUtils::makeBoldWhite(" - legend entries:") << std::endl;
    TLegend* leg = this->getObject<TLegend>("legend");
    if(!leg){
      ERRORclass("no legend found!");
    } else {
      TQLegendEntryIterator itr(leg->GetListOfPrimitives());
      while(itr.hasNext()){
        TLegendEntry* entry = itr.readNext();
        if(!entry) continue;
        TObject* obj = entry->GetObject();
        if(obj){
          std::cout << TQStringUtils::makeBoldBlue(TQStringUtils::fixedWidth(obj->Class()->GetName(),20)) << TQStringUtils::makeBoldWhite(TQStringUtils::fixedWidth(obj->GetName(),20))<< '"' << TQStringUtils::makeBoldWhite(entry->GetLabel()) << '"' << std::endl;
        } else {
          std::cout << TQStringUtils::makeBoldRed(TQStringUtils::fixedWidth("NULL",40)) << '"' << TQStringUtils::makeBoldWhite(entry->GetLabel()) << '"' << std::endl;
        }
      }
    }
  }
  //@tags: printStyle: print the style tags active after plotting (includes temporary tags set by the plotter itself)
  if(tags.getTagBoolDefault("printStyle",false))
    copyOfTags.printTags();

  return c;
}

//__________________________________________________________________________________|___________

TPad * TQROOTPlotter::getPad(const TString& name){
  // retrieve a pad by name
  if(!this->pads) return NULL;
  if(name.IsNull()) return NULL;
  TQIterator itr(this->pads);
  while(itr.hasNext()){
    TObject* obj = itr.readNext();
    if(!obj) continue;
    if(!TQStringUtils::matches(obj->GetName(),name)) continue;
    TPad* p = dynamic_cast<TPad*>(obj);
    if(!p) return NULL;
    p->cd();
    return p;
  }
  return NULL;
}

//__________________________________________________________________________________|___________

TCanvas * TQROOTPlotter::plot(TString histogram, const char* inputTags) {
  // plot the given histogram using the given tags
  // the tags are forwarded to and interpreted by the makeplot function
  TQTaggable taggable(inputTags);
  TCanvas * c = plot(histogram, taggable);
  return c;
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::plotAndSaveAsInternal(const TString& histogram, const TString& saveAs, TQTaggable& tags) {
  // plot and save the given histogram using the given tags
  // the tags are forwarded to and interpreted by the makeplot function
  bool verbose = tags.getTagBoolDefault("verbose",false);
  if(verbose) VERBOSEclass("TQROOTPlotter::plotAndSaveAs");

  TDirectory* tmpObjects = NULL;
  TDirectory* oldDir = gDirectory;
  if(saveAs.EndsWith(".root")){
    tmpObjects = this->objects;
    if(verbose) VERBOSEclass("opening .root output file");
    this->objects = TFile::Open(saveAs,"RECREATE");
  }
  gDirectory = oldDir;

  TCanvas * canvas = plot(histogram, tags);
  bool success = canvas;

  //@tags: sortObjects: Sort plotter objects before printing .C files. This produces consistent files that can be compared to previous commits. However, the pdfs can look a little sketchy. Don't use this tag if you want to get nice results. Default: false.
  if(success && tags.getTagBoolDefault("sortObjects",false)){
    // sort everything to ensure a consistent layout of .C files
    if(verbose) VERBOSEclass("sorting objects");
    TQListUtils::sortByName(const_cast<TList*>(canvas->GetListOfPrimitives()));
    TQIterator paditr(this->pads);
    while(paditr.hasNext()){
      TPad* pad = dynamic_cast<TPad*>(paditr.readNext());
      if(!pad) continue;
      TList* primitives = const_cast<TList*>(pad->GetListOfPrimitives());
      if(!primitives) continue;
      TQListUtils::sortByName(primitives);
    }
  }

  if (success && !tmpObjects) {
    this->pads->SetOwner(true);

    // Save the canvas and capture the default root message
    int capturingSuccessful = TQLibrary::captureStdout();
    canvas->SaveAs(saveAs.Data());
    if (capturingSuccessful == 0){
      // If capturing works, suppress the standard message.
      TString output = TQLibrary::readCapturedStdout();
      TQLibrary::restore_stdout();
      if (!TQROOTPlotter::isDefaultPlotMessage(output, saveAs)){
        WARNclass("Unexpected output from ROOT:");
        std::cout << output.Data();
        std::cout.flush();
      }
    }

    //@tags: embedfonts: run external font embedding command on created pdf plots
    if(saveAs.EndsWith(".pdf") && tags.getTagBoolDefault("embedfonts",false)){
      TQLibrary::embedFonts(saveAs);
    }
    if(saveAs.EndsWith(".pdf") || saveAs.EndsWith(".jpg") || saveAs.EndsWith(".png")){
      TString exifinfostring = histogram;
      //@tags: exiftitle: set meta-information as exif string on pdf,jpg and png files
      this->getTagString("exiftitle",exifinfostring);
      tags.getTagString("exiftitle",exifinfostring);
      if(TQLibrary::hasEXIFsupport() && !TQLibrary::setEXIF(saveAs,exifinfostring)){
        ERRORclass("setting EXIF meta-information on %s failed!",saveAs.Data());
      }
    }
  }
  if(success && tmpObjects){
    this->objects->Add(canvas);
    this->objects->Add(this->pads);
    this->objects->Write();
    this->objects->Close();
    this->objects = tmpObjects;
    this->pads = new TObjArray();
    std::cout << "Info in " << this->IsA()->GetName() << ": created file " << saveAs << std::endl;
    this->clearObjects();
  } else if(tags.getTagBoolDefault("deleteObjects",true)){
    //@tags: deleteObjects: control whether plotting objects will be kept in memory after plotting (default: false for plotAndSaveAs, true for plot)
    this->deleteObjects();
    delete canvas;
  }
  return success;
}


//______________________________________________________________________________________________

TQROOTPlotter::~TQROOTPlotter() {
  // Destructor of TQPlotter class:
  // if(this->pads) delete this->pads;
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::setStyleAtlas() {
  // apply atlas style options to gStyle

  int icol = 0;
  gStyle->SetFrameBorderMode(icol);
  gStyle->SetFrameFillColor(icol);
  gStyle->SetCanvasBorderMode(icol);
  gStyle->SetCanvasColor(icol);
  gStyle->SetPadBorderMode(icol);
  gStyle->SetPadColor(icol);
  gStyle->SetStatColor(icol);

  // set the paper & margin sizes
  gStyle->SetPaperSize(20,26);

  // set margin sizes
  gStyle->SetPadTopMargin(0.05);
  gStyle->SetPadRightMargin(0.05);
  gStyle->SetPadBottomMargin(0.16);
  gStyle->SetPadLeftMargin(0.16);

  // set title offsets (for axis label)
  gStyle->SetTitleXOffset(1.4);
  gStyle->SetTitleYOffset(1.4);

  // use large fonts
  //int font=72; // Helvetica italics
  int font=42; // Helvetica
  double tsize=0.05;
  gStyle->SetTextFont(font);

  gStyle->SetTextSize(tsize);
  gStyle->SetLabelFont(font,"x");
  gStyle->SetTitleFont(font,"x");
  gStyle->SetLabelFont(font,"y");
  gStyle->SetTitleFont(font,"y");
  gStyle->SetLabelFont(font,"z");
  gStyle->SetTitleFont(font,"z");

  gStyle->SetLabelSize(tsize,"x");
  gStyle->SetTitleSize(tsize,"x");
  gStyle->SetLabelSize(tsize,"y");
  gStyle->SetTitleSize(tsize,"y");
  gStyle->SetLabelSize(tsize,"z");
  gStyle->SetTitleSize(tsize,"z");

  // use bold lines and markers
  gStyle->SetMarkerStyle(20);
  gStyle->SetMarkerSize(1.2);
  gStyle->SetHistLineWidth((Width_t)2.);
  gStyle->SetLineStyleString(2,"[12 12]"); // postscript dashes

  // get rid of X error bars
  //gStyle->SetErrorX(0.001);
  // get rid of error bar caps
  //gStyle->SetEndErrorSize(0.);

  // do not display any of the standard histogram decorations
  gStyle->SetOptTitle(0);
  //gStyle->SetOptStat(1111);
  gStyle->SetOptStat(0);
  //gStyle->SetOptFit(1111);
  gStyle->SetOptFit(0);

  // put tick marks on top and RHS of plots
  gStyle->SetPadTickX(1);
  gStyle->SetPadTickY(1);

}


//__________________________________________________________________________________|___________

void TQROOTPlotter::clearObjects(){
  // clear all objects maintained by the plotter
  this->pads->SetOwner(false);
  this->pads->Clear();
  TQPlotter::clearObjects();
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::deleteObjects(){
  // clear all objects maintained by the plotter
  this->pads->SetOwner(true);
  this->pads->Clear();
  TQPlotter::deleteObjects();
}

//__________________________________________________________________________________|___________

TPad* TQROOTPlotter::createPad(TQTaggable& tags, const TString& key){
  // create a pad and add it to the list
  // geometry and styling parameters will be read from the given tag set
  // the tags according to the given key will be read
  //@tags: geometry.*.scaling: scaling of a pad
  //@tags: [geometry.*.xMin,geometry.*.xMax,geometry.*.yMin,geometry.*.yMax]: set the geometry parameters of a pad
  //@tags: [style.*.fillStyle, style.*.fillColor]: control fill style and color of a pad
  //@tags: [geometry.*.margins.left,geometry.*.margins.right,geometry.*.margins.top,geometry.*.margins.bottom]: control margins of a pad
  //@tags: [style.*.tickx,style.*.ticky]: control whether ticks are shown on x and y axes of this pad
  //@tags: [style.tickx,style.ticky]: control whether ticks are shown on x and y axes of all pads
  //@tags: [style.*.borderSize,style.*.borderMode] control appearance of the borders of this pad
  //@tags: [style.*.logScaleY] control log scale in y
  double padscaling = tags.getTagDoubleDefault("geometry."+key+".scaling",1.);
  double ymin = tags.getTagDoubleDefault("geometry."+key+".yMin",0.);
  double ymax = tags.getTagDoubleDefault("geometry."+key+".yMax",ymin + tags.getTagDoubleDefault("geometry."+key+".height",1.));
  TPad * pad = new TPad(key,key,
                        tags.getTagDoubleDefault("geometry."+key+".xMin",0.),
                        ymin,
                        tags.getTagDoubleDefault("geometry."+key+".xMax",1.),
                        ymax);
  pad->SetFillStyle(tags.getTagIntegerDefault("style."+key+".fillStyle",0));
  pad->SetFillColor(tags.getTagIntegerDefault("style."+key+".fillColor",0));
  pad->SetMargin(tags.getTagDoubleDefault("geometry."+key+".margins.left" ,0.16),
                 tags.getTagDoubleDefault("geometry."+key+".margins.right" ,0.05),
                 padscaling*tags.getTagDoubleDefault("geometry."+key+".margins.bottom",0.16),
                 padscaling*tags.getTagDoubleDefault("geometry."+key+".margins.top" ,0.05));
  pad->SetTickx(tags.getTagIntegerDefault("style."+key+".tickx",tags.getTagIntegerDefault("style.tickx",1)));
  pad->SetTicky(tags.getTagIntegerDefault("style."+key+".ticky",tags.getTagIntegerDefault("style.ticky",1)));
  pad->SetBorderSize(tags.getTagIntegerDefault("style."+key+".borderSize",0));
  pad->SetBorderMode(tags.getTagIntegerDefault("style."+key+".borderMode",0));
  pad->SetLogy(tags.getTagBoolDefault ("style."+key+".logScaleY", false));
  pad->SetGridy(tags.getTagBoolDefault("style."+key+".gridy",false));
  pad->SetGridx(tags.getTagBoolDefault("style."+key+".gridx",false));		
  this->pads->Add(pad);
  return pad;
}

//__________________________________________________________________________________|___________

TCanvas* TQROOTPlotter::createCanvas(TQTaggable& tags){
  // create a new canvas
  bool verbose = tags.getTagBoolDefault("verbose",false);
  TString canvasName = tags.getTagStringDefault("input.name","histogram");
  canvasName.ReplaceAll("/", "_");
  canvasName=TQStringUtils::makeValidIdentifier(canvasName,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._","");

  // don't make the new canvas kill another with the same name: append an increasing number until it's unique
  int iCanvas = 1;
  TCollection * listOfCanvases = gROOT->GetListOfCanvases();
  const TString origCanvasName(canvasName);
  while (listOfCanvases && listOfCanvases->FindObject(canvasName.Data()))
    canvasName = TString::Format("%s_n%d", origCanvasName.Data(), iCanvas++);

  // @tags:geometry.canvas.width: set the width of the canvas
  // @tags:geometry.canvas.height: set the height of the canvas
  if(verbose) VERBOSEclass("creating canvas with name '%s'",canvasName.Data());
  int width = tags.getTagIntegerDefault("geometry.canvas.width",800);
  int height = tags.getTagIntegerDefault("geometry.canvas.height",600);
  TCanvas* canvas = new TCanvas(TQFolder::makeValidIdentifier(canvasName),canvasName,0,0,width,height);
  canvas->SetWindowSize(width + (width - canvas->GetWw()), height + (height - canvas->GetWh()));
  canvas->SetMargin(0.,0.,0.,0);
  canvas->cd();

  TPad* pad = this->createPad(tags,"main");
  // @tags:style.logScale: control whether the main plot will be shown in log scale (default:false)
  if (tags.getTagBoolDefault ("style.logScale",false ) && (
    (tags.getTagIntegerDefault("style.nDim",1) == 1) || (tags.getTagIntegerDefault("style.nDim",1) == -1) // -1 for TProfile
  ) ){
    pad->SetLogy();
  }
  // @tags:style.logScaleX: control whether the main plot will be shown in logX scale (default:false)
  if (tags.getTagBoolDefault ("style.logScaleX",false )){
    pad->SetLogx();
  }
  pad->Draw();
  // @tags:style.showSub: control whether any subplot will be shown. overwrites subplots defined elsewhere.
  if (tags.getTagBoolDefault ("style.showSub",false)){
    canvas->cd();
    TPad * ratioPad = this->createPad(tags,"sub");
    // @tags:style.logScaleX: control whether the subplot will be shown in logX scale (default:false)
    if (tags.getTagBoolDefault ("style.logScaleX",false )){
      ratioPad->SetLogx();
    }
    ratioPad->Draw();
  }

  canvas->cd();
  return canvas;
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::drawCutLines1D(TQTaggable& tags){
  // draw vertical lines as requested by the user
  TH1* hMaster = this->getObject<TH1>("Graph_master");
  double upper = hMaster->GetMaximum();
  double lower = hMaster->GetMinimum();
  bool logScale = tags.getTagBoolDefault ("style.logScale",false );

  // read the list of cut thresholds to display
  int iCut = 0;
  double threshold = 0.;
  //@tags: cuts.*: a list of (vertical) cut lines to be drawn. value will be x-value of the vertical line
  while (tags.getTagDouble(TString::Format("cuts.%d", iCut++), threshold)) {
    int iBlock = 0;
    double block_x = 0;
    double block_x_old = 0;
    double block_y = 1;
    while(tags.getTag(TString::Format("blocks.x.%d",iBlock),block_x) && tags.getTag(TString::Format("blocks.y.%d",iBlock),block_y)){
      if(threshold > block_x_old){
        break;
      }
      block_x_old = block_x;
      iBlock++;
    }
    //@tags: style.cutLineHeightScaleFactor: Cut line height is nominally the same as the histogram maximum; use this tag to scale it by some factor.
    auto cutLineHeightScaleFactor = tags.getTagDoubleDefault("style.cutLineHeightScaleFactor",1.0);
    block_y *= cutLineHeightScaleFactor;
    double max = logScale ? TMath::Exp((TMath::Log(upper) - TMath::Log(lower)) * block_y + TMath::Log(lower)) : (upper - lower) * block_y + lower;

    TLine * line = new TLine(threshold, lower, threshold, max);
    //@tags:[style.cutLineStyle,style.cutLineWidth,style.cutLineColor]: control appearance of cutlines (TLine::SetLineStyle,TLine::SetLineWidth,TLine::SetLineColor)
    line->SetLineStyle(tags.getTagIntegerDefault("style.cutLineStyle",7));
    line->SetLineWidth(tags.getTagIntegerDefault("style.cutLineWidth",2));
    line->SetLineColor(tags.getTagIntegerDefault("style.cutLineColor",kRed));
    line->Draw();

    //@tags:[style.cutArrows]: draw an arrow in the direction of the cut at the top of the cut line
    bool arrowsToDraw = tags.getTagBoolDefault("style.cutArrows",false);
    if (arrowsToDraw){
      //@tags:[style.cutLineArrowDirection]: specify which direction the cut is in so the arrow is drawn correctly
      auto arrowDirection = tags.getTagStringDefault("style.cutLineArrowDirection", "left");

      double arrow_lo = 0.;
      double arrow_hi = 0.;
      TString arrowDir;

      if (arrowDirection == "left") {
	arrow_lo = threshold*0.8;
	arrow_hi = threshold;
	arrowDir = "<";
      }
      else if (arrowDirection == "right") {
	arrow_lo = threshold;
	arrow_hi = threshold*1.2;
	arrowDir = ">";
      }      

      TArrow * arrow = new TArrow(arrow_lo, max, arrow_hi, max, 0.015, arrowDir);
      arrow->SetLineWidth(tags.getTagIntegerDefault("style.cutLineWidth",2));
      //Always draw arrow as solid line
      arrow->SetLineStyle(1);
      arrow->SetLineColor(tags.getTagIntegerDefault("style.cutLineColor",kBlack));
      arrow->Draw();

    }
  }
}

//__________________________________________________________________________________|___________

int TQROOTPlotter::drawHeightLines(TQTaggable& tags){
  // draw height lines onto the canvas
  if(!tags.getTagBoolDefault("heightlines.show",false))
    return 0;

  bool verbose = tags.getTagBoolDefault("verbose",false);
  if(verbose) VERBOSEclass("attempting to draw height lines");

  TH1* hMaster = this->getObject<TH1>("Graph_master");

  //@tags:[heightlines.show] draw additional diagonal height lines in 2D plots
  //@tags:[heightlines.xCoeff,heightlines.yCoeff,heightlines.constCoeff]  control the slope of diagonal height lines in 2D plots
  double xCoeff = tags.getTagDoubleDefault("heightlines.xCoeff",0.);
  double yCoeff = tags.getTagDoubleDefault("heightlines.yCoeff",0.);
  double constCoeff = tags.getTagDoubleDefault("heightlines.constCoeff",0.);

  bool rotate = tags.getTagBoolDefault("heightlines.rotateLabels",true);
  //@tags:[heightlines.rotateLabels] rotate labels according to the inclination angle of height lines in 2D plots

  double labelSize = tags.getTagDoubleDefault("style.axes.labelSize",0.03);
  double labelOffset = tags.getTagDoubleDefault("style.axes.labelOffset",0.005);

  //@tags:[heightlines.color,heightlines.style]  control the visuals of diagonal height lines in 2D plots
  //@tags:[heightlines.values] list of values along the x axis at which height lines should appear
  int color = tags.getTagIntegerDefault("heightlines.color",kBlack);
  int linestyle = tags.getTagIntegerDefault("heightlines.style",1.);

  std::vector<double> vals = tags.getTagVDouble("heightlines.values");
  double xmin = TQHistogramUtils::getAxisXmin(hMaster);
  double xmax = TQHistogramUtils::getAxisXmax(hMaster);

  int n = 0;

  double slope = - xCoeff/yCoeff;


  TLatex latex;
  latex.SetTextColor(color);
  latex.SetTextSize(labelSize);
  double latexXOffset, latexYOffset;

  if(rotate){
    double visualSlope = - TQUtils::convertdYtoPixels(xCoeff)/TQUtils::convertdXtoPixels(yCoeff);
    double visualAngle = atan(visualSlope) * 180./TMath::Pi();
    latex.SetTextAngle(visualAngle);
    latexXOffset = TQUtils::convertdXfromNDC(labelOffset * sin(-visualSlope));
    latexYOffset = TQUtils::convertdYfromNDC(labelOffset * cos( visualSlope));
  } else {
    latexXOffset = 0.;
    latexYOffset = TQUtils::convertdYfromNDC(labelOffset);
  }

  for(size_t i=0; i<vals.size(); i++){
    if(verbose) VERBOSEclass("drawing height line for z = %g",vals[i]);

    double offset = (vals[i] - constCoeff) / yCoeff;

    double y0 = offset + slope * xmin;
    double y1 = offset + slope * xmax;
    double x0 = xmin;
    double x1 = xmax;

    if(verbose) VERBOSEclass("pre-crop coordinates are x0=%g, x1=%g, y0=%g, y1=%g",x0,x1,y0,y1);

    TLine* l = new TLine(x0,y0,x1,y1);
    if(TQHistogramUtils::cropLine(hMaster,l)){
      if(verbose) VERBOSEclass("post-crop coordinates are x0=%g, x1=%g, y0=%g, y1=%g",l->GetX1(),l->GetX2(),l->GetY1(),l->GetY2());
      l->SetLineColor(color);
      l->SetLineStyle(linestyle);
      l->Draw();
      latex.DrawLatex(latexXOffset + 0.5*(l->GetX2()+l->GetX1()),latexYOffset + 0.5*(l->GetY2()+l->GetY1()),TString::Format("%g",vals[i]));
      n++;
    } else {
      if(verbose) VERBOSEclass("line-crop failed - no line plotted");
      delete l;
    }
  }

  return n;
}

//__________________________________________________________________________________|___________


int TQROOTPlotter::drawAdditionalAxes(TQTaggable& tags){
  // draw an additional axis onto the canvas
  double defaultLabelSize = tags.getTagDoubleDefault("style.axes.labelSize",0.03);
  double defaultTitleSize = tags.getTagDoubleDefault("style.axes.titleSize",0.03);
  double defaultTitleOffset = tags.getTagDoubleDefault("style.axes.titleOffset",1.0);

  /* read the list of cut thresholds to display */
  int iAxis = -1;
  bool show = false;

  //@tags:axis.IDX.show: draw an additional axis with index IDX
  //@tags:[axis.IDX.xMin,axis.IDX.xMax,axis.IDX.yMin,axis.IDX.yMax]: control geometry of additional axis IDX to be drawn
  //@tags:[axis.IDX.wMin,axis.IDX.wMax,axis.IDX.nDiv,axis.IDX.title]: control labeling of additional axis IDX to be drawn
  //@tags:[axis.*.labelSize,axis.IDX.titleSize,axis.IDX.titleOffset]: control style of additional axis IDX to be drawn

  while (tags.getTagBool(TString::Format("axis.%d.show", ++iAxis), show)) {
    if(!show) continue;

    double xmin, xmax, ymin, ymax;
    if(!tags.getTagDouble(TString::Format("axis.%d.xMin", iAxis), xmin)) continue;
    if(!tags.getTagDouble(TString::Format("axis.%d.xMax", iAxis), xmax)) continue;
    if(!tags.getTagDouble(TString::Format("axis.%d.yMin", iAxis), ymin)) continue;
    if(!tags.getTagDouble(TString::Format("axis.%d.yMax", iAxis), ymax)) continue;

    double wmin = tags.getTagDoubleDefault (TString::Format("axis.%d.wMin" , iAxis), 0);
    double wmax = tags.getTagDoubleDefault (TString::Format("axis.%d.wMax" , iAxis), 1);
    int nDiv = tags.getTagIntegerDefault (TString::Format("axis.%d.nDiv" , iAxis), 110);
    TString title = tags.getTagStringDefault(TString::Format("axis.%d.title", iAxis), "");


    double labelSize = tags.getTagDoubleDefault (TString::Format("axis.%d.labelSize", iAxis), defaultLabelSize);
    double titleSize = tags.getTagDoubleDefault (TString::Format("axis.%d.titleSize", iAxis), defaultTitleSize);
    double titleOffset = tags.getTagDoubleDefault (TString::Format("axis.%d.titleOffset", iAxis), defaultTitleOffset);

    TGaxis *addAxis = new TGaxis(xmin, ymin, xmax, ymax,wmin,wmax,nDiv);
    if(!title.IsNull()) addAxis->SetTitle(title);
    addAxis->SetLabelSize(labelSize);
    addAxis->SetTitleSize(titleSize);
    addAxis->SetTitleOffset(titleOffset);
    addAxis->Draw();
    show = false;
  }
  return iAxis;
}


//__________________________________________________________________________________|___________

bool TQROOTPlotter::isDefaultPlotMessage(TString message, const TString& filename){
  // check if message only contains one newline

  // The message should not usually be empty. But it happens when
  // running in standalone mode. The root message can not be captured
  // for some reason.
  if (message.EqualTo(""))
    return true;

  if (!(message.CountChar(10) == 1))
    return false;

  if ((filename.EndsWith(".C")) || (filename.EndsWith(".cxx")) || (filename.EndsWith(".json"))){
    if ((TQStringUtils::removeLeadingText(message, "TCanvas::SaveSource") == 1)
	&& (TQStringUtils::removeLeadingBlanks(message) > 0)
	&& (TQStringUtils::removeLeadingText(message, "INFO") == 1)
	&& (message.EndsWith("has been generated\n"))){
      return true;
    }
  }
  else if (filename.EndsWith(".root") || filename.EndsWith(".xml")){
    if ((TQStringUtils::removeLeadingText(message, "TCanvas::SaveAs") == 1)
	&& (TQStringUtils::removeLeadingBlanks(message) > 0)
	&& (TQStringUtils::removeLeadingText(message, "INFO") == 1)
	&& (message.EndsWith("has been created\n"))){
      return true;
    }
  }
  else{
    if ((TQStringUtils::removeLeadingText(message, "TCanvas::Print") == 1)
	&& (TQStringUtils::removeLeadingBlanks(message) > 0)
	&& (TQStringUtils::removeLeadingText(message, "INFO") == 1)
	&& (message.EndsWith("has been created\n"))){
      return true;
    }
  }
  return false;
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::stackHistograms(TQTaggable& tags, const TString& stackname){
  // create the histogram stack
  bool verbose = tags.getTagBoolDefault("verbose",false );
  if(verbose) VERBOSEclass("stacking histograms");

  //@tag:normalize: normalize all histograms to 1
  bool normalize = tags.getTagBoolDefault("normalize",false ) || tags.getTagBoolDefault("normalizeWithoutOverUnderflow",false );
  //@tag:normalizeWithoutOverUnderflow: disable using underflow and overflow for normalization purposes. This tag automatically activates the "normalize" tag.
  bool normalizeWithoutOverUnderflow = !tags.getTagBoolDefault("normalizeWithoutOverUnderflow",false );
  TH1* hMaster = this->getObject<TH1>("Graph_master");
  TH1* hTotalStack = TQHistogramUtils::copyHistogram(hMaster,"totalStack");
  // these are some default values
  hTotalStack->SetTitle("SM");
  hTotalStack->SetLineColor(kBlue);
  hTotalStack->SetFillColor(14);
  hTotalStack->SetFillStyle(3245);
  hTotalStack->SetMarkerStyle(0);
  TH1* hTotalBkg = TQHistogramUtils::copyHistogram(hTotalStack,"totalBkg");

  // the list of histograms to be stacked
  std::vector<TH1*> otherHistList;;
  std::vector<TH1*> histStackList;
  std::vector<TQNamedTaggable*> processStackList;
  TQTaggableIterator itr(this->fProcesses);
  while(itr.hasNext()){
    TQNamedTaggable* process = itr.readNext();
    if(!process) continue;
    TH1 * h = this->getObject<TH1>(this->makeHistogramIdentifier(process));
    if(!h) continue;

    bool bkg = process->getTagBoolDefault(".isBackground",false);
    bool sig = process->getTagBoolDefault(".isSignal",false);
    bool bkgStack = bkg && process->getTagBoolDefault("stack", true);
    bool sigStack = sig && tags.getTagBoolDefault ("style.autoStackSignal",false);

    if(bkg) hTotalBkg->Add(h);
    if(bkgStack || sigStack){
      histStackList.push_back(h);
      processStackList.push_back(process);
      hTotalStack->Add(h);
    } else {
      otherHistList.push_back(h);
    }
  }

  // scale to normalize total background
  double totalBkgScale = 0;
  if (hTotalBkg){
    totalBkgScale = TQHistogramUtils::getIntegral(hTotalBkg, normalizeWithoutOverUnderflow);
  }
  if (normalize){
    if (hTotalBkg && totalBkgScale > 0.){
      hTotalBkg->Scale(1. / totalBkgScale);
      for(auto h:histStackList){
        h->Scale(1. / totalBkgScale);
      }
    }
    for(auto h:otherHistList){
      //also normalize non-stacked histograms such that their integral matches the normalized stack ("totalBackground")
      if (TQHistogramUtils::getIntegral(h, normalizeWithoutOverUnderflow) > 0) h->Scale(1./TQHistogramUtils::getIntegral(h, normalizeWithoutOverUnderflow));
    }
  }

  // sort the histograms to be stacked by ascending integral (sum of weights)
  if (!tags.getTagBoolDefault("style.manualStacking",false) && tags.getTagBoolDefault("style.autoStack",tags.getTagBoolDefault("style.logScale",false))){
    for (unsigned iHist = 0; iHist < histStackList.size(); iHist++) {
      unsigned iHistMin = iHist;
      double intMin = ((TH1*)histStackList.at(iHistMin))->GetSumOfWeights();
      for (unsigned iHist2 = iHist + 1; iHist2 < histStackList.size(); iHist2++) {
        double intMin2 = ((TH1*)histStackList.at(iHist2))->GetSumOfWeights();
        if (intMin2 < intMin) {
          iHistMin = iHist2;
          intMin = intMin2;
        }
      }
      if (iHistMin != iHist) {
        TH1 * temp = (TH1*)(histStackList)[iHist];
        (histStackList)[iHist] = (histStackList)[iHistMin];
        (histStackList)[iHistMin] = temp;
        TQNamedTaggable * temptag = (processStackList)[iHist];
        (processStackList)[iHist] = (processStackList)[iHistMin];
        (processStackList)[iHistMin] = temptag;
      }
    }
  }

  // create the stack
  THStack * stack = new THStack(stackname, tags.getTagBoolDefault("style.stackSignal",false) ? "Signal+Background Stack" : "Background Stack");

  // add the histograms to the stack (following the order in the histStackList)
  if (tags.getTagBoolDefault ("style.reverseStacking",false )) {
    for (int iHist = histStackList.size(); iHist > 0 ; iHist--){
      TH1* h = (histStackList.at(iHist-1));
      stack->Add(h);
    }
  } else {
    for (unsigned iHist = 0; iHist < histStackList.size(); iHist++){
      TH1* h = dynamic_cast<TH1*>(histStackList.at(iHist));
      stack->Add(h);
    }
  }

  TQTaggableIterator sitr(this->fProcesses);
  bool stackSignal = tags.getTagBoolDefault ("style.stackSignal",false);
  if (tags.getTagBoolDefault ("style.autoStackSignal",false)) stackSignal = false;
  while(sitr.hasNext()){
    TQNamedTaggable* process = sitr.readNext();
    if(!process) continue;
    if(!process->getTagBoolDefault(".isSignal",false)) continue;
    TH1 * h = this->getObject<TH1>(this->makeHistogramIdentifier(process));
    if(!h) continue;
    if(totalBkgScale > 0 && process->getTagBoolDefault("normalizeToTotalBkg",false) && !normalize){ //don't scale again if everything was already normalized to unity (see above)
      //@tag:normalizeToTotalBkg: process tag to normalize individual signal contributions to the total background. Apply this tag on the individual process. This tag will be ignored in combination with other normalization tags.
      h->Scale(totalBkgScale / TQHistogramUtils::getIntegral(h));
    }
    if (process->getTagBoolDefault("stack", stackSignal)){
      stack->Add(h);
      hTotalStack->Add(h);
    }
  }

  if(stack->GetNhists() > 0){
    if(verbose) VERBOSEclass("successfully stacked %d histograms",stack->GetNhists());
    this->addObject(stack,stackname);
  } else {
    DEBUGclass("stack is empty!");
    delete stack;
  }
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::addObject(TLegend* obj, const TString& key){
  // add a legend to the list of graphics objects maintained by the plotter
  if(!obj) return;
  if(!key.IsNull()) obj->SetName(key);
  this->objects->Add(obj);
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::makeLegend(TQTaggable& tags, TObjArray* histos){
  // create a legend including the given list of histograms
  // @tags:style.showEventYields: show event yields (integral counts) in the legend
  // @tags:style.showEventYields.useUnderOverflow: include underflow and overflow in the event yields displayed in the legend (default:true)
  // @tags:style.nLegendCols: number of columns to be shown in legend
  // @tags:geometry.legend.height: scaling factor for height of the legend
  bool showEventYields = tags.getTagBoolDefault ("style.showEventYields",false);
  int nLegendCols = tags.getTagIntegerDefault ("style.nLegendCols",showEventYields ? 1 : 2);
  bool showTotalBkg = tags.getTagBoolDefault ("style.showTotalBkg",true);
  double legendHeight = tags.getTagDoubleDefault ("geometry.legend.height",1. );
  double scaling = tags.getTagDoubleDefault("geometry.main.scaling",1.);

  bool drawData = tags.getTagBoolDefault ("style.drawData",true);
  bool verbose = tags.getTagBoolDefault("verbose",false);

  // Obtain data cuts if drawData is true
  std::vector<TString> showDataAtCuts;
  if (drawData) {
    tags.getTag("showDataAtCuts", showDataAtCuts);
  }

  // Check we're meant to draw for this cut.
  TString histogramTag = tags.getTagStringDefault("input.histogram", "");
  TString cutName(histogramTag(0, histogramTag.First('/')));
  bool drawDataThisCut = (showDataAtCuts.size() == 0);
  if (std::find(showDataAtCuts.begin(), showDataAtCuts.end(), cutName) != showDataAtCuts.end()) {
    drawDataThisCut = true;
  }


  // the nominal coordinates of the legend

  // calculate the number of entries
  int nEntries = 0;
  //@tag: style.showMissing: show empty legend entries where histogram is empty or could not be retrieved (default:true)
  bool showMissing = tags.getTagBoolDefault ("style.showMissing",true );

  nEntries += (showMissing ? histos->GetEntriesFast() : histos->GetEntries());
  TH1* hTotalStack = this->getObject<TH1>("totalStack");
  if (showTotalBkg && (hTotalStack || (showMissing && this->getNProcesses(".isBackground") > 0))) nEntries++;

  // calculate the height of the legend
  int nLegendRows = (int)nEntries / nLegendCols + ((nEntries % nLegendCols) > 0 ? 1 : 0);

  TLegend* legend = NULL;
  // @tags:[geometry.legend.xMin,geometry.legend.xMax,geometry.legend.yMin,geometry.legend.yMax]: control the geometry of the legend in relative coordinates
  bool legpad = tags.getTagBoolDefault("style.useLegendPad",false);
  //@tags:style.useLegendPad: put the legend on a separate pad on the side of the plot
  if(legpad){
    if(verbose) VERBOSEclass("creating legend with unity coordinates");
    legend = new TLegend(tags.getTagDoubleDefault("geometry.legend.margins.left",0),
                         tags.getTagDoubleDefault("geometry.legend.margins.bottom",0),
                         1.-tags.getTagDoubleDefault("geometry.legend.margins.right",0),
                         1.-tags.getTagDoubleDefault("geometry.legend.margins.top",0));
    legend->SetFillColor(0);
    legend->SetFillStyle(0);
  } else {
    // if we plot the ratio, the canvas has to be divided which results in a
    // scaling of the legend. To avoid this, we have to rescale the legend's
    // position
    double x1 = tags.getTagDoubleDefault("geometry.legend.xMin",0.59);
    double y1 = tags.getTagDoubleDefault("geometry.legend.yMin",0.75);
    double x2 = tags.getTagDoubleDefault("geometry.legend.xMax",0.90);
    double y2 = tags.getTagDoubleDefault("geometry.legend.yMax",0.92);

    y1 = y2 - (y2 - y1) * scaling;
    legendHeight *= (y2 - y1) * (double)nLegendRows / tags.getTagDoubleDefault("geometry.legend.nRows",5.);

    // set the height of the legend
    y1 = y2 - legendHeight;
    // create the legend and set some attributes
    double tmpx1 = x1;
    double tmpx2 = x2;
    double tmpy1 = y1;
    double tmpy2 = y2;
    if(verbose) VERBOSEclass("creating legend with coordinates %g/%g - %g/%g",tmpx1,tmpy1,tmpx2,tmpy2);
    legend = new TLegend(tmpx1, tmpy1, tmpx2, tmpy2);
    //@tags:[style.legend.fillColor,style.legend.fillStyle]: control color and style of the legend with TLegend::SetFillColor and TLegend::SetFillStyle. defaults are 0.
    legend->SetFillColor(tags.getTagIntegerDefault("style.legend.fillColor",0));
    legend->SetFillStyle(tags.getTagIntegerDefault("style.legend.fillStyle",0));
  }
  legend->SetBorderSize(0);
  legend->SetNColumns(nLegendCols);

  //@tags: style.legend.textSize: control the font size (floating point number, default is 0.0375)
  //@tags: style.legend.textSizeFixed: boolean to control whether the text size will be interpreted relative to canvas size (default) or absolute
  double textsize = tags.getTagDoubleDefault("style.legend.textSize",0.45*tags.getTagDoubleDefault("style.textSize",0.0375));
  if (tags.getTagBoolDefault ("style.legend.textSizeFixed", false))
    legend->SetTextSize(textsize);
  else
    legend->SetTextSize(textsize * scaling);

  // show the error band on SM MC backgrounds in the legend. We have to use a
  // dummy histogram for the legend to get the correct appearance

  bool statMcErrors = tags.getTagBoolDefault("errors.drawStatMC",true );
  bool sysMcErrors = tags.getTagBoolDefault("errors.drawSysMC",false ) || tags.hasTag("errors.showSys");
  TH1* hTotalStackError = NULL;
  if (statMcErrors || sysMcErrors) {
    hTotalStackError = TQHistogramUtils::copyHistogram(hTotalStack,"totalStackError");
    if(hTotalStackError){
      hTotalStackError->Reset();
      hTotalStackError->SetTitle("total background error (legend dummy)");
      this->applyStyle (tags,hTotalStackError,"main.totalStackError");
      if(verbose){ DEBUGclass("totalStackError style: %s",TQHistogramUtils::getDetailsAsString(hTotalStackError,5).Data()); }
    }
  }

  // create the SM legend entry label depending on which error is shown as a
  // band around it
  TString totalStackLabel = tags.getTagStringDefault ("labels.totalStack", "SM");
  TString legendTotalBkgLabel = tags.getTagStringDefault ("labels.totalStack", "SM");
  legendTotalBkgLabel = " " + tags.getTagStringDefault ("labels.legendTotalBkg", legendTotalBkgLabel); // overwrite if you explicitly want it different in legend
  if(tags.getTagBoolDefault("legend.showTotalBkgErrorType",true)){
    if (statMcErrors && sysMcErrors)
      legendTotalBkgLabel.Append(" (sys #oplus stat)");
    else if (sysMcErrors)
      legendTotalBkgLabel.Append(" (sys)");
    else if (statMcErrors)
      legendTotalBkgLabel.Append(" (stat)");
  }
  if (tags.getTagBoolDefault("isCompPlot",false))
    addAllHistogramsToLegend(tags,legend, ".isBackground", tags.getTagStringDefault("legend.dataDisplayType",".legendOptions='lep'"));

  if(!tags.getTagBoolDefault("style.unsorted",false) || tags.getTagBoolDefault("style.listDataFirst", false)){
    // add the data processes
    if (drawData && drawDataThisCut) {
      addAllHistogramsToLegend(tags,legend, ".isData", tags.getTagStringDefault("legend.dataDisplayType",".legendOptions='lep'"));
    }
  }

  // add the total background histogram to the legend
  if (showTotalBkg) {
    if (hTotalStackError){
      if(verbose) VERBOSEclass("adding total stack error to legend");
      TString opt = tags.getTagStringDefault("legend.errorDisplayType","lf");
      if(!opt.Contains("l")){
        hTotalStackError->SetLineColor(0);
        hTotalStackError->SetLineStyle(0);
        hTotalStackError->SetLineWidth(0);
      }
      DEBUGclass(TQHistogramUtils::getDetailsAsString(hTotalStackError,5));
      legend->AddEntry(hTotalStackError, legendTotalBkgLabel,opt);
    } else {
      if(verbose) VERBOSEclass("no total stack error found");
      if (showMissing && this->getNProcesses(".isBackground") > 0){
        legend->AddEntry((TObject*)NULL,"","");
      }
    }
  }

  bool stackSignal = tags.getTagBoolDefault ("style.stackSignal",false);
  bool autoStackSignal = tags.getTagBoolDefault ("style.autoStackSignal",false);
  bool listSignalFirst = tags.getTagBoolDefault ("style.listSignalFirst",false);
  bool showSignal = tags.getTagBoolDefault ("style.showSignalInLegend",true);
  if(tags.getTagBoolDefault("style.unsorted",false)){
    //@tag:style.unsorted: do not apply any sorting whatsoever, list all processes in the order in which they were added
    if (tags.getTagBoolDefault("style.listDataFirst", false)){
    //@tag:style.listDataFirst: show data before anything else on the legend
      addAllHistogramsToLegend(tags,legend, ".isBackground");  
      addAllHistogramsToLegend(tags,legend, ".isSignal");    
    }
    else{
      addAllHistogramsToLegend(tags,legend, ""); 
    }   
  } else {
    if (!tags.getTagBoolDefault ("style.manualStacking", false)) {
      if(!tags.getTagBoolDefault("style.autoStackLegend",false)){
	// add the background and signal processes
	if(verbose) VERBOSEclass("generating legend in default mode");
	if(listSignalFirst){
	  if (showSignal)
	    addAllHistogramsToLegend(tags,legend, ".isSignal");
	  if (!tags.getTagBoolDefault("isCompPlot",false))
	    addAllHistogramsToLegend(tags,legend, ".isBackground");
	} else {
	  if (!tags.getTagBoolDefault("isCompPlot",false))
	    addAllHistogramsToLegend(tags,legend, ".isBackground");
	  if (showSignal)
	    addAllHistogramsToLegend(tags,legend, ".isSignal");
	}
      } else {
	THStack* stack = this->getObject<THStack>("stack");
	if(!stack){
	  if(verbose){
	    VERBOSEclass("cannot generate legend in auto-stack mode - no stack!");
	  }
	  return;
	} else {
	  if(verbose) VERBOSEclass("generating legend in auto-stack mode");
	  if (!stackSignal && listSignalFirst && showSignal && !autoStackSignal) {
	    addAllHistogramsToLegend(tags,legend, ".isSignal");
	  }
	  TQTH1Iterator itr(stack->GetHists()->MakeIterator(kIterBackward),true);
	  while(itr.hasNext()){
	    TH1* hist = itr.readNext();
	    addHistogramToLegend(tags,legend,hist);
	  }
	  if (!stackSignal && !listSignalFirst && showSignal  && !autoStackSignal) {
	    addAllHistogramsToLegend(tags,legend, ".isSignal");
	  }
	}
      }
    } else {
      if (stackSignal) {
	if(verbose) VERBOSEclass("generating legend in manual stacking mode - stackSignal=true");
	if (listSignalFirst) {
	  if (showSignal)
	    addAllHistogramsToLegend(tags,legend, ".isSignal","",true);
	  addAllHistogramsToLegend(tags,legend, ".isBackground","",true);
	} else {
	  addAllHistogramsToLegend(tags,legend, ".isBackground","",true);
	  addAllHistogramsToLegend(tags,legend, ".isSignal","",true);
	}
      } else {
	if(verbose) VERBOSEclass("generating legend in manual stacking mode - stackSignal=false");
	if (listSignalFirst) {
        if (showSignal)
          addAllHistogramsToLegend(tags,legend, ".isSignal");
        addAllHistogramsToLegend(tags,legend, ".isBackground","",true);
	} else {
	  addAllHistogramsToLegend(tags,legend, ".isBackground","",true);
	  if (showSignal)
	    addAllHistogramsToLegend(tags,legend, ".isSignal");
	}
      }
    }
  }
  this->addObject(legend,"legend");
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawHeatmap(TQTaggable& tags){
  // draw a heatmap
  // this is a TH2 plotting mode
  TString heatmap = "totalStack";
  TString overlay = "totalSig";
  TString overlayAdditional = "totalSig";

  //@tag:[style.heatmap] If this tag is set a heatmap ('colz') style 2D histogram is drawn for the histogram (read: process, e.g., "hist_Zjets") instead of contour ones
  if(!tags.getTagString("style.heatmap",heatmap)) return false;
  bool normalize = tags.getTagBoolDefault("normalizeheatmap",false );
  TPad* pad = this->getPad("main");
  pad->cd();
  //@tag: [geometry.main.rightMargin] Change the right margin of the main pad
  pad->SetRightMargin(tags.getTagDoubleDefault("geometry.main.rightMargin", 0.11));
  //@tag:[style.drawGrid] Draws a grid on heatmap plots if set to true. Default: false.
  if (tags.getTagBoolDefault("style.drawGrid",false)) pad->SetGrid(1,1);
  TH2* hMaster = this->getObject<TH2>("Graph_master");
  TH2* hHeatmap = this->getObject<TH2>(heatmap);

  TH2* hOverlay = NULL;
  TH2* hoverlayAdditional = NULL;
  bool verbose = tags.getTagBoolDefault("verbose",false);
  bool doOverlay = tags.getTagString("style.heatmapoverlay",overlay);
  bool dooverlayAdditional = tags.getTagString("style.heatmapoverlayAdditional",overlayAdditional);

  if(verbose) VERBOSEclass("making Heatmap ");
  if (normalize){
    if (hHeatmap){
      double totalScale = TQHistogramUtils::getIntegral(hHeatmap);
      hHeatmap->Scale(1. / totalScale * 100);
    }
    if (hOverlay){
      double totalScale2 = TQHistogramUtils::getIntegral(hOverlay);
      hOverlay->Scale(1. / totalScale2 * 100);
    }
  }

  bool logScaleZ = tags.getTagBoolDefault("style.logScaleZ",false);
  if (logScaleZ) {
    pad->SetLogz();
  }

  if(doOverlay){
    if(verbose) VERBOSEclass("retrieving overlay histogram by name '%s'",overlay.Data());
    hOverlay = this->getObject<TH2>(overlay);
  }

  if(dooverlayAdditional){
    if(verbose) VERBOSEclass("retrieving overlay histogram by name '%s'",overlayAdditional.Data());
    hoverlayAdditional = this->getObject<TH2>(overlayAdditional);
  }

  if(hHeatmap){
    hMaster->SetMaximum(hHeatmap->GetMaximum());
    hMaster->SetMinimum(hHeatmap->GetMinimum());
  }
  /*
  // should this be used at all?
  if(hOverlay){
    hMaster->SetMaximum(hOverlay->GetMaximum());
    hMaster->SetMinimum(hOverlay->GetMinimum());
  }
  */

  if(verbose) VERBOSEclass("drawing master histogram");
  hMaster->Draw("HIST");

  if(hHeatmap){
    // Some basic style changes for COLZ drawing
    hHeatmap->SetFillStyle(0);
    hHeatmap->SetLineColor(kBlue-4);
    if(verbose) VERBOSEclass("drawing histogram '%s' as heatmap",heatmap.Data());
    TString ZAxis_title = "Events";
    bool Zaxistitle = tags.getTagString("style.Zaxistitle",ZAxis_title);
    hHeatmap->GetZaxis()->SetTitleOffset(1.1);
    if (Zaxistitle) {hHeatmap->GetZaxis()->SetTitle(ZAxis_title.Data());}
    if(verbose) VERBOSEclass("drawing histogram with title'%s' ",ZAxis_title.Data());
    hHeatmap->Draw("COLZ1,SAME");
  } else {
    if(verbose){
      VERBOSEclass("cannot draw '%s' as heatmap - object not found",heatmap.Data());
      this->printObjects();
    }
    return false;
  }



  if(hOverlay){
    if(verbose) VERBOSEclass("drawing histogram '%s' as heatmap overlay",overlay.Data());
    hOverlay->SetFillStyle(0);
    hOverlay->SetLineWidth(2);
    hOverlay->SetLineStyle(1);
    hOverlay->Draw("BOX,SAME");
  } else if(doOverlay){
    if(verbose){
      VERBOSEclass("cannot draw '%s' as heatmap overlay - object not found",overlay.Data());
      this->printObjects();
    }
  }
  if(hoverlayAdditional){
    if(verbose) VERBOSEclass("drawing histogram '%s' as heatmap overlay",overlay.Data());
    hoverlayAdditional->SetFillStyle(0);
    hoverlayAdditional->SetLineWidth(2);
    hoverlayAdditional->SetLineStyle(1);

    hoverlayAdditional->Draw("BOX,SAME");
  } else if(dooverlayAdditional){
    if(verbose){
      VERBOSEclass("cannot draw '%s' as heatmap overlay - object not found",overlay.Data());
      this->printObjects();
    }
  }

  return true;
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawContours(TQTaggable& tags){
  // draw a contour plot
  // this is a TH2 plotting mode
  TPad* pad = this->getPad("main");
  TH2* hMaster = this->getObject<TH2>("Graph_master");
  TObjArray* histos = this->getObject<TObjArray>("histos");
  bool verbose = tags.getTagBoolDefault("verbose",false);

  // select the z-values of the contours to be drawn
  //@tag:[style.logMin,style.logMinRel] These argument tags determine the minimum value contour plots in logarithmic scale. Default of "logMin" is 1. If the latter one is set, the minimum of the scale is taken as the product of the "logMinRel" tag's value and the highest bin content of the underlying histogram.
  double logMin = tags.getTagDoubleDefault("style.logMin",1.);
  bool logScale = tags.getTagIntegerDefault("style.logScale",false);
  double max = TQHistogramUtils::getMax(histos,false);
  //if the user has set a relative (to the maximum value) lower boundary for log scaled histograms use that one
  if (logScale && tags.hasTagDouble("style.logMinRel") ) logMin = max*tags.getTagDoubleDefault("style.logMinRel",42.); //the default value should never do anything, and if it does we want it to be obvious that something is wrong
  double min = logScale ? std::max(logMin,TQHistogramUtils::getMin(histos,false)) : TQHistogramUtils::getMin(histos,false);

  size_t nContours = tags.getTagIntegerDefault("style.nContours",6);
  double step = logScale ? (log(max) - log(min))/(nContours+1) : (max-min)/(nContours+1);
  std::vector<double> contours;
  for(size_t i=0; i<nContours; i++){
    double z_orig = logScale ? min*exp((i+1)*step) : min+(i+1)*step;
    double z = TQUtils::roundAuto(z_orig,1);
    contours.push_back(z);
  }

  // create the contour graphs
  TObjArray* contourGraphs = new TObjArray();
  std::vector<double> contourVals;
  //@tag:[style.minContourArea] This argument tag determines up to what size contours are omitted. Default is three time the minimum bin area of the master histogram. Removing this limit would create PDFs easily reaching ~100MByte!
  double minContourArea = tags.getTagDoubleDefault("style.minContourArea",3*TQHistogramUtils::getMinBinArea(hMaster));
  bool batch = gROOT->IsBatch();
  gROOT->SetBatch(true);
  //@tag:[style.doContourLevelsPerHistogram] If this argument tag is set to true countour levels (in contour plots) are determined for each process separately. Default: false.
  bool contourLevelsPerHistogram = tags.getTagBoolDefault("style.doContourLevelsPerHistogram",false);
  TQIterator histItr(histos);
  while(histItr.hasNext()){
    // create a temporary canvas and draw the histogram to create the contours
    TCanvas* tmp = new TCanvas("tmp","tmp");
    TH2* hist = dynamic_cast<TH2*>(histItr.readNext());
    if(tags.getTagBoolDefault("style.smooth",false)){
      hist->Smooth(1,"k5a");
    }
    if(!hist) continue;
    if (contourLevelsPerHistogram) {
      contours.clear();
      max = TQHistogramUtils::getMax(hist,false,false);
      //if the user has set a relative (to the maximum value) lower boundary for log scaled histograms use that one
      if (logScale && tags.hasTagDouble("style.logMinRel") ) logMin = max*tags.getTagDoubleDefault("style.logMinRel",42.); //the default value should never do anything, and if we want it to be obvious that something is wrong
      min = logScale ? std::max(logMin,TQHistogramUtils::getMin(hist,false,false)) : TQHistogramUtils::getMin(hist,false,false);
      //@tag:[style.nContours] This argument tag sets the number of contour levels shown in contour plots. Default is 6 unless "style.doContourLevelsPerHistogram" is set to true, in which case default is 2.
      size_t nContours = tags.getTagIntegerDefault("style.nContours",2);
      double step = logScale ? (log(max) - log(min))/(nContours+1) : (max-min)/(nContours+1);
      for(size_t i=0; i<nContours; i++){
        double z_orig = logScale ? min*exp((i+1)*step) : min+(i+1)*step;
        double z = TQUtils::roundAuto(z_orig,1);
        contours.push_back(z);
      }
    }
    hist->SetContour(contours.size(), &contours[0]);
    if(verbose) VERBOSEclass("drawing contours for %s",hist->GetName());
    hist->Draw("CONT Z LIST");
    // Needed to force the plotting and retrieve the contours in TGraphs
    tmp->Update();
    // retrieve the contours
    TQIterator contItr2(dynamic_cast<TObjArray*>(gROOT->GetListOfSpecials()->FindObject("contours")));
    while(contItr2.hasNext()){
      // contours by level
      TList* contLevel = dynamic_cast<TList*>(contItr2.readNext());
      int idx = contItr2.getLastIndex();
      double z0 = contours[idx];
      if(verbose) VERBOSEclass("\tretrieving %d contours for level %f",contLevel->GetEntries(),z0);
      int nGraphs = 0;
      std::vector<double> contourAreas;
      std::vector<double> contourIndices;
      TQIterator contItr3(contLevel);
      while(contItr3.hasNext()){
        // individual graphs per contour level
        TGraph* curv = dynamic_cast<TGraph*>(contItr3.readNext());
        // veto against non-existant contours
        if(!curv) continue;
        double area = fabs(TQHistogramUtils::getContourArea(curv));
        double triangle = 0.5*pow(TQHistogramUtils::getContourJump(curv),2);
        double val = std::max(area,triangle);
        if(verbose) VERBOSEclass("\t\tcontour %d has area=%f and triangle jump=%f -- contour value is %f",nGraphs,area,triangle,val);
        contourAreas.push_back(val);
        contourIndices.push_back(contItr3.getLastIndex());
        nGraphs++;
      }
      if(verbose) VERBOSEclass("identified %i non-vanishing contours",contourAreas.size());
      nGraphs = 0;
      int nContoursMax = tags.getTagIntegerDefault("style.contourLimit",7);
      while(nGraphs < nContoursMax){
        size_t index = 0;
        double max = 0;
        for(size_t i=0; i<contourAreas.size(); i++){
          if(contourAreas[i] > max){
            max = contourAreas[i];
            index = contourIndices[i];
            contourAreas[i] = 0;
          }
        }
        // veto against micro-blob contours
        TGraph* curv = dynamic_cast<TGraph*>(contLevel->At(index));
        if(max < minContourArea && nGraphs > 0) {
          DEBUGclass("removing micro-blob");
          break;
        }

        if(max <= 0) break;
        // individual graphs per contour level
        // veto against non-existant contours
        if(!curv) continue;
        // create clones of the graphs to avoid deletions
        TGraph* gc = dynamic_cast<TGraph*>(curv->Clone());
        if(!gc) continue;
        // apply the styles to the graphs
        int color = hist->GetFillColor();
        int style = 1;
        if((color == kWhite) || (color == 0)){
          color = hist->GetLineColor();
          style = TQStringUtils::equal("hist_data",hist->GetName()) ? 3 : 7;
        }
        gc->SetLineColor(color);
        gc->SetLineStyle(style);
        if(tags.getTagBoolDefault("style.contourLines.shade",false)){
          gc->SetFillStyle(3004+ (histItr.getLastIndex() % 4));
          gc->SetLineWidth(-100
                           *TQUtils::sgn(tags.getTagIntegerDefault("style.contourLines.shadeDirection",1))
                           *tags.getTagIntegerDefault("style.contourLines.shadeWidth",3)
                           + tags.getTagIntegerDefault("style.contourLines.width",1));
        } else {
          gc->SetLineWidth(tags.getTagIntegerDefault("style.contourLines.width",1));
        }
        gc->SetTitle(TString::Format("%s: contour #%d to level %g",hist->GetTitle(),(int)nGraphs,z0));
        this->addObject(gc,TString::Format("contour_%d_%s_%g_%d",contourGraphs->GetEntries(),hist->GetName(),z0,(int)nGraphs));
        contourGraphs->Add(gc);
        contourVals.push_back(z0);
        nGraphs++;
      }
      if(verbose) VERBOSEclass("\tretrieved %d (dismissed all others)",nGraphs);
    }
    // delete the temporary canvas
    delete tmp;
  }
  this->addObject(contourGraphs,"contours");
  if(!batch) gROOT->SetBatch(false);

  // switch to the correct pad
  pad->cd();
  hMaster->Draw("hist");

  // prepare the TLatex object for drawing the labels
  TLatex l;
  bool autoColor = tags.getTagBoolDefault("style.contourLabels.autocolor",false);
  int color = tags.getTagIntegerDefault("style.contourLabels.color",kBlack);
  double size = tags.getTagDoubleDefault("style.contourLabels.size",0.03);
  l.SetTextSize(size);
  l.SetNDC(true);
  if(!autoColor) l.SetTextColor(color);

  std::vector<double> labelSpotsX;
  std::vector<double> labelSpotsY;
  TQIterator itrGraphs(contourGraphs);
  while(itrGraphs.hasNext()){
    // iterate over the contour graphs
    TGraph* gc = dynamic_cast<TGraph*>(itrGraphs.readNext());
    if(!gc) continue;
    // actually draw the contour graph
    gc->Draw("C");
    // choose a "central" point of the graph
    // to retrieve coordinates for the label
    int index = 0.5*gc->GetN();
    int indexStep = 1;
    double x0, y0, z0;
    double xNDC, yNDC;
    // create the label text
    z0 = contourVals[itrGraphs.getLastIndex()];
    TString val = TString::Format("%g",z0);
    double minDistX = 0.5*size*TQStringUtils::getWidth(val);
    double minDistY = size;
    // find a location to draw the label
    bool acceptPosition = false;
    if(tags.getTagBoolDefault("style.contourLabels.avoidCollisions",true)){
      while(index > 0 && index < gc->GetN()){
        acceptPosition = true;
        gc->GetPoint(index, x0, y0);
        xNDC = TQUtils::convertXtoNDC(x0);
        yNDC = TQUtils::convertYtoNDC(y0);
        for(size_t i=0; i<labelSpotsX.size(); i++){
          double dx = fabs(xNDC - labelSpotsX[i]);
          double dy = fabs(yNDC - labelSpotsY[i]);
          if((dx < minDistX) && (dy < minDistY)) acceptPosition = false;
        }
        if(acceptPosition) break;
        index += indexStep;
        indexStep = -TQUtils::sgn(indexStep)*(abs(indexStep)+1);
      }
    }
    if(!acceptPosition){
      if(verbose) VERBOSEclass("did not find any suitable label position, using default");
      gc->GetPoint((int)(0.5*gc->GetN()), x0, y0);
      xNDC = TQUtils::convertXtoNDC(x0);
      yNDC = TQUtils::convertYtoNDC(y0);
    }
    labelSpotsX.push_back(xNDC);
    labelSpotsY.push_back(yNDC);
    // choose a color
    if(autoColor) l.SetTextColor(gc->GetLineColor());
    // draw the label
    l.DrawLatex(xNDC,yNDC,val);
    if(verbose) VERBOSEclass("drawing label '%s' at (%f,%f) == (%f,%f) with minDist=(%f,%f)",val.Data(),x0,y0,xNDC,yNDC,minDistX,minDistY);
  }
  return true;
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawScatter(TQTaggable& tags){
  // draw a scatter plot (approximate, due to using binned inputs)
  // this is a TH2 plotting mode
  TPad* pad = this->getPad("main");
  TH2* hMaster = this->getObject<TH2>("Graph_master");
  TObjArray* histos = this->getObject<TObjArray>("histos");
  //bool verbose = tags.getTagBoolDefault("verbose",false);

  /*
  // select the z-values of the contours to be drawn
  double logMin = tags.getTagDoubleDefault("style.logMin",1.);
  bool logScale = tags.getTagIntegerDefault("style.logScale",false);
  double max = TQHistogramUtils::getMax(histos,false);
  //if the user has set a relative (to the maximum value) lower boundary for log scaled histograms use that one
  if (logScale && tags.hasTagDouble("style.logMinRel") ) logMin = max*tags.getTagDoubleDefault("style.logMinRel",42.); //the default value should never do anything, and if it does we want it to be obvious that something is wrong
  double min = logScale ? std::max(logMin,TQHistogramUtils::getMin(histos,false)) : TQHistogramUtils::getMin(histos,false);
  */
  int markerStyle;
  //@tag:[style.scatter.markerStyle] override process-defined marker style with specified value for 2D scatter plots (see ROOT's TAttMarker documentaiton for values)
  bool overrideMarkerStyle = tags.getTagInteger("style.scatter.markerStyle",markerStyle);
  //@tag:[style.scatter.alphaDecay] Multiply alpha value for each subsequent process drawn onto scatter plots by this factor. Default: 1.0
  float alphaDecay = tags.getTagDoubleDefault("style.scatter.alphaDecay",1.0);
  //@tag:[style.scatter.alphaDecay] Multiply processes' marker sizes by this factor in scatter plots. Default: 1.0
  float markerSizeScale = tags.getTagDoubleDefault("style.scatter.markerScale", 1.0);
  bool batch = gROOT->IsBatch();
  gROOT->SetBatch(true);
  pad->cd();
  hMaster->Draw("");
  TQIterator histItr(histos);
  float alpha = 1.0;
  while(histItr.hasNext()){
    TH2* hist = dynamic_cast<TH2*>(histItr.readNext());
    if(!hist) continue;
    if (overrideMarkerStyle) {
      hist->SetMarkerStyle(markerStyle);
    }
    hist->SetMarkerSize(hist->GetMarkerSize() * markerSizeScale);
    hist->SetMarkerColorAlpha(hist->GetMarkerColor(), alpha);
    alpha *= alphaDecay;
    hist->Draw("SAME,SCAT");
  }
  

  if(!batch) gROOT->SetBatch(false);

  return true;
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawMigration(TQTaggable& tags){
  // draw a migration plot
  // this is a TH2 plotting mode
  TString migration = "ggf";
  //@tag:[style.migration] If this tag is set a migration ('col4z') style 2D histogram is drawn for the histogram (read: process, e.g., "hist_Zjets") instead of contour or heatmap ones
  if(!tags.getTagString("style.migration",migration)) return false;
  TPad* pad = this->getPad("main");
  TH2* hMaster = this->getObject<TH2>("Graph_master");
  TQTaggableIterator itr_sig(fProcesses);
  TQNamedTaggable* process_mig = NULL;
  while(itr_sig.hasNext()){
    TQNamedTaggable* process = itr_sig.readNext();
    if(!process) continue;
    if(process->getTagBoolDefault(".isData",false)) continue;
    if(process->getName() == migration)
      process_mig = process;
  }
  TH2* hMigration = this->getObject<TH2>(this->makeHistogramIdentifier(process_mig));
  bool verbose = tags.getTagBoolDefault("verbose",false);
  bool logScale = tags.getTagBoolDefault("style.logScale",false);
  if (logScale) pad->SetLogz();

  hMaster->Draw("HIST");

  if(hMigration){
    if(verbose) VERBOSEclass("drawing histogram '%s' as migration",migration.Data());
    for(int i=0; i <= hMigration->GetNbinsY(); i++) {
      double integral = hMigration->Integral(0,hMigration->GetNbinsY()+1,i,i);
      if(integral > 0){
        for(int j=0; j <= hMigration->GetNbinsX(); j++) {
          double bincontent = hMigration->GetBinContent(j,i)/integral*100;
          hMigration->SetBinContent(j,i,bincontent);
        }
      }
    }
    gStyle->SetPaintTextFormat("4.1f");
    hMigration->SetContour(99);
    hMigration->Draw("col4zsame");
    hMigration->SetMarkerColor(kBlack);
    hMigration->SetMarkerSize(1.4);
    hMigration->Draw("textsame");
  } else {
    if(verbose){
      VERBOSEclass("cannot draw '%s' as migration - object not found",migration.Data());
      this->printObjects();
    }
    return false;
  }

  return true;

}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawStack(TQTaggable& tags){
  // draw the stack produced by stackHistograms
  // @tag:errors.drawStatMC: control drawing of statistical MC errors (default:true)
  // @tag:errors.drawSysMC: control drawing of systematic MC errors (default:false; deprecated, use errors.totalBkgSys)
  // @tag:errors.showSys: alias for errors.totalBkgSys
  // @tag:errors.totalBkgSys: include in the total background error the specified systematics tag
  // @tag:style.showTotalBkg: control display of additional line (and legend entry) for total background (default:true)
  // @tag:style.drawData: control whether data points will be shown (default:true)
  // @tag:style.data.asymErrors: show asymmetric errors (poisson errors) for data points
  // @tag:showDataAtCuts: Show data only for these cuts. If empty and drawData = true, will draw data for all plots.

  this->getPad("main");
  bool statMcErrors = tags.getTagBoolDefault("errors.drawStatMC",true );
  bool sysMcErrors = tags.getTagBoolDefault("errors.drawSysMC",false );
  bool showTotalBkg = tags.getTagBoolDefault ("style.showTotalBkg",true);
  bool drawData = tags.getTagBoolDefault ("style.drawData",true);
  bool asymErrorsData = tags.getTagBoolDefault("style.data.asymErrors",false);
  bool verbose = tags.getTagBoolDefault("verbose",false);
  double scaling = tags.getTagDoubleDefault("geometry.main.scaling",1.);

  // Obtain data cuts if drawData is true
  std::vector<TString> showDataAtCuts;
  if (drawData) {
    tags.getTag("showDataAtCuts", showDataAtCuts);
  }


  TH1* hMaster = this->getObject<TH1>("Graph_master");
  TH1* hTotalStack = this->getObject<TH1>(tags.getTagStringDefault("errors.shiftTo","totalStack"));
  if(!hMaster) return false;

  // the first histogram to draw is the SM histogram.
  hMaster->Draw("hist");

  //////////////////////////////////////////////////////
  // error band on background MC
  //////////////////////////////////////////////////////

  if(verbose) VERBOSEclass("creating MC error band");
  // all this only makes sense if we have a histogram representing the "total background"
  TGraphAsymmErrors * errorGraph = 0;
  if (hTotalStack && (statMcErrors || sysMcErrors)){
    TObjArray* histosAsymmSys = this->getObject<TObjArray>("asymmSys");
    if(histosAsymmSys) {
      errorGraph = TQHistogramUtils::getGraph(hTotalStack, histosAsymmSys);
    } else {
      errorGraph = TQHistogramUtils::getGraph(hTotalStack);
    }
    this->applyStyle(tags,errorGraph,"main.totalStackError",1.,scaling);
    this->addObject(errorGraph,"totalStackErr");
  }

  if(tags.getTagBoolDefault("errors.showX",true)){
    double errWidthX = 0.5;
    if(tags.getTagDouble("errors.widthX", errWidthX))
      gStyle->SetErrorX(errWidthX);
  } else {
    gStyle->SetErrorX(0.);
  }

  //////////////////////////////////////////////////////
  // calculate axis ranges
  // rescale to avoid graphical collisions
  //////////////////////////////////////////////////////

  if(verbose) VERBOSEclass("calculating axis ranges & rescaling histograms");
  bool axisOK = this->calculateAxisRanges1D(tags);
  if(!axisOK){
    if(verbose) VERBOSEclass("encountered invalid axis ranges, using defaults");
  }

  //////////////////////////////////////////////////////
  // draw everything
  //////////////////////////////////////////////////////

  if(verbose) VERBOSEclass("drawing backgrounds");

  THStack* stack = this->getObject<THStack>("stack");
  TString stackDrawOptions = tags.getTagStringDefault ("style.stackDrawOptions","hist");

  // draw the backgrounds
  if (hTotalStack && stack) {
    stack->Draw(stackDrawOptions + " same");
    if (showTotalBkg && errorGraph) errorGraph->Draw("2");
  } else {
    if (verbose) VERBOSEclass("failed to obtain stack");
  }

  //@tag:stack: process tag to steer whether this process will be added to the stack (default: true for bkg, else false)
  //@tag:drawOptions: control the draw options of this process (default: 'hist' for MC, 'ep' for data)

  if(verbose) VERBOSEclass("drawing signal (and other non-stacked histograms)");
  // draw signal
  bool stackSignal = tags.getTagBoolDefault ("style.stackSignal",false);
  TQTaggableIterator itr_sig(fProcesses);
  while(itr_sig.hasNext()){
    TQNamedTaggable* process = itr_sig.readNext();
    if(!process) continue;
    if(process->getTagBoolDefault(".isData",false)) continue;
    if(!(process->getTagBoolDefault("stack",process->getTagBoolDefault(".isBackground") || stackSignal))){
      TH1 * h = this->getObject<TH1>(this->makeHistogramIdentifier(process));
      if(!h) continue;
      TString drawOpt = process->getTagStringDefault("drawOptions", "hist") + " same";
      if(process->getTagBoolDefault("stackShift",false)){
        TH1* hcopy = TQHistogramUtils::copyHistogram(h,TString::Format("%s_shifted",h->GetName()));
        hcopy->Add(hTotalStack);
        hcopy->Draw(drawOpt);
      } else {
        h->Draw(drawOpt);
      }
    }
  }

  // Draw Data
  // Check we're meant to draw for this cut.
  TString histogramTag = tags.getTagStringDefault("input.histogram", "");
  TString cutName(histogramTag(0, histogramTag.First('/')));
  bool drawDataThisCut = (showDataAtCuts.size() == 0);  
  if (std::find(showDataAtCuts.begin(), showDataAtCuts.end(), cutName) != showDataAtCuts.end()) {
    drawDataThisCut = true;
  }

  if (drawData && drawDataThisCut) {
    if(verbose) VERBOSEclass("drawing data");
    TQTaggableIterator itr_data(fProcesses);
    while(itr_data.hasNext()){
      TQNamedTaggable* process = itr_data.readNext();
      if(!process) continue;
      if(!process->getTagBoolDefault(".isData",false)) continue;
      TH1 * h = this->getObject<TH1>(this->makeHistogramIdentifier(process));
      TList* myList = tags.getListOfTagNames();
      TIter next(myList);
      if (!h) {
        continue;
      } else if (h->Integral() < tags.getTagDoubleDefault("skipEmptyHistograms", 1e-5)) {
        if (verbose) {
          VERBOSEclass("skipping data histogram '%s' because it is empty", h->GetName());
        }
        continue;
      }
      this->applyStyle(tags,h,"main.data");
      if (asymErrorsData) {
        h->Sumw2(false); //only do this for data, since uncertainty is sqrt(n). However, it is needed for kPoisson to take effect
        h->SetBinErrorOption(TH1::kPoisson);
      }
      TString drawOpt = process->getTagStringDefault("drawOptions","ep") + " same";
      if(verbose)
        VERBOSEclass("drawing data histogram '%s' with option '%s'", h->GetName(),drawOpt.Data());
      h->Draw(drawOpt);
    }
  }

  if (tags.getTagBoolDefault("isCompPlot",false))
    stack->Draw(stackDrawOptions + " same");
  return true;
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::drawProfiles(TQTaggable& tags){
  // draw background TProfiles
  this->getPad("main");
  bool verbose = tags.getTagBoolDefault("verbose",false);

  TProfile* hMaster = this->getObject<TProfile>("Graph_master");
  TProfile* hTotalStack = this->getObject<TProfile>("totalStack");
  if(!hMaster || !hTotalStack) return false;
  //hOverlay = this->getObject<TProfile>(overlay);
  hMaster->SetMaximum(hMaster->GetYmax());
  hMaster->SetMinimum(hMaster->GetYmin());

  //////////////////////////////////////////////////////
  // calculate axis ranges
  // rescale to avoid graphical collisions
  //////////////////////////////////////////////////////

  if(verbose) VERBOSEclass("calculating axis ranges & rescaling histograms");
  bool axisOK = this->calculateAxisRangesProfile(tags);
  if(!axisOK){
    if(verbose) VERBOSEclass("encountered invalid axis ranges, using defaults");
  }

  // the first histogram to draw is the SM histogram.
  hMaster->Draw("hist");

  //////////////////////////////////////////////////////
  // draw everything
  //////////////////////////////////////////////////////

  if(verbose) VERBOSEclass("drawing profiles");

  // draw the backgrounds
  TQTaggableIterator itr_bkg(fProcesses);
  while(itr_bkg.hasNext()){
    TQNamedTaggable* process = itr_bkg.readNext();
    TString tmp1 = process->getName();
    if(verbose){
      INFOclass("drawing %s",tmp1.Data());
    }
    if(!process) continue;
    TProfile * h = this->getObject<TProfile>(this->makeHistogramIdentifier(process));
    if(!h) continue;
    this->applyStyle(tags,h,"main.bkg");
    //@tag:drawOptions: control the draw options of this process (default: 'hist' for MC, 'ep' for data)
    h->Draw(process->getTagStringDefault("drawOptions", "ep") + " same");
  }

  //@tag:stack: process tag to steer whether this process will be added to the stack (default: true for bkg, else false)
  return true;
}

//__________________________________________________________________________________|___________

void TQROOTPlotter::drawLegend(TQTaggable& tags){
  // draw the legend produced by TQROOTPlotter::makeLegend
  bool verbose = tags.getTagBoolDefault("verbose",false);
  bool legpad = tags.getTagBoolDefault("style.useLegendPad",false);
  //@tag:[style.showLegend] Controls if legend is shown. Default: true
  if (!tags.getTagBoolDefault("style.showLegend",true)) return;
  TLegend* legend = this->getObject<TLegend>("legend");
  if(legpad){
    if(verbose) VERBOSEclass("drawing legend pad");
    if(!this->getPad("legend")){
      ERRORclass("error retrievling legend pad!");
    }
    legend->Draw();
  } else {
    if(verbose) VERBOSEclass("drawing legend on-pad");
    this->getPad("main");
    legend->Draw("same");
  }
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::calculateAxisRanges1D(TQTaggable& tags){
  // calculate the axis ranges, taking into account the given block tags
  bool logScale = tags.getTagBoolDefault ("style.logScale",false );
  bool drawData = tags.getTagBoolDefault ("style.drawData",true);
  bool verbose = tags.getTagBoolDefault("verbose",false);

  // Obtain data cuts if drawData is true
  std::vector<TString> showDataAtCuts;
  if (drawData) {
    tags.getTag("showDataAtCuts", showDataAtCuts);
  }
  // Check we're meant to draw for this cut
  TString histogramTag = tags.getTagStringDefault("input.histogram", "");
  TString cutName(histogramTag(0, histogramTag.First('/')));
  bool drawDataThisCut = (showDataAtCuts.size() == 0);  
  if (std::find(showDataAtCuts.begin(), showDataAtCuts.end(), cutName) != showDataAtCuts.end()) {
    drawDataThisCut = true;
  }

  TH1* hTotalStack = this->getObject<TH1>("totalStack");
  TList* histograms = new TList();
  if (hTotalStack) histograms->Add(hTotalStack);


  double min = std::numeric_limits<double>::infinity();
  TQTaggableIterator itr(fProcesses);
  while(itr.hasNext()){
    TQNamedTaggable* process = itr.readNext();
    if(!process) continue;
    if(process->getTagBoolDefault(".isData",false) && (!drawData || !drawDataThisCut)) continue;
    TH1 * h = this->getObject<TH1>(this->makeHistogramIdentifier(process));
    if(!h) continue;
    histograms->Add(h);
    //ignore empty/very small bins for log scale plots when trying to automatically determine axis range
    min = std::min(min,TQHistogramUtils::getMin(h, true, true, logScale ? tags.getTagDoubleDefault("style.logMinMin",1e-9) : -std::numeric_limits<double>::infinity() ));
  }
  //@tag:[style.min,style.logMin,style.linMin,(style.logMinMin)] These argument tags determine the lower bound of the y axis in 1D plots. "style.min" is used unless the specific tag for the plot type (lin/log) is set. Additionally, "style.logMinMin" defaults to 1e-9 and acts as an additional lower bound; use with great care!
  tags.getTagDouble("style.min", min);
  if(logScale){
    tags.getTagDouble("style.logMin",min);
  } else {
    tags.getTagDouble("style.linMin",min);
  }

  if(logScale && min < tags.getTagDoubleDefault("style.logMinMin",1e-9) ) min = tags.getTagDoubleDefault("style.logMinMin",1e-9);

  double max_precise = this->getHistogramUpperLimit(tags, histograms,min,true);
  delete histograms;

  double max;
  if(max_precise <= 0 || !TQUtils::isNum(max_precise) || max_precise < min){
    max = std::max(2*min,10.);
    if(verbose) VERBOSEclass("using default range");
  } else {
    if(verbose) VERBOSEclass("using rounded range");
    max = TQUtils::roundAutoUp(max_precise);
  }

  if(verbose) VERBOSEclass("calculated y-axis range is %g < y < %g (%g)",min,max,max_precise);

  // the user might want to overwrite the automatic upper limit on the y axis
  tags.getTagDouble("style.max", max);
  double maxscale = 1.0;
  tags.getTagDouble("style.max.scale", maxscale);

  TH1* hMaster = this->getObject<TH1>("Graph_master");
  hMaster->SetMinimum(min);
  hMaster->SetMaximum(max * maxscale);

  //@tag:[style.xmin,style.xmax] Set custom x-axis range
  double xmin;
  double xmax;
  if (tags.getTagDouble("style.xmin", xmin)) {
    hMaster->GetXaxis()->SetRangeUser(xmin, TQHistogramUtils::getAxisXmax(hMaster));
    hTotalStack->GetXaxis()->SetRangeUser(xmin, TQHistogramUtils::getAxisXmax(hTotalStack));
  }
  if (tags.getTagDouble("style.xmax", xmax)) {
    hMaster->GetXaxis()->SetRangeUser(TQHistogramUtils::getAxisXmin(hMaster), xmax);
    hTotalStack->GetXaxis()->SetRangeUser(TQHistogramUtils::getAxisXmin(hTotalStack), xmax);
  }

  return !(max == 0);
}

//__________________________________________________________________________________|___________

bool TQROOTPlotter::calculateAxisRangesProfile(TQTaggable& tags){
  // calculate the axis ranges, taking into account the given block tags
  bool logScale = tags.getTagBoolDefault ("style.logScale",false );
  double logMin = tags.getTagDoubleDefault("style.logMin", -1.);
  bool drawData = tags.getTagBoolDefault ("style.drawData",true);
  bool verbose = tags.getTagBoolDefault("verbose",false);
  TString profileRange = tags.getTagStringDefault("style.profileRange","filtered"); //"full", "predefined", or "filtered"

  // Obtain data cuts if drawData is true
  std::vector<TString> showDataAtCuts;
  if (drawData) {
    tags.getTag("showDataAtCuts", showDataAtCuts);
  }

  // Check we're meant to draw for this cut.
  TString histogramTag = tags.getTagStringDefault("input.histogram", "");
  TString cutName(histogramTag(0, histogramTag.First('/')));
  bool drawDataThisCut = (showDataAtCuts.size() == 0);  
  if (std::find(showDataAtCuts.begin(), showDataAtCuts.end(), cutName) != showDataAtCuts.end()) {
    drawDataThisCut = true;
  }


  TList* histograms = new TList();
  
  double ymin = std::numeric_limits<double>::infinity();
  double xmin = std::numeric_limits<double>::infinity();
  double ymax = -std::numeric_limits<double>::infinity();
  double xmax = -std::numeric_limits<double>::infinity();
  double min,max;
  TQTaggableIterator itr(fProcesses);
  while(itr.hasNext()){
    TQNamedTaggable* process = itr.readNext();
    if(!process) continue;
    if(process->getTagBoolDefault(".isData",false) && (!drawData || !drawDataThisCut)) continue;
    TProfile * h = this->getObject<TProfile>(this->makeHistogramIdentifier(process));
    if(!h) continue;
    histograms->Add(h);
    ymin=std::min(ymin,h->GetYmin() );
    ymax=std::max(ymax,h->GetYmax() );
    xmin=std::min(xmin,h->GetXaxis()->GetXmin());
    xmax=std::max(xmax,h->GetXaxis()->GetXmax());
  }
  if (profileRange.EqualTo("filtered")) {
    TQHistogramUtils::getFilteredRange(histograms, xmin, xmax, ymin, ymax, min, max, logMin);
    min=std::max(min, ymin);
    max=std::min(max, ymax);
    if (min==ymax) min=ymin;
    if (max==ymin) max=ymax;
  } else if (profileRange.EqualTo("predefined")) {
    min=ymin;
    max=ymax;
  } else if (profileRange.EqualTo("full")){
    TQHistogramUtils::getUnFilteredRange(histograms, xmin, xmax, ymin, ymax, min, max);
  }
  
  if(logScale) min = std::max(min,tags.getTagDoubleDefault("style.logMinMin",1e-9));
  
  //rescale to avoid colliding with legend and labels
  int iBlock = 0;
  double block_y;
  double vetoFrac = 1;
  
  while(tags.getTagDouble(TString::Format("blocks.y.%d",iBlock),block_y)){
    //block_y is a (lowest) y1 coordinate of a block with legend/label
    //avoid the most intruding of all blocks
    vetoFrac = std::min(vetoFrac, block_y);
    iBlock++;
  }
  if (logScale) max = std::max(max, exp(log(max/min) / vetoFrac ) * min);
  else          max = std::max(max, (max - min) / vetoFrac + min);
  
  delete histograms;
  
  if(verbose) VERBOSEclass("calculated y-axis range is %g < y < %g",min,max);
  
  // the user might want to overwrite the automatic upper limit on the y axis
  tags.getTagDouble("style.max", max);
  double maxscale = 1.0;
  tags.getTagDouble("style.max.scale", maxscale);
  
  TProfile* hMaster = this->getObject<TProfile>("Graph_master");
  hMaster->SetMinimum(min);
  hMaster->SetMaximum(max * maxscale);
  
  return !(max == 0);
}

//__________________________________________________________________________________|___________

namespace {
  template<class T> size_t getN(T* obj);
  template<class T> bool getXY(T*obj,size_t i,double& x,double& y);

  template<> size_t getN<TGraphErrors>(TGraphErrors* obj){ return obj->GetN(); }
  template<> size_t getN<TGraph>(TGraph* obj){ return obj->GetN(); }
  template<> size_t getN<TH1>   (TH1* obj){ return obj->GetNbinsX(); }
  template<> bool getXY<TGraph> (TGraph* obj,size_t i,double& x,double& y){ return (i==(size_t)(obj->GetPoint(i,x,y))); }
  template<> bool getXY<TGraphErrors> (TGraphErrors* obj,size_t i,double& x,double& y){ return (i==(size_t)(obj->GetPoint(i,x,y))); }
  template<> bool getXY<TH1>    (TH1* obj,size_t i,double& x,double& y){ x=obj->GetBinCenter(i+1); y=obj->GetBinContent(i+1); return true; }
}

template<class T>
void TQROOTPlotter::drawArrows(TQTaggable &tags,T *obj, double yMin, double yMax){
  // Check if the red arrows should be drawn
  if(!tags.getTagBoolDefault("style.showArrows",true)) return;
  bool verbose = tags.getTagBoolDefault("verbose",false);

  size_t nBins = ::getN<T>(obj);

  double arrowLength = tags.getTagDoubleDefault ("style.arrowLength",0.12 ); // fraction of the y-range
  double arrowOffset = tags.getTagDoubleDefault ("style.arrowOffset",0.08 ); // fraction of the y-range
  int arrowLineWidth = tags.getTagIntegerDefault ("style.arrowLineWidth",2 );
  double arrowHeadSize = tags.getTagDoubleDefault ("style.arrowHeadSize",0.03 );
  double padRatio = tags.getTagDoubleDefault("geometry.sub.height",0.35);

  double canvasHeight = tags.getTagDoubleDefault("geometry.canvas.height",600.);
  double canvasWidth = tags.getTagDoubleDefault("geometry.canvas.width",600.);
  double frameWidthFrac = 1. - tags.getTagDoubleDefault("geometry.sub.margins.right",0.1) - tags.getTagDoubleDefault("geometry.sub.margins.left",0.1);
  double frameWidth = frameWidthFrac * canvasWidth;
  double arrowHeight = arrowHeadSize * canvasHeight;
  double binWidth = frameWidth / nBins;
  double alpha = 2*std::atan(binWidth/(2*arrowHeight)) * 180 / 3.1415926;

  double arrowHeadAngle = tags.getTagDoubleDefault ("style.arrowHeadAngle",std::min(60.,alpha));
  TString arrowType = tags.getTagStringDefault ("style.arrowType", "|>" ); // refer to TArrow
  int arrowColor = tags.getTagIntegerDefault ("style.arrowColor",kRed);

  double plrange = yMax - yMin;

  TArrow marker;
  marker.SetLineWidth(arrowLineWidth);
  marker.SetLineColor(arrowColor);
  marker.SetFillColor(arrowColor);
  marker.SetAngle(arrowHeadAngle);
  for(size_t i=0; i < nBins; ++i){
    double x; double y;
    if(!::getXY<T>(obj,i,x,y)) continue;
    if(y > yMax){
      marker.DrawArrow(x,
                       yMax - (arrowOffset+arrowLength)*plrange,
                       x,
                       yMax - (arrowOffset)*plrange,
                       arrowHeadSize*padRatio,
                       arrowType);
      if(verbose) VERBOSEclass("drawing marker for point %i, y > %f",i,yMax);
    }
    if(y < yMin && y != 0){
      marker.DrawArrow(x,
                       yMin + (arrowOffset+arrowLength)*plrange,
                       x,
                       yMin + arrowOffset*plrange,
                       arrowHeadSize*padRatio,
                       arrowType);
      if(verbose) VERBOSEclass("drawing marker for point %i, y < %f",i,yMin);
    }
  }
}

template void TQROOTPlotter::drawArrows<TGraph>(TQTaggable &tags,TGraph *obj, double yMin, double yMax);
template void TQROOTPlotter::drawArrows<TGraphErrors>(TQTaggable &tags,TGraphErrors *obj, double yMin, double yMax);
template void TQROOTPlotter::drawArrows<TH1>(TQTaggable &tags,TH1 *obj, double yMin, double yMax);
 TQROOTPlotter.cxx:1
 TQROOTPlotter.cxx:2
 TQROOTPlotter.cxx:3
 TQROOTPlotter.cxx:4
 TQROOTPlotter.cxx:5
 TQROOTPlotter.cxx:6
 TQROOTPlotter.cxx:7
 TQROOTPlotter.cxx:8
 TQROOTPlotter.cxx:9
 TQROOTPlotter.cxx:10
 TQROOTPlotter.cxx:11
 TQROOTPlotter.cxx:12
 TQROOTPlotter.cxx:13
 TQROOTPlotter.cxx:14
 TQROOTPlotter.cxx:15
 TQROOTPlotter.cxx:16
 TQROOTPlotter.cxx:17
 TQROOTPlotter.cxx:18
 TQROOTPlotter.cxx:19
 TQROOTPlotter.cxx:20
 TQROOTPlotter.cxx:21
 TQROOTPlotter.cxx:22
 TQROOTPlotter.cxx:23
 TQROOTPlotter.cxx:24
 TQROOTPlotter.cxx:25
 TQROOTPlotter.cxx:26
 TQROOTPlotter.cxx:27
 TQROOTPlotter.cxx:28
 TQROOTPlotter.cxx:29
 TQROOTPlotter.cxx:30
 TQROOTPlotter.cxx:31
 TQROOTPlotter.cxx:32
 TQROOTPlotter.cxx:33
 TQROOTPlotter.cxx:34
 TQROOTPlotter.cxx:35
 TQROOTPlotter.cxx:36
 TQROOTPlotter.cxx:37
 TQROOTPlotter.cxx:38
 TQROOTPlotter.cxx:39
 TQROOTPlotter.cxx:40
 TQROOTPlotter.cxx:41
 TQROOTPlotter.cxx:42
 TQROOTPlotter.cxx:43
 TQROOTPlotter.cxx:44
 TQROOTPlotter.cxx:45
 TQROOTPlotter.cxx:46
 TQROOTPlotter.cxx:47
 TQROOTPlotter.cxx:48
 TQROOTPlotter.cxx:49
 TQROOTPlotter.cxx:50
 TQROOTPlotter.cxx:51
 TQROOTPlotter.cxx:52
 TQROOTPlotter.cxx:53
 TQROOTPlotter.cxx:54
 TQROOTPlotter.cxx:55
 TQROOTPlotter.cxx:56
 TQROOTPlotter.cxx:57
 TQROOTPlotter.cxx:58
 TQROOTPlotter.cxx:59
 TQROOTPlotter.cxx:60
 TQROOTPlotter.cxx:61
 TQROOTPlotter.cxx:62
 TQROOTPlotter.cxx:63
 TQROOTPlotter.cxx:64
 TQROOTPlotter.cxx:65
 TQROOTPlotter.cxx:66
 TQROOTPlotter.cxx:67
 TQROOTPlotter.cxx:68
 TQROOTPlotter.cxx:69
 TQROOTPlotter.cxx:70
 TQROOTPlotter.cxx:71
 TQROOTPlotter.cxx:72
 TQROOTPlotter.cxx:73
 TQROOTPlotter.cxx:74
 TQROOTPlotter.cxx:75
 TQROOTPlotter.cxx:76
 TQROOTPlotter.cxx:77
 TQROOTPlotter.cxx:78
 TQROOTPlotter.cxx:79
 TQROOTPlotter.cxx:80
 TQROOTPlotter.cxx:81
 TQROOTPlotter.cxx:82
 TQROOTPlotter.cxx:83
 TQROOTPlotter.cxx:84
 TQROOTPlotter.cxx:85
 TQROOTPlotter.cxx:86
 TQROOTPlotter.cxx:87
 TQROOTPlotter.cxx:88
 TQROOTPlotter.cxx:89
 TQROOTPlotter.cxx:90
 TQROOTPlotter.cxx:91
 TQROOTPlotter.cxx:92
 TQROOTPlotter.cxx:93
 TQROOTPlotter.cxx:94
 TQROOTPlotter.cxx:95
 TQROOTPlotter.cxx:96
 TQROOTPlotter.cxx:97
 TQROOTPlotter.cxx:98
 TQROOTPlotter.cxx:99
 TQROOTPlotter.cxx:100
 TQROOTPlotter.cxx:101
 TQROOTPlotter.cxx:102
 TQROOTPlotter.cxx:103
 TQROOTPlotter.cxx:104
 TQROOTPlotter.cxx:105
 TQROOTPlotter.cxx:106
 TQROOTPlotter.cxx:107
 TQROOTPlotter.cxx:108
 TQROOTPlotter.cxx:109
 TQROOTPlotter.cxx:110
 TQROOTPlotter.cxx:111
 TQROOTPlotter.cxx:112
 TQROOTPlotter.cxx:113
 TQROOTPlotter.cxx:114
 TQROOTPlotter.cxx:115
 TQROOTPlotter.cxx:116
 TQROOTPlotter.cxx:117
 TQROOTPlotter.cxx:118
 TQROOTPlotter.cxx:119
 TQROOTPlotter.cxx:120
 TQROOTPlotter.cxx:121
 TQROOTPlotter.cxx:122
 TQROOTPlotter.cxx:123
 TQROOTPlotter.cxx:124
 TQROOTPlotter.cxx:125
 TQROOTPlotter.cxx:126
 TQROOTPlotter.cxx:127
 TQROOTPlotter.cxx:128
 TQROOTPlotter.cxx:129
 TQROOTPlotter.cxx:130
 TQROOTPlotter.cxx:131
 TQROOTPlotter.cxx:132
 TQROOTPlotter.cxx:133
 TQROOTPlotter.cxx:134
 TQROOTPlotter.cxx:135
 TQROOTPlotter.cxx:136
 TQROOTPlotter.cxx:137
 TQROOTPlotter.cxx:138
 TQROOTPlotter.cxx:139
 TQROOTPlotter.cxx:140
 TQROOTPlotter.cxx:141
 TQROOTPlotter.cxx:142
 TQROOTPlotter.cxx:143
 TQROOTPlotter.cxx:144
 TQROOTPlotter.cxx:145
 TQROOTPlotter.cxx:146
 TQROOTPlotter.cxx:147
 TQROOTPlotter.cxx:148
 TQROOTPlotter.cxx:149
 TQROOTPlotter.cxx:150
 TQROOTPlotter.cxx:151
 TQROOTPlotter.cxx:152
 TQROOTPlotter.cxx:153
 TQROOTPlotter.cxx:154
 TQROOTPlotter.cxx:155
 TQROOTPlotter.cxx:156
 TQROOTPlotter.cxx:157
 TQROOTPlotter.cxx:158
 TQROOTPlotter.cxx:159
 TQROOTPlotter.cxx:160
 TQROOTPlotter.cxx:161
 TQROOTPlotter.cxx:162
 TQROOTPlotter.cxx:163
 TQROOTPlotter.cxx:164
 TQROOTPlotter.cxx:165
 TQROOTPlotter.cxx:166
 TQROOTPlotter.cxx:167
 TQROOTPlotter.cxx:168
 TQROOTPlotter.cxx:169
 TQROOTPlotter.cxx:170
 TQROOTPlotter.cxx:171
 TQROOTPlotter.cxx:172
 TQROOTPlotter.cxx:173
 TQROOTPlotter.cxx:174
 TQROOTPlotter.cxx:175
 TQROOTPlotter.cxx:176
 TQROOTPlotter.cxx:177
 TQROOTPlotter.cxx:178
 TQROOTPlotter.cxx:179
 TQROOTPlotter.cxx:180
 TQROOTPlotter.cxx:181
 TQROOTPlotter.cxx:182
 TQROOTPlotter.cxx:183
 TQROOTPlotter.cxx:184
 TQROOTPlotter.cxx:185
 TQROOTPlotter.cxx:186
 TQROOTPlotter.cxx:187
 TQROOTPlotter.cxx:188
 TQROOTPlotter.cxx:189
 TQROOTPlotter.cxx:190
 TQROOTPlotter.cxx:191
 TQROOTPlotter.cxx:192
 TQROOTPlotter.cxx:193
 TQROOTPlotter.cxx:194
 TQROOTPlotter.cxx:195
 TQROOTPlotter.cxx:196
 TQROOTPlotter.cxx:197
 TQROOTPlotter.cxx:198
 TQROOTPlotter.cxx:199
 TQROOTPlotter.cxx:200
 TQROOTPlotter.cxx:201
 TQROOTPlotter.cxx:202
 TQROOTPlotter.cxx:203
 TQROOTPlotter.cxx:204
 TQROOTPlotter.cxx:205
 TQROOTPlotter.cxx:206
 TQROOTPlotter.cxx:207
 TQROOTPlotter.cxx:208
 TQROOTPlotter.cxx:209
 TQROOTPlotter.cxx:210
 TQROOTPlotter.cxx:211
 TQROOTPlotter.cxx:212
 TQROOTPlotter.cxx:213
 TQROOTPlotter.cxx:214
 TQROOTPlotter.cxx:215
 TQROOTPlotter.cxx:216
 TQROOTPlotter.cxx:217
 TQROOTPlotter.cxx:218
 TQROOTPlotter.cxx:219
 TQROOTPlotter.cxx:220
 TQROOTPlotter.cxx:221
 TQROOTPlotter.cxx:222
 TQROOTPlotter.cxx:223
 TQROOTPlotter.cxx:224
 TQROOTPlotter.cxx:225
 TQROOTPlotter.cxx:226
 TQROOTPlotter.cxx:227
 TQROOTPlotter.cxx:228
 TQROOTPlotter.cxx:229
 TQROOTPlotter.cxx:230
 TQROOTPlotter.cxx:231
 TQROOTPlotter.cxx:232
 TQROOTPlotter.cxx:233
 TQROOTPlotter.cxx:234
 TQROOTPlotter.cxx:235
 TQROOTPlotter.cxx:236
 TQROOTPlotter.cxx:237
 TQROOTPlotter.cxx:238
 TQROOTPlotter.cxx:239
 TQROOTPlotter.cxx:240
 TQROOTPlotter.cxx:241
 TQROOTPlotter.cxx:242
 TQROOTPlotter.cxx:243
 TQROOTPlotter.cxx:244
 TQROOTPlotter.cxx:245
 TQROOTPlotter.cxx:246
 TQROOTPlotter.cxx:247
 TQROOTPlotter.cxx:248
 TQROOTPlotter.cxx:249
 TQROOTPlotter.cxx:250
 TQROOTPlotter.cxx:251
 TQROOTPlotter.cxx:252
 TQROOTPlotter.cxx:253
 TQROOTPlotter.cxx:254
 TQROOTPlotter.cxx:255
 TQROOTPlotter.cxx:256
 TQROOTPlotter.cxx:257
 TQROOTPlotter.cxx:258
 TQROOTPlotter.cxx:259
 TQROOTPlotter.cxx:260
 TQROOTPlotter.cxx:261
 TQROOTPlotter.cxx:262
 TQROOTPlotter.cxx:263
 TQROOTPlotter.cxx:264
 TQROOTPlotter.cxx:265
 TQROOTPlotter.cxx:266
 TQROOTPlotter.cxx:267
 TQROOTPlotter.cxx:268
 TQROOTPlotter.cxx:269
 TQROOTPlotter.cxx:270
 TQROOTPlotter.cxx:271
 TQROOTPlotter.cxx:272
 TQROOTPlotter.cxx:273
 TQROOTPlotter.cxx:274
 TQROOTPlotter.cxx:275
 TQROOTPlotter.cxx:276
 TQROOTPlotter.cxx:277
 TQROOTPlotter.cxx:278
 TQROOTPlotter.cxx:279
 TQROOTPlotter.cxx:280
 TQROOTPlotter.cxx:281
 TQROOTPlotter.cxx:282
 TQROOTPlotter.cxx:283
 TQROOTPlotter.cxx:284
 TQROOTPlotter.cxx:285
 TQROOTPlotter.cxx:286
 TQROOTPlotter.cxx:287
 TQROOTPlotter.cxx:288
 TQROOTPlotter.cxx:289
 TQROOTPlotter.cxx:290
 TQROOTPlotter.cxx:291
 TQROOTPlotter.cxx:292
 TQROOTPlotter.cxx:293
 TQROOTPlotter.cxx:294
 TQROOTPlotter.cxx:295
 TQROOTPlotter.cxx:296
 TQROOTPlotter.cxx:297
 TQROOTPlotter.cxx:298
 TQROOTPlotter.cxx:299
 TQROOTPlotter.cxx:300
 TQROOTPlotter.cxx:301
 TQROOTPlotter.cxx:302
 TQROOTPlotter.cxx:303
 TQROOTPlotter.cxx:304
 TQROOTPlotter.cxx:305
 TQROOTPlotter.cxx:306
 TQROOTPlotter.cxx:307
 TQROOTPlotter.cxx:308
 TQROOTPlotter.cxx:309
 TQROOTPlotter.cxx:310
 TQROOTPlotter.cxx:311
 TQROOTPlotter.cxx:312
 TQROOTPlotter.cxx:313
 TQROOTPlotter.cxx:314
 TQROOTPlotter.cxx:315
 TQROOTPlotter.cxx:316
 TQROOTPlotter.cxx:317
 TQROOTPlotter.cxx:318
 TQROOTPlotter.cxx:319
 TQROOTPlotter.cxx:320
 TQROOTPlotter.cxx:321
 TQROOTPlotter.cxx:322
 TQROOTPlotter.cxx:323
 TQROOTPlotter.cxx:324
 TQROOTPlotter.cxx:325
 TQROOTPlotter.cxx:326
 TQROOTPlotter.cxx:327
 TQROOTPlotter.cxx:328
 TQROOTPlotter.cxx:329
 TQROOTPlotter.cxx:330
 TQROOTPlotter.cxx:331
 TQROOTPlotter.cxx:332
 TQROOTPlotter.cxx:333
 TQROOTPlotter.cxx:334
 TQROOTPlotter.cxx:335
 TQROOTPlotter.cxx:336
 TQROOTPlotter.cxx:337
 TQROOTPlotter.cxx:338
 TQROOTPlotter.cxx:339
 TQROOTPlotter.cxx:340
 TQROOTPlotter.cxx:341
 TQROOTPlotter.cxx:342
 TQROOTPlotter.cxx:343
 TQROOTPlotter.cxx:344
 TQROOTPlotter.cxx:345
 TQROOTPlotter.cxx:346
 TQROOTPlotter.cxx:347
 TQROOTPlotter.cxx:348
 TQROOTPlotter.cxx:349
 TQROOTPlotter.cxx:350
 TQROOTPlotter.cxx:351
 TQROOTPlotter.cxx:352
 TQROOTPlotter.cxx:353
 TQROOTPlotter.cxx:354
 TQROOTPlotter.cxx:355
 TQROOTPlotter.cxx:356
 TQROOTPlotter.cxx:357
 TQROOTPlotter.cxx:358
 TQROOTPlotter.cxx:359
 TQROOTPlotter.cxx:360
 TQROOTPlotter.cxx:361
 TQROOTPlotter.cxx:362
 TQROOTPlotter.cxx:363
 TQROOTPlotter.cxx:364
 TQROOTPlotter.cxx:365
 TQROOTPlotter.cxx:366
 TQROOTPlotter.cxx:367
 TQROOTPlotter.cxx:368
 TQROOTPlotter.cxx:369
 TQROOTPlotter.cxx:370
 TQROOTPlotter.cxx:371
 TQROOTPlotter.cxx:372
 TQROOTPlotter.cxx:373
 TQROOTPlotter.cxx:374
 TQROOTPlotter.cxx:375
 TQROOTPlotter.cxx:376
 TQROOTPlotter.cxx:377
 TQROOTPlotter.cxx:378
 TQROOTPlotter.cxx:379
 TQROOTPlotter.cxx:380
 TQROOTPlotter.cxx:381
 TQROOTPlotter.cxx:382
 TQROOTPlotter.cxx:383
 TQROOTPlotter.cxx:384
 TQROOTPlotter.cxx:385
 TQROOTPlotter.cxx:386
 TQROOTPlotter.cxx:387
 TQROOTPlotter.cxx:388
 TQROOTPlotter.cxx:389
 TQROOTPlotter.cxx:390
 TQROOTPlotter.cxx:391
 TQROOTPlotter.cxx:392
 TQROOTPlotter.cxx:393
 TQROOTPlotter.cxx:394
 TQROOTPlotter.cxx:395
 TQROOTPlotter.cxx:396
 TQROOTPlotter.cxx:397
 TQROOTPlotter.cxx:398
 TQROOTPlotter.cxx:399
 TQROOTPlotter.cxx:400
 TQROOTPlotter.cxx:401
 TQROOTPlotter.cxx:402
 TQROOTPlotter.cxx:403
 TQROOTPlotter.cxx:404
 TQROOTPlotter.cxx:405
 TQROOTPlotter.cxx:406
 TQROOTPlotter.cxx:407
 TQROOTPlotter.cxx:408
 TQROOTPlotter.cxx:409
 TQROOTPlotter.cxx:410
 TQROOTPlotter.cxx:411
 TQROOTPlotter.cxx:412
 TQROOTPlotter.cxx:413
 TQROOTPlotter.cxx:414
 TQROOTPlotter.cxx:415
 TQROOTPlotter.cxx:416
 TQROOTPlotter.cxx:417
 TQROOTPlotter.cxx:418
 TQROOTPlotter.cxx:419
 TQROOTPlotter.cxx:420
 TQROOTPlotter.cxx:421
 TQROOTPlotter.cxx:422
 TQROOTPlotter.cxx:423
 TQROOTPlotter.cxx:424
 TQROOTPlotter.cxx:425
 TQROOTPlotter.cxx:426
 TQROOTPlotter.cxx:427
 TQROOTPlotter.cxx:428
 TQROOTPlotter.cxx:429
 TQROOTPlotter.cxx:430
 TQROOTPlotter.cxx:431
 TQROOTPlotter.cxx:432
 TQROOTPlotter.cxx:433
 TQROOTPlotter.cxx:434
 TQROOTPlotter.cxx:435
 TQROOTPlotter.cxx:436
 TQROOTPlotter.cxx:437
 TQROOTPlotter.cxx:438
 TQROOTPlotter.cxx:439
 TQROOTPlotter.cxx:440
 TQROOTPlotter.cxx:441
 TQROOTPlotter.cxx:442
 TQROOTPlotter.cxx:443
 TQROOTPlotter.cxx:444
 TQROOTPlotter.cxx:445
 TQROOTPlotter.cxx:446
 TQROOTPlotter.cxx:447
 TQROOTPlotter.cxx:448
 TQROOTPlotter.cxx:449
 TQROOTPlotter.cxx:450
 TQROOTPlotter.cxx:451
 TQROOTPlotter.cxx:452
 TQROOTPlotter.cxx:453
 TQROOTPlotter.cxx:454
 TQROOTPlotter.cxx:455
 TQROOTPlotter.cxx:456
 TQROOTPlotter.cxx:457
 TQROOTPlotter.cxx:458
 TQROOTPlotter.cxx:459
 TQROOTPlotter.cxx:460
 TQROOTPlotter.cxx:461
 TQROOTPlotter.cxx:462
 TQROOTPlotter.cxx:463
 TQROOTPlotter.cxx:464
 TQROOTPlotter.cxx:465
 TQROOTPlotter.cxx:466
 TQROOTPlotter.cxx:467
 TQROOTPlotter.cxx:468
 TQROOTPlotter.cxx:469
 TQROOTPlotter.cxx:470
 TQROOTPlotter.cxx:471
 TQROOTPlotter.cxx:472
 TQROOTPlotter.cxx:473
 TQROOTPlotter.cxx:474
 TQROOTPlotter.cxx:475
 TQROOTPlotter.cxx:476
 TQROOTPlotter.cxx:477
 TQROOTPlotter.cxx:478
 TQROOTPlotter.cxx:479
 TQROOTPlotter.cxx:480
 TQROOTPlotter.cxx:481
 TQROOTPlotter.cxx:482
 TQROOTPlotter.cxx:483
 TQROOTPlotter.cxx:484
 TQROOTPlotter.cxx:485
 TQROOTPlotter.cxx:486
 TQROOTPlotter.cxx:487
 TQROOTPlotter.cxx:488
 TQROOTPlotter.cxx:489
 TQROOTPlotter.cxx:490
 TQROOTPlotter.cxx:491
 TQROOTPlotter.cxx:492
 TQROOTPlotter.cxx:493
 TQROOTPlotter.cxx:494
 TQROOTPlotter.cxx:495
 TQROOTPlotter.cxx:496
 TQROOTPlotter.cxx:497
 TQROOTPlotter.cxx:498
 TQROOTPlotter.cxx:499
 TQROOTPlotter.cxx:500
 TQROOTPlotter.cxx:501
 TQROOTPlotter.cxx:502
 TQROOTPlotter.cxx:503
 TQROOTPlotter.cxx:504
 TQROOTPlotter.cxx:505
 TQROOTPlotter.cxx:506
 TQROOTPlotter.cxx:507
 TQROOTPlotter.cxx:508
 TQROOTPlotter.cxx:509
 TQROOTPlotter.cxx:510
 TQROOTPlotter.cxx:511
 TQROOTPlotter.cxx:512
 TQROOTPlotter.cxx:513
 TQROOTPlotter.cxx:514
 TQROOTPlotter.cxx:515
 TQROOTPlotter.cxx:516
 TQROOTPlotter.cxx:517
 TQROOTPlotter.cxx:518
 TQROOTPlotter.cxx:519
 TQROOTPlotter.cxx:520
 TQROOTPlotter.cxx:521
 TQROOTPlotter.cxx:522
 TQROOTPlotter.cxx:523
 TQROOTPlotter.cxx:524
 TQROOTPlotter.cxx:525
 TQROOTPlotter.cxx:526
 TQROOTPlotter.cxx:527
 TQROOTPlotter.cxx:528
 TQROOTPlotter.cxx:529
 TQROOTPlotter.cxx:530
 TQROOTPlotter.cxx:531
 TQROOTPlotter.cxx:532
 TQROOTPlotter.cxx:533
 TQROOTPlotter.cxx:534
 TQROOTPlotter.cxx:535
 TQROOTPlotter.cxx:536
 TQROOTPlotter.cxx:537
 TQROOTPlotter.cxx:538
 TQROOTPlotter.cxx:539
 TQROOTPlotter.cxx:540
 TQROOTPlotter.cxx:541
 TQROOTPlotter.cxx:542
 TQROOTPlotter.cxx:543
 TQROOTPlotter.cxx:544
 TQROOTPlotter.cxx:545
 TQROOTPlotter.cxx:546
 TQROOTPlotter.cxx:547
 TQROOTPlotter.cxx:548
 TQROOTPlotter.cxx:549
 TQROOTPlotter.cxx:550
 TQROOTPlotter.cxx:551
 TQROOTPlotter.cxx:552
 TQROOTPlotter.cxx:553
 TQROOTPlotter.cxx:554
 TQROOTPlotter.cxx:555
 TQROOTPlotter.cxx:556
 TQROOTPlotter.cxx:557
 TQROOTPlotter.cxx:558
 TQROOTPlotter.cxx:559
 TQROOTPlotter.cxx:560
 TQROOTPlotter.cxx:561
 TQROOTPlotter.cxx:562
 TQROOTPlotter.cxx:563
 TQROOTPlotter.cxx:564
 TQROOTPlotter.cxx:565
 TQROOTPlotter.cxx:566
 TQROOTPlotter.cxx:567
 TQROOTPlotter.cxx:568
 TQROOTPlotter.cxx:569
 TQROOTPlotter.cxx:570
 TQROOTPlotter.cxx:571
 TQROOTPlotter.cxx:572
 TQROOTPlotter.cxx:573
 TQROOTPlotter.cxx:574
 TQROOTPlotter.cxx:575
 TQROOTPlotter.cxx:576
 TQROOTPlotter.cxx:577
 TQROOTPlotter.cxx:578
 TQROOTPlotter.cxx:579
 TQROOTPlotter.cxx:580
 TQROOTPlotter.cxx:581
 TQROOTPlotter.cxx:582
 TQROOTPlotter.cxx:583
 TQROOTPlotter.cxx:584
 TQROOTPlotter.cxx:585
 TQROOTPlotter.cxx:586
 TQROOTPlotter.cxx:587
 TQROOTPlotter.cxx:588
 TQROOTPlotter.cxx:589
 TQROOTPlotter.cxx:590
 TQROOTPlotter.cxx:591
 TQROOTPlotter.cxx:592
 TQROOTPlotter.cxx:593
 TQROOTPlotter.cxx:594
 TQROOTPlotter.cxx:595
 TQROOTPlotter.cxx:596
 TQROOTPlotter.cxx:597
 TQROOTPlotter.cxx:598
 TQROOTPlotter.cxx:599
 TQROOTPlotter.cxx:600
 TQROOTPlotter.cxx:601
 TQROOTPlotter.cxx:602
 TQROOTPlotter.cxx:603
 TQROOTPlotter.cxx:604
 TQROOTPlotter.cxx:605
 TQROOTPlotter.cxx:606
 TQROOTPlotter.cxx:607
 TQROOTPlotter.cxx:608
 TQROOTPlotter.cxx:609
 TQROOTPlotter.cxx:610
 TQROOTPlotter.cxx:611
 TQROOTPlotter.cxx:612
 TQROOTPlotter.cxx:613
 TQROOTPlotter.cxx:614
 TQROOTPlotter.cxx:615
 TQROOTPlotter.cxx:616
 TQROOTPlotter.cxx:617
 TQROOTPlotter.cxx:618
 TQROOTPlotter.cxx:619
 TQROOTPlotter.cxx:620
 TQROOTPlotter.cxx:621
 TQROOTPlotter.cxx:622
 TQROOTPlotter.cxx:623
 TQROOTPlotter.cxx:624
 TQROOTPlotter.cxx:625
 TQROOTPlotter.cxx:626
 TQROOTPlotter.cxx:627
 TQROOTPlotter.cxx:628
 TQROOTPlotter.cxx:629
 TQROOTPlotter.cxx:630
 TQROOTPlotter.cxx:631
 TQROOTPlotter.cxx:632
 TQROOTPlotter.cxx:633
 TQROOTPlotter.cxx:634
 TQROOTPlotter.cxx:635
 TQROOTPlotter.cxx:636
 TQROOTPlotter.cxx:637
 TQROOTPlotter.cxx:638
 TQROOTPlotter.cxx:639
 TQROOTPlotter.cxx:640
 TQROOTPlotter.cxx:641
 TQROOTPlotter.cxx:642
 TQROOTPlotter.cxx:643
 TQROOTPlotter.cxx:644
 TQROOTPlotter.cxx:645
 TQROOTPlotter.cxx:646
 TQROOTPlotter.cxx:647
 TQROOTPlotter.cxx:648
 TQROOTPlotter.cxx:649
 TQROOTPlotter.cxx:650
 TQROOTPlotter.cxx:651
 TQROOTPlotter.cxx:652
 TQROOTPlotter.cxx:653
 TQROOTPlotter.cxx:654
 TQROOTPlotter.cxx:655
 TQROOTPlotter.cxx:656
 TQROOTPlotter.cxx:657
 TQROOTPlotter.cxx:658
 TQROOTPlotter.cxx:659
 TQROOTPlotter.cxx:660
 TQROOTPlotter.cxx:661
 TQROOTPlotter.cxx:662
 TQROOTPlotter.cxx:663
 TQROOTPlotter.cxx:664
 TQROOTPlotter.cxx:665
 TQROOTPlotter.cxx:666
 TQROOTPlotter.cxx:667
 TQROOTPlotter.cxx:668
 TQROOTPlotter.cxx:669
 TQROOTPlotter.cxx:670
 TQROOTPlotter.cxx:671
 TQROOTPlotter.cxx:672
 TQROOTPlotter.cxx:673
 TQROOTPlotter.cxx:674
 TQROOTPlotter.cxx:675
 TQROOTPlotter.cxx:676
 TQROOTPlotter.cxx:677
 TQROOTPlotter.cxx:678
 TQROOTPlotter.cxx:679
 TQROOTPlotter.cxx:680
 TQROOTPlotter.cxx:681
 TQROOTPlotter.cxx:682
 TQROOTPlotter.cxx:683
 TQROOTPlotter.cxx:684
 TQROOTPlotter.cxx:685
 TQROOTPlotter.cxx:686
 TQROOTPlotter.cxx:687
 TQROOTPlotter.cxx:688
 TQROOTPlotter.cxx:689
 TQROOTPlotter.cxx:690
 TQROOTPlotter.cxx:691
 TQROOTPlotter.cxx:692
 TQROOTPlotter.cxx:693
 TQROOTPlotter.cxx:694
 TQROOTPlotter.cxx:695
 TQROOTPlotter.cxx:696
 TQROOTPlotter.cxx:697
 TQROOTPlotter.cxx:698
 TQROOTPlotter.cxx:699
 TQROOTPlotter.cxx:700
 TQROOTPlotter.cxx:701
 TQROOTPlotter.cxx:702
 TQROOTPlotter.cxx:703
 TQROOTPlotter.cxx:704
 TQROOTPlotter.cxx:705
 TQROOTPlotter.cxx:706
 TQROOTPlotter.cxx:707
 TQROOTPlotter.cxx:708
 TQROOTPlotter.cxx:709
 TQROOTPlotter.cxx:710
 TQROOTPlotter.cxx:711
 TQROOTPlotter.cxx:712
 TQROOTPlotter.cxx:713
 TQROOTPlotter.cxx:714
 TQROOTPlotter.cxx:715
 TQROOTPlotter.cxx:716
 TQROOTPlotter.cxx:717
 TQROOTPlotter.cxx:718
 TQROOTPlotter.cxx:719
 TQROOTPlotter.cxx:720
 TQROOTPlotter.cxx:721
 TQROOTPlotter.cxx:722
 TQROOTPlotter.cxx:723
 TQROOTPlotter.cxx:724
 TQROOTPlotter.cxx:725
 TQROOTPlotter.cxx:726
 TQROOTPlotter.cxx:727
 TQROOTPlotter.cxx:728
 TQROOTPlotter.cxx:729
 TQROOTPlotter.cxx:730
 TQROOTPlotter.cxx:731
 TQROOTPlotter.cxx:732
 TQROOTPlotter.cxx:733
 TQROOTPlotter.cxx:734
 TQROOTPlotter.cxx:735
 TQROOTPlotter.cxx:736
 TQROOTPlotter.cxx:737
 TQROOTPlotter.cxx:738
 TQROOTPlotter.cxx:739
 TQROOTPlotter.cxx:740
 TQROOTPlotter.cxx:741
 TQROOTPlotter.cxx:742
 TQROOTPlotter.cxx:743
 TQROOTPlotter.cxx:744
 TQROOTPlotter.cxx:745
 TQROOTPlotter.cxx:746
 TQROOTPlotter.cxx:747
 TQROOTPlotter.cxx:748
 TQROOTPlotter.cxx:749
 TQROOTPlotter.cxx:750
 TQROOTPlotter.cxx:751
 TQROOTPlotter.cxx:752
 TQROOTPlotter.cxx:753
 TQROOTPlotter.cxx:754
 TQROOTPlotter.cxx:755
 TQROOTPlotter.cxx:756
 TQROOTPlotter.cxx:757
 TQROOTPlotter.cxx:758
 TQROOTPlotter.cxx:759
 TQROOTPlotter.cxx:760
 TQROOTPlotter.cxx:761
 TQROOTPlotter.cxx:762
 TQROOTPlotter.cxx:763
 TQROOTPlotter.cxx:764
 TQROOTPlotter.cxx:765
 TQROOTPlotter.cxx:766
 TQROOTPlotter.cxx:767
 TQROOTPlotter.cxx:768
 TQROOTPlotter.cxx:769
 TQROOTPlotter.cxx:770
 TQROOTPlotter.cxx:771
 TQROOTPlotter.cxx:772
 TQROOTPlotter.cxx:773
 TQROOTPlotter.cxx:774
 TQROOTPlotter.cxx:775
 TQROOTPlotter.cxx:776
 TQROOTPlotter.cxx:777
 TQROOTPlotter.cxx:778
 TQROOTPlotter.cxx:779
 TQROOTPlotter.cxx:780
 TQROOTPlotter.cxx:781
 TQROOTPlotter.cxx:782
 TQROOTPlotter.cxx:783
 TQROOTPlotter.cxx:784
 TQROOTPlotter.cxx:785
 TQROOTPlotter.cxx:786
 TQROOTPlotter.cxx:787
 TQROOTPlotter.cxx:788
 TQROOTPlotter.cxx:789
 TQROOTPlotter.cxx:790
 TQROOTPlotter.cxx:791
 TQROOTPlotter.cxx:792
 TQROOTPlotter.cxx:793
 TQROOTPlotter.cxx:794
 TQROOTPlotter.cxx:795
 TQROOTPlotter.cxx:796
 TQROOTPlotter.cxx:797
 TQROOTPlotter.cxx:798
 TQROOTPlotter.cxx:799
 TQROOTPlotter.cxx:800
 TQROOTPlotter.cxx:801
 TQROOTPlotter.cxx:802
 TQROOTPlotter.cxx:803
 TQROOTPlotter.cxx:804
 TQROOTPlotter.cxx:805
 TQROOTPlotter.cxx:806
 TQROOTPlotter.cxx:807
 TQROOTPlotter.cxx:808
 TQROOTPlotter.cxx:809
 TQROOTPlotter.cxx:810
 TQROOTPlotter.cxx:811
 TQROOTPlotter.cxx:812
 TQROOTPlotter.cxx:813
 TQROOTPlotter.cxx:814
 TQROOTPlotter.cxx:815
 TQROOTPlotter.cxx:816
 TQROOTPlotter.cxx:817
 TQROOTPlotter.cxx:818
 TQROOTPlotter.cxx:819
 TQROOTPlotter.cxx:820
 TQROOTPlotter.cxx:821
 TQROOTPlotter.cxx:822
 TQROOTPlotter.cxx:823
 TQROOTPlotter.cxx:824
 TQROOTPlotter.cxx:825
 TQROOTPlotter.cxx:826
 TQROOTPlotter.cxx:827
 TQROOTPlotter.cxx:828
 TQROOTPlotter.cxx:829
 TQROOTPlotter.cxx:830
 TQROOTPlotter.cxx:831
 TQROOTPlotter.cxx:832
 TQROOTPlotter.cxx:833
 TQROOTPlotter.cxx:834
 TQROOTPlotter.cxx:835
 TQROOTPlotter.cxx:836
 TQROOTPlotter.cxx:837
 TQROOTPlotter.cxx:838
 TQROOTPlotter.cxx:839
 TQROOTPlotter.cxx:840
 TQROOTPlotter.cxx:841
 TQROOTPlotter.cxx:842
 TQROOTPlotter.cxx:843
 TQROOTPlotter.cxx:844
 TQROOTPlotter.cxx:845
 TQROOTPlotter.cxx:846
 TQROOTPlotter.cxx:847
 TQROOTPlotter.cxx:848
 TQROOTPlotter.cxx:849
 TQROOTPlotter.cxx:850
 TQROOTPlotter.cxx:851
 TQROOTPlotter.cxx:852
 TQROOTPlotter.cxx:853
 TQROOTPlotter.cxx:854
 TQROOTPlotter.cxx:855
 TQROOTPlotter.cxx:856
 TQROOTPlotter.cxx:857
 TQROOTPlotter.cxx:858
 TQROOTPlotter.cxx:859
 TQROOTPlotter.cxx:860
 TQROOTPlotter.cxx:861
 TQROOTPlotter.cxx:862
 TQROOTPlotter.cxx:863
 TQROOTPlotter.cxx:864
 TQROOTPlotter.cxx:865
 TQROOTPlotter.cxx:866
 TQROOTPlotter.cxx:867
 TQROOTPlotter.cxx:868
 TQROOTPlotter.cxx:869
 TQROOTPlotter.cxx:870
 TQROOTPlotter.cxx:871
 TQROOTPlotter.cxx:872
 TQROOTPlotter.cxx:873
 TQROOTPlotter.cxx:874
 TQROOTPlotter.cxx:875
 TQROOTPlotter.cxx:876
 TQROOTPlotter.cxx:877
 TQROOTPlotter.cxx:878
 TQROOTPlotter.cxx:879
 TQROOTPlotter.cxx:880
 TQROOTPlotter.cxx:881
 TQROOTPlotter.cxx:882
 TQROOTPlotter.cxx:883
 TQROOTPlotter.cxx:884
 TQROOTPlotter.cxx:885
 TQROOTPlotter.cxx:886
 TQROOTPlotter.cxx:887
 TQROOTPlotter.cxx:888
 TQROOTPlotter.cxx:889
 TQROOTPlotter.cxx:890
 TQROOTPlotter.cxx:891
 TQROOTPlotter.cxx:892
 TQROOTPlotter.cxx:893
 TQROOTPlotter.cxx:894
 TQROOTPlotter.cxx:895
 TQROOTPlotter.cxx:896
 TQROOTPlotter.cxx:897
 TQROOTPlotter.cxx:898
 TQROOTPlotter.cxx:899
 TQROOTPlotter.cxx:900
 TQROOTPlotter.cxx:901
 TQROOTPlotter.cxx:902
 TQROOTPlotter.cxx:903
 TQROOTPlotter.cxx:904
 TQROOTPlotter.cxx:905
 TQROOTPlotter.cxx:906
 TQROOTPlotter.cxx:907
 TQROOTPlotter.cxx:908
 TQROOTPlotter.cxx:909
 TQROOTPlotter.cxx:910
 TQROOTPlotter.cxx:911
 TQROOTPlotter.cxx:912
 TQROOTPlotter.cxx:913
 TQROOTPlotter.cxx:914
 TQROOTPlotter.cxx:915
 TQROOTPlotter.cxx:916
 TQROOTPlotter.cxx:917
 TQROOTPlotter.cxx:918
 TQROOTPlotter.cxx:919
 TQROOTPlotter.cxx:920
 TQROOTPlotter.cxx:921
 TQROOTPlotter.cxx:922
 TQROOTPlotter.cxx:923
 TQROOTPlotter.cxx:924
 TQROOTPlotter.cxx:925
 TQROOTPlotter.cxx:926
 TQROOTPlotter.cxx:927
 TQROOTPlotter.cxx:928
 TQROOTPlotter.cxx:929
 TQROOTPlotter.cxx:930
 TQROOTPlotter.cxx:931
 TQROOTPlotter.cxx:932
 TQROOTPlotter.cxx:933
 TQROOTPlotter.cxx:934
 TQROOTPlotter.cxx:935
 TQROOTPlotter.cxx:936
 TQROOTPlotter.cxx:937
 TQROOTPlotter.cxx:938
 TQROOTPlotter.cxx:939
 TQROOTPlotter.cxx:940
 TQROOTPlotter.cxx:941
 TQROOTPlotter.cxx:942
 TQROOTPlotter.cxx:943
 TQROOTPlotter.cxx:944
 TQROOTPlotter.cxx:945
 TQROOTPlotter.cxx:946
 TQROOTPlotter.cxx:947
 TQROOTPlotter.cxx:948
 TQROOTPlotter.cxx:949
 TQROOTPlotter.cxx:950
 TQROOTPlotter.cxx:951
 TQROOTPlotter.cxx:952
 TQROOTPlotter.cxx:953
 TQROOTPlotter.cxx:954
 TQROOTPlotter.cxx:955
 TQROOTPlotter.cxx:956
 TQROOTPlotter.cxx:957
 TQROOTPlotter.cxx:958
 TQROOTPlotter.cxx:959
 TQROOTPlotter.cxx:960
 TQROOTPlotter.cxx:961
 TQROOTPlotter.cxx:962
 TQROOTPlotter.cxx:963
 TQROOTPlotter.cxx:964
 TQROOTPlotter.cxx:965
 TQROOTPlotter.cxx:966
 TQROOTPlotter.cxx:967
 TQROOTPlotter.cxx:968
 TQROOTPlotter.cxx:969
 TQROOTPlotter.cxx:970
 TQROOTPlotter.cxx:971
 TQROOTPlotter.cxx:972
 TQROOTPlotter.cxx:973
 TQROOTPlotter.cxx:974
 TQROOTPlotter.cxx:975
 TQROOTPlotter.cxx:976
 TQROOTPlotter.cxx:977
 TQROOTPlotter.cxx:978
 TQROOTPlotter.cxx:979
 TQROOTPlotter.cxx:980
 TQROOTPlotter.cxx:981
 TQROOTPlotter.cxx:982
 TQROOTPlotter.cxx:983
 TQROOTPlotter.cxx:984
 TQROOTPlotter.cxx:985
 TQROOTPlotter.cxx:986
 TQROOTPlotter.cxx:987
 TQROOTPlotter.cxx:988
 TQROOTPlotter.cxx:989
 TQROOTPlotter.cxx:990
 TQROOTPlotter.cxx:991
 TQROOTPlotter.cxx:992
 TQROOTPlotter.cxx:993
 TQROOTPlotter.cxx:994
 TQROOTPlotter.cxx:995
 TQROOTPlotter.cxx:996
 TQROOTPlotter.cxx:997
 TQROOTPlotter.cxx:998
 TQROOTPlotter.cxx:999
 TQROOTPlotter.cxx:1000
 TQROOTPlotter.cxx:1001
 TQROOTPlotter.cxx:1002
 TQROOTPlotter.cxx:1003
 TQROOTPlotter.cxx:1004
 TQROOTPlotter.cxx:1005
 TQROOTPlotter.cxx:1006
 TQROOTPlotter.cxx:1007
 TQROOTPlotter.cxx:1008
 TQROOTPlotter.cxx:1009
 TQROOTPlotter.cxx:1010
 TQROOTPlotter.cxx:1011
 TQROOTPlotter.cxx:1012
 TQROOTPlotter.cxx:1013
 TQROOTPlotter.cxx:1014
 TQROOTPlotter.cxx:1015
 TQROOTPlotter.cxx:1016
 TQROOTPlotter.cxx:1017
 TQROOTPlotter.cxx:1018
 TQROOTPlotter.cxx:1019
 TQROOTPlotter.cxx:1020
 TQROOTPlotter.cxx:1021
 TQROOTPlotter.cxx:1022
 TQROOTPlotter.cxx:1023
 TQROOTPlotter.cxx:1024
 TQROOTPlotter.cxx:1025
 TQROOTPlotter.cxx:1026
 TQROOTPlotter.cxx:1027
 TQROOTPlotter.cxx:1028
 TQROOTPlotter.cxx:1029
 TQROOTPlotter.cxx:1030
 TQROOTPlotter.cxx:1031
 TQROOTPlotter.cxx:1032
 TQROOTPlotter.cxx:1033
 TQROOTPlotter.cxx:1034
 TQROOTPlotter.cxx:1035
 TQROOTPlotter.cxx:1036
 TQROOTPlotter.cxx:1037
 TQROOTPlotter.cxx:1038
 TQROOTPlotter.cxx:1039
 TQROOTPlotter.cxx:1040
 TQROOTPlotter.cxx:1041
 TQROOTPlotter.cxx:1042
 TQROOTPlotter.cxx:1043
 TQROOTPlotter.cxx:1044
 TQROOTPlotter.cxx:1045
 TQROOTPlotter.cxx:1046
 TQROOTPlotter.cxx:1047
 TQROOTPlotter.cxx:1048
 TQROOTPlotter.cxx:1049
 TQROOTPlotter.cxx:1050
 TQROOTPlotter.cxx:1051
 TQROOTPlotter.cxx:1052
 TQROOTPlotter.cxx:1053
 TQROOTPlotter.cxx:1054
 TQROOTPlotter.cxx:1055
 TQROOTPlotter.cxx:1056
 TQROOTPlotter.cxx:1057
 TQROOTPlotter.cxx:1058
 TQROOTPlotter.cxx:1059
 TQROOTPlotter.cxx:1060
 TQROOTPlotter.cxx:1061
 TQROOTPlotter.cxx:1062
 TQROOTPlotter.cxx:1063
 TQROOTPlotter.cxx:1064
 TQROOTPlotter.cxx:1065
 TQROOTPlotter.cxx:1066
 TQROOTPlotter.cxx:1067
 TQROOTPlotter.cxx:1068
 TQROOTPlotter.cxx:1069
 TQROOTPlotter.cxx:1070
 TQROOTPlotter.cxx:1071
 TQROOTPlotter.cxx:1072
 TQROOTPlotter.cxx:1073
 TQROOTPlotter.cxx:1074
 TQROOTPlotter.cxx:1075
 TQROOTPlotter.cxx:1076
 TQROOTPlotter.cxx:1077
 TQROOTPlotter.cxx:1078
 TQROOTPlotter.cxx:1079
 TQROOTPlotter.cxx:1080
 TQROOTPlotter.cxx:1081
 TQROOTPlotter.cxx:1082
 TQROOTPlotter.cxx:1083
 TQROOTPlotter.cxx:1084
 TQROOTPlotter.cxx:1085
 TQROOTPlotter.cxx:1086
 TQROOTPlotter.cxx:1087
 TQROOTPlotter.cxx:1088
 TQROOTPlotter.cxx:1089
 TQROOTPlotter.cxx:1090
 TQROOTPlotter.cxx:1091
 TQROOTPlotter.cxx:1092
 TQROOTPlotter.cxx:1093
 TQROOTPlotter.cxx:1094
 TQROOTPlotter.cxx:1095
 TQROOTPlotter.cxx:1096
 TQROOTPlotter.cxx:1097
 TQROOTPlotter.cxx:1098
 TQROOTPlotter.cxx:1099
 TQROOTPlotter.cxx:1100
 TQROOTPlotter.cxx:1101
 TQROOTPlotter.cxx:1102
 TQROOTPlotter.cxx:1103
 TQROOTPlotter.cxx:1104
 TQROOTPlotter.cxx:1105
 TQROOTPlotter.cxx:1106
 TQROOTPlotter.cxx:1107
 TQROOTPlotter.cxx:1108
 TQROOTPlotter.cxx:1109
 TQROOTPlotter.cxx:1110
 TQROOTPlotter.cxx:1111
 TQROOTPlotter.cxx:1112
 TQROOTPlotter.cxx:1113
 TQROOTPlotter.cxx:1114
 TQROOTPlotter.cxx:1115
 TQROOTPlotter.cxx:1116
 TQROOTPlotter.cxx:1117
 TQROOTPlotter.cxx:1118
 TQROOTPlotter.cxx:1119
 TQROOTPlotter.cxx:1120
 TQROOTPlotter.cxx:1121
 TQROOTPlotter.cxx:1122
 TQROOTPlotter.cxx:1123
 TQROOTPlotter.cxx:1124
 TQROOTPlotter.cxx:1125
 TQROOTPlotter.cxx:1126
 TQROOTPlotter.cxx:1127
 TQROOTPlotter.cxx:1128
 TQROOTPlotter.cxx:1129
 TQROOTPlotter.cxx:1130
 TQROOTPlotter.cxx:1131
 TQROOTPlotter.cxx:1132
 TQROOTPlotter.cxx:1133
 TQROOTPlotter.cxx:1134
 TQROOTPlotter.cxx:1135
 TQROOTPlotter.cxx:1136
 TQROOTPlotter.cxx:1137
 TQROOTPlotter.cxx:1138
 TQROOTPlotter.cxx:1139
 TQROOTPlotter.cxx:1140
 TQROOTPlotter.cxx:1141
 TQROOTPlotter.cxx:1142
 TQROOTPlotter.cxx:1143
 TQROOTPlotter.cxx:1144
 TQROOTPlotter.cxx:1145
 TQROOTPlotter.cxx:1146
 TQROOTPlotter.cxx:1147
 TQROOTPlotter.cxx:1148
 TQROOTPlotter.cxx:1149
 TQROOTPlotter.cxx:1150
 TQROOTPlotter.cxx:1151
 TQROOTPlotter.cxx:1152
 TQROOTPlotter.cxx:1153
 TQROOTPlotter.cxx:1154
 TQROOTPlotter.cxx:1155
 TQROOTPlotter.cxx:1156
 TQROOTPlotter.cxx:1157
 TQROOTPlotter.cxx:1158
 TQROOTPlotter.cxx:1159
 TQROOTPlotter.cxx:1160
 TQROOTPlotter.cxx:1161
 TQROOTPlotter.cxx:1162
 TQROOTPlotter.cxx:1163
 TQROOTPlotter.cxx:1164
 TQROOTPlotter.cxx:1165
 TQROOTPlotter.cxx:1166
 TQROOTPlotter.cxx:1167
 TQROOTPlotter.cxx:1168
 TQROOTPlotter.cxx:1169
 TQROOTPlotter.cxx:1170
 TQROOTPlotter.cxx:1171
 TQROOTPlotter.cxx:1172
 TQROOTPlotter.cxx:1173
 TQROOTPlotter.cxx:1174
 TQROOTPlotter.cxx:1175
 TQROOTPlotter.cxx:1176
 TQROOTPlotter.cxx:1177
 TQROOTPlotter.cxx:1178
 TQROOTPlotter.cxx:1179
 TQROOTPlotter.cxx:1180
 TQROOTPlotter.cxx:1181
 TQROOTPlotter.cxx:1182
 TQROOTPlotter.cxx:1183
 TQROOTPlotter.cxx:1184
 TQROOTPlotter.cxx:1185
 TQROOTPlotter.cxx:1186
 TQROOTPlotter.cxx:1187
 TQROOTPlotter.cxx:1188
 TQROOTPlotter.cxx:1189
 TQROOTPlotter.cxx:1190
 TQROOTPlotter.cxx:1191
 TQROOTPlotter.cxx:1192
 TQROOTPlotter.cxx:1193
 TQROOTPlotter.cxx:1194
 TQROOTPlotter.cxx:1195
 TQROOTPlotter.cxx:1196
 TQROOTPlotter.cxx:1197
 TQROOTPlotter.cxx:1198
 TQROOTPlotter.cxx:1199
 TQROOTPlotter.cxx:1200
 TQROOTPlotter.cxx:1201
 TQROOTPlotter.cxx:1202
 TQROOTPlotter.cxx:1203
 TQROOTPlotter.cxx:1204
 TQROOTPlotter.cxx:1205
 TQROOTPlotter.cxx:1206
 TQROOTPlotter.cxx:1207
 TQROOTPlotter.cxx:1208
 TQROOTPlotter.cxx:1209
 TQROOTPlotter.cxx:1210
 TQROOTPlotter.cxx:1211
 TQROOTPlotter.cxx:1212
 TQROOTPlotter.cxx:1213
 TQROOTPlotter.cxx:1214
 TQROOTPlotter.cxx:1215
 TQROOTPlotter.cxx:1216
 TQROOTPlotter.cxx:1217
 TQROOTPlotter.cxx:1218
 TQROOTPlotter.cxx:1219
 TQROOTPlotter.cxx:1220
 TQROOTPlotter.cxx:1221
 TQROOTPlotter.cxx:1222
 TQROOTPlotter.cxx:1223
 TQROOTPlotter.cxx:1224
 TQROOTPlotter.cxx:1225
 TQROOTPlotter.cxx:1226
 TQROOTPlotter.cxx:1227
 TQROOTPlotter.cxx:1228
 TQROOTPlotter.cxx:1229
 TQROOTPlotter.cxx:1230
 TQROOTPlotter.cxx:1231
 TQROOTPlotter.cxx:1232
 TQROOTPlotter.cxx:1233
 TQROOTPlotter.cxx:1234
 TQROOTPlotter.cxx:1235
 TQROOTPlotter.cxx:1236
 TQROOTPlotter.cxx:1237
 TQROOTPlotter.cxx:1238
 TQROOTPlotter.cxx:1239
 TQROOTPlotter.cxx:1240
 TQROOTPlotter.cxx:1241
 TQROOTPlotter.cxx:1242
 TQROOTPlotter.cxx:1243
 TQROOTPlotter.cxx:1244
 TQROOTPlotter.cxx:1245
 TQROOTPlotter.cxx:1246
 TQROOTPlotter.cxx:1247
 TQROOTPlotter.cxx:1248
 TQROOTPlotter.cxx:1249
 TQROOTPlotter.cxx:1250
 TQROOTPlotter.cxx:1251
 TQROOTPlotter.cxx:1252
 TQROOTPlotter.cxx:1253
 TQROOTPlotter.cxx:1254
 TQROOTPlotter.cxx:1255
 TQROOTPlotter.cxx:1256
 TQROOTPlotter.cxx:1257
 TQROOTPlotter.cxx:1258
 TQROOTPlotter.cxx:1259
 TQROOTPlotter.cxx:1260
 TQROOTPlotter.cxx:1261
 TQROOTPlotter.cxx:1262
 TQROOTPlotter.cxx:1263
 TQROOTPlotter.cxx:1264
 TQROOTPlotter.cxx:1265
 TQROOTPlotter.cxx:1266
 TQROOTPlotter.cxx:1267
 TQROOTPlotter.cxx:1268
 TQROOTPlotter.cxx:1269
 TQROOTPlotter.cxx:1270
 TQROOTPlotter.cxx:1271
 TQROOTPlotter.cxx:1272
 TQROOTPlotter.cxx:1273
 TQROOTPlotter.cxx:1274
 TQROOTPlotter.cxx:1275
 TQROOTPlotter.cxx:1276
 TQROOTPlotter.cxx:1277
 TQROOTPlotter.cxx:1278
 TQROOTPlotter.cxx:1279
 TQROOTPlotter.cxx:1280
 TQROOTPlotter.cxx:1281
 TQROOTPlotter.cxx:1282
 TQROOTPlotter.cxx:1283
 TQROOTPlotter.cxx:1284
 TQROOTPlotter.cxx:1285
 TQROOTPlotter.cxx:1286
 TQROOTPlotter.cxx:1287
 TQROOTPlotter.cxx:1288
 TQROOTPlotter.cxx:1289
 TQROOTPlotter.cxx:1290
 TQROOTPlotter.cxx:1291
 TQROOTPlotter.cxx:1292
 TQROOTPlotter.cxx:1293
 TQROOTPlotter.cxx:1294
 TQROOTPlotter.cxx:1295
 TQROOTPlotter.cxx:1296
 TQROOTPlotter.cxx:1297
 TQROOTPlotter.cxx:1298
 TQROOTPlotter.cxx:1299
 TQROOTPlotter.cxx:1300
 TQROOTPlotter.cxx:1301
 TQROOTPlotter.cxx:1302
 TQROOTPlotter.cxx:1303
 TQROOTPlotter.cxx:1304
 TQROOTPlotter.cxx:1305
 TQROOTPlotter.cxx:1306
 TQROOTPlotter.cxx:1307
 TQROOTPlotter.cxx:1308
 TQROOTPlotter.cxx:1309
 TQROOTPlotter.cxx:1310
 TQROOTPlotter.cxx:1311
 TQROOTPlotter.cxx:1312
 TQROOTPlotter.cxx:1313
 TQROOTPlotter.cxx:1314
 TQROOTPlotter.cxx:1315
 TQROOTPlotter.cxx:1316
 TQROOTPlotter.cxx:1317
 TQROOTPlotter.cxx:1318
 TQROOTPlotter.cxx:1319
 TQROOTPlotter.cxx:1320
 TQROOTPlotter.cxx:1321
 TQROOTPlotter.cxx:1322
 TQROOTPlotter.cxx:1323
 TQROOTPlotter.cxx:1324
 TQROOTPlotter.cxx:1325
 TQROOTPlotter.cxx:1326
 TQROOTPlotter.cxx:1327
 TQROOTPlotter.cxx:1328
 TQROOTPlotter.cxx:1329
 TQROOTPlotter.cxx:1330
 TQROOTPlotter.cxx:1331
 TQROOTPlotter.cxx:1332
 TQROOTPlotter.cxx:1333
 TQROOTPlotter.cxx:1334
 TQROOTPlotter.cxx:1335
 TQROOTPlotter.cxx:1336
 TQROOTPlotter.cxx:1337
 TQROOTPlotter.cxx:1338
 TQROOTPlotter.cxx:1339
 TQROOTPlotter.cxx:1340
 TQROOTPlotter.cxx:1341
 TQROOTPlotter.cxx:1342
 TQROOTPlotter.cxx:1343
 TQROOTPlotter.cxx:1344
 TQROOTPlotter.cxx:1345
 TQROOTPlotter.cxx:1346
 TQROOTPlotter.cxx:1347
 TQROOTPlotter.cxx:1348
 TQROOTPlotter.cxx:1349
 TQROOTPlotter.cxx:1350
 TQROOTPlotter.cxx:1351
 TQROOTPlotter.cxx:1352
 TQROOTPlotter.cxx:1353
 TQROOTPlotter.cxx:1354
 TQROOTPlotter.cxx:1355
 TQROOTPlotter.cxx:1356
 TQROOTPlotter.cxx:1357
 TQROOTPlotter.cxx:1358
 TQROOTPlotter.cxx:1359
 TQROOTPlotter.cxx:1360
 TQROOTPlotter.cxx:1361
 TQROOTPlotter.cxx:1362
 TQROOTPlotter.cxx:1363
 TQROOTPlotter.cxx:1364
 TQROOTPlotter.cxx:1365
 TQROOTPlotter.cxx:1366
 TQROOTPlotter.cxx:1367
 TQROOTPlotter.cxx:1368
 TQROOTPlotter.cxx:1369
 TQROOTPlotter.cxx:1370
 TQROOTPlotter.cxx:1371
 TQROOTPlotter.cxx:1372
 TQROOTPlotter.cxx:1373
 TQROOTPlotter.cxx:1374
 TQROOTPlotter.cxx:1375
 TQROOTPlotter.cxx:1376
 TQROOTPlotter.cxx:1377
 TQROOTPlotter.cxx:1378
 TQROOTPlotter.cxx:1379
 TQROOTPlotter.cxx:1380
 TQROOTPlotter.cxx:1381
 TQROOTPlotter.cxx:1382
 TQROOTPlotter.cxx:1383
 TQROOTPlotter.cxx:1384
 TQROOTPlotter.cxx:1385
 TQROOTPlotter.cxx:1386
 TQROOTPlotter.cxx:1387
 TQROOTPlotter.cxx:1388
 TQROOTPlotter.cxx:1389
 TQROOTPlotter.cxx:1390
 TQROOTPlotter.cxx:1391
 TQROOTPlotter.cxx:1392
 TQROOTPlotter.cxx:1393
 TQROOTPlotter.cxx:1394
 TQROOTPlotter.cxx:1395
 TQROOTPlotter.cxx:1396
 TQROOTPlotter.cxx:1397
 TQROOTPlotter.cxx:1398
 TQROOTPlotter.cxx:1399
 TQROOTPlotter.cxx:1400
 TQROOTPlotter.cxx:1401
 TQROOTPlotter.cxx:1402
 TQROOTPlotter.cxx:1403
 TQROOTPlotter.cxx:1404
 TQROOTPlotter.cxx:1405
 TQROOTPlotter.cxx:1406
 TQROOTPlotter.cxx:1407
 TQROOTPlotter.cxx:1408
 TQROOTPlotter.cxx:1409
 TQROOTPlotter.cxx:1410
 TQROOTPlotter.cxx:1411
 TQROOTPlotter.cxx:1412
 TQROOTPlotter.cxx:1413
 TQROOTPlotter.cxx:1414
 TQROOTPlotter.cxx:1415
 TQROOTPlotter.cxx:1416
 TQROOTPlotter.cxx:1417
 TQROOTPlotter.cxx:1418
 TQROOTPlotter.cxx:1419
 TQROOTPlotter.cxx:1420
 TQROOTPlotter.cxx:1421
 TQROOTPlotter.cxx:1422
 TQROOTPlotter.cxx:1423
 TQROOTPlotter.cxx:1424
 TQROOTPlotter.cxx:1425
 TQROOTPlotter.cxx:1426
 TQROOTPlotter.cxx:1427
 TQROOTPlotter.cxx:1428
 TQROOTPlotter.cxx:1429
 TQROOTPlotter.cxx:1430
 TQROOTPlotter.cxx:1431
 TQROOTPlotter.cxx:1432
 TQROOTPlotter.cxx:1433
 TQROOTPlotter.cxx:1434
 TQROOTPlotter.cxx:1435
 TQROOTPlotter.cxx:1436
 TQROOTPlotter.cxx:1437
 TQROOTPlotter.cxx:1438
 TQROOTPlotter.cxx:1439
 TQROOTPlotter.cxx:1440
 TQROOTPlotter.cxx:1441
 TQROOTPlotter.cxx:1442
 TQROOTPlotter.cxx:1443
 TQROOTPlotter.cxx:1444
 TQROOTPlotter.cxx:1445
 TQROOTPlotter.cxx:1446
 TQROOTPlotter.cxx:1447
 TQROOTPlotter.cxx:1448
 TQROOTPlotter.cxx:1449
 TQROOTPlotter.cxx:1450
 TQROOTPlotter.cxx:1451
 TQROOTPlotter.cxx:1452
 TQROOTPlotter.cxx:1453
 TQROOTPlotter.cxx:1454
 TQROOTPlotter.cxx:1455
 TQROOTPlotter.cxx:1456
 TQROOTPlotter.cxx:1457
 TQROOTPlotter.cxx:1458
 TQROOTPlotter.cxx:1459
 TQROOTPlotter.cxx:1460
 TQROOTPlotter.cxx:1461
 TQROOTPlotter.cxx:1462
 TQROOTPlotter.cxx:1463
 TQROOTPlotter.cxx:1464
 TQROOTPlotter.cxx:1465
 TQROOTPlotter.cxx:1466
 TQROOTPlotter.cxx:1467
 TQROOTPlotter.cxx:1468
 TQROOTPlotter.cxx:1469
 TQROOTPlotter.cxx:1470
 TQROOTPlotter.cxx:1471
 TQROOTPlotter.cxx:1472
 TQROOTPlotter.cxx:1473
 TQROOTPlotter.cxx:1474
 TQROOTPlotter.cxx:1475
 TQROOTPlotter.cxx:1476
 TQROOTPlotter.cxx:1477
 TQROOTPlotter.cxx:1478
 TQROOTPlotter.cxx:1479
 TQROOTPlotter.cxx:1480
 TQROOTPlotter.cxx:1481
 TQROOTPlotter.cxx:1482
 TQROOTPlotter.cxx:1483
 TQROOTPlotter.cxx:1484
 TQROOTPlotter.cxx:1485
 TQROOTPlotter.cxx:1486
 TQROOTPlotter.cxx:1487
 TQROOTPlotter.cxx:1488
 TQROOTPlotter.cxx:1489
 TQROOTPlotter.cxx:1490
 TQROOTPlotter.cxx:1491
 TQROOTPlotter.cxx:1492
 TQROOTPlotter.cxx:1493
 TQROOTPlotter.cxx:1494
 TQROOTPlotter.cxx:1495
 TQROOTPlotter.cxx:1496
 TQROOTPlotter.cxx:1497
 TQROOTPlotter.cxx:1498
 TQROOTPlotter.cxx:1499
 TQROOTPlotter.cxx:1500
 TQROOTPlotter.cxx:1501
 TQROOTPlotter.cxx:1502
 TQROOTPlotter.cxx:1503
 TQROOTPlotter.cxx:1504
 TQROOTPlotter.cxx:1505
 TQROOTPlotter.cxx:1506
 TQROOTPlotter.cxx:1507
 TQROOTPlotter.cxx:1508
 TQROOTPlotter.cxx:1509
 TQROOTPlotter.cxx:1510
 TQROOTPlotter.cxx:1511
 TQROOTPlotter.cxx:1512
 TQROOTPlotter.cxx:1513
 TQROOTPlotter.cxx:1514
 TQROOTPlotter.cxx:1515
 TQROOTPlotter.cxx:1516
 TQROOTPlotter.cxx:1517
 TQROOTPlotter.cxx:1518
 TQROOTPlotter.cxx:1519
 TQROOTPlotter.cxx:1520
 TQROOTPlotter.cxx:1521
 TQROOTPlotter.cxx:1522
 TQROOTPlotter.cxx:1523
 TQROOTPlotter.cxx:1524
 TQROOTPlotter.cxx:1525
 TQROOTPlotter.cxx:1526
 TQROOTPlotter.cxx:1527
 TQROOTPlotter.cxx:1528
 TQROOTPlotter.cxx:1529
 TQROOTPlotter.cxx:1530
 TQROOTPlotter.cxx:1531
 TQROOTPlotter.cxx:1532
 TQROOTPlotter.cxx:1533
 TQROOTPlotter.cxx:1534
 TQROOTPlotter.cxx:1535
 TQROOTPlotter.cxx:1536
 TQROOTPlotter.cxx:1537
 TQROOTPlotter.cxx:1538
 TQROOTPlotter.cxx:1539
 TQROOTPlotter.cxx:1540
 TQROOTPlotter.cxx:1541
 TQROOTPlotter.cxx:1542
 TQROOTPlotter.cxx:1543
 TQROOTPlotter.cxx:1544
 TQROOTPlotter.cxx:1545
 TQROOTPlotter.cxx:1546
 TQROOTPlotter.cxx:1547
 TQROOTPlotter.cxx:1548
 TQROOTPlotter.cxx:1549
 TQROOTPlotter.cxx:1550
 TQROOTPlotter.cxx:1551
 TQROOTPlotter.cxx:1552
 TQROOTPlotter.cxx:1553
 TQROOTPlotter.cxx:1554
 TQROOTPlotter.cxx:1555
 TQROOTPlotter.cxx:1556
 TQROOTPlotter.cxx:1557
 TQROOTPlotter.cxx:1558
 TQROOTPlotter.cxx:1559
 TQROOTPlotter.cxx:1560
 TQROOTPlotter.cxx:1561
 TQROOTPlotter.cxx:1562
 TQROOTPlotter.cxx:1563
 TQROOTPlotter.cxx:1564
 TQROOTPlotter.cxx:1565
 TQROOTPlotter.cxx:1566
 TQROOTPlotter.cxx:1567
 TQROOTPlotter.cxx:1568
 TQROOTPlotter.cxx:1569
 TQROOTPlotter.cxx:1570
 TQROOTPlotter.cxx:1571
 TQROOTPlotter.cxx:1572
 TQROOTPlotter.cxx:1573
 TQROOTPlotter.cxx:1574
 TQROOTPlotter.cxx:1575
 TQROOTPlotter.cxx:1576
 TQROOTPlotter.cxx:1577
 TQROOTPlotter.cxx:1578
 TQROOTPlotter.cxx:1579
 TQROOTPlotter.cxx:1580
 TQROOTPlotter.cxx:1581
 TQROOTPlotter.cxx:1582
 TQROOTPlotter.cxx:1583
 TQROOTPlotter.cxx:1584
 TQROOTPlotter.cxx:1585
 TQROOTPlotter.cxx:1586
 TQROOTPlotter.cxx:1587
 TQROOTPlotter.cxx:1588
 TQROOTPlotter.cxx:1589
 TQROOTPlotter.cxx:1590
 TQROOTPlotter.cxx:1591
 TQROOTPlotter.cxx:1592
 TQROOTPlotter.cxx:1593
 TQROOTPlotter.cxx:1594
 TQROOTPlotter.cxx:1595
 TQROOTPlotter.cxx:1596
 TQROOTPlotter.cxx:1597
 TQROOTPlotter.cxx:1598
 TQROOTPlotter.cxx:1599
 TQROOTPlotter.cxx:1600
 TQROOTPlotter.cxx:1601
 TQROOTPlotter.cxx:1602
 TQROOTPlotter.cxx:1603
 TQROOTPlotter.cxx:1604
 TQROOTPlotter.cxx:1605
 TQROOTPlotter.cxx:1606
 TQROOTPlotter.cxx:1607
 TQROOTPlotter.cxx:1608
 TQROOTPlotter.cxx:1609
 TQROOTPlotter.cxx:1610
 TQROOTPlotter.cxx:1611
 TQROOTPlotter.cxx:1612
 TQROOTPlotter.cxx:1613
 TQROOTPlotter.cxx:1614
 TQROOTPlotter.cxx:1615
 TQROOTPlotter.cxx:1616
 TQROOTPlotter.cxx:1617
 TQROOTPlotter.cxx:1618
 TQROOTPlotter.cxx:1619
 TQROOTPlotter.cxx:1620
 TQROOTPlotter.cxx:1621
 TQROOTPlotter.cxx:1622
 TQROOTPlotter.cxx:1623
 TQROOTPlotter.cxx:1624
 TQROOTPlotter.cxx:1625
 TQROOTPlotter.cxx:1626
 TQROOTPlotter.cxx:1627
 TQROOTPlotter.cxx:1628
 TQROOTPlotter.cxx:1629
 TQROOTPlotter.cxx:1630
 TQROOTPlotter.cxx:1631
 TQROOTPlotter.cxx:1632
 TQROOTPlotter.cxx:1633
 TQROOTPlotter.cxx:1634
 TQROOTPlotter.cxx:1635
 TQROOTPlotter.cxx:1636
 TQROOTPlotter.cxx:1637
 TQROOTPlotter.cxx:1638
 TQROOTPlotter.cxx:1639
 TQROOTPlotter.cxx:1640
 TQROOTPlotter.cxx:1641
 TQROOTPlotter.cxx:1642
 TQROOTPlotter.cxx:1643
 TQROOTPlotter.cxx:1644
 TQROOTPlotter.cxx:1645
 TQROOTPlotter.cxx:1646
 TQROOTPlotter.cxx:1647
 TQROOTPlotter.cxx:1648
 TQROOTPlotter.cxx:1649
 TQROOTPlotter.cxx:1650
 TQROOTPlotter.cxx:1651
 TQROOTPlotter.cxx:1652
 TQROOTPlotter.cxx:1653
 TQROOTPlotter.cxx:1654
 TQROOTPlotter.cxx:1655
 TQROOTPlotter.cxx:1656
 TQROOTPlotter.cxx:1657
 TQROOTPlotter.cxx:1658
 TQROOTPlotter.cxx:1659
 TQROOTPlotter.cxx:1660
 TQROOTPlotter.cxx:1661
 TQROOTPlotter.cxx:1662
 TQROOTPlotter.cxx:1663
 TQROOTPlotter.cxx:1664
 TQROOTPlotter.cxx:1665
 TQROOTPlotter.cxx:1666
 TQROOTPlotter.cxx:1667
 TQROOTPlotter.cxx:1668
 TQROOTPlotter.cxx:1669
 TQROOTPlotter.cxx:1670
 TQROOTPlotter.cxx:1671
 TQROOTPlotter.cxx:1672
 TQROOTPlotter.cxx:1673
 TQROOTPlotter.cxx:1674
 TQROOTPlotter.cxx:1675
 TQROOTPlotter.cxx:1676
 TQROOTPlotter.cxx:1677
 TQROOTPlotter.cxx:1678
 TQROOTPlotter.cxx:1679
 TQROOTPlotter.cxx:1680
 TQROOTPlotter.cxx:1681
 TQROOTPlotter.cxx:1682
 TQROOTPlotter.cxx:1683
 TQROOTPlotter.cxx:1684
 TQROOTPlotter.cxx:1685
 TQROOTPlotter.cxx:1686
 TQROOTPlotter.cxx:1687
 TQROOTPlotter.cxx:1688
 TQROOTPlotter.cxx:1689
 TQROOTPlotter.cxx:1690
 TQROOTPlotter.cxx:1691
 TQROOTPlotter.cxx:1692
 TQROOTPlotter.cxx:1693
 TQROOTPlotter.cxx:1694
 TQROOTPlotter.cxx:1695
 TQROOTPlotter.cxx:1696
 TQROOTPlotter.cxx:1697
 TQROOTPlotter.cxx:1698
 TQROOTPlotter.cxx:1699
 TQROOTPlotter.cxx:1700
 TQROOTPlotter.cxx:1701
 TQROOTPlotter.cxx:1702
 TQROOTPlotter.cxx:1703
 TQROOTPlotter.cxx:1704
 TQROOTPlotter.cxx:1705
 TQROOTPlotter.cxx:1706
 TQROOTPlotter.cxx:1707
 TQROOTPlotter.cxx:1708
 TQROOTPlotter.cxx:1709
 TQROOTPlotter.cxx:1710
 TQROOTPlotter.cxx:1711
 TQROOTPlotter.cxx:1712
 TQROOTPlotter.cxx:1713
 TQROOTPlotter.cxx:1714
 TQROOTPlotter.cxx:1715
 TQROOTPlotter.cxx:1716
 TQROOTPlotter.cxx:1717
 TQROOTPlotter.cxx:1718
 TQROOTPlotter.cxx:1719
 TQROOTPlotter.cxx:1720
 TQROOTPlotter.cxx:1721
 TQROOTPlotter.cxx:1722
 TQROOTPlotter.cxx:1723
 TQROOTPlotter.cxx:1724
 TQROOTPlotter.cxx:1725
 TQROOTPlotter.cxx:1726
 TQROOTPlotter.cxx:1727
 TQROOTPlotter.cxx:1728
 TQROOTPlotter.cxx:1729
 TQROOTPlotter.cxx:1730
 TQROOTPlotter.cxx:1731
 TQROOTPlotter.cxx:1732
 TQROOTPlotter.cxx:1733
 TQROOTPlotter.cxx:1734
 TQROOTPlotter.cxx:1735
 TQROOTPlotter.cxx:1736
 TQROOTPlotter.cxx:1737
 TQROOTPlotter.cxx:1738
 TQROOTPlotter.cxx:1739
 TQROOTPlotter.cxx:1740
 TQROOTPlotter.cxx:1741
 TQROOTPlotter.cxx:1742
 TQROOTPlotter.cxx:1743
 TQROOTPlotter.cxx:1744
 TQROOTPlotter.cxx:1745
 TQROOTPlotter.cxx:1746
 TQROOTPlotter.cxx:1747
 TQROOTPlotter.cxx:1748
 TQROOTPlotter.cxx:1749
 TQROOTPlotter.cxx:1750
 TQROOTPlotter.cxx:1751
 TQROOTPlotter.cxx:1752
 TQROOTPlotter.cxx:1753
 TQROOTPlotter.cxx:1754
 TQROOTPlotter.cxx:1755
 TQROOTPlotter.cxx:1756
 TQROOTPlotter.cxx:1757
 TQROOTPlotter.cxx:1758
 TQROOTPlotter.cxx:1759
 TQROOTPlotter.cxx:1760
 TQROOTPlotter.cxx:1761
 TQROOTPlotter.cxx:1762
 TQROOTPlotter.cxx:1763
 TQROOTPlotter.cxx:1764
 TQROOTPlotter.cxx:1765
 TQROOTPlotter.cxx:1766
 TQROOTPlotter.cxx:1767
 TQROOTPlotter.cxx:1768
 TQROOTPlotter.cxx:1769
 TQROOTPlotter.cxx:1770
 TQROOTPlotter.cxx:1771
 TQROOTPlotter.cxx:1772
 TQROOTPlotter.cxx:1773
 TQROOTPlotter.cxx:1774
 TQROOTPlotter.cxx:1775
 TQROOTPlotter.cxx:1776
 TQROOTPlotter.cxx:1777
 TQROOTPlotter.cxx:1778
 TQROOTPlotter.cxx:1779
 TQROOTPlotter.cxx:1780
 TQROOTPlotter.cxx:1781
 TQROOTPlotter.cxx:1782
 TQROOTPlotter.cxx:1783
 TQROOTPlotter.cxx:1784
 TQROOTPlotter.cxx:1785
 TQROOTPlotter.cxx:1786
 TQROOTPlotter.cxx:1787
 TQROOTPlotter.cxx:1788
 TQROOTPlotter.cxx:1789
 TQROOTPlotter.cxx:1790
 TQROOTPlotter.cxx:1791
 TQROOTPlotter.cxx:1792
 TQROOTPlotter.cxx:1793
 TQROOTPlotter.cxx:1794
 TQROOTPlotter.cxx:1795
 TQROOTPlotter.cxx:1796
 TQROOTPlotter.cxx:1797
 TQROOTPlotter.cxx:1798
 TQROOTPlotter.cxx:1799
 TQROOTPlotter.cxx:1800
 TQROOTPlotter.cxx:1801
 TQROOTPlotter.cxx:1802
 TQROOTPlotter.cxx:1803
 TQROOTPlotter.cxx:1804
 TQROOTPlotter.cxx:1805
 TQROOTPlotter.cxx:1806
 TQROOTPlotter.cxx:1807
 TQROOTPlotter.cxx:1808
 TQROOTPlotter.cxx:1809
 TQROOTPlotter.cxx:1810
 TQROOTPlotter.cxx:1811
 TQROOTPlotter.cxx:1812
 TQROOTPlotter.cxx:1813
 TQROOTPlotter.cxx:1814
 TQROOTPlotter.cxx:1815
 TQROOTPlotter.cxx:1816
 TQROOTPlotter.cxx:1817
 TQROOTPlotter.cxx:1818
 TQROOTPlotter.cxx:1819
 TQROOTPlotter.cxx:1820
 TQROOTPlotter.cxx:1821
 TQROOTPlotter.cxx:1822
 TQROOTPlotter.cxx:1823
 TQROOTPlotter.cxx:1824
 TQROOTPlotter.cxx:1825
 TQROOTPlotter.cxx:1826
 TQROOTPlotter.cxx:1827
 TQROOTPlotter.cxx:1828
 TQROOTPlotter.cxx:1829
 TQROOTPlotter.cxx:1830
 TQROOTPlotter.cxx:1831
 TQROOTPlotter.cxx:1832
 TQROOTPlotter.cxx:1833
 TQROOTPlotter.cxx:1834
 TQROOTPlotter.cxx:1835
 TQROOTPlotter.cxx:1836
 TQROOTPlotter.cxx:1837
 TQROOTPlotter.cxx:1838
 TQROOTPlotter.cxx:1839
 TQROOTPlotter.cxx:1840
 TQROOTPlotter.cxx:1841
 TQROOTPlotter.cxx:1842
 TQROOTPlotter.cxx:1843
 TQROOTPlotter.cxx:1844
 TQROOTPlotter.cxx:1845
 TQROOTPlotter.cxx:1846
 TQROOTPlotter.cxx:1847
 TQROOTPlotter.cxx:1848
 TQROOTPlotter.cxx:1849
 TQROOTPlotter.cxx:1850
 TQROOTPlotter.cxx:1851
 TQROOTPlotter.cxx:1852
 TQROOTPlotter.cxx:1853
 TQROOTPlotter.cxx:1854
 TQROOTPlotter.cxx:1855
 TQROOTPlotter.cxx:1856
 TQROOTPlotter.cxx:1857
 TQROOTPlotter.cxx:1858
 TQROOTPlotter.cxx:1859
 TQROOTPlotter.cxx:1860
 TQROOTPlotter.cxx:1861
 TQROOTPlotter.cxx:1862
 TQROOTPlotter.cxx:1863
 TQROOTPlotter.cxx:1864
 TQROOTPlotter.cxx:1865
 TQROOTPlotter.cxx:1866
 TQROOTPlotter.cxx:1867
 TQROOTPlotter.cxx:1868
 TQROOTPlotter.cxx:1869
 TQROOTPlotter.cxx:1870
 TQROOTPlotter.cxx:1871
 TQROOTPlotter.cxx:1872
 TQROOTPlotter.cxx:1873
 TQROOTPlotter.cxx:1874
 TQROOTPlotter.cxx:1875
 TQROOTPlotter.cxx:1876
 TQROOTPlotter.cxx:1877
 TQROOTPlotter.cxx:1878
 TQROOTPlotter.cxx:1879
 TQROOTPlotter.cxx:1880
 TQROOTPlotter.cxx:1881
 TQROOTPlotter.cxx:1882
 TQROOTPlotter.cxx:1883
 TQROOTPlotter.cxx:1884
 TQROOTPlotter.cxx:1885
 TQROOTPlotter.cxx:1886
 TQROOTPlotter.cxx:1887
 TQROOTPlotter.cxx:1888
 TQROOTPlotter.cxx:1889
 TQROOTPlotter.cxx:1890
 TQROOTPlotter.cxx:1891
 TQROOTPlotter.cxx:1892
 TQROOTPlotter.cxx:1893
 TQROOTPlotter.cxx:1894
 TQROOTPlotter.cxx:1895
 TQROOTPlotter.cxx:1896
 TQROOTPlotter.cxx:1897
 TQROOTPlotter.cxx:1898
 TQROOTPlotter.cxx:1899
 TQROOTPlotter.cxx:1900
 TQROOTPlotter.cxx:1901
 TQROOTPlotter.cxx:1902
 TQROOTPlotter.cxx:1903
 TQROOTPlotter.cxx:1904
 TQROOTPlotter.cxx:1905
 TQROOTPlotter.cxx:1906
 TQROOTPlotter.cxx:1907
 TQROOTPlotter.cxx:1908
 TQROOTPlotter.cxx:1909
 TQROOTPlotter.cxx:1910
 TQROOTPlotter.cxx:1911
 TQROOTPlotter.cxx:1912
 TQROOTPlotter.cxx:1913
 TQROOTPlotter.cxx:1914
 TQROOTPlotter.cxx:1915
 TQROOTPlotter.cxx:1916
 TQROOTPlotter.cxx:1917
 TQROOTPlotter.cxx:1918
 TQROOTPlotter.cxx:1919
 TQROOTPlotter.cxx:1920
 TQROOTPlotter.cxx:1921
 TQROOTPlotter.cxx:1922
 TQROOTPlotter.cxx:1923
 TQROOTPlotter.cxx:1924
 TQROOTPlotter.cxx:1925
 TQROOTPlotter.cxx:1926
 TQROOTPlotter.cxx:1927
 TQROOTPlotter.cxx:1928
 TQROOTPlotter.cxx:1929
 TQROOTPlotter.cxx:1930
 TQROOTPlotter.cxx:1931
 TQROOTPlotter.cxx:1932
 TQROOTPlotter.cxx:1933
 TQROOTPlotter.cxx:1934
 TQROOTPlotter.cxx:1935
 TQROOTPlotter.cxx:1936
 TQROOTPlotter.cxx:1937
 TQROOTPlotter.cxx:1938
 TQROOTPlotter.cxx:1939
 TQROOTPlotter.cxx:1940
 TQROOTPlotter.cxx:1941
 TQROOTPlotter.cxx:1942
 TQROOTPlotter.cxx:1943
 TQROOTPlotter.cxx:1944
 TQROOTPlotter.cxx:1945
 TQROOTPlotter.cxx:1946
 TQROOTPlotter.cxx:1947
 TQROOTPlotter.cxx:1948
 TQROOTPlotter.cxx:1949
 TQROOTPlotter.cxx:1950
 TQROOTPlotter.cxx:1951
 TQROOTPlotter.cxx:1952
 TQROOTPlotter.cxx:1953
 TQROOTPlotter.cxx:1954
 TQROOTPlotter.cxx:1955
 TQROOTPlotter.cxx:1956
 TQROOTPlotter.cxx:1957
 TQROOTPlotter.cxx:1958
 TQROOTPlotter.cxx:1959
 TQROOTPlotter.cxx:1960
 TQROOTPlotter.cxx:1961
 TQROOTPlotter.cxx:1962
 TQROOTPlotter.cxx:1963
 TQROOTPlotter.cxx:1964
 TQROOTPlotter.cxx:1965
 TQROOTPlotter.cxx:1966
 TQROOTPlotter.cxx:1967
 TQROOTPlotter.cxx:1968
 TQROOTPlotter.cxx:1969
 TQROOTPlotter.cxx:1970
 TQROOTPlotter.cxx:1971
 TQROOTPlotter.cxx:1972
 TQROOTPlotter.cxx:1973
 TQROOTPlotter.cxx:1974
 TQROOTPlotter.cxx:1975
 TQROOTPlotter.cxx:1976
 TQROOTPlotter.cxx:1977
 TQROOTPlotter.cxx:1978
 TQROOTPlotter.cxx:1979
 TQROOTPlotter.cxx:1980
 TQROOTPlotter.cxx:1981
 TQROOTPlotter.cxx:1982
 TQROOTPlotter.cxx:1983
 TQROOTPlotter.cxx:1984
 TQROOTPlotter.cxx:1985
 TQROOTPlotter.cxx:1986
 TQROOTPlotter.cxx:1987
 TQROOTPlotter.cxx:1988
 TQROOTPlotter.cxx:1989
 TQROOTPlotter.cxx:1990
 TQROOTPlotter.cxx:1991
 TQROOTPlotter.cxx:1992
 TQROOTPlotter.cxx:1993
 TQROOTPlotter.cxx:1994
 TQROOTPlotter.cxx:1995
 TQROOTPlotter.cxx:1996
 TQROOTPlotter.cxx:1997
 TQROOTPlotter.cxx:1998
 TQROOTPlotter.cxx:1999
 TQROOTPlotter.cxx:2000
 TQROOTPlotter.cxx:2001
 TQROOTPlotter.cxx:2002
 TQROOTPlotter.cxx:2003
 TQROOTPlotter.cxx:2004
 TQROOTPlotter.cxx:2005
 TQROOTPlotter.cxx:2006
 TQROOTPlotter.cxx:2007
 TQROOTPlotter.cxx:2008
 TQROOTPlotter.cxx:2009
 TQROOTPlotter.cxx:2010
 TQROOTPlotter.cxx:2011
 TQROOTPlotter.cxx:2012
 TQROOTPlotter.cxx:2013
 TQROOTPlotter.cxx:2014
 TQROOTPlotter.cxx:2015
 TQROOTPlotter.cxx:2016
 TQROOTPlotter.cxx:2017
 TQROOTPlotter.cxx:2018
 TQROOTPlotter.cxx:2019
 TQROOTPlotter.cxx:2020
 TQROOTPlotter.cxx:2021
 TQROOTPlotter.cxx:2022
 TQROOTPlotter.cxx:2023
 TQROOTPlotter.cxx:2024
 TQROOTPlotter.cxx:2025
 TQROOTPlotter.cxx:2026
 TQROOTPlotter.cxx:2027
 TQROOTPlotter.cxx:2028
 TQROOTPlotter.cxx:2029
 TQROOTPlotter.cxx:2030
 TQROOTPlotter.cxx:2031
 TQROOTPlotter.cxx:2032
 TQROOTPlotter.cxx:2033
 TQROOTPlotter.cxx:2034
 TQROOTPlotter.cxx:2035
 TQROOTPlotter.cxx:2036
 TQROOTPlotter.cxx:2037
 TQROOTPlotter.cxx:2038
 TQROOTPlotter.cxx:2039
 TQROOTPlotter.cxx:2040
 TQROOTPlotter.cxx:2041
 TQROOTPlotter.cxx:2042
 TQROOTPlotter.cxx:2043
 TQROOTPlotter.cxx:2044
 TQROOTPlotter.cxx:2045
 TQROOTPlotter.cxx:2046
 TQROOTPlotter.cxx:2047
 TQROOTPlotter.cxx:2048
 TQROOTPlotter.cxx:2049
 TQROOTPlotter.cxx:2050
 TQROOTPlotter.cxx:2051
 TQROOTPlotter.cxx:2052
 TQROOTPlotter.cxx:2053
 TQROOTPlotter.cxx:2054
 TQROOTPlotter.cxx:2055
 TQROOTPlotter.cxx:2056
 TQROOTPlotter.cxx:2057
 TQROOTPlotter.cxx:2058
 TQROOTPlotter.cxx:2059
 TQROOTPlotter.cxx:2060
 TQROOTPlotter.cxx:2061
 TQROOTPlotter.cxx:2062
 TQROOTPlotter.cxx:2063
 TQROOTPlotter.cxx:2064
 TQROOTPlotter.cxx:2065
 TQROOTPlotter.cxx:2066
 TQROOTPlotter.cxx:2067
 TQROOTPlotter.cxx:2068
 TQROOTPlotter.cxx:2069
 TQROOTPlotter.cxx:2070
 TQROOTPlotter.cxx:2071
 TQROOTPlotter.cxx:2072
 TQROOTPlotter.cxx:2073
 TQROOTPlotter.cxx:2074
 TQROOTPlotter.cxx:2075
 TQROOTPlotter.cxx:2076
 TQROOTPlotter.cxx:2077
 TQROOTPlotter.cxx:2078
 TQROOTPlotter.cxx:2079
 TQROOTPlotter.cxx:2080
 TQROOTPlotter.cxx:2081
 TQROOTPlotter.cxx:2082
 TQROOTPlotter.cxx:2083
 TQROOTPlotter.cxx:2084
 TQROOTPlotter.cxx:2085
 TQROOTPlotter.cxx:2086
 TQROOTPlotter.cxx:2087
 TQROOTPlotter.cxx:2088
 TQROOTPlotter.cxx:2089
 TQROOTPlotter.cxx:2090
 TQROOTPlotter.cxx:2091
 TQROOTPlotter.cxx:2092
 TQROOTPlotter.cxx:2093
 TQROOTPlotter.cxx:2094
 TQROOTPlotter.cxx:2095
 TQROOTPlotter.cxx:2096
 TQROOTPlotter.cxx:2097
 TQROOTPlotter.cxx:2098
 TQROOTPlotter.cxx:2099
 TQROOTPlotter.cxx:2100
 TQROOTPlotter.cxx:2101
 TQROOTPlotter.cxx:2102
 TQROOTPlotter.cxx:2103
 TQROOTPlotter.cxx:2104
 TQROOTPlotter.cxx:2105
 TQROOTPlotter.cxx:2106
 TQROOTPlotter.cxx:2107
 TQROOTPlotter.cxx:2108
 TQROOTPlotter.cxx:2109
 TQROOTPlotter.cxx:2110
 TQROOTPlotter.cxx:2111
 TQROOTPlotter.cxx:2112
 TQROOTPlotter.cxx:2113
 TQROOTPlotter.cxx:2114
 TQROOTPlotter.cxx:2115