Re: how to store and execute later a series of cint commands

From: Valery Fine (fine@mail.cern.ch)
Date: Thu Aug 07 1997 - 18:20:29 MEST


On  7 Aug 97 at 16:31, Elemer Nagy wrote:


> 
> 
>      In PAW one has the possibility to write several PAW commands in
> a mfn.kumac file and later execute this macro inside PAW by typeing
> 
>      exec mfn
> 
>      Does exist a similar facility in ROOT, and if yes, please tell
> me the generic name of the file to be created and the command inside
> ROOT to be executed.
> 
>      Ex.: I open a file and plot a histogram:
> 
> TFile f("htest.root");
> f.ls();
> h2434.Draw();
>  etc...
> 
> Next time I wouldn't like to type all these but execute a file
> which contains these commands. How to do this?
> 

  Hello, 

  1. First, try to launch ROOT and just type "arrow UP" key just to 
     invoke a command from ALL previous sessions one by one.

  2. Then one may apply "Emacs style" command, namely type Ctrl-R and 
     then type the first letter of the command from the history you 
     want to perform.

   3. Apparenly the all things above mean ROOT does create a history 
      file. Look for ".root_hist" in your home directory and enjoy 
      yourself.

   4. Now one may copy that file with another save name, 
      edit/customize it and execute via either .x ROOT command ot via 
      gROOT->Macro("name_of_macro_file") ROOT method.

  Hope this helps,
    With my best regards,
                           Valery
=================================================================
Dr. Valery Fine                  Telex : 911621 dubna su
    -----------
LCTA/Joint Inst.for NuclearRes   Phone : +7 09621 6 40 80
141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
Russia                           mailto:fine@main1.jinr.dubna.su                              

Dr. Valeri Faine
    ------------                 Phone: +41 22 767 6468
CERN                             FAX  : +41 22 767 7910
CH-1211 Geneva, 23               mailto:fine@mail.cern.ch 
Switzerland                      http://nicewww.cern.ch/~fine
                                 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET