Demo: Building Chains
TChain chain(“T”) ;
What’s the line ( “gROOT->LoadMacro(”$ROOTSYS/test/libEvent.so");" ) used for?
Can the line be deleted when do the above?
The LoadMacro lines load the library that implement the classes of the object stored in the ROOT file mentioned later.
Since the ROOT files are self-describing, you can read those file without this library. However if you do not load the library some functionality is not available (for example you can not call any member function of the classes).
In the example you provided, the result of MakeClass might be slightly different with or without the MakeClass (but the different is not huge).