Hi,
a variable is not an alias.
doing in bash
# A="xclock"
# echo $A
will not work either.
Probably not the best way, but
root[] # gSystem->SetEnv("A","xclock")
root[] # gSystem->Exec("`echo $A`")
will work.
Georg
>
> but the folllowing doesn't "work":
>
> root [1] gSystem->Setenv("amiGetDatasetEVNTInfo","'python /afs/cern.ch/atlas/software/releases/16.6.2/AtlasCore/16.6.2/Database/Bookkeeping/AMIClients/pyAMI/python/amiGetDatasetEVNTInfo.py'")
> root [2] gSystem->Exec("amiGetDatasetEVNTInfo")
> sh: amiGetDatasetEVNTInfo: command not found
>
> while in unix :
> alias amiGetDatasetEVNTInfo='python /afs/cern.ch/atlas/software/releases/16.6.2/AtlasCore/16.6.2/Database/Bookkeeping/AMIClients/pyAMI/python/amiGetDatasetEVNTInfo.py
> amiGetDatasetENVInfo
> "works"
>
> would you have a hint ?
>
> ===============
>
> Dario Berzano a écrit :
>>> Hello,
>>>
>>> in root, there are the methods TSystem::Exec() and TSystem::GetFromPipe which have the same behaviour for the following issue :
>>>
>>> if one does in unix :
>>> a=3
>>> echo $a
>>> it works
>>>
>>> but in root :
>>> if ones does :
>>> gSystem->Exec("b=3);
>>> gSystem->Exec("echo $b")
>>> it will "forget" the b
>>>
>>> only this works :
>>> gSystem->Exec("c=3;echo $c")
>>>
>>> ==>
>>> is there a way to have the memory of the variables for several gSystem->Exec() commands ?
>>> (in order to do some instructions ones, and some others inside a loop)
>>>
>>> (i tried also with export, but it doesn't help)
>>>
>>> thanks
>>>
This archive was generated by hypermail 2.2.0 : Wed Mar 09 2011 - 17:50:01 CET