How to get running script argv?

For example,

void test(Int_t Input)
{
   Printf("%s(%d)",gInterpreter->GetCurrentMarcoName(), Input);
}

Is there any command to get “Input” in root like gInterpreter->GetCurrentMarcoName()

I do not understand your question.

Rene

What I mean is how to get each argument of currect macro.

[quote=“gjzeus”]For example,

void test(Int_t Input)
{
   Printf("%s(%d)",gInterpreter->GetCurrentMarcoName(), Input);
}

Is there any command to get “Input” in root like gInterpreter->GetCurrentMarcoName()[/quote]

Hi,

I don’t remember that we offer a getter for the currently executed function… If you would know that you could search for that in CINT’s list of functions (e.g. via ROOT) and get its parameter list…

What do you need it for?

Cheers, Axel.

Just want to save to txt as a log info without hardcoded.

This could be of some use:

cplager@tableau> cat bla.C
void bla()
{
   cout << __FILE__ << " " << __LINE__ << endl;
}
cplager@tableau> root -l -q bla.C
root [0] 
Processing bla.C...
/home/cplager/./bla.C 3
cplager@tableau>