update RootFileWriter so that we can split header and event(s) to different trees