Hello,
I have written many little plotting scripts which I call from the command line
root [0] .x plot.C
which simply loads up the ntuples, declares a histograms, and creates a ps file. But there are large chunks that I cut-and-paste for every plotting script. I’d like to convert the chunk into something like
string convert_mode_to_string(Int_t mode){
switch(mode){
case 0: return "thismode" ; break ;
default: return "thatmode" ; break ;
}
}
and call convert_mode_to_string() from my script which I call from root. I am not quite sure how this works with the macro interface. I would be grateful if someone can point to an example where such things are done.
thanks,
Tae Min Hong