Skip to content
Merged
Prev Previous commit
Next Next commit
clean up #includes and update doc comments
  • Loading branch information
paulgessinger committed Aug 31, 2016
commit a5ea3e8493f90309ea5e5b68b9ff58ca9d350fd4
10 changes: 9 additions & 1 deletion graf2d/gpad/inc/TRatioPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
// //
//////////////////////////////////////////////////////////////////////////

class TObject;
#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TString
#include "TString.h"
#endif

class TH1;
class TPad;
class TVirtualPad;
class TGraphAsymmErrors;
class TGraphErrors;
class TGraph;
Expand Down
74 changes: 52 additions & 22 deletions graf2d/gpad/src/TRatioPlot.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,74 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#include <iostream>
#include "TRatioPlot.h"

#ifndef ROOT_TROOT
#include "TROOT.h"
#endif

#ifndef ROOT_TClassRef
#include "TClassRef.h"
#endif

#ifndef ROOT_TVirtualPad
#include "TVirtualPad.h"
#include "TRatioPlot.h"
#endif

#ifndef ROOT_TBrowser
#include "TBrowser.h"
#endif

#ifndef ROOT_TH1
#include "TH1.h"
#endif

#ifndef ROOT_TF1
#include "TF1.h"
#endif

#ifndef ROOT_TPad
#include "TPad.h"
#endif

#ifndef ROOT_TString
#include "TString.h"
#endif

#ifndef ROOT_TMath
#include "TMath.h"
#endif

#ifndef ROOT_TGraphAsymmErrors
#include "TGraphAsymmErrors.h"
#endif

#ifndef ROOT_TGraphErrors
#include "TGraphErrors.h"
#endif

#ifndef ROOT_TGaxis
#include "TGaxis.h"
#include "TCanvas.h"
#include "TFrame.h"
#include "TMath.h"
#endif

#ifndef ROOT_TLine
#include "TLine.h"
#endif

#ifndef ROOT_TVirtualFitter
#include "TVirtualFitter.h"
#endif

#ifndef ROOT_TFitResult
#include "TFitResult.h"
#endif

#ifndef ROOT_THStack
#include "THStack.h"
#endif

#include <iostream>

#define _(x) std::cout << #x;
#define __(x) std::cout << "[" << std::string(__FILE__).substr(std::string(__FILE__).find_last_of("/\\") + 1) << ":" <<__LINE__ << "] " << x << std::endl ;
#define var_dump(v) __(#v << "=" << (v));

/** \class TRatioPlot
\ingroup gpad
Expand Down Expand Up @@ -203,11 +247,6 @@ void TRatioPlot::Init(TH1* h1, TH1* h2,Option_t *option)
/// \param h1 First histogram
/// \param h2 Second histogram
/// \param option Steers the error calculation, as well as ratio / difference
/// \param h1DrawOpt Drawing option for first histogram
/// \param h2DrawOpt Drawing option for second histogram
/// \param graphDrawOpt Drawing option the lower graph
/// \param name Name for the object
/// \param title Title for the object

TRatioPlot::TRatioPlot(TH1* h1, TH1* h2, Option_t *option)
: fGridlines()
Expand Down Expand Up @@ -240,11 +279,6 @@ TRatioPlot::TRatioPlot(TH1* h1, TH1* h2, Option_t *option)
/// \param st The THStack object
/// \param h2 The other histogram
/// \param option Steers the calculation of the lower plot
/// \param h1DrawOpt Drawing option for the stack
/// \param h2DrawOpt Drawing options for the other histogram
/// \param graphDrawOpt Drawing option for the lower plot graph
/// \param name The name of the object
/// \param title The title of the object

TRatioPlot::TRatioPlot(THStack* st, TH1* h2, Option_t *option)
{
Expand Down Expand Up @@ -277,11 +311,7 @@ TRatioPlot::TRatioPlot(THStack* st, TH1* h2, Option_t *option)
/// Constructor for one histogram and a fit.
/// \param h1 The histogram
/// \param option Steers the error calculation
/// \param h1DrawOpt Drawing option for the histogram
/// \param graphDrawOpt Drawing option the lower graph
/// \param fitres Explicit fit result to be used for calculation. Uses last fit if left empty
/// \param name Name for the object
/// \param title Title for the object

TRatioPlot::TRatioPlot(TH1* h1, Option_t *option, TFitResult *fitres)
: fH1(h1),
Expand Down