#include "TTree.h" #include "TFile.h" #include "TSystem.h" //to store an object from "particle_CLASS" in a tree void Tutorial_Tree(){ using namespace std; TTree t("t_key","t_title"); Int_t load = gSystem->Load("./particle_CLASS_h.so"); //define a class and compile it to .so file using >> .x filename++ // Now load the class definition cout<<"LOad status is: "<set_energy(11); sparticle->set_position(113,12,3); t.Fill(); t.Scan(); }