Save Eve Display

Hello,

Say I have some nice 3D Eve display, how then do I save it as a png? from a script automatically? or from a gui?

Thanks,
Whit

Hi,

There is a menu in gl viewer where you can save the image as png. The menu is auto-hiding by default so you need hover over the bluish bar on the top. You can disable menu hiding via entry in File menu or via rootrc setting Eve.Viewer.HideMenus.

If you have a pointer to TGLViewer (I can help you get it from Eve if you know the name of the view) you can also call glviewer->SavePicture("pic.png"); // or glviewer->SavePictureScale("picx2.png", 2.0);

Cheers,
Matevz

I do

      gEve->GetDefaultGLViewer()->SavePicture(Form("plots/%d/event_%d.png",fgRunNumber,fgEventNumber));

Then I rotate the 3D display and click the button which executes the code above which produces the following :

root [1] Warning in <TEveSceneList::TEveSceneList::ProcessSceneChanges>: Expect one physical, cnt=2. Warning in <TEveSceneList::TEveSceneList::ProcessSceneChanges>: Expect one physical, cnt=2. Warning in <TEveSceneList::TEveSceneList::ProcessSceneChanges>: Expect one physical, cnt=2. Warning in <TEveSceneList::TEveSceneList::ProcessSceneChanges>: Expect one physical, cnt=2. Error in <TGLSAViewer::TGLViewer::SavePictureUsingFBO>: TGLFBO::Init Constructed TGLFBO is not complete, unexpected error.

Even through the menu I get the same error.

What am I missing here?

Thanks!!

Never mind about that.

I was going over ssh and I just saw the last comment at
root.cern.ch/root/html/TGLViewer … ePicture@1

It works great now!

Thanks for the help!