TFile and TNtuple interaction, Changing files midstream

Greetings all,
Once again I am trying to do something unusual.
The object of what I am trying to do is make new files at midnight.

I do the following,
Create a new TFile
Create an new TNtuple
At midnight, I close the current TFile object and open another
When I try to to an ntuple->Fill() after this operation, the probram does SIGSEV, My guess is that the ntuple is not properly part of the TFile I am connected to or obliterated. Which makes sense now that I think about it.

Can I easily recreate the ntuple in the new TFile path? If so, how would I go about doing that?



When you close the TFile, the TNtuple will be automatically deleted.
When you create your second file, you should recreate the TNtuple object