Hi Christian, The ".L file.C" notation is convenient at the command line but cannot be used directly in a C++ macro. In a macro, always use gROOT->ProcessLine("some command"); eg gROOT->ProcessLine(".L TClass1.h"); gROOT->ProcessLine(".L blabla.C; MyFunction(3.14);"); As you see, the string given to ProcessLine may be one or more CINT commands. Note that the above will also work when called from a compiled C++ function. Rene Brun Christian Hansen wrote: > > Dear all rooters, > > I have defined a couple of classes in some files and every time I open > root I have to load all these files one by one, like > > root [0] .L TClass1.h > root [1] .L TClass1.cpp > root [2] .L TClass2.h > root [3] .L TClass2.cpp > root [4] .L TClass3.h > root [5] .L TClass3.cpp > > and so on... > > I wonder if there is any other way to do this. I've tried to define a > macro, MyLoad.cpp (see attachement), so that I could manage it all in one > go, like > > root [0] .x MyLoad.cpp > > But I then get some strange error messages. I would be very glad if anyone > could find what's wrong with this macro, or tell me how to do this in > another (correct) way. > > Thanks, > / Christian Hansen > > =============================================== > 591-R-023 Office: +41-(0)22-7677386 > CERN Lab : +41-(0)22-7673979 > CH-1211 Geneve 23 > Switzerland > ----------------------------------------------- > Mobile : +33-(0)6-15817201 > Home Page : http://welcome.to/Christian_Hansen > > -------------------------------------------------------------------------------- > > Name: MyLoad.cpp > MyLoad.cpp Type: Plain Text (TEXT/PLAIN) > Encoding: BASE64
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:58 MET