I get a .root file in the example Geant4
how can export data from .root to .txt ?
What am I doing wrong?
I try this way and get the error (see figure 2):
TFile *f =TFile::Open("yz_t1.root"); .ls Th1D *yz; file->GetObject("yz-distributions/yz.1",yz); .>abc.txt ->Print("all"); .> error message: input_line_35:2:3: error: use of undeclared identifier 'Th1D' (Th1D * ((*(class TTree **)0x7f0b6e99b010))) ^ Error in <HandleInterpreterException>: Error evaluating expression (Th1D * ((*(class TTree **)0x7f0b6e99b010))). Execution of your code was aborted.
ROOT Version: ROOT 6.22/03
Platform: Ubuntu 18
Compiler: Not Provided