I need to know the difference between the below two ways of compiling macros with root. becasue sometimes it works with both ways and sometimes i got no output with the first way.
root -l Data_Histograms.C
root [ ].L Data_Histograms.C+
root [ ]Data_Histograms m
root [ ]m.Loop()
in (1) you are letting ROOT “interpret” (more precisely just in time compile) your code and invoke the function called
Data_Histograms inside your macro.
In (2) you are telling ROOT to:
- create dictionaries for all classes inside the code
- compile macro and dictionaries as a library using the compiler used to build root
- load the library
- instantiate an object m of type
- invoke the method
Loop of object
Thanks. Do you have any idea how to write the below lines in bash script to work with LSF batch on lxplus? because root -b -q Data_Histograms.C+ didnt work and when i wrote the below lines as they are , syntax errors appears.
root -b -q myMacro.C+
root -b -q myMacro.C
will work only if you have a function in your code which is called
myMacro. ROOT looks for it and runs it. This rule is valid independently of the usage of a batch system.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.