#ifndef tmvaglob__HH
#define tmvaglob__HH
// global TMVA style settings
#ifndef TMVA_TMVAGLOB
#define TMVA_TMVAGLOB

#include <iostream>
#include <vector>

#include "TPad.h"
#include "TCanvas.h"
#include "TColor.h"
#include "TSystem.h"
#include "TImage.h"
#include "TKey.h"
#include "TH1.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TFile.h"
#include "TDirectory.h"
#include "TObjArray.h"
#include "TClass.h"
#include "TText.h"
#include "TLegend.h"

#include "RVersion.h"

namespace TMVA{

   using std::cout;
   using std::endl;

   namespace TMVAGlob {
         // --------- S t y l e ---------------------------
      // -----------------------------------------------
      
      enum TypeOfPlot { kId = 0,
                        kNorm,
                        kDecorrelated,
                        kPCA,
                        kGaussDecorr,
                        kNumOfMethods };
      
      static Int_t c_Canvas         = TColor::GetColor( "#f0f0f0" );
      static Int_t c_FrameFill      = TColor::GetColor( "#fffffd" );
      static Int_t c_TitleBox       = TColor::GetColor( "#5D6B7D" );
      static Int_t c_TitleBorder    = TColor::GetColor( "#7D8B9D" );
      static Int_t c_TitleText      = TColor::GetColor( "#FFFFFF" );
      static Int_t c_SignalLine     = TColor::GetColor( "#0000ee" );
      static Int_t c_SignalFill     = TColor::GetColor( "#7d99d1" );
      static Int_t c_BackgroundLine = TColor::GetColor( "#ff0000" );
      static Int_t c_BackgroundFill = TColor::GetColor( "#ff0000" );
      static Int_t c_NovelBlue      = TColor::GetColor( "#2244a5" );
      
      
      // set the style
      void SetSignalAndBackgroundStyle( TH1* sig, TH1* bkg, TH1* all = 0 ); 
      void SetMultiClassStyle( TObjArray* hists ); 
      // set frame styles
      void SetFrameStyle( TH1* frame, Float_t scale = 1.0 );
      void SetTMVAStyle();
      void DestroyCanvases();
      // set style and remove existing canvas'
      void Initialize( Bool_t useTMVAStyle = kTRUE );
      // checks if file with name "fin" is already open, and if not opens one
      TFile* OpenFile( const TString& fin );
      // used to create output file for canvas
      void imgconv( TCanvas* c, const TString & fname );
      TImage * findImage(const char * imageName) ;
      void plot_logo( Float_t v_scale = 1.0, Float_t skew = 1.0 );
      void NormalizeHist( TH1* h ); 
      void NormalizeHists( TH1* sig, TH1* bkg = 0 ); 
      void GetMethodName( TString & name, TKey * mkey ); 
      void GetMethodTitle( TString & name, TKey * ikey ) ;
      void GetMethodName( TString & name, TDirectory * mdir ); 
      void GetMethodTitle( TString & name, TDirectory * idir ) ;
      TKey *NextKey( TIter & keyIter, TString className); 
      UInt_t GetListOfKeys( TList& keys, TString inherits, TDirectory *dir=0 );
      Int_t GetNumberOfTargets( TDirectory *dir );
      Int_t GetNumberOfInputVariables( TDirectory *dir );
      std::vector<TString> GetInputVariableNames(TDirectory *dir );
      Int_t GetNumberOfInputVariablesMultiClass( TDirectory *dir );
      std::vector<TString> GetClassNames(TDirectory *dir );
      TKey* FindMethod( TString name, TDirectory *dir=0 );
      Bool_t ExistMethodName( TString name, TDirectory *dir=0 );
      UInt_t GetListOfMethods( TList & methods, TDirectory *dir=0 );
      UInt_t GetListOfJobs( TFile* file, TList& jobdirs);
      UInt_t GetListOfTitles( TDirectory *rfdir, TList & titles );
      UInt_t GetListOfTitles( TString & methodName, TList & titles, TDirectory *dir=0 );
      TDirectory *GetInputVariablesDir( TMVAGlob::TypeOfPlot type, TDirectory *dir=0 );
      TDirectory *GetCorrelationPlotsDir( TMVAGlob::TypeOfPlot type, TDirectory *dir=0 );
      
   }
   
#endif
}
#endif
 tmvaglob.h:1
 tmvaglob.h:2
 tmvaglob.h:3
 tmvaglob.h:4
 tmvaglob.h:5
 tmvaglob.h:6
 tmvaglob.h:7
 tmvaglob.h:8
 tmvaglob.h:9
 tmvaglob.h:10
 tmvaglob.h:11
 tmvaglob.h:12
 tmvaglob.h:13
 tmvaglob.h:14
 tmvaglob.h:15
 tmvaglob.h:16
 tmvaglob.h:17
 tmvaglob.h:18
 tmvaglob.h:19
 tmvaglob.h:20
 tmvaglob.h:21
 tmvaglob.h:22
 tmvaglob.h:23
 tmvaglob.h:24
 tmvaglob.h:25
 tmvaglob.h:26
 tmvaglob.h:27
 tmvaglob.h:28
 tmvaglob.h:29
 tmvaglob.h:30
 tmvaglob.h:31
 tmvaglob.h:32
 tmvaglob.h:33
 tmvaglob.h:34
 tmvaglob.h:35
 tmvaglob.h:36
 tmvaglob.h:37
 tmvaglob.h:38
 tmvaglob.h:39
 tmvaglob.h:40
 tmvaglob.h:41
 tmvaglob.h:42
 tmvaglob.h:43
 tmvaglob.h:44
 tmvaglob.h:45
 tmvaglob.h:46
 tmvaglob.h:47
 tmvaglob.h:48
 tmvaglob.h:49
 tmvaglob.h:50
 tmvaglob.h:51
 tmvaglob.h:52
 tmvaglob.h:53
 tmvaglob.h:54
 tmvaglob.h:55
 tmvaglob.h:56
 tmvaglob.h:57
 tmvaglob.h:58
 tmvaglob.h:59
 tmvaglob.h:60
 tmvaglob.h:61
 tmvaglob.h:62
 tmvaglob.h:63
 tmvaglob.h:64
 tmvaglob.h:65
 tmvaglob.h:66
 tmvaglob.h:67
 tmvaglob.h:68
 tmvaglob.h:69
 tmvaglob.h:70
 tmvaglob.h:71
 tmvaglob.h:72
 tmvaglob.h:73
 tmvaglob.h:74
 tmvaglob.h:75
 tmvaglob.h:76
 tmvaglob.h:77
 tmvaglob.h:78
 tmvaglob.h:79
 tmvaglob.h:80
 tmvaglob.h:81
 tmvaglob.h:82
 tmvaglob.h:83
 tmvaglob.h:84
 tmvaglob.h:85
 tmvaglob.h:86
 tmvaglob.h:87
 tmvaglob.h:88
 tmvaglob.h:89
 tmvaglob.h:90
 tmvaglob.h:91
 tmvaglob.h:92
 tmvaglob.h:93
 tmvaglob.h:94
 tmvaglob.h:95
 tmvaglob.h:96
 tmvaglob.h:97