Hi Dean,
just call gSystem->cd("src") before calling MakeClass:
> #include "TChain.h" > int main (int argc, char* argv[]) > { > TChain chain("MyTree"); > chain.Add("filename.root"); gSystem->cd("src"); > chain.MakeClass("Variables"); gSystem->cd("..");
Cheers, Axel.
Dean Andrew Hidas wrote:
> Hello Rooters,
>
> I'm using MakeClass to create a class "Variables" which works great, but I'd like to create this class (.C and .h files) in not the current directory, but a relative directory such as "src" so I would have ./src/Variables.h (and .C). Is there a way to tell root to use a different working directory (real directory, not in the ntuple)? I've tried using MakeClass("src/Variables") but this creates a class called "src/Variables", though it is in the correct directory it is not so desirable...
>
> using root v 4.00/03 and gcc v 3.3.1
>
> The code I'm using can be as simple as:
>
> #include "TChain.h"
> int main (int argc, char* argv[])
> {
> TChain chain("MyTree");
> chain.Add("filename.root");
> chain.MakeClass("Variables");
> return 0;
> }
>
>
> Thanks much,
>
> -Dean
>
>
Received on Wed Feb 16 2005 - 21:07:04 MET
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET