汎用rootマクロ

まだ途中・・・

#ifndef __CINT__

#include <TApplication.h>
#include <TCanvas.h>
#include <iostream>
#include <fstream>
#include <TROOT.h>
#include <TStyle.h>
#include <TString.h>
#include <TH1.h>
#include <TH2.h>
#include <TF1.h>
#include <TGraph.h>
#include <TGraphErrors.h>
#include <TRandom.h>
#include <TLegend.h>
#include <TCut.h>
#include <TFile.h>
#include <TTree.h>
#include <TGraph2D.h>
#include <TGraph2DErrors.h>
#include <TChain.h>
using namespace std;
int main(int argc, char* argv[])
{
  TApplication theApp("App", &argc, argv);
  cout<<"///Binary Mode..."<<endl;
#else
void comp()
{
  gROOT->Reset();
  cout<<"///Macro Mode..."<<endl;
#endif  // __CINT__
 
  const TString FileName="dat/file.root";
  TFile file;
  file.Open(FileName);
  file.ls();
  TTree tree;
  tree
  TCanvas *c1=new TCanvas("c1", "Canvas");
  gStyle->SetPalette(1);//rainbow palatte
  c1->Divide(2,2);
  //1
  c1->cd(1);
  TH1F *h1=new TH1F("h1", "h1 title", 201, -10, 10);
  h1->FillRandom("gaus", 10000);
  // c1.cd();
  h1->Draw();
  c1->Update();
    
#ifndef __CINT__
  theApp.Run();
  return 0;
#else
  return;
#endif  // __CINT__ 

}