Executing Macros or Functions

Albert Cheung

Easy ways:

1
$ root MacroName.C
1
root [0] .x MacroName.C

(sometimes .so is also available. See here .)

Or you can load macro first and use function in it:

1
2
root [0] .L MacroName.C
root [1] MacroName()

() is used for passing parameters. Special example:

1
$ root 'MacroName("Some String", 12)'

note ' ' here.

  • Title: Executing Macros or Functions
  • Author: Albert Cheung
  • Created at : 2024-10-19 16:57:24
  • Updated at : 2024-10-19 17:05:48
  • Link: https://www.albertc9.github.io/2024/10/19/excuting-macros-or-functions/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Executing Macros or Functions