Hi Stelios
For a ROOT file you can try to open it:
TFile f("macro.root");
and then test if it actually exists with
if( f.IsOpen() ) { .... }
Hope this helps
John
>
>
>
>On Fri, 11 Jul 2003, Stilianos Kesisoglou wrote:
>
>
>
>>Hi,
>>
>> Does anyone knows how to search for a file in the current working directory from a ROOT macro?
>>
>> Let's say my macro is named "macro.C" and when I run it on the prompt:
>>
>> prompt> root -l macro.C
>>
>> I want to be able to detect if a certain file let's say "macro.root" exists on the current working directory.
>>
>> How can I do that?
>>
>> Thanks!
>>
>>Stelios.
>>
>>
>>
>
>
>
>
--
ganil logo <http://www.ganil.fr>
John D. Frankland <mailto:frankland@ganil.fr>
Beam Coordinator
GANIL
B.P. 55027
14076 CAEN Cedex 05
*tel:* +33 (0)231454628
*fax:* +33 (0)231454665
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET