Saving a root session

I have a question

I have done some work on the root prompt. Basically have run an unnamed macro. My macro has several arrays and matrices. Typing say Q[50]34], on root prompt prints the value. Here Q is some matrix in my macro. Or I can make a histogram from a one dimensional array from my macro on root prompt.

All these arrays have been generated by running an unnamed macro, which contains them.

My question is, how can I save this as a root session, so that I can load all this at a later time and do everything I described earlier without executing the macro again. Is there a way.

I am asking this because my macro takes a very long time to execute.


with no answers, I believe this is not possible.


This is currently not directly possible (as doing it ‘right’ means either saving the (almost) all the memory allocated by the process due to all the potential (hidden) relations between C++ objects.

However if your were to gather all the calculation in a small set of class and generate the dictionary for those classes, you could simply store those in a ROOT file are reload them at the later date.


PS. Also running your macro might be sped up a lot if you were to upgraded to a named macro and compile via ACLiC.