How to write a shell script to run a root macro created by MakeClass()?

___Dear colleagues,

I worte my root macro by using MakeClass(), and there are many small script for many purpose.

Now I hope to write a shell script and run of script in the root macro files. How should I do ?

Usually, in root command line, I do this by few following lines:

  1. open root : root
  2. load my own root script : .L MyOwnClass.C
  3. define the class : MyOwnClass a
  4. run one script in it : a.Loop()

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Create a shell script which contains something like this:


# source /full_path_to/bin/ # if needed
root -b -l -x <<EOF
.L MyOwnClass.C
MyOwnClass a;

Thank you for your reply.
That is exactly what I need.

But after testing, It seems does not work.

“does not work” means what?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.