Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
hsimpleProxyDriver.C File Reference

Detailed Description

View in nbviewer Open in SWAN
This is the driver of the hsimpleProxy example It provides the infrastructure to run that code on an ntuple To be run from the tutorials directory

void hsimpleProxyDriver()
{
std::cout << gSystem->WorkingDirectory() << std::endl;
TFile *file = TFile::Open("hsimple.root");
if (!file){
std::cerr << "Input file not found.\n";
}
TTree *ntuple = nullptr;
file->GetObject("ntuple",ntuple);
std::string s1(__FILE__);
TString dir = gSystem->UnixPathName(s1.substr(0, s1.find_last_of("\\/")).c_str());
ntuple->Draw(dir+"/hsimpleProxy.C+");
}
#define s1(x)
Definition RSha256.hxx:91
return
Invalidate stored TCling state for declarations included in transaction ‘T’.
Definition TCling.cxx:6896
R__EXTERN TSystem * gSystem
Definition TSystem.h:566
void GetObject(const char *namecycle, T *&ptr)
Get an object with proper type checking.
Definition TDirectory.h:212
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Definition TFile.h:53
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4110
Basic string class.
Definition TString.h:139
A TTree represents a columnar dataset.
Definition TTree.h:79
void Draw(Option_t *opt) override
Default Draw method for all objects.
Definition TTree.h:434
Author
Rene Brun

Definition in file hsimpleProxyDriver.C.