Recommended style for MakeClass outputting a TTree

Hello, I have some analysis code based on a MakeClass output. I did the recommended thing and created my own class which inherits from the “Made” Class. All of the examples create histograms for viewing, but I find it much more useful to produce output TTrees. This allows for example to try various cuts and looking at correlations without having to re-run the analysis code.

So without examples, I am not sure how to proceed to create the output TTree. Should I make the output TFile and TTree inside the Loop() method, or declare them outside and fill the tree inside? There are many ways to do it, so I am looking for the general recommendation.

Jean-François

Hi,

I would recommend to create the TTree and TFile in the same place you create the histogram.

Cheers,
Philippe.