Re: pyROOT - geometry again

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Thu, 27 Mar 2008 17:01:59 +0100


Michal,

Michal Dwuznik wrote:
> Rene wrote:
>

>> Note that with C++ you can do directly
>>
>>
>>  TGeoManager::Import("http://zeus32.cyf-kr.edu.pl/~mdwuznik/SCTandPIX_L123.root")
>>    gGeoManager->GetTopVolume()->Draw("ogl")
>>
>>  ie
>>    -no need to create a TGeoManager. This is done automatically by the
>>      static function TGeoManager::Import
>>    -you can access directly the original file via http as shown above.
>>  No need
>>    to make a local copy.
>>     
>

> Thanks for those remarks.
> For:
> gSystem->Load("libGeom")
> gGeoManager->Import(...)
> yields a null pointer
> that's why I left the empty TGeoManager call for both examples.
> Sorry, I can't make out the perfect way myself...
>
>

As I said, gGeoManager is created by the static function TGeoManager::Import, so you do not need a TGeoManager object to call it.
>>  In case of pyroot, you can do the same. However after top.Draw you must exit
>>  python to get the mouse control in the GL viewer.
>>
>>
>>     

> Well, just a few days ago I remember getting the _interactive_ viewer
> from inside
> an interactive python shell (no matter if python -i or ipython). I was
> hit by "display-list registration failed only recently, but, I must
> admit I do not know what change triggered that...
> Can I ask what do you mean by "exiting python"? If I really Ctrl-D the
> python shell I kill all the windows created "from inside" this python
> session, including the 3D viewer created.
>

I was assuming that you were executing your python commands following a   TPython::Prompt();

Rene Brun
> Regards
> Michal

>
>
Received on Thu Mar 27 2008 - 16:59:13 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 27 2008 - 23:50:02 CET