In a named macro I create a histogram and draw it (see sample code). However, when I open a file, the histogram is drawn but deleted immediately. I understand that in a named macro pointers to objects get deleted when the file is closed. I also remember from a previous discussion that there is an option to make the histogram persistent.
Unfortunately, I couldn’t dig out that information. How do I make the histogram persistent after the file is closed?
TH1F *h = new TH1F("h","",100,0,100);