I am running ROOT 5.34/36 Windows10
Is there way to exit a Root session but save all commands executed to what was called a KUMAC file in PAW but now they are Root commands instead?
What I want here is to edit this KUMAC file after my Root sessions, so I can save the trials and delete the errors and then next time I enter Root, I could just run the cleaned up KUMAC file and pick up right where I left off last time, esp if I have to do numerous tedious custodial commands to set directories in certain ways etc
Plus, I can be strategic about it and just create complex Kumac files for different projects writing to different directories, setting up all the needed objects which will be different for different projects, clearing memory before and after etc
I used to use KUMAC files this way in PAW and would like to use whatever the equivalent ROOT file happens to be now
The KUIP/PAW macros (.kumac files) equivalent in ROOT are C++ macros/scripts. Usually they have the extension .C . All what you ask here can be done. See @Wile_E_Coyote and @brettviren answers.
Thank you. I do understand how C++ scripts can be made and used in Root yes. However, my question is if I execute a number of commands in a Root session, and lets say I do that for a few hours and so there are numerus such C++ commands in the session. Now can I simply upon exit somehow write all of the commands which were executed into some txt file which after exiting I can edit, and then re-edit it and work it into a C++ file to save on disc such that next session all I must do is execute this script and all the variables will be created automatically.
The suggestions/answers so far are just that yes *.C files can be made and executed, yes sure. But can the list of commands executed in a session be written out upon exit? Then I can find that file afterwards and edit it to remove the errors and keep only the successful commands etc
this file does not exist anywhere I have found.
IN order to nail this down,
- how do I set the Windows directory from which all files are drawn?
- how do I set the Windows directory to which all files will be written?
if I can control the destination directory (on Windows10) into which Root is writing files, then maybe that is where this ~./.root_hist will be found
thank you suggesting this
Any help on relevant subsections? page numbers etc?
The file containingn the history of commands is defined in
$ROOTSYS/etc/system.rootrc by the entry:
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.