ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hsimpleProxyDriver.C
Go to the documentation of this file.
1 // This is the driver of the hsimpleProxy example
2 // It provides the infrastructure to run that code on an ntuple
3 // To be run from the tutorials directory
4 
6 {
7  std::cout << gSystem->WorkingDirectory() << std::endl;
8  TFile *file = TFile::Open("hsimple.root");
9  if (!file){
10  std::cerr << "Input file not found.\n";
11  return ;
12  }
13  TTree *ntuple = nullptr;
14  file->GetObject("ntuple",ntuple);
15  TString dir = gSystem->DirName(__FILE__);
16  ntuple->Draw(dir+"/hsimpleProxy.C+");
17 }
tuple ntuple
Definition: hsimple.py:39
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:865
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
Basic string class.
Definition: TString.h:137
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
Definition: TSystem.cxx:980
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Definition: TFile.cxx:3851
void GetObject(const char *namecycle, T *&ptr)
R__EXTERN TSystem * gSystem
Definition: TSystem.h:545
return
Definition: TBase64.cxx:62
void hsimpleProxyDriver()
tuple file
Definition: fildir.py:20
void dir(char *path=0)
Definition: rootalias.C:30
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition: TTree.h:360
A TTree object has a header with a name and a title.
Definition: TTree.h:98