//this file looks like plain C, but it's actually -*- c++ -*-
#ifndef __TQCompPlotter__
#define __TQCompPlotter__

#include "TH1.h"
#include "THStack.h"
#include "TNamed.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "TString.h"
#include "QFramework/TQTaggable.h"
#include "QFramework/TQNamedTaggable.h"
#include "QFramework/TQSampleFolder.h"
#include "TObjArray.h"
#include "QFramework/TQROOTPlotter.h"

#include "TGraph.h"
#include "TGraphErrors.h"
#include "TGraphAsymmErrors.h"

#include <math.h>
#include <limits>

class TQSampleDataReader;

class TQCompPlotter : public TQROOTPlotter {

protected:
  using TQROOTPlotter::makePlot;
  virtual TCanvas * makePlot(TString histogram, TQTaggable& inputTags);
  int global_hist_counter;

  void setStyle(TQTaggable& tags);
  TObjArray* collectHistograms(TQTaggable& tags);
  void drawRatio(TQTaggable& tags);
  void drawLabels(TQTaggable& tags);
  void makeLegend(TQTaggable& tags, TObjArray* histos);
  bool calculateAxisRanges1D(TQTaggable& tags);
  void drawLegend(TQTaggable& tags);
  void drawArrows(TQTaggable &tags,TGraphErrors *ratioGraph, double min, double max, bool verbose);
  bool drawHistograms(TQTaggable& tags);
  TString getScaleFactorList(TString histname);

public:


  virtual void reset();

  TQCompPlotter();
  TQCompPlotter(TQSampleFolder * baseSampleFolder);
  TQCompPlotter(TQSampleDataReader * dataSource);

  virtual ~TQCompPlotter();

  ClassDefOverride(TQCompPlotter, 1); //QFramework class

};

//typedef TQCompPlotter TQCompPlotter2;

#endif
 TQCompPlotter.h:1
 TQCompPlotter.h:2
 TQCompPlotter.h:3
 TQCompPlotter.h:4
 TQCompPlotter.h:5
 TQCompPlotter.h:6
 TQCompPlotter.h:7
 TQCompPlotter.h:8
 TQCompPlotter.h:9
 TQCompPlotter.h:10
 TQCompPlotter.h:11
 TQCompPlotter.h:12
 TQCompPlotter.h:13
 TQCompPlotter.h:14
 TQCompPlotter.h:15
 TQCompPlotter.h:16
 TQCompPlotter.h:17
 TQCompPlotter.h:18
 TQCompPlotter.h:19
 TQCompPlotter.h:20
 TQCompPlotter.h:21
 TQCompPlotter.h:22
 TQCompPlotter.h:23
 TQCompPlotter.h:24
 TQCompPlotter.h:25
 TQCompPlotter.h:26
 TQCompPlotter.h:27
 TQCompPlotter.h:28
 TQCompPlotter.h:29
 TQCompPlotter.h:30
 TQCompPlotter.h:31
 TQCompPlotter.h:32
 TQCompPlotter.h:33
 TQCompPlotter.h:34
 TQCompPlotter.h:35
 TQCompPlotter.h:36
 TQCompPlotter.h:37
 TQCompPlotter.h:38
 TQCompPlotter.h:39
 TQCompPlotter.h:40
 TQCompPlotter.h:41
 TQCompPlotter.h:42
 TQCompPlotter.h:43
 TQCompPlotter.h:44
 TQCompPlotter.h:45
 TQCompPlotter.h:46
 TQCompPlotter.h:47
 TQCompPlotter.h:48
 TQCompPlotter.h:49
 TQCompPlotter.h:50
 TQCompPlotter.h:51
 TQCompPlotter.h:52
 TQCompPlotter.h:53
 TQCompPlotter.h:54
 TQCompPlotter.h:55
 TQCompPlotter.h:56
 TQCompPlotter.h:57
 TQCompPlotter.h:58
 TQCompPlotter.h:59
 TQCompPlotter.h:60
 TQCompPlotter.h:61